Search code examples
javascriptbluetoothserial-portusbdevice

JavaScript Device Communication


I need to communicate with an already connected (paired) device attached to my computer via JavaScript.

This is a Bluetooth device however it does NOT use 'low power technology' thus is currently inaccessible via WebBluetooth.

Is there any way to communicate with my device using a different method due to the fact that it is already paired with the computer? Maybe as some sort of serial connection?

Targeting support for Google Chrome.

Node.js or anything outside the realm of HTML5/JavaScript/Chrome Specific JavaScript will not be accepted as an answer. WebBluetooth already shows an example however my device does not use Low-Power-Bluetooth..


Solution

  • You will need to use something like NodeJS. Browsers cannot access hardware attached to the computer unless the browser provides an API for it or you have an app on the host machine that the browser communicates with.

    I suggest learning NodeJS as it is a great language and considering you already know JS the syntax will be familiar.