4 ms·
Another similarly stupid thing is when you're trying to connect USB Serial device to your Android Smartphone. Well, you connect it, it appears to work. Then yo
by vbezhenar 1y ago
Another similarly stupid thing is when you're trying to connect USB Serial device to your Android Smartphone.
Well, you connect it, it appears to work. Then you want to write an application to use that USB serial interface. But apparently you can't. You start to dig in and it appears that you just don't have permissions to access `/dev/ttyACM0` (or whatever the name of the serial device is, sorry, I might have misspell it).
Serial support is built into the kernel, but inaccessible to user program, not without rooting anyway.
Dig further and it appears that Android has userspace USB access. Similar to libusb, or may be it's built on top of libusb?. Matters not.
So you can open "raw" USB device from your Android program. But you can't open serial USB device. Serial USB is just a protocol on top of USB. Actually it's a set of half-proprietary protocols. FTDI, some other protocols. I didn't dig into it much. But there are half-backed libraries for Android, which actually implement those protocols in the userspace, so in the end you can access USB serial device... At least some of them.
Also I think that you can open raw USB device from your Android Chrome browser, using WebUSB! But not WebSerial. Probably for the same reason.
What surprised me in the end: why even enable USB serial support in the kernel? For debugging?
- karn97 1y ago[dead]