Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Access to serial port from web browser

I'm trying to access serial port through web browser. The reason is for downloading firmware to a device that is connected to the same machine that is running the browser (via USB to rs-232).

I'v searched around and have seen that this is doable via Silverlight, but this is Windows only centric since it requires COM support, while my main operating system is Linux, then Windows and then Mac.

I know it's easy to develop JavaFX / QT / Mono / AIR cross platform applications, but those require installing a huge runtime binaries and only then run the application. I'm trying to keep it really simple, plug your device, visit a web site and it will auto install your application.

Do you guys think it's possible?

Thanks.

like image 287
Rabeeh Khoury Avatar asked Oct 25 '22 16:10

Rabeeh Khoury


1 Answers

https://code.google.com/p/java-simple-serial-connector/

Since Java is cross platform, this would be the only thing required to get the serial support you need in browser.

(not exactly a security nightmare as @"awm" proposed) You could implement a websocket on the localhost, expose a port that is rarely used and call that websocket to open the serial port and feed data to the device to upgrade the firmware.

like image 68
infrared Avatar answered Oct 29 '22 18:10

infrared