rshell: Problem copying an mpy file to the ESP8266

I can copy the attached file to a Pyboard without problems. Copying it to the Feather Huzzah reference board with an empty filesystem produces the following outcome:

[adminpete@axolotl]: /mnt/qnap2/data/Projects/MicroPython/projects/mqtt_as
$ rsusb
Connecting to /dev/ttyUSB0 ...
Welcome to rshell. Use Control-D to exit.
/mnt/qnap2/data/Projects/MicroPython/projects/mqtt_as> ls /pyboard/
boot.py
/mnt/qnap2/data/Projects/MicroPython/projects/mqtt_as> cp mqtt_as.mpy /pyboard/
False
>raw REPL; CTRL-B to exit
>raw REPL; CTRL-B to exit
>raw REPL; CTRL-B to exit
>
MicroPython v1.8.7-797-ge5e49be on 2017-06-21; ESP module with ESP8266
Type "help()" for more information.
>>> 
raw REPL; CTRL-B to exit

I have tried erasing flash. It copies the larger .py source file without issue so I don’t believe there is a filesystem problem. Oddly I’ve copied .mpy files to the ESP8266 before without issue. Is it a particular binary value problem? My invocation is via

alias rsusb='rshell -p /dev/ttyUSB0 --editor nano --buffer-size=30'
[adminpete@axolotl]: /mnt/qnap2/data/Projects/MicroPython/projects/mqtt_as
$ rshell -V
0.0.8

test.zip

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 27 (15 by maintainers)

Most upvoted comments

Seeing this problem when copying files to a Raspberry Pi Pico. Similarly sized binary files are OK, but some python code file hang. The workaround appears to be to increase the buffer size.

rshell --buffer-size=2048 -p /dev/ttyACM0

works fine, but change that 2048 to the default 512 and it hangs.

Would you be able to send me the files? zip them up and send them to dhylands@gmail.com

I’ve never had any issues copying files to the pyboard, so I’m really interested in figuring out what the problem might be.

Interestingly it occurs with some extensions to your client.mpy file. Your answer however gave me the clue. I thought using this was the right way: cp -a client.mpy /pyboard/ But apparently I have to start rshell with the “-a” option instead, which I have not seen before and misinterpreted the command of Dave to using “-a” only in the cp command. Now it works correctly. Thank you both for the help!