I guess my point is that it isn't always possible to determine what device is connected. You need to know the correct baud rate, hardware-flow-control, serial comms to even talk to the device. Some devices are write-only. Some devices are read-only. Some devices aren't even serial devices at all. They might be an IR-LED that you're just bit-banging the RTS line to generate a signal.
Here's an example of a write-only device that only uses the DTR signal: http://www.lirc.org/transmitters.html Lots of people use devices like this for controller home theatre systems. Are you going to say you can't use it just because you can't identify the device in a programmatic fashion? Even in the USB serial case, you might just detect that a USB-to-serial dongle is attached and not what device is plugged into the dongle. What about TCPIP-rs232 servers? Nobody seems to care about permissions at the device level for those. Why should you care about permissions just because its connected directly? Dave Hylands ----- Original Message ----- > From: "Andrew Sutherland" <asutherl...@asutherland.org> > To: dev-platform@lists.mozilla.org > Sent: Wednesday, July 16, 2014 11:25:27 AM > Subject: Re: Intent to implement: webserial api > On 07/16/2014 02:03 PM, Dave Hylands wrote: > > But phones, and devices like the Raspberry Pi, and BeagleBone Black, also > > have "native" serial ports (i.e. non-USB, non-Bluetooth), and the people > > that use these types of devices are the very one which are extremely > > frustrated by the lack of support for access to serial. > AIUI the Raspberry Pi/BeagleBone Black/Arduino have GPIO pins that may > be hooked up to shields or custom things done by the user and not > generic RS232 ports. It seems like in the mapping/definition process, > usable identifiers/metadata could be provided that could in turn be > surfaced into Firefox/Firefox OS so that authorization could be done in > terms of specific things. If there is some emerging serial meta-data > protocol so that Firefox OS can send some bytes over the serial port and > have the serial port report back what's connected, that's even better. > For example: "Do you want to allow http://superblinkylights.example.org > access to you NeoPixel Shield?" > I do agree that it would make sense to lump this under the auspices of > WebSerial. I think my main point is just that the UX and permissions > needs to be about the devices/endpoints. This also seems desirable > since otherwise you potentially have to have every app/webpage being > smart enough not to use the serial ports that are not hooked up to what > it actually wants to talk to. > One possibility for this would be for the WebSerial API to have a > super-dangerous API surface (that requires app store/configuration pain) > and the friendly/safe API. A limited utility app with the > super-dangerous permission helps the user define what the random > non-self-describing serial ports on their system are. Then all the > random "show a pretty LED light show on your arduino" app can still just > ask for the "NeoPixel" serial protocol/etc. > Andrew > _______________________________________________ > dev-platform mailing list > dev-platform@lists.mozilla.org > https://lists.mozilla.org/listinfo/dev-platform _______________________________________________ dev-platform mailing list dev-platform@lists.mozilla.org https://lists.mozilla.org/listinfo/dev-platform