Due to high demand expect some shipping delays at this time, orders may not ship for 3-4 business days. On MLK Day no orders will be shipped.
0

Pimoroni Pico RGB Keypad Base disappearing
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Pimoroni Pico RGB Keypad Base disappearing

by savt22 on Mon Nov 29, 2021 1:10 pm

Hi,

I have been working on creating a pico-powered MIDI chord player using the Pimoroni RGB Keypad Base. I've got the code working, and when I initially set it up it does exactly what I want it to.

However, if I restart my Mac, or unmount/remount the Pico, the Pico powers on and the keypad lights up as expected, but my mac no longer recognises it. It doesn't show up as a CIRCUITPY removable drive anymore, it's no longer available as a MIDI device, and the MIDI signals aren't received.

The process I've been doing is:

BOOTSEL -> flash Pico with the CircuitPython 7.0.0 build for the Pico.
Pico reboots and CIRCUITPY.
I drag and drop Keybow 2040, dotstar, and Adafruit_midi lib files into CIRCUITPY lib.
I sudo nano into code.py, and paste in my code (https://github.com/savt22/2040_midi_cho ... in/code.py). cntrl + x, save code.py changes.

At this point, everything works fine. My mac sees it as a midi device, it lights up, and I can use it. It works perfectly.

However...

If I restart my mac, or eject and restart the pico, the pico comes on and the base lights up with the right keypad lighting and the lights respond to key presses as it's coded to do, suggesting the code is running, but my mac (M1 mini, Mac OS Monterey) can no longer see it. It's not mounted on the desktop, isn't in system information, and none of the midi keys are detected.

Am I missing an important step here? It seems like there's a step I need to take or a piece of code I'm missing to get it seen by whatever device I'm plugging it in to.

savt22
 
Posts: 4
Joined: Mon Nov 29, 2021 1:02 pm

Re: Pimoroni Pico RGB Keypad Base disappearing

by tannewt on Mon Nov 29, 2021 6:45 pm

This sounds like a USB bug in CircuitPython. Please try 7.1.0-beta.0. It has a newer version of TinyUSB that may have fixed the issue. (Also try the absolute latest if the beta doesn't work.)

tannewt
 
Posts: 2732
Joined: Thu Oct 06, 2016 8:48 pm

Re: Pimoroni Pico RGB Keypad Base disappearing

by savt22 on Tue Nov 30, 2021 6:12 am

Thank you for the quick reply and suggestions.

I tried both 7.1 and 6.2, but both had the same issue.

However... I got the opportunity to try it on a Windows computer this morning, and it works as excepted. It seems like there might be something stopping it from connecting to my mac properly... I'm using an M1 Mac mini with Monterey. I'll have a look around to see if anyone has had similar issues. It's weird that going through the initial setup and flashing the pico lets it read it as CIRCUITPY usb device without issue, but not after a hard reset.

The mac definitely notices it, as it pauses audio for a second when I plug it in. On Windows it comes up as D:, but nothing on mac. No indication that anything at all is plugged in.

I tried adding in a boot.py file that disables USB HID, enables USB MIDI, and enables USB storage. I also added a time delay to boot. Still working on Windows, but not Mac.

savt22
 
Posts: 4
Joined: Mon Nov 29, 2021 1:02 pm

Re: Pimoroni Pico RGB Keypad Base disappearing

by savt22 on Fri Dec 03, 2021 5:19 pm

Hi - on the console, I get 6 errors when plugging in the USB.

130345.648474 IOUSBHostDevice@02241000: IOUSBHostDevice::start_block_invoke: device descriptor fragment is invalid
130345.651657 IOUSBHostFamily::validateEndpointMaxPacketSize: USB 2.0 5.[5-8].3: endpoint 0x00 invalid wMaxPacketSize 0x0000
130345.651866 AppleUSB20HubPort@02241000: AppleUSBHostPort::enumerateDeviceComplete_block_invoke: enumeration failed
130345.651890 AppleUSB20HubPort@02241000: AppleUSBHostPort::terminateDevice: destroying 0x0000/0000/0000 (IOUSBHostDevice): enumeration failure
130345.651963 AppleUSB20HubPort@02241000: AppleUSBHostPort::disconnect: persistent enumeration failures
130345.651990 IOUSBHostDevice@02241000: IOUSBHostDevice::start_block_invoke: device will not be registered for matching

Any ideas of things I could try would be greatly appreciated!

savt22
 
Posts: 4
Joined: Mon Nov 29, 2021 1:02 pm

Re: Pimoroni Pico RGB Keypad Base disappearing

by tannewt on Fri Dec 03, 2021 9:55 pm

Please file an issue here: https://github.com/adafruit/circuitpyth ... report.yml

I think we have other folks in our community with M1 macs that can try it.

tannewt
 
Posts: 2732
Joined: Thu Oct 06, 2016 8:48 pm

Re: Pimoroni Pico RGB Keypad Base disappearing

by savt22 on Sat Dec 04, 2021 6:59 am

Great, I'll post there now. Thank you!

EDIT - I have since tried mounting it on an older Intel iMac running El Capitan, and it presents the same issue. I've added this info into the bug I submitted.

savt22
 
Posts: 4
Joined: Mon Nov 29, 2021 1:02 pm

Please be positive and constructive with your questions and comments.