[SOLVED] USB connection mistery

C programming, build, interpreter/VM.
Target audience: MicroPython Developers.
Post Reply
User avatar
kamikaze
Posts: 154
Joined: Tue Aug 16, 2016 10:10 am
Location: Latvia
Contact:

[SOLVED] USB connection mistery

Post by kamikaze » Thu May 23, 2019 6:31 pm

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
Last edited by kamikaze on Thu May 30, 2019 9:14 pm, edited 2 times in total.

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: v1.10 mistery

Post by jimmo » Thu May 23, 2019 10:14 pm

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...

User avatar
jimmo
Posts: 2754
Joined: Tue Aug 08, 2017 1:57 am
Location: Sydney, Australia
Contact:

Re: v1.10 mistery

Post by jimmo » Thu May 23, 2019 10:24 pm

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?

User avatar
kamikaze
Posts: 154
Joined: Tue Aug 16, 2016 10:10 am
Location: Latvia
Contact:

Re: v1.10 mistery

Post by kamikaze » Fri May 24, 2019 9:35 pm

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

User avatar
kamikaze
Posts: 154
Joined: Tue Aug 16, 2016 10:10 am
Location: Latvia
Contact:

Re: v1.10 mistery

Post by kamikaze » Fri May 24, 2019 9:44 pm

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

User avatar
dhylands
Posts: 3821
Joined: Mon Jan 06, 2014 6:08 pm
Location: Peachland, BC, Canada
Contact:

Re: v1.10 mistery

Post by dhylands » Fri May 24, 2019 11:14 pm

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

User avatar
kamikaze
Posts: 154
Joined: Tue Aug 16, 2016 10:10 am
Location: Latvia
Contact:

Re: USB connection mistery

Post by kamikaze » Mon May 27, 2019 9:09 pm

Connected to Windows machine - PyBoard works ok. Thanks for the tip, will check w/o modemmanager soon if it is installed.

User avatar
kamikaze
Posts: 154
Joined: Tue Aug 16, 2016 10:10 am
Location: Latvia
Contact:

Re: [SOLVED] USB connection mistery

Post by kamikaze » Thu May 30, 2019 9:15 pm

Yes, that was a modemmanager... Thanks

Post Reply