Is there a way to use a usb serial library and list the USB devices attached to the system?
I tried 2 different libraries, and guessed if it was device 0, or 1, or 2, etc. but no devices are ever found. I am using an android single board computer type setup.
I can plug a mouse into the USB port, and it works fine, so i know the USB works.
It is possible that your Android device recognizes HID devices and doesn't recognize other devices. If the device is rooted then it might be possible to fix it.
It also has on-board TTL serial port headers, but I dont know how to use those in android.
Also the device has no input devices. No touchscreen or anything, its meant to run an LED sign. So its not like I can go download an app from the play store and interact with it, it isnt possible.
Appears as if there is a USB Hub internal to the single board computer.
can the usb serial library work through a hub? can that be fixed? Turns out one of the on board TTL ports is actually the DMESG interface to the kernel.
So when I plug in the FTDI cable, I actually get this:
B4X:
[ 132.487124] usb 1-1.3: new full speed USB device number 5 using s5p-ohci
[ 132.604617] ftdi_sio 1-1.3:1.0: FTDI USB Serial Device converter detected
[ 132.605619] usb 1-1.3: Detected FT232RL
[ 132.605656] usb 1-1.3: Number of endpoints 2
[ 132.605695] usb 1-1.3: Endpoint 1 MaxPacketSize 64
[ 132.605737] usb 1-1.3: Endpoint 2 MaxPacketSize 64
[ 132.606711] usb 1-1.3: Setting MaxPacketSize 64
[ 132.615393] usb 1-1.3: FTDI USB Serial Device converter now attached to ttyUSB4
[ 179.776135] RTL871X: rtw_issue_addbareq_cmd, p=0
[ 179.776226] RTL871X: issue_action_BA, category=3, action=0, status=0
[ 179.776288] RTL871X: BA_starting_seqctrl = 268 for TID=0
[ 179.812170] RTL871X: OnAction_back
[ 179.812215] RTL871X: OnAction_back, action=1
[ 179.812252] RTL871X: agg_enable for TID=0
But if I try to open ttyUSB4 as a serial port in the App, I just simply get permission denied.
Edit: If I insert a USB Hub in between Then it works! Go figure...