W woodpecker Member Licensed User Longtime User Aug 9, 2020 #1 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: Copy 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: Copy usb1.DeviceInfo(1) Thanks
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: Copy 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: Copy usb1.DeviceInfo(1) Thanks
Erel B4X founder Staff member Licensed User Longtime User Aug 10, 2020 #2 You can use the USB library to find the connected peripherals. The UsbDevice object contains the information you need. Upvote 0
You can use the USB library to find the connected peripherals. The UsbDevice object contains the information you need.