0

CircuitPython with FT232H on Windows10 not playing nicely wi
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

CircuitPython with FT232H on Windows10 not playing nicely wi

by TI994A on Fri Jul 03, 2020 4:27 pm

Hello,

We got CircuitPython working alright on Windows10 here following these directions.
https://learn.adafruit.com/circuitpytho ... h?view=all

However, as soon as we connect another FTDI device (unrelated) to Adafruit FT232H to a USB port, both devices no longer function.
When calling import usb, usb.util, and then printing out dev=usb.core.find(idVendor=0x0403, idProduct=0x6014) that all works fine. BUT -- When calling import board, we get "Operation not supported or unimplemented on this platform". Our other device (with an FTDI chip, with different idProduct numbers) also stops working.

As shown in Zadig, we are using the libusbK (v3.0.7.0) driver on Windows10. The other USB device is using the FTDIBUS(v2.12.28.0) driver.

Any thoughts on how I can get the FT232H to play nicely with other USB Devices?

Thanks,
Brian

TI994A
 
Posts: 12
Joined: Mon Jun 29, 2020 2:59 pm

Re: CircuitPython with FT232H on Windows10 not playing nicel

by adafruit_support_carter on Fri Jul 03, 2020 5:16 pm

Just to check - does the FT232H work OK by itself?

adafruit_support_carter
 
Posts: 18222
Joined: Tue Nov 29, 2016 2:45 pm

Re: CircuitPython with FT232H on Windows10 not playing nicel

by TI994A on Fri Jul 03, 2020 5:23 pm

Hello,
Thanks for the response. Yes, by itself, it works great, but as soon as I attach another FTDI device, it stops working.
Note the ProductIDs are different. Curious if it was tested in a multi-device configuration?
Thanks,
Brian

TI994A
 
Posts: 12
Joined: Mon Jun 29, 2020 2:59 pm

Re: CircuitPython with FT232H on Windows10 not playing nicel

by adafruit_support_carter on Fri Jul 03, 2020 5:29 pm

Other people have managed to get mutli-device to work. We even got a PR to change the search URL being used to help with that:
https://github.com/adafruit/Adafruit_Blinka/pull/235
But maybe that is not working for your case.

If you plug in both devices and run these commands:
https://learn.adafruit.com/circuitpytho ... -3041935-2
what happens?

adafruit_support_carter
 
Posts: 18222
Joined: Tue Nov 29, 2016 2:45 pm

Re: CircuitPython with FT232H on Windows10 not playing nicel

by TI994A on Sat Jul 04, 2020 10:36 am

Thanks again for the help!

When I only have the Adafruit FT232H Breakout Board and run these commands, it looks OK:
>>> from pyftdi.ftdi import Ftdi
>>> Ftdi().open_from_url('ftdi:///?')
Available interfaces:
ftdi://ftdi:232h:1/1 (������)

But, when I ALSO connect my other device with FTDI chips on it, things go badly and I get that "Operation not supported or unimplemented on this platform"
>>> from pyftdi.ftdi import Ftdi
>>> Ftdi().open_from_url('ftdi:///?')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\ProductionAdmin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyftdi\ftdi.py", line 516, in open_from_url
devdesc, interface = self.get_identifiers(url)
... [abbreviated] ...
File "C:\Users\ProductionAdmin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyusb-1.0.2-py3.8.egg\usb\core.py", line 107, in managed_open
File "C:\Users\ProductionAdmin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyusb-1.0.2-py3.8.egg\usb\backend\libusb1.py", line 786, in open_device
File "C:\Users\ProductionAdmin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyusb-1.0.2-py3.8.egg\usb\backend\libusb1.py", line 635, in __init__
File "C:\Users\ProductionAdmin\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyusb-1.0.2-py3.8.egg\usb\backend\libusb1.py", line 585, in _check
NotImplementedError: Operation not supported or unimplemented on this platform
>>> quit()

Any suggestions?

Thanks so much,
Brian

TI994A
 
Posts: 12
Joined: Mon Jun 29, 2020 2:59 pm

Re: CircuitPython with FT232H on Windows10 not playing nicel

