🎁📬❄️📦 Holiday Shipping Deadlines are approaching! International customers and domestic ground - get your orders in 12/9/2020 📦❄️📬🎁
0

Matrix Portal fails to create CIRCUITPY removable drive
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

Matrix Portal fails to create CIRCUITPY removable drive

by georgel1 on Sun Nov 08, 2020 4:24 pm

I successfully got the Moon Clock python program working with the Matrix Portal from ADABOX 016. I'm using the Mu editor and it connected to my Mac with no problems. A week later I wanted to make some customizations. When I plug the Matrix Portal into my Mac I see two different behaviors. If the display is vertical, the splash pages come up and the clock starts up normally, but no CIRCUITPY folder is created, so I can't edit the program or connect with Mu. If the display is horizontal, the Python splash comes up, but the werewolf splash is not displayed correctly (it seems like it is corrupted somehow?), and the clock does not start - the display goes black. The neopixel status LED is dark on the back, only two green status LEDs are on. And CIRCUITPY folder is not created.

I am running 6.0.0 MicroPython and the latest 6.0.1 is out, so I downloaded it, but when I double click the reset button, no BOOT folder is created.

Is there some way I can restore the Matrix Portal to its shipped state so i can recover from this? Any other troubleshooting ideas are welcome.
George

georgel1
 
Posts: 16
Joined: Sat Dec 08, 2012 10:43 am

Re: Matrix Portal fails to create CIRCUITPY removable drive

by adafruit_support_carter on Mon Nov 09, 2020 3:09 pm

You can double press reset to get into bootloader mode and use this UF2 to get back to shipped state:
https://learn.adafruit.com/adabox016/shipping-demo

However, that is an Arduino example. So you won't get the CIRCUITPY folder to show up with that.

But also, sounds like something else is happening:
I double click the reset button, no BOOT folder is created.

What color is the NeoPixel after you double click reset and try to get into bootloader mode?

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

Re: Matrix Portal fails to create CIRCUITPY removable drive

by georgel1 on Mon Nov 09, 2020 5:14 pm

Thanks, yes, that's right, something else is going on. In my testing this morning, the problem is intermittent. But when it does occur, a double reset results in the neopixel red, but not bright red, kind of dim. The two green led status lights are both on next to it. It is steady, no flashing or slow pulsing.

During testing today I successfully got the unit to create a CIRCUITPY folder on the mac, and when I double reset the board, it created a MATRIXBOOT folder, as expected. On a hunch, I unplugged the matrixportal from the display (but left power connected) and reset and double reset. Both worked as expected. I could not get it to fail without the display plugged in. When in CIRCUITPY mode, the neopixel goes from green to red to blue as part of the program startup. In MATRIXBOOT mode, the neopixel is solid and bright green.

I plugged it back in and it worked at first if the matrixportal board was held so the display was vertical, but failed again when it was horizontal (uses the accelerometer to determine how to display). When it fails in CIRCUITPY mode (single reset - fails to create CIRCUITPY) the neopixel goes dark. In MATRIXBOO

georgel1
 
Posts: 16
Joined: Sat Dec 08, 2012 10:43 am

Re: Matrix Portal fails to create CIRCUITPY removable drive

by georgel1 on Mon Nov 09, 2020 5:16 pm

(accidental post). In MATRIXBOOT mode (double reset - no MATRIXBOOT created) the neopixel is red, but not bright.

Let me know if you can make anything out of this...
George

georgel1
 
Posts: 16
Joined: Sat Dec 08, 2012 10:43 am

Re: Matrix Portal fails to create CIRCUITPY removable drive

by adafruit_support_carter on Mon Nov 09, 2020 6:29 pm

The orientation dependent behavior is odd. The accelo gets read for any orientation:
https://github.com/adafruit/Adafruit_Le ... de.py#L180

Do you know how to connect to the REPL / Serial Console on the Matrix Portal?

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

Re: Matrix Portal fails to create CIRCUITPY removable drive

by georgel1 on Tue Nov 10, 2020 1:08 am

Yes, when the CIRCUITPY folder is successfully created, I can get into REPL

georgel1
 
Posts: 16
Joined: Sat Dec 08, 2012 10:43 am

Re: Matrix Portal fails to create CIRCUITPY removable drive

by adafruit_support_carter on Tue Nov 10, 2020 12:11 pm

OK, try this. You can press <CTRL><C> to stop the currently running program and drop into the REPL prompt >>>.

Do that with the orientation that works. Then rotate to the orientation that does not work. At the REPL prompt, press <CTRL><D> to do a software reset. The program will run again. Watch the output for any error messages. Paste here what you get.

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

Re: Matrix Portal fails to create CIRCUITPY removable drive

by georgel1 on Tue Nov 10, 2020 11:49 pm

This seemed like a good idea to me, too. Here is the result:

TAIL OF CORRECTLY RUNNING APPLICATION:
1605035820 22.8% full
Rises: 2:22
Traceback (most recent call last):
File "code.py", line 427, in <module>
KeyboardInterrupt:

CONTROL-C - ENTER REPL
Code done running. Waiting for reload.
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.soft reboot

CONTROL-D - RELOAD APPLICATION
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
NO OUTPUT AFTER THIS. SEEMS THAT ONCE THE MATRIXPORTAL FAILS TO CONNECT TO CIRCUITPY, MU CAN NO LONGER GET ANY DATA ON SERIAL CLOSING THE SERIAL WINDOW AND REOPENING FAILS WITH THE ERROR THAT THERE IS NO DEVICE ATTACHED.



