rpr wrote: ↑Sun Aug 18, 2019 1:53 am
I have an infinite loop running on my ESP8266
Is this just a "while True: pass". What you're describing _should_ work, so sounds like there's a bug somewhere. Do you still have the console connected to the serial port when you run rshell?
pythoncoder wrote: ↑Sun Aug 18, 2019 8:06 am
The more practical way is to have main.py look like this
The first thing rshell does is sent Ctrl-C twice, so I don't understand why this would be any different to the time.sleep(). Or am I missing something?
I just tested this quickly on my esp8266. I'm using `pyboard.py -f`, but it's effectively the same as rshell. (I think rshell uses pyboard.py, or a derivative of, internally).
main_loop.py:
Code: Select all
pyboard.py --device /dev/ttyUSB0 -f cp main_loop.py :main.py
(soft reset ESP8266, verify in terminal that it's stuck in the infinite loop)
Code: Select all
$ ./tools/pyboard.py --device /dev/ttyUSB0 -f ls
ls :
230 boot.py
19 main.py