I'm attempting to configure a pocketbeagle running bone-debian9.9. Kernel version is 4.14.108-ti-r113. The board has a Micro USB port with the following functions: rndis, acm, ecm, and mass_storage. the USB interface (usb0) lets me obtain a shell two ways - by ssh and through the COM port.
I would like the COM port on usb0 to not be a shell. I want to be able to plug in the device, open the COM port, and receive a stream of bytes. I can send/receive arbitrary bytes via the UART peripherals by wiring one to a usb-to-serial converter and opening a COM port. Is it possible to get this from the USB COM port as well. How can I accomplish this?
What I've tried/considered so far:
1) I tried getting rid of the log in terminal, thinking that serial-getty@service was the problem. After masking the service I could not open a COM port.
2) I'm not sure that I need to write another driver - I would think the acm driver would be enough.
3) Modifying /etc/systemd/logind.conf so that NAutoVT=0 and ReserveVT=1 didn't help either.
Another thing that may be related: I needed uart0, which was also was a shell. I got rid of the shell by masking [email protected] and [email protected]. My application configured a terminal on /dev/ttyO0 using termios.h and then it worked. I'm wondering if masking serial-getty@service was the correct thing to do and I should register some kind of callback to configure a terminal when the USB device is connected. If that's the case then I could use the approach outlined here: https://serverfault.com/questions/766506/automount-usb-drives-with-systemd
thank you in advance