WHILE IN REPL, THERE IS A SEQUENCE OF NEOPIXEL FLASHES THAT REPEAT THE SAME SEQUENCE OVER AND OVER AGAIN:
Green 1s
Yellow 1s

Blue 250ms 4x
Red 250ms 1x
Yellow 250ms 2x
Turquoise 250ms 7x
Red 250ms 1x
Red 250ms 1x


WHEN THE MATRIXPORTAL SUCCESSFULLY CONNECTS TO CIRCUITPY, THIS IS THE SEQUENCE RECORDED IN THE SERIAL WINDOW:
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

Press any key to enter the REPL. Use CTRL-D to reload.soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:

CONTROL-D
Connecting to AP XXXXXX
Could not connect to internet ('Failed to connect to ssid', b'XXXXXX')
Retrying in 3 seconds...
Connecting to AP XXXXXX
Using stored geolocation: 37.7825 -122.413
Retrieving data...Socket missing recv_into. Using more memory to be compatible
Reply is OK!
Fetching moon data via https://api.met.no/weatherapi/sunrise/2 ... set=-08:00
Retrieving data...Socket missing recv_into. Using more memory to be compatible
Reply is OK!
Fetching moon data via https://api.met.no/weatherapi/sunrise/2 ... set=-08:00
Retrieving data...Socket missing recv_into. Using more memory to be compatible
Reply is OK!

1605036385 22.8% full
Rises: 2:22

1605036390 22.8% full
Rises: 2:22

CONTROL-C
Traceback (most recent call last):
File "code.py", line 427, in <module>
KeyboardInterrupt:

Press any key to enter the REPL. Use CTRL-D to reload.soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:

CONTROL-D
Connecting to AP XXXXXX
Could not connect to internet ('Failed to connect to ssid', b'XXXXXX')
Retrying in 3 seconds...
Connecting to AP XXXXXX
Using stored geolocation: 37.7825 -122.413
Retrieving data...Socket missing recv_into. Using more memory to be compatible
Reply is OK!
Fetching moon data via https://api.met.no/weatherapi/sunrise/2 ... set=-08:00
Retrieving data...Socket missing recv_into. Using more memory to be compatible
Reply is OK!
Fetching moon data via https://api.met.no/weatherapi/sunrise/2 ... set=-08:00
Retrieving data...Socket missing recv_into. Using more memory to be compatible
Reply is OK!

1605036634 22.7% full
Rises: 2:22

1605036639 22.7% full
Rises: 2:22

CONTROL-C
Traceback (most recent call last):
File "code.py", line 427, in <module>
KeyboardInterrupt:

Press any key to enter the REPL. Use CTRL-D to reload.

Bottom line: once the MATRIXPORTAL loses connection with CIRCUITPY, no output goes to the serial window.

George
Last edited by adafruit_support_carter on Wed Nov 11, 2020 2:41 pm, edited 1 time in total.
Reason: removed SSID name

georgel1
 
Posts: 16
Joined: Sat Dec 08, 2012 10:43 am

Re: Matrix Portal fails to create CIRCUITPY removable drive

by adafruit_support_carter on Wed Nov 11, 2020 2:43 pm

I removed your SSID name from the post.

It's having trouble connecting to your wifi for some reason:
Could not connect to internet ('Failed to connect to ssid', b'XXXXXX')


Is your SSID correct?

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

Re: Matrix Portal fails to create CIRCUITPY removable drive

by georgel1 on Wed Nov 11, 2020 4:00 pm

I understand that the connection failures would lead you to ask that question, but it does eventually connect and get accurate noon data. From that I conclude that the SSID and password in my secrets.py file are correct.

georgel1
 
Posts: 16
Joined: Sat Dec 08, 2012 10:43 am

Re: Matrix Portal fails to create CIRCUITPY removable drive

by adafruit_support_carter on Wed Nov 11, 2020 4:05 pm

OK. That makes sense. The rest of it looks generally as expected.

When you get to a point where it looks like this:
Code: Select all | TOGGLE FULL SIZE
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:

You may or may not see any more output depending on what is in code.py. Any print() statements would show up. But if there are none, then the code may be happily chugging away without anything showing up.

Can you clarify what you mean here?
Bottom line: once the MATRIXPORTAL loses connection with CIRCUITPY, no output goes to the serial window.

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

Re: Matrix Portal fails to create CIRCUITPY removable drive

by georgel1 on Wed Nov 11, 2020 8:19 pm

What I meant was that it seemed to me that the lack of traffic in the serial port window was because Mu was no longer connected to CIRCUITPY because it was no longer present / created by MatrixPortal.

This seems like it is not uncovering any clues about the behavior, and I'm inclined to buy another MatrixPortal so I have a second unit to experiment with and compare. That's helped me troubleshoot odd intermittent behavior before on other hardware. Open to any other suggestions.

George

georgel1
 
Posts: 16
Joined: Sat Dec 08, 2012 10:43 am

Re: Matrix Portal fails to create CIRCUITPY removable drive

by adafruit_support_carter on Thu Nov 12, 2020 2:04 pm

The lack of traffic in the serial port could be normal. It all depends on what is currently happening. What state the board is in. What code is running. Etc.

Your output above all looks normal. It seems like everything is running OK.

Could you restate what you think the current issue is?

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

Please be positive and constructive with your questions and comments.