Black Lives Matter - Action and Equality.
0

FT232H "...invalid configuration
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

FT232H "...invalid configuration

by ZAPLING on Sat May 02, 2020 2:54 am

I followed the driver installation under circuit python, I can get the board to enumerate with
Code: Select all | TOGGLE FULL SIZE
import usb
import usb.util
dev = usb.core.find(idVendor=0x0403, idProduct=0x6014)
print(dev)


However when I try and use
Code: Select all | TOGGLE FULL SIZE
import board

I get the following error
Code: Select all | TOGGLE FULL SIZE
>>> import board
Traceback (most recent call last):
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyftdi\ftdi.py", line 1771, in write_data
    length = self._write(data[offset:offset+write_size])
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyftdi\ftdi.py", line 2079, in _write
    return self._usb_dev.write(self._in_ep, data, self._usb_write_timeout)
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyusb-1.0.2-py3.8.egg\usb\core.py", line 942, in write
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyusb-1.0.2-py3.8.egg\usb\core.py", line 89, in wrapper
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyusb-1.0.2-py3.8.egg\usb\core.py", line 203, in setup_request
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyusb-1.0.2-py3.8.egg\usb\core.py", line 89, in wrapper
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyusb-1.0.2-py3.8.egg\usb\core.py", line 154, in managed_claim_interface
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyusb-1.0.2-py3.8.egg\usb\backend\libusb0.py", line 508, in claim_interface
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyusb-1.0.2-py3.8.egg\usb\backend\libusb0.py", line 418, in _check
usb.core.USBError: [Errno None] b'libusb0-dll:err [claim_interface] could not claim interface 0, invalid configuration 0\n'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\board.py", line 129, in <module>
    from adafruit_blinka.board.ftdi_ft232h import *
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\adafruit_blinka\board\ftdi_ft232h.py", line 2, in <module>
    from adafruit_blinka.microcontroller.ft232h import pin
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\adafruit_blinka\microcontroller\ft232h\pin.py", line 71, in <module>
    D4 = Pin(4)
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\adafruit_blinka\microcontroller\ft232h\pin.py", line 24, in __init__
    i2c.configure("ftdi://ftdi:ft232h/1")
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyftdi\i2c.py", line 517, in configure
    frequency = self._ftdi.open_mpsse_from_url(url, **kwargs)
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyftdi\ftdi.py", line 643, in open_mpsse_from_url
    return self.open_mpsse_from_device(device, interface,
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyftdi\ftdi.py", line 764, in open_mpsse_from_device
    frequency = self._set_frequency(frequency)
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyftdi\ftdi.py", line 2296, in _set_frequency
    self.write_data(cmd)
  File "C:\Users\Sean\AppData\Local\Programs\Python\Python38-32\lib\site-packages\pyftdi\ftdi.py", line 1778, in write_data
    raise FtdiError('UsbError: %s' % str(ex))
pyftdi.ftdi.FtdiError: UsbError: [Errno None] b'libusb0-dll:err [claim_interface] could not claim interface 0, invalid configuration 0\n'



Thanks

ZAPLING
 
Posts: 6
Joined: Sat May 02, 2020 2:49 am

Re: FT232H "...invalid configuration

by siddacious on Thu May 07, 2020 5:12 pm

I assume you set the BLINKA_FT232H environment variable as suggested here?
https://learn.adafruit.com/circuitpython-on-any-computer-with-ft232h/windows#set-environment-variable-3-30
I'm not on windows so I can only be so helpful but I'll get this to someone else who can help.

Hold tight!

siddacious
 
Posts: 246
Joined: Fri Apr 21, 2017 3:09 pm

Re: FT232H "...invalid configuration

by ZAPLING on Thu May 07, 2020 5:43 pm

Yes,
env var set in cmd window that was used to run python

ZAPLING
 
Posts: 6
Joined: Sat May 02, 2020 2:49 am

Re: FT232H "...invalid configuration

by adafruit_support_carter on Thu May 07, 2020 5:44 pm

Is it possible you have some other driver installed that is claiming the FT232H?
Code: Select all | TOGGLE FULL SIZE
    usb.core.USBError: [Errno None] b'libusb0-dll:err [claim_interface] could not claim interface 0, invalid configuration 0\n'

After plugging in the FT232H, what does it look like in Device Manager?

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

Re: FT232H "...invalid configuration

by ZAPLING on Fri May 08, 2020 7:45 pm

Screen Shot 2020-05-08 at 4.39.35 PM.png
Screen Shot 2020-05-08 at 4.39.35 PM.png (127.18 KiB) Viewed 24 times


Just like this

ZAPLING
 
Posts: 6
Joined: Sat May 02, 2020 2:49 am

Re: FT232H "...invalid configuration

by adafruit_support_carter on Mon May 11, 2020 1:52 pm

That looks OK.

What do you get when you run this?
https://learn.adafruit.com/circuitpytho ... rectly-6-2

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

Re: FT232H "...invalid configuration

by ZAPLING on Mon May 11, 2020 3:45 pm

This is what I get
Code: Select all | TOGGLE FULL SIZE
C:\Users\Sean>python
Python 3.8.2 (tags/v3.8.2:7b3ab59, Feb 25 2020, 22:45:29) [MSC v.1916 32 bit (Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> os.environ["BLINKA_FT232H"]
'1'
>>> from pyftdi.ftdi import Ftdi
>>> Ftdi().open_from_url('ftdi:///?')
Available interfaces:
  ftdi://ftdi:232h:1/1   (������)

Then the same error when
Code: Select all | TOGGLE FULL SIZE
import board

is run

ZAPLING
 
Posts: 6
Joined: Sat May 02, 2020 2:49 am

Re: FT232H "...invalid configuration

by adafruit_support_carter on Mon May 11, 2020 7:07 pm

What version of Windows are you running?

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

Re: FT232H "...invalid configuration

by ZAPLING on Mon May 11, 2020 7:48 pm

Win 10, latest patch.
I should add that it is a VM on Mac OSX Mavericks
VM ware player .

ZAPLING
 
Posts: 6
Joined: Sat May 02, 2020 2:49 am

Re: FT232H "...invalid configuration

by adafruit_support_carter on Mon May 11, 2020 8:01 pm

Can you test with a non-VM instance? The VM layer could be what is causing the interference with low level access to the hardware. It's not a setup we have tested ourselves, so we don't know that will even work.

You can use the FT232H directly on Mac:
https://learn.adafruit.com/circuitpytho ... 2h/mac-osx

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

Re: FT232H "...invalid configuration

by ZAPLING on Mon May 18, 2020 12:27 pm

IT works fine on the MAC - natively.
The challenge is that I have some applications that run in Windows...

ZAPLING
 
Posts: 6
Joined: Sat May 02, 2020 2:49 am

Re: FT232H "...invalid configuration

by adafruit_support_carter on Mon May 18, 2020 1:37 pm

I think you are running into issues with the hardware interface specifics that are occurring when running via a virtual machine.

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

Please be positive and constructive with your questions and comments.