0

Select one of MCP2221 connected
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Select one of MCP2221 connected

by dnwklin on Sun Sep 19, 2021 1:15 am

I have the adafruit MCP2221 board that I want to use with CircuitPython. However, other devices I used with my computer also has MCP2221 in them. How do I tell CircuitPython I want to talk to Adafruit's MCP2221 not my other device?

I ask this because my python script now getting errors:
self._hid.open(MCP2221.VID, MCP2221.PID)
File "hid.pyx", line 68, in hid.device.open
OSError: open failed


Additional Information
>>> hid.enumerate()
[{'path': b'0001:0013:02', 'vendor_id': 1240, 'product_id': 221, 'serial_number': '', 'release_number': 256, 'manufacturer_string': 'Microchip Technology Inc.', 'product_string': 'MCP2221 USB-I2C/UART Combo', 'usage_page': 0, 'usage': 0, 'interface_number': 2}, {'path': b'0001:0003:03', 'vendor_id': 3468, 'product_id': 314, 'serial_number': '', 'release_number': 256, 'manufacturer_string': 'C-Media Electronics Inc. ', 'product_string': 'USB PnP Sound Device', 'usage_page': 0, 'usage': 0, 'interface_number': 3}, {'path': b'0001:0002:02', 'vendor_id': 1240, 'product_id': 221, 'serial_number': '', 'release_number': 256, 'manufacturer_string': 'Microchip Technology Inc.', 'product_string': 'MCP2221 USB-I2C/UART Combo', 'usage_page': 0, 'usage': 0, 'interface_number': 2}]

dnwklin
 
Posts: 8
Joined: Tue Apr 13, 2021 12:14 am

Re: Select one of MCP2221 connected

by mikeysklar on Sun Sep 19, 2021 6:13 pm

So you have two MCP2221's connected to a PC (lin/win/mac) using the USB-C connector and CircuitPython cannot differentiate?

I looked through the Adafruit_Blinka github repo and did not see a way to specificy more than one board.

I think this would be a good time for you to open a request for supporting multiple MCP2221's. Seems reasonable.

https://github.com/adafruit/Adafruit_Blinka/issues

mikeysklar
 
Posts: 5855
Joined: Mon Aug 01, 2016 8:10 pm

Re: Select one of MCP2221 connected

by dnwklin on Tue Sep 21, 2021 5:06 pm

mikeysklar wrote:So you have two MCP2221's connected to a PC (lin/win/mac) using the USB-C connector and CircuitPython cannot differentiate?

I looked through the Adafruit_Blinka github repo and did not see a way to specificy more than one board.

I think this would be a good time for you to open a request for supporting multiple MCP2221's. Seems reasonable.

https://github.com/adafruit/Adafruit_Blinka/issues



Yes. CircuitPython doesn't seem to be able to differentiate them. Since I am using it on a Proxmox VM host. One of the MCP2221 is assigned to VM client. It would be natural that CircuitPython can't open it thus giving me the error. I can't say for sure this is what happens. But I'm guessing this is what happened based on anecdotal evidence.

dnwklin
 
Posts: 8
Joined: Tue Apr 13, 2021 12:14 am

Please be positive and constructive with your questions and comments.