Page 1 of 1

[SOLVED] USB connection mistery

Posted: Thu May 23, 2019 6:31 pm
by kamikaze
Updated to latest MP version (1.10+) in git master... flashed my PyBoard v1.1 and then my working-for-a-long-time-not-modified code started to misbehave... when connecting to laptop (same as always) it works for ~15 sec, then red led flashes and my SPI display which shows different information - hangs. When connecting via screen command and running the same function - it works forever. Going to investigate, so the question is: what is the most correct way to downgrade firmware? I mean is it enough to git checkout v1.9.4 ?

Code is HERE

Re: v1.10 mistery

Posted: Thu May 23, 2019 10:14 pm
by jimmo
Maybe easier (and will eliminate any potential issues in your build env) to download the stock 1.9.4 firmware from micropython.org/download and flash it via DFU the ordinary way. Maybe you could compare the nightly build with your own build at master? (Unless you have local mods / frozen modules)

But yeah, should be fine to checkout at 1.9.4.

Really interesting that having the console connected makes a difference...

Re: v1.10 mistery

Posted: Thu May 23, 2019 10:24 pm
by jimmo
Btw, when it crashes, are you subsequently able to open up the console and get to the REPL? Or has it fully locked up? Or is it in a state where you can ctrl-c back to the repl?

And just to confirm that in both scenarios, it's the same power supply (usb from your laptop), the only difference is whether you have screen open?

Re: v1.10 mistery

Posted: Fri May 24, 2019 9:35 pm
by kamikaze
yes, everything is the same. the different is the way I launch the same function. after crash I can open the screen, but I need to Ctrl+C first to get a prompt. Will try official 1.9.4 now

Re: v1.10 mistery

Posted: Fri May 24, 2019 9:44 pm
by kamikaze
Ok. it seems that something is wrong... 1.9.4 and 1.9.3 crash the same... the only guess here is - Linux is being continuously updated so who knows... what have been changed there. will try to boot my older version from external HDD

Re: v1.10 mistery

Posted: Fri May 24, 2019 11:14 pm
by dhylands
Do you have ModemManager installed on your machine? If it is installed then it will try to connect to /dev/ttyACM0 when you plug in your pyboard and it will send AT commands to your board.

Depending on the code you've got running, this can cause issues.

I normally unintall modemmanager:

Code: Select all

sudo apt remove modemmanager

Re: USB connection mistery

Posted: Mon May 27, 2019 9:09 pm
by kamikaze
Connected to Windows machine - PyBoard works ok. Thanks for the tip, will check w/o modemmanager soon if it is installed.

Re: [SOLVED] USB connection mistery

Posted: Thu May 30, 2019 9:15 pm
by kamikaze
Yes, that was a modemmanager... Thanks