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.
nrf52840 DK PCA10056 (could not enter raw REPL)
Re: nrf52840 DK PCA10056 (could not enter raw REPL)
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..
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)
This is the involved method :
def enter_raw_repl(self)
where the changes are commented
def enter_raw_repl(self)
where the changes are commented
Re: nrf52840 DK PCA10056 (could not enter raw REPL)
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).
The traceback says that the problem arise from the enter_raw_repl method defined in the class Pyboard ( line 192 of pyboard.py).
- Attachments
-
- get
- 4_ampy_w60x_get.PNG (52.06 KiB) Viewed 4762 times
-
- changed pyboard.py
- 3_ampy_w60x_changed_pyboard.PNG (74.2 KiB) Viewed 4762 times
-
- pyboard enter_raw_repl changes
- 2_pyboard_py_changes.PNG (91.6 KiB) Viewed 4762 times
-
- result with unchanged pyboard.py
- 1_ampy_w60x_pyboard_unchanged.PNG (95.68 KiB) Viewed 4762 times
Re: nrf52840 DK PCA10056 (could not enter raw REPL)
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
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)
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 -