meshtastic / js

JS/TS library for interfacing with Meshtastic devices
https://meshtastic.org
GNU General Public License v3.0
74 stars 36 forks source link

Implement Web Serial functions #10

Closed thepoweroftwo closed 2 years ago

thepoweroftwo commented 3 years ago

Make it possible to connect to a meshtastic device via the Web Serial API. It is currently in origin trial in chrome.

https://www.chromestatus.com/feature/6577673212002304

Example: https://codelabs.developers.google.com/codelabs/web-serial/?hl=iw

Maybe: add a feature to the meshtastic device code so that "autodiscover" works; meaning when you connect the device via usb a notification from the browser pops up that tells the user what to do. (Link to a meshtastic web app under app.meshtastic.org)

sachaw commented 3 years ago

Think it would also be good to implement this with a switch in the constructor to specify the serial implementation. i.e. using WebSerial for browsers or https://serialport.io/ for node.

sachaw commented 3 years ago

Origin trials should finish early March, I'm gonna have a look into it around then, as it will be accessible to everyone at that time.

sachaw commented 3 years ago

This is now implemented, But lacks node serial support, which will be added later