Page 1 of 1

nrf52840 DK PCA10056 (could not enter raw REPL)

Posted: Tue Aug 25, 2020 12:53 pm
by M.Ridwan
Dear Colleagues,
I want to copy the Python Script in nrf52840 DK PCA10056 by using Zephyr Port and I am using the method as given in the link http://docs.micropython.org/en/v1.12/re ... rd.py.html and I am getting the following error:

python3 pyboard.py --device /dev/ttyACM0 light.py
b'>>> \r\n>'
could not enter raw repl


Please Advise.

Re: nrf52840 DK PCA10056 (could not enter raw REPL)

Posted: Sun Aug 30, 2020 10:28 am
by federico
I don't know if the following trial will solve your problem, anyway give it an chance.

I suggest the following trial involving the substitution of your pyboard.py ( after a safety backup of the same)

Why ?
Please, read from:
https://bigl.es/microcontroller-monday-wemos-w600-pico/

pyboard.py - this version can be download from:

https://drive.google.com/file/d/1qCvD3Z ... sp=sharing


"I got an error stating that ampy could not enter a raw repl and this caused the application to exit
..................
..............
And then copied the new pyboard.py file from my Downloads directory to the ampy directory.
" etc..

Re: nrf52840 DK PCA10056 (could not enter raw REPL)

Posted: Tue Sep 01, 2020 1:43 am
by federico
This is the involved method :
def enter_raw_repl(self)

where the changes are commented
enter_raw_repl.png
def enter_raw_repl(self)
enter_raw_repl.png (162.17 KiB) Viewed 6525 times

Re: nrf52840 DK PCA10056 (could not enter raw REPL)

Posted: Tue Sep 01, 2020 9:00 pm
by federico
From the attachment 1,2,3,4,5 we have a practical demonstration about the results of interaction with an W600-PICO board, by an unchanged pyboard.py and an changed one.
The traceback says that the problem arise from the enter_raw_repl method defined in the class Pyboard ( line 192 of pyboard.py).

Re: nrf52840 DK PCA10056 (could not enter raw REPL)

Posted: Wed Sep 02, 2020 1:23 am
by federico
We have from the following address the correct syntax to copy a file to the board:

https://docs.micropython.org/en/latest/ ... rd.py.html

The cp command uses a ssh-like convention for referring to local and remote files. Any path starting with a : will be interpreted as on the device, otherwise it will be local. So:

$ pyboard.py --device /dev/ttyACM0 -f cp main.py :main.py

will copy main.py from the current directory on the PC to a file named main.py on the device. The filename can be omitted, e.g.:

$ pyboard.py --device /dev/ttyACM0 -f cp main.py :

is equivalent to the above.

Your is :
python3 pyboard.py --device /dev/ttyACM0 light.py 

Re: nrf52840 DK PCA10056 (could not enter raw REPL)

Posted: Wed Sep 02, 2020 7:56 pm
by federico
I have upgraded my pyboard.py version with the last one on github ( doesn't require the ampy support) - I newly have changed the enter_raw_repl() in the Pyboard class and simulated your requirement as from the attachment - without any problem -
pyboard_last_copy_light_py.PNG
pyboard.py last version
pyboard_last_copy_light_py.PNG (87.59 KiB) Viewed 6466 times