Opening USB serial REPL When Script Running

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
Post Reply
bitninja
Posts: 115
Joined: Thu Sep 15, 2016 4:09 pm
Location: Spring, Texas

Opening USB serial REPL When Script Running

Post by bitninja » Mon Aug 06, 2018 4:12 pm

I have just notice a recent issue I have been having using ampy to access a Wemos D1 Mini. It seems that with the latest build, the behavior has changed such that when an ampy command is run and the device is "busy" running a script... the opening of the serial port fails.

I believe that before, opening the port would somehow interrupt the running script, and allow the device to enter a serial REPL.

Does anybody know how MicroPython behaves under these conditions and what might have changed?

I'm running Windows 10 and compiling my own binary with the latest code.

Thanks.

bitninja
Posts: 115
Joined: Thu Sep 15, 2016 4:09 pm
Location: Spring, Texas

Re: Opening USB serial REPL When Script Running

Post by bitninja » Tue Aug 07, 2018 2:15 am

OK, I think I have solved my problem. I was using a custom boot.py and was not aware of this change...

https://github.com/micropython/micropython/pull/3784

Once I added the new lines...

Code: Select all

import uos, machine
uart = machine.UART(0, 115200)
uos.dupterm(uart, 1)
to my boot.py, I was able use ampy again. I'm still testing though. Any insight into what's going on would be much appreciated.

Post Reply