2

I recently found an article on MSDN about Calling Windows Runtime APIs in dekstop apps, so I decided to give it a shot. I tried connecting to my CR95HF transceiver that's plugged into COM3 (USB) using the UsbDevice device class.

When I open up the Device Manager and check for COM3, Windows says that FTDIBUS\VID_0403+PID_6001+FTBHOWVPA\0000 is plugged in. Its parent is USB\VID_0403&PID_6001\FTBHOWVP because the port is virtualised. For both names, the vendor id is 0403 (1027 in decimal) and the product id is 6001 (24577 in decimal), so I tried follow the exact same steps as the tutorial on the UsbDevice MSDN page, but the USB device was not found.

I've made sure that Device Manager was not open when I tried to find the UsbDevice, and I also made sure nothing else was trying to talk to COM3. What could be the issue?

JansthcirlU
  • 688
  • 5
  • 21
  • The following may be helpful: https://stackoverflow.com/questions/65957066/serial-to-usb-cable-from-a-scale-to-pc-some-values-are-just-question-marks/65971845#65971845 (see "HelperSerialPort.cs" method "GetComPortInfo()") (see "HelperSerialPort.cs" method "GetComPortInfo()") – Tu deschizi eu inchid Jan 31 '22 at 16:14
  • @user9938 thanks, I'll give your approach a shot. As an aside, it might be helpful to upload that code to github for future reference. – JansthcirlU Jan 31 '22 at 16:20
  • Serial port information can also be retrieved from WMI by executing the following PowerShell commands: `Get-WmiObject -Class Win32_SerialPort`, `Get-WmiObject -Class Win32_SerialPortConfiguration`, and `Get-WmiObject -Class Win32_PnPEntity -filter "Name LIKE '%(com%)%'"` – Tu deschizi eu inchid Jan 31 '22 at 16:24
  • What driver do you have installed? Window generic or vendor driver? The window generic driver may not be getting the vendor ids. Try the vendor driver. – jdweng Jan 31 '22 at 16:35
  • @jdweng I've tried both (Windows and FTDI), and both said the drivers were up-to-date. Now I've seen some discussions online about FTDI being unreliable so I might look into that a bit more deeply. – JansthcirlU Jan 31 '22 at 16:37
  • @user9938 according to your last ps command, the device I thought was a USB device turns out to be a Win32_PnPEntity, what a headache! – JansthcirlU Jan 31 '22 at 16:38
  • Definitely use the FTDI driver. I'm very familiar with the driver. It is really using a silicon lab IC and driver (see : https://www.silabs.com/developers/usb-to-uart-bridge-vcp-drivers?force_isolation=true). Your CR95HF has the silicon IC built into the transceiver. There is a new and old version of the IC. Wondering if maybe you have the older IC. – jdweng Jan 31 '22 at 16:48
  • The only time FTDI driver is not reliable is when the hardware was built with a Chinese version of the Silicon IC. – jdweng Jan 31 '22 at 17:16
  • @jdweng what I don't get is that the FTDI USB Converter is detected, but that the device isn't recognized as a device, although it's recognized as an active COM port. How could I tell the difference between the old and new version? – JansthcirlU Feb 01 '22 at 07:57
  • Look for the silico driver documents which may help solve your issues. I think in the real part there is a difference in IDs between old and new. The Adrafruit cable has the part CP210X internal and uses same driver. The real part costs around ten dollars while the Chinese version is only a couple of dollars. The Chinese part is not made very well and people say you have to buy four or five of them before you get one that works. See : https://www.adafruit.com/product/954 – jdweng Feb 01 '22 at 09:53
  • You will see on link above a demo board labeled FTDI + Friend. Is the part powered? You may not see the ID until you power up the part. – jdweng Feb 01 '22 at 10:03

0 Answers0