WICG / serial

Serial ports API for the platform.
https://wicg.github.io/serial/
Other
255 stars 46 forks source link

More info when providing access to serial ports through web API? #203

Closed gbmhunter closed 1 month ago

gbmhunter commented 1 month ago

Hi @reillyeon first of thanks for all the work you've put into getting the Web serial API out there! I love it and think it's great for the embedded/hardware/IoT/Arduino (whatever you want to call it) industry.

I am the author of https://ninjaterm.mbedded.ninja/, a free and open source terminal that uses the web serial API to provide firmware developers with a tool for debugging firmware and viewing data.

One thing I feel is holding the web serial API back (and one of the reasons I keep considering whether to switch back to using Electron) is the lack of info provided to the web app about the serial port. All I can typically retrieve are two obscure IDs. Running a serial app natively, I can usually get vendor name, description, port address, (COM on windows, /dev/ttyXXX or ACM0 e.t.c. on Linux) e.t.c.. These are vital for identifying serial ports easily when you have quite a few connected (and switching between them).

I realize the lack of information was likely done for security reasons, fingerprinting e.t.c. but surely if the user has manually clicked on "allow access" that should be enough to warrant sharing that info with the web page?

reillyeon commented 1 month ago

I think this is a duplicate of #175 which proposes sharing the name that was presented to the user with the site after permission has been granted.

gbmhunter commented 1 month ago

Oh sorry yes it is :-) Great to see it's already been discussed.