EEVblog Electronics Community Forum
Electronics => Projects, Designs, and Technical Stuff => Topic started by: Ribster on May 09, 2017, 09:06:54 am
-
Hey,
Has anyone had experience with chrome extensions for hardware ?
My goal is to communicate via an RS485 transceiver of the sort, to make an interface application.
I can do this in Qt, where i have a cross platform application, but it still needs to be compiled for all the different versions.
I'm wondering if a web interface is the better choice, but the ability to couple to hardware needs to be present.
I think you can achieve this with JAVA, although i don't have experience in that. Only C, C++, PHP, etc... Web, embedded and pc applications.
Is going with the chrome plugin route a viable thing, or should i seek for something else to get my communication working with the web interface?
Any input is valuable, thanks in advance!
-
If you want your application to work 2 years from now you should definitely not use Chrome plugins. The environment is very volatile.
Instead, use Qt. You could use a web-ish GUI implementation in Qt, or QML is you have the license. It'll compile for all platforms if you keep inside Qt api's.
And there is the inevitable problem of the Chrome sandbox you'd have to break-out, and will be limited by.
Don't use Java for end-user applications. Java's lifetime has expired. Support is crumbling away.
-
Hey Jeroen, Thanks for the reply!
I was looking at the cleanflight chrome app as a starting point..
https://github.com/cleanflight/cleanflight-configurator (https://github.com/cleanflight/cleanflight-configurator)
Can you clarify what you mean with web-ish GUI implementation in Qt ?
Host a webserver with the Qt application or what ?
-
Qt can use a webview that you can use for gui stuff. You could make a webserver if you're desperate enough. But you have a remote webpage that needs communication with local hardware?
-
I would also avoid browser plugins and extensions as that will lock your users in to a specific browser vendor.
Here is what I have done before. Write a little HTTP server with NodeJS (or Python if you prefer and plenty of tutorials on the web to do both) that listens on port 8080 or something. Then create your GUI as an interactive web app taking advantage of all the HTML5 goodness on offer. Then add to that an AJAX / SOAP interface to poll for updates that are buffered by the Web Server. No need for compiling things or Qt.
The advantage of this are...
a) The server will run on ANY OS that supports either NodeJS or Python
b) NodeJS and Python will give you direct access to system resources (perhaps through third-party addons)
c) is not running in a sandbox making point b) easier.
d) With a little port forwarding magic on your router you could access and control your hardware from anyplace on the planet.
e) will work in any browser even mobile ones.
f) this list is endless.
-
Thanks for the input guys.
@Jeroen3:
But that Qt program still needs to be compiled for different platforms. So making it web based surely solves some issues, but it's still convoluted i think.
I want to make a management software that communicates with a serial device. Simple in the beginning, but adding logging functionality in the future would be nice.
@Pixulator:
That's actually not a bad idea. It can be easy enough if i link it all together. What i'm missing a little bit is the ease of transfer... I should just be able to send someone a ZIP file, let them extract it, execute and ready to go, cross platform. This with minimal overhead of maintaining different versions for different platforms. The low level interfacing is just serial, so not that special...
Thanks both for the input, i'll investigate it further before starting a proof of concept.
-
Python is actually a good idea. That would be truly cross platform, and it does not look like you need a very high performance.
-
https://github.com/cleanflight/cleanflight-configurator (https://github.com/cleanflight/cleanflight-configurator)
I have been thinking about the same idea, use a browser to talk serial for runtime configuring stuff, looks like that cleanflight configurator would be a good place to fork from.