Communication between Android phone and Linux Gadget Serial

34 views Asked by At

I have an Android phone running some custom app, trying to establish connection over serial with a custom board. The board has an ARM CPU running Yocto and is configured as an ACM CDC device using Linux Gadget Serial. The communication takes place over USB-C.

Testing everything separately works as expected. I used a custom ACM device (based on an STM32 MCU) to test the Android app and it both detects and communicates with it.

However, when I try to communicate with the Linux gadget device, it connects for a very brief moment and then drops the connection. I have tried the Android Serial Terminal too, which uses the same serial library as my code, and I get same results:

15:45:11:596 Connected to CDC device
15:45:11:932 Connection lost

Also tried setting different vendor and product id numbers on my gadget serial, but with no success.

Has anyone tried something similar?

Edit: The usb-serial-for-android mentions a workaround regarding "Probing for Unrecognized Devices". Unfortunately, even though I fiddled a lot with that, nothing really came out.

0

There are 0 answers