rshell cp command not working on Raspberry Pi Pico with MicroPython installed
-
- Posts: 7
- Joined: Fri Feb 14, 2020 12:10 am
rshell cp command not working on Raspberry Pi Pico with MicroPython installed
Hello All
I am running MicroPython on the new Raspberry Pi Pico. I am trying to use rshell to copy files from my Windows 10 PC to the Raspberry Pi Pico.
PS C:\Users\xxxxl> rshell -p com14 -b 115200 --buffer-size 512 -> this works fine
C:\Users\xxxxx> ls /pyboard
pico_hello.py pico_i2c_scan.py pico_oled.py ssd1306.py
C:\Users\xxxxx> cd Documents/
I can copy from the raspberry pi Pico to the PC
C:\Users\xxxxx/Documents> cp /pyboard/ssd1306.py test07.py -> this works fine
If I try to copy from PC to Raspberry Pi Pico it times out with an error
C:\Users\xxxxx/Documents> cp test07.py /pyboard/test07.py -> this times out with errors
The final line of the Error output is ...
"rshell.pyboard.PyboardError: timeout waiting for first EOF reception"
Any help would be gratefully received.
Regards Frank
I am running MicroPython on the new Raspberry Pi Pico. I am trying to use rshell to copy files from my Windows 10 PC to the Raspberry Pi Pico.
PS C:\Users\xxxxl> rshell -p com14 -b 115200 --buffer-size 512 -> this works fine
C:\Users\xxxxx> ls /pyboard
pico_hello.py pico_i2c_scan.py pico_oled.py ssd1306.py
C:\Users\xxxxx> cd Documents/
I can copy from the raspberry pi Pico to the PC
C:\Users\xxxxx/Documents> cp /pyboard/ssd1306.py test07.py -> this works fine
If I try to copy from PC to Raspberry Pi Pico it times out with an error
C:\Users\xxxxx/Documents> cp test07.py /pyboard/test07.py -> this times out with errors
The final line of the Error output is ...
"rshell.pyboard.PyboardError: timeout waiting for first EOF reception"
Any help would be gratefully received.
Regards Frank
Re: rshell cp command not working on Raspberry Pi Pico with MicroPython installed
Have you seen the other threads on the forum relative to the rp2? viewtopic.php?f=21&t=9646
I think people encounter similar issues and there is some work being done to fix such issues.
I think people encounter similar issues and there is some work being done to fix such issues.
Re: rshell cp command not working on Raspberry Pi Pico with MicroPython installed
My RPi pico board showed up.
I'm able to copy some files (like these 2 from the README.md: https://github.com/dhylands/upy-example ... aster/pico) but I was unable to copy the pwm_fade.py exampls from the ports/rp2/examples directory.
I'm not sure exactly what's going on, but I'm going to guess that it has something to do with either the USB driver or an interaction with writing to the filesystem and USB.
I'm able to copy some files (like these 2 from the README.md: https://github.com/dhylands/upy-example ... aster/pico) but I was unable to copy the pwm_fade.py exampls from the ports/rp2/examples directory.
I'm not sure exactly what's going on, but I'm going to guess that it has something to do with either the USB driver or an interaction with writing to the filesystem and USB.
Re: rshell cp command not working on Raspberry Pi Pico with MicroPython installed
mpr works fine. Maybe you could compare it with what rshell implements.
-
- Posts: 7
- Joined: Fri Feb 14, 2020 12:10 am
Re: rshell cp command not working on Raspberry Pi Pico with MicroPython installed
Hello Davedhylands wrote: ↑Fri Jan 29, 2021 6:47 amMy RPi pico board showed up.
I'm able to copy some files (like these 2 from the README.md: https://github.com/dhylands/upy-example ... aster/pico) but I was unable to copy the pwm_fade.py exampls from the ports/rp2/examples directory.
I'm not sure exactly what's going on, but I'm going to guess that it has something to do with either the USB driver or an interaction with writing to the filesystem and USB.
I believe that you are the actual author of rshell. Thank you for taking the time to attempt to answer my question. I am honoured. To give a bit more information I connected the Pi Pico board to my Raspberry Pi 4 machine and repeated the exercise with the same result. i.e. using rshell cp command can copy from Pi Pico board to Raspberry Pi 4 but cannot copy from Raspberry Pi 4 to Pi Pico board. Using Thonny version 3.3.3 copying works both ways on both Windows 10 PC and Raspberry Pi 4. I would prefer to use rshell so hopefully a solution can be found.
Regards Frank
I am keen for rshell to work
-
- Posts: 7
- Joined: Fri Feb 14, 2020 12:10 am
Re: rshell cp command not working on Raspberry Pi Pico with MicroPython installed
Hello Robert
Thank you for offering your thoughts. Excuse my ignorance but is MPR similar to rshell?
I tried to find it on the net without success. Could you please give me a bit of info about mpr?
Much appreciated
Regards Frank
Re: rshell cp command not working on Raspberry Pi Pico with MicroPython installed
Robert will tell you more, but mpr is a tool that has not been merged yet to the main branch: https://github.com/micropython/micropython/pull/6375
From what I have understood, it works the other way round than classical tools such as rshell: allowing you to mount your raspberry Pi 4 project directory onto the raspberry Pi pico.
From what I have understood, it works the other way round than classical tools such as rshell: allowing you to mount your raspberry Pi 4 project directory onto the raspberry Pi pico.
Re: rshell cp command not working on Raspberry Pi Pico with MicroPython installed
You're right. It is not in the master branch yet, which is a pity, because is works so well. But it follows pyboard.py, which also works well for copying data in and out, connecting to repl and running scripts. Only mpr is a little bit easier to use (fewer keystrokes).
edit: About pyboard.py, see http://docs.micropython.org/en/latest/r ... rd.py.html
edit: About pyboard.py, see http://docs.micropython.org/en/latest/r ... rd.py.html
Re: rshell cp command not working on Raspberry Pi Pico with MicroPython installed
When I comment out all of the file operations then copying files from the host to the pico then rshell doesn't hang.
So this tells me that the problem is most likely related to the filesystem, or an interaction between the filesystem and USB.
So this tells me that the problem is most likely related to the filesystem, or an interaction between the filesystem and USB.
Re: rshell cp command not working on Raspberry Pi Pico with MicroPython installed
I have a version of rshell that works for me (at least better than the released version). It can be found on the pico branch of https://github.com/dhylands/rshell
If you checkout the git repository you can use the ./r.py script to run rshell from your local github tree. The changes I made are here:
https://github.com/dhylands/rshell/comm ... 5243f50589
and there is also a change here to auto recognize the Pico for connecting:
https://github.com/dhylands/rshell/comm ... b22b25d4d3
and I've filed an issue in micropython repo:
https://github.com/micropython/micropython/issues/6816
If you checkout the git repository you can use the ./r.py script to run rshell from your local github tree. The changes I made are here:
https://github.com/dhylands/rshell/comm ... 5243f50589
and there is also a change here to auto recognize the Pico for connecting:
https://github.com/dhylands/rshell/comm ... b22b25d4d3
and I've filed an issue in micropython repo:
https://github.com/micropython/micropython/issues/6816