tjko/riden-flashtool

Failure to write after wiping existing firmware

Closed this issue · 2 comments

./flash-rd.py /dev/ttyUSB0 ../RD60062_V1.38.bin 
Serial port: /dev/ttyUSB0 (115200bps)
Firmware size: 143872 bytes
Check if device is in bootloader mode...Yes
Device information (from bootloader):
    Model: RD6006 (60062)
 Firmware: v1.28
      S/N: 00016xxx
Traceback (most recent call last):
  File "/usr/lib/python3.10/site-packages/serial/serialposix.py", line 500, in read
    raise SerialException(
serial.serialutil.SerialException: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/{user}/Downloads/riden-flashtool/./flash-rd.py", line 146, in <module>
    res = update_firmware(serial, firmware)
  File "/home/{user}/Downloads/riden-flashtool/./flash-rd.py", line 46, in update_firmware
    r = read_reply(serial, 6)
  File "/home/{user}/Downloads/riden-flashtool/./flash-rd.py", line 33, in read_reply
    r = serial.read(count)
  File "/usr/lib/python3.10/site-packages/serial/serialposix.py", line 509, in read
    raise SerialException('read failed: {}'.format(e))
serial.serialutil.SerialException: read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?)

On further testing this can probably just be added as a warning to the documentation. This failure was repeatable when I tried flashing through a USB hub (in hindsight a dumb mistake on my part). Flashing works just fine with a direct connection to the PC.

tjko commented

Thanks, I added warning about USB hubs possibly causing issues with the firmware update.