Android Question USB Device Recognition

ChocoScope

Member
Licensed User
Longtime User
I have been trying to add a usb IO device to my program without success and using various routines provided by you including "USBdetails" and USBsamples 1.b4a. The programs always report "No USB Devices found" , no matter what combination of routine and connection I use.

I have found an app in the google app store called "USB Host Controller v0.44" and it reports all the devices I plug in to either of the Host Port (mini usb connector via conversion cable) or the OTG labelled (full size usb connector) on my tablet. This is whether the PC USB Debugging is connected or not.

The reports I get back from the app are as follows:-

Host Port (1-1)
FTDI US232B 6001:0403
FTDI UM245R 6001:0403
PROLIFIC USB 2303:067b

OTG Port (3-1)
FTDI US232B 6001:0403
FTDI UM245R 6001:0403
PROLIFIC USB 2303:067b

I have "UsbSerial v2.3" installed in the standard library together with the latest Device_Filter in program xml library and have modified the Manifest as instructed. Can you please give me some guidance as to what I am doing wrong? I am having some difficulty discerning between the USBserial routines and the USBmanager routines and how they interract. I have ordered the book and hope that it puts them more in perspective.
 

ChocoScope

Member
Licensed User
Longtime User
Thanks Erel. I have a better understanding of the processes now. I solved my problem by completely removing the app using ExitApplication. This causes FirstTime to become true on _Create and my usb and astream re-initialise. I realise that all my data will also be destroyed during this process and I will add a save when I need it.

New problem ... I am using a timer to trigger my program to send a byte out on the usb port. This byte causes a datastream to be sent back from a microprocessor which is then displayed on the screen. It works fine when I do it manually via a Button_Click but if I replace the button click with a Timer1_Tick, It sends out the single byte (once a second) but Astreams_NewData does not fire up until I disable the timer externally using another Button_Click. It seems that the Timer1_Tick subroutine is blocking the Astreams_NewData. Please can you help?
 
Upvote 0
Top