Android Question USBSerial with multiple unknown VID / PID

woodpecker

Member
Licensed User
Longtime User
Hi all,

I have a small app using UsbSerial 2.4 that talks to a handful of simialr but different devices that conform to the CDC device class, at first I was getting an "Error Opening USB Port 1" so I added:-

B4X:
usb1.SetCustomDevice(usb1.DRIVER_SILABS, 0x****, 0x**)

Where * indicates the VID and PID numbers, it all then worked fine.

Now I need the app to work with a few other similar devices (slight model variants) but I don't know the VID / PID of them, is there a way to cover any VID / PID combo or do I need to try and extract them using device info like this? I could try and grab it using a regex, any better solution?

B4X:
usb1.DeviceInfo(1)

Thanks
 
Top