I am developing an application on Am3352 based board which needs to communicate to an android device (tablet/phone) over USB. I need to exchange some custom data bytes (which will be understood only by my application and an application running in the android device) over USB.
When I connect the android tablet to my AM3352 board, I am getting prints on the console with VID PID etc which indicates that the device is getting detected. What I need to know is, how to make the kernel assign a dev file for the device. For example, when we connect a usb to serial converter we will get /dev/ttyUSBx file so that we can open it and write/read to this file. Similarly is it possible for direct usb connection?
I was expecting a /dev/ttyACMx device file to be generated so that I can write and read to it. The CDC/Modem support is enabled in kernel. (I am not sure if this will help but just tried it anyway).
Kindly let me know how I can get a device file name associated with the device so that I can read and write to it.
First you have to know what USB kind of your android device is. How this device is recognized on your linux box? As a mass-storage or CDC or anything else? Then you can try to communicate with it. And you don't have to create any device in /dev/ to communicate with android via USB. Take a look at libusb library.
In your example - /dev/ttyUSBx is created because kernel knows that this is communication device class. So you also need to know what kind of USB device is this android device.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With