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.
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.
Related
I'm developping a node.js electron app and I need to decide if our Hardware will feature BLE or standard Bluetooth.
I found a couple of APIs (bleno & noble) for this purpose. However for Windows OS both of these require me to use an additional bluetooth usb adapter (used WinUSB & Zadig).
To put it bluntly, is there any way to communicate with a BLE device on a Windows OS using node.js without using an external dongle?
It seems like standard bluetooth is just way less of a hassle. Thanks!
Found a package which solves this issue using a UWP-to-noble bridge:
https://www.npmjs.com/package/noble-winrt
It works just like noble but supports BLE connectivity on Windows without the need for a dongle and complicated driver set-ups!
I was able to easily integrate it on Electron as well, problem solved! :)
The official Bluetooth API on Windows is built for Windows Runtime, https://learn.microsoft.com/en-us/microsoft-edge/windows-runtime. It supports Javascript but I'm not sure if you need a specific js environment. If you don't get that working, you should write or use a native binding for node.js.
I have a WPF desktop application that would make a good candidate as a Universal Windows App. The application has a must-have dependence on USB or Bluetooth devices that act as a Serial Port.
In all my reading I've yet to discover whether there is any access to a SerialPort API in a UWA.
I suspect the answer is 'No support'. If so, does anyone know of a USB or Bluetooth GPS that supports whatever APIs the UWA has for that sort of thing. I have to be able to read things like ground speed, elevation, rate of climb, etc.
If the answer is 'Supported', could you point me to some documentation.
For the "Bluetooth devices that act as a Serial Port", I assume you mean the RFCOMM. They are both supported on Windows Runtime since Windows 8.1 and you can also use them in the Universal Windows Application.
namespace: Windows.Devices.Usb and Windows.Devices.Bluetooth.Rfcomm.
About the Bluetooth GPS, I'm not sure if it uses RFCOMM or not (it depends on the devices), and it is also possible to use the GATT.
Code Sample: Custom USB device access sample
I'm trying to build a simple web app that reads the clients' serial port that is connected to a barcode scanner. I have done this using ActiveX but it only works on IE browsers, i have heard that I can now do this using node.js and serial-node. Can someone tell me if this is even possible using these two technologies? Also if anyone can direct me to a working tutorial on how to do this. Thanks!
You can't read the serial port of the web app's client's computer using serial-node, no. Node.js and serial-node run server side, they do not have direct access to the web clients' hardware.
In a local area network is lamp-server, on which the site is located. On the client computers (winXP, Ubuntu) network running opera / firefox (mode kioskmode).
Opera-kioskmode local_site.ru.dev
Is it possible to doing what any script / code local_site.ru.dev - access usb devices (flash drive, SD card and other drives) connected to client computers? Accordingly, pressing or not pressing any buttons on it local_site.ru.dev
The web camera to connect without problems.
Using any web programming technology, you can make it happen.
Need versatility regardless of platform Win | Lin
I would be very grateful for the detailed response.
You're requirement is not so clear, but in order to access a physical drives on client machine, You may need technologies like; Silverlight (Moonlight - on Linux), or Adobe Air, etc.
Or, You also can use ActiveX which is a traditional way do so what such a thing you need.
However, if your requirement to develop an application where to deploy-once and use from many clients, then why don't you try Out-Of-Browser Silverlight + Auto Update.
Here is the link - http://timheuer.com/blog/archive/2009/03/18/silverlight-3-offline-update-framework.aspx
Cheers!
I need some way to communicate between J2SE app and j2me midlet running in emulator in netbeans. How can I achieve this?
Well, technically, Netbeans is a J2SE application so you are already doing this everytime you launch the J2ME emulator.
I expect that when Netbeans launches the emulator, it does it in a way that sends the emulator standard output and standard error back to Netbeans. Presumably using the emulator executable command line parameters. That is one-way communication though.
The debugger inside Netbeans uses a standard protocol to retrieve information and manipulate the emulator:
http://java.sun.com/j2se/1.4.2/docs/guide/jpda/jpda.html
Of course, using this still restricts what you can do.
Since the emulator is meant to represent a phone, the only pure-Java to pure-Java communication channel is networking. That means opening a tcp, udp or http connection between the two environments. Of course, getting this to work once you put your J2Me application on an actual phone will require quite a bit of setup on the J2SE side of things.