
once upon a time hey recently learned about cdc-acm !! it's actually not very complicated. there are so few cdc-acm libraries around (that i found) but it's not too complicated! in fact anotherterm has general usb serial support on android. one resource i found for cdc-acm was https://www.silabs.com/documents/public/application-notes/AN758.pdf . you do some usb control calls to set the line parameters, and then it's just two bulk calls, one to send and one to receive, as much data as desired. one of the quirks is that usb is datagram- or packet- based kinda so when you receive data it seems easiest to allocate a buffer such that it's the biggest send the device will give since the data doesn't get queued in a stream for the next receive call i haven't really learned about it in depth, but so many serial problems went away when i increased my receive size and caught overflow errors