Can not flash SonOff with MP
Posted: Sun Feb 10, 2019 5:21 pm
Hello Forum
This is my first post on this forum. I have problem flashing the Micropytyhon firmware to a SonOff board with a ESP8266 with 1M flash
running the flowing commands on a Raspberry pi 3+
Erasing
esptool.py --port /dev/ttyUSB0 erase_flash
Returns
esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting........_____....._
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: b4:e6:2d:24:9f:74
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 2.6s
Hard resetting via RTS pin...
Flashing
esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 esp8266-20190125-v1.10.bin
Returns
190125-v1.10.bin
esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting........_
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: b4:e6:2d:24:9f:74
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 1MB
Flash params set to 0x0020
Compressed 615388 bytes to 399928...
Wrote 615388 bytes (399928 compressed) at 0x00000000 in 10.8 seconds (effective 454.7 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Starting rshell
rshell --buffer-size=30 -p /dev/ttyUSB0
Returns
Using buffer-size of 30
Connecting to /dev/ttyUSB0 (buffer-size 30)...
Testing if ubinascii.unhexlify exists ... b'\x00'
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1249, in connect
ip_address = socket.gethostbyname(port)
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/rshell", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/rshell/command_line.py", line 4, in main
rshell.main.main()
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 2815, in main
real_main()
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 2777, in real_main
connect(args.port, baud=args.baud, wait=args.wait, user=args.user, password=args.password)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1255, in connect
connect_serial(port, baud=baud, wait=wait)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1279, in connect_serial
dev = DeviceSerial(port, baud, wait)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1537, in __init__
Device.__init__(self, pyb)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1333, in __init__
unhexlify_exists = self.remote_eval(test_unhexlify)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1453, in remote_eval
return eval(self.remote(func, *args, **kwargs))
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1431, in remote
self.pyb.enter_raw_repl()
File "/usr/local/lib/python3.5/dist-packages/rshell/pyboard.py", line 187, in enter_raw_repl
raise PyboardError('could not enter raw repl')
rshell.pyboard.PyboardError: could not enter raw repl
Doing exactly the same on a ESP-12F here I get the same result but the next time I start rshell everything works byt not on the SonOff board
is there a explanation for his and is it possible to correct it?
Thanks Hans
This is my first post on this forum. I have problem flashing the Micropytyhon firmware to a SonOff board with a ESP8266 with 1M flash
running the flowing commands on a Raspberry pi 3+
Erasing
esptool.py --port /dev/ttyUSB0 erase_flash
Returns
esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting........_____....._
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: b4:e6:2d:24:9f:74
Uploading stub...
Running stub...
Stub running...
Erasing flash (this may take a while)...
Chip erase completed successfully in 2.6s
Hard resetting via RTS pin...
Flashing
esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 esp8266-20190125-v1.10.bin
Returns
190125-v1.10.bin
esptool.py v2.6
Serial port /dev/ttyUSB0
Connecting........_
Detecting chip type... ESP8266
Chip is ESP8266EX
Features: WiFi
MAC: b4:e6:2d:24:9f:74
Uploading stub...
Running stub...
Stub running...
Changing baud rate to 460800
Changed.
Configuring flash size...
Auto-detected Flash size: 1MB
Flash params set to 0x0020
Compressed 615388 bytes to 399928...
Wrote 615388 bytes (399928 compressed) at 0x00000000 in 10.8 seconds (effective 454.7 kbit/s)...
Hash of data verified.
Leaving...
Hard resetting via RTS pin...
Starting rshell
rshell --buffer-size=30 -p /dev/ttyUSB0
Returns
Using buffer-size of 30
Connecting to /dev/ttyUSB0 (buffer-size 30)...
Testing if ubinascii.unhexlify exists ... b'\x00'
Traceback (most recent call last):
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1249, in connect
ip_address = socket.gethostbyname(port)
socket.gaierror: [Errno -2] Name or service not known
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/usr/local/bin/rshell", line 11, in <module>
sys.exit(main())
File "/usr/local/lib/python3.5/dist-packages/rshell/command_line.py", line 4, in main
rshell.main.main()
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 2815, in main
real_main()
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 2777, in real_main
connect(args.port, baud=args.baud, wait=args.wait, user=args.user, password=args.password)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1255, in connect
connect_serial(port, baud=baud, wait=wait)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1279, in connect_serial
dev = DeviceSerial(port, baud, wait)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1537, in __init__
Device.__init__(self, pyb)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1333, in __init__
unhexlify_exists = self.remote_eval(test_unhexlify)
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1453, in remote_eval
return eval(self.remote(func, *args, **kwargs))
File "/usr/local/lib/python3.5/dist-packages/rshell/main.py", line 1431, in remote
self.pyb.enter_raw_repl()
File "/usr/local/lib/python3.5/dist-packages/rshell/pyboard.py", line 187, in enter_raw_repl
raise PyboardError('could not enter raw repl')
rshell.pyboard.PyboardError: could not enter raw repl
Doing exactly the same on a ESP-12F here I get the same result but the next time I start rshell everything works byt not on the SonOff board
is there a explanation for his and is it possible to correct it?
Thanks Hans