by adafruit_support_carter on Sat Jul 04, 2020 11:25 am

What exactly is the other FTDI device?

What happens if you run the above command with *only* the other FTDI device?

adafruit_support_carter
 
Posts: 18222
Joined: Tue Nov 29, 2016 2:45 pm

Re: CircuitPython with FT232H on Windows10 not playing nicel

by TI994A on Sat Jul 04, 2020 11:33 am

Hi,

The other device is a programmer for flashing a Bluetooth chip. It has on it a FT232R device, which Zadig shows uses the "FTDIBUS" driver. Currently, I have the Adafruit FT232H device using the libusbK driver.

If I run the Python FTDI.show_devices or FTDI.open_from_url('FTDI:///?') with only my other USB Device and the Adafruit FT232H disconnected, I get the same error: "Operation not supported or unimplemented on this platform"

Thanks,
Brian

TI994A
 
Posts: 12
Joined: Mon Jun 29, 2020 2:59 pm

Re: CircuitPython with FT232H on Windows10 not playing nicel

by TI994A on Sat Jul 04, 2020 3:03 pm

I think pyftdi is trying to access the other FTDI chips connected to the Windows PC, but they are using a VCP driver from FTDI. This might be giving pyftdi difficulties?

I tried settings the PRODUCT_IDS to limit only to the FT232H, thinking this may limit why pyftdi is trying to scan that might be butting up in conflict with the VCP drivers.

This appears to be working. I haven't fully tested it, but might I be on the right track?

>>> Ftdi.PRODUCT_IDS = {1027:{'232h':24596,'ft232h':24596}}
>>> Ftdi.PRODUCT_IDS
{1027: {'232h': 24596, 'ft232h': 24596}}
>>> Ftdi.show_devices()
Available interfaces:
ftdi://ftdi:232h:1/1 (������)

TI994A
 
Posts: 12
Joined: Mon Jun 29, 2020 2:59 pm

Re: CircuitPython with FT232H on Windows10 not playing nicel

by adafruit_support_carter on Sat Jul 04, 2020 3:28 pm

Hmmm. Good info and testing. That could be it. As another idea or approach, could you use zadig to change the driver for both devices to libusbk?

adafruit_support_carter
 
Posts: 18222
Joined: Tue Nov 29, 2016 2:45 pm

Re: CircuitPython with FT232H on Windows10 not playing nicel

by TI994A on Sat Jul 04, 2020 3:31 pm

Yup... I tried that. And yes, it works for the FT232H. But then it breaks the SW for the other programming device that needs the VCP drivers.

Thanks!
Brian

TI994A
 
Posts: 12
Joined: Mon Jun 29, 2020 2:59 pm

Re: CircuitPython with FT232H on Windows10 not playing nicel

by TI994A on Sun Jul 05, 2020 5:46 am

Yup, it works! Just wanted to follow up and document this for anyone else. It looks like specifying the IDs prevented it from trying to discover the other devices tied directly to the FTDI VCP drivers. This was really messing things up. It's now fixed. Thanks for the help over the holiday. Cheers!

>>> from pyftdi.ftdi import Ftdi
>>> Ftdi.PRODUCT_IDS = {1027:{'232h':24596,'ft232h':24596}}
>>> Ftdi.PRODUCT_IDS
{1027: {'232h': 24596, 'ft232h': 24596}}
>>> Ftdi.show_devices()
Available interfaces:
ftdi://ftdi:232h:1/1 (??????)

TI994A
 
Posts: 12
Joined: Mon Jun 29, 2020 2:59 pm

Re: CircuitPython with FT232H on Windows10 not playing nicel

by adafruit_support_carter on Sun Jul 05, 2020 4:28 pm

Thanks again for this info. I'll add a reference to this thread to the guide. This looks like it will be useful for anyone trying to run multiple FTDI devices with mixed libusbk/VCP drivers. That's definitely a configuration we did *not* test. So good to know what is needed to get it working.

adafruit_support_carter
 
Posts: 18222
Joined: Tue Nov 29, 2016 2:45 pm

Please be positive and constructive with your questions and comments.