Reputation: 986
I'm trying to connect to FT232R USB UART device using Windows Runtime Component for Windows Store application. Unfortunately, nothing seem to work.
My device has a vid of 0x0403 and a pid 0x6001 which seem pretty standard for this type of the device.
I tried this approach but in my case the ClassCode and SubClassCodde are both 0x00 respectively and InterfaceClassCode and InterfaceSubClassCode are both 0xFF. All this data comes from the USB view utility.
Using selector based on these class and subclass codes no device is found by DeviceInformation.FindAllAsync(selector)
. Also selector created based on vid and pid does not find any device.
Without the selector the device is found but I receive null
in UsbDevice.FromIdAsync(serviceInfo.Id)
.
I also tried the FTDI approach. I downloaded the FTDI drivers and referenced the FTDI.D2xx.WinRT.winmd
and FTDI.D2xx.WinRT.USB.winmd
. I used the approach documented in this PDF but FTDI.D2xx.WinRT.FTManager.GetDeviceList()
returns empty list.
The DeviceCapabilities are defined as they should according to documentation I found:
<Capabilities>
<m2:DeviceCapability Name="usb">
<!--FT232AM, FT232BM, FT232R and FT245R Devices-->
<m2:Device Id="vidpid:0403 6001">
<m2:Function Type="name:vendorSpecific" />
</m2:Device>
</m2:DeviceCapability>
</Capabilities>
What am I doing wrong?
Upvotes: 2
Views: 7085
Reputation: 986
Well, after long hours of fighting I found the solution. Posting it here in case anyone will need it in the future.
First of all, you should follow the official FTDI guide to install FTDI drivers from here.
You will need to remove default drivers installed by Windows for your device.
Do it this way:
It's important to check the "Delete the driver software for this device" checkbox.
Do so for Serial controller also:
Afterwards disable Windows automatic drivers installation as described here.
Then scan for hardware changes in the Device manager and you'll see the unrecognized device.
Install drivers for it manually.
Afterwards you'll see your device under Universal Serial Bus devices and not controllers.
Now your device will be fully accessible using the FTDI API.
Here is a link to API guide in case you need it. It also has an explanation on how to install correct FTDI drivers.
Upvotes: 4