New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem in file edit #42
Comments
Solved! A few minutes after posting I found out, that I have to set the buffer size to a larger value than the rshell -p /dev/ttyUSB0 --buffer-size 2048 Now everything works well. Thanks for the nice rshell tool! |
Normally, you need to decrease the buffer size to a value like 30. This is especially true for the devices which don't have native USB support. The pyboard supports USB natively, most of the others require the use of a USB-to-serial converter, which is often built into the board. |
I tried it now with a buffer-size of 30, but execution of "edit" aborts again as I described it above. The problem has something to do with the file size. My file hh.py is 571 byte long. Smaller files with only a few Python source lines always can be edited without any problem for the default buffer size 512. My LoPy [1] UART is driven by a FT234XD which sits on the LoPy expansion board V2 [2]. [1] https://pycom.io/product/lopy/ |
Hello,
I am trying to edit a file with "edit /flash/hh.py" in rshell, but an exception is thrown. The traceback is
I already tried some debugging and found that in main.py, line 986
write_buf contains the following data on the last iteration, which is the reason for the exception:
b'632829290a202020207072696e74282264657669636520455549203d222c206d616329\xf0ets Jun 8 2016 00:22:57\r\n\r\nrst:0x7 (TG0WDT_SYS_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)\r\nconfigsip: 0, SPIWP:0xee\r\nclk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00\r\nmode:DIO, clock div:1\r\nload:0x3fff8028,len:8\r\nload:0x3fff8030,len:1728\r\nload:0x4009fa00,len:0\r\nload:0x4009fa00,len:14584\r\nentry 0x400a059c\r\nMicroPython v1756e28293a0a202020206d6163203d2062696e61736369692e6865786c696679286e6574776f726b2e4c6f526128292e6d61'
I am using a LoPy1.0r with up-to-date firmware. On the host computer I have Python 3.6.4 (Anaconda).
With kind regards,
Hubert
The text was updated successfully, but these errors were encountered: