-
Notifications
You must be signed in to change notification settings - Fork 46
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Need to identify previously used port #128
Comments
I wrote up some notes about this on #19 and the corresponding implementation issue is Chromium issue 1074383. The plan is to add a |
It's great to hear there is already a plan to implement a unique identifier with WebSerial. I can't see anything in the specification, is this still pending? There are a few real-world use cases for this we have today:
A strong reason for the unique identifier to be It would be good to see some consistency between the Please see WICG/webhid#34 (comment) for an identical issue raised for |
Hi @reillyeon , do you have any updates about adding an |
@csarnataro, ports have have been connected before are already returned by the The details on how Chromium tries to remember devices that it has seen before so that when the user makes the decision to grant a site access to a device that decision is remembered for later so that they don't need to make that decision over and over again. Unfortunately there aren't always enough identifiable properties of the device for the browser to confidently remember it. For example, a USB device which doesn't have a serial number is indistinguishable from any other device of the same model. The exact heuristics vary a bit between platforms. On Windows ports are almost always remembered because COM port numbers are stable identifiers managed by the operating system and based on complex heuristics like the location of the device on the USB bus. On Linux a serial number is required because the first USB serial port is always |
Any chance to solve the issue in the near future? |
I can't guarantee a timeline but we've been talking about the class of issues around this as part of our project planning process. |
Thanks everyone for bringing this up and @reillyeon and team for working on a solution. I like your port+site_specific getInfo().id idea; that would work just fine for us. We too need this functionality since our use cases include the possibility for more than one simultaneously-connected microcontroller (each of which our users may be developing separate code for) and also common cases where students need to connect/disconnect multiple times during their development phase. Without this unique identifier to an already_granted port, I believe there is no way for us to provide the same level of nice port logistics handling that we implemented in native apps long ago. |
Any updates or a timeline for getting this addressed? |
I know that it looks like this issue hasn't been making much progress but I assure you our team is aware of the need here and it is on our roadmap. |
Hi @reillyeon, I am checking in to see if there has been any progress on this issue and if you could provide a general timeline for addressing it. Thanks! |
If there's one thing I've learned as a software engineer it's that I am terrible at estimating timelines. This is on our project roadmap. It's not the next thing we're working on but it's near the top. |
I'm developing an open-source serial port application called NinjaTerm (https://ninjaterm.mbedded.ninja/) and I also would love this feature! I recently migrated NinjaTerm from an Electron-based App to a PWA and being able to "exactly" identify previously allowed ports for automatic opening the next time the app loads would greatly improve the user experience. |
I'm surprised that any reliable port identifiers still do not exist in the standard. |
Any chance this feature can be added before the final deadline of Chrome App support or ChromeOS, Jan 2025? @reillyeon - Is it currently considered impossible to definitively identify every USB device across all platforms unless it has a serial number (along with other identifying info) when it is being connected/disconnected throughout a session? If that's the case, how about the next best thing...
That should solve the problem as much as is possible and gives the app awareness of sticky and non-sticky identifiers that may lead to some kind of graceful mitigation for certain use cases. |
I am developing a web app to interact with a USB composite device which exposes two CDC interfaces. I need to be able to positively identify each of these ports, ideally using the iInterface string which is unique for each. Failing that we must rely on the user to select the correct port for each function which is a guessing game at best, and once the page is reloaded we have no way to even restore the selections that the user previously made. |
Hello, I have this kind of use case:
A web app accesses at least two functionally different devices on serial ports. For reference, it is a serial interface to transceiver control (CAT) and Arduino keyer - but this is not essential. The serial ports are actually USB devices of various manufacturers - e.g. CP2102, CH340, PL2303 etc. Raspberry Pi PICO (and, in principle any embedded device implementing serial port CDC) is also not excluded, although not in use, yet.
The web application maintains some kind of persistence to serve as a kind of ham radio logger and radio/keyer control panel. Therefore it is supposed to restore its previous state after reload - retrieve the log and configuration from LocalStorage or IndexedDB (also not essential) - and (automatically) reconnect previously connected devices.
Problem:
Task to be solved:
For those with extreme security concerns, I would like to repeat and point out that we talk about devices previously authorized by the user to be connected and to serve the given purpose as application peripheral.
Early implementation would be highly appreciated, of course :-)
Thank you
Jindra
OK4RM
The text was updated successfully, but these errors were encountered: