esp8266 not booting
esp8266 not booting
I just flashed the newest esp8266-20190125-v1.10.bin firmware to an esp8266, with these commands:
esptool.py --port COM6 erase_flash
esptool.py --port COM6 --baud 115200 write_flash --flash_size=detect 0 esp8266-20190125-v1.10.bin
I can reset/reboot the device multiple times, no problem. However, if I try to copy some files on the flash, then the device works until the next reset ONLY. On the next reset, I only see some "noise" coming out from the serial line.
First I thought that this might be a problem with the flash. Then I have tried another ESP8266 device, and I got the very same results. Then I went back to esp8266-20180511-v1.9.4.bin but I see no difference. The behaviour is the same: if the flash based filesystem is not modified, then the device boots without problem. But if I write something on the flash fs, then it cannot boot after the next reset.
Any idea what can be causing this?
esptool.py --port COM6 erase_flash
esptool.py --port COM6 --baud 115200 write_flash --flash_size=detect 0 esp8266-20190125-v1.10.bin
I can reset/reboot the device multiple times, no problem. However, if I try to copy some files on the flash, then the device works until the next reset ONLY. On the next reset, I only see some "noise" coming out from the serial line.
First I thought that this might be a problem with the flash. Then I have tried another ESP8266 device, and I got the very same results. Then I went back to esp8266-20180511-v1.9.4.bin but I see no difference. The behaviour is the same: if the flash based filesystem is not modified, then the device boots without problem. But if I write something on the flash fs, then it cannot boot after the next reset.
Any idea what can be causing this?
Re: esp8266 not booting
I just opened a brand new WeMos Mini board and it behaves the same: after something was written to the filesystem, it won't boot. It is clearly not a flash memory problem, because it happened on 3 different devices, one of them is brand new.
Re: esp8266 not booting
What method are you using to write files to the filesystem?
Re: esp8266 not booting
I have developed my own program. Basically it executes python statements through the REPL prompt:
- open a file
- write one chunk into the file
- repeat until all data is transferred
- close the file
Please note that there is no error while I upload the files. It is also possible to import the uploaded python modules. The problem only appears when I first reset the device.
- open a file
- write one chunk into the file
- repeat until all data is transferred
- close the file
Please note that there is no error while I upload the files. It is also possible to import the uploaded python modules. The problem only appears when I first reset the device.
Re: esp8266 not booting
On the brand new device, I see this in at the end of the garbage:
#4 ets_task(40100130, 3, 3fff83ec, 4)
This one has v1.9.4 firmware. On the other devices, everything is just rubbish. They have v1.10
#4 ets_task(40100130, 3, 3fff83ec, 4)
This one has v1.9.4 firmware. On the other devices, everything is just rubbish. They have v1.10
Last edited by nagylzs on Sat Mar 09, 2019 3:29 pm, edited 1 time in total.
Re: esp8266 not booting
Just to be on the safe side, try uploading files to your esp8266 using one of:
Re: esp8266 not booting
All right. Here is what I have tried:
At this point, I can reset, connect to the REPL prompt and execute commands.
Next step: I have created a test.txt file with "Hello world" in it, and then:
Here is the result:
Code: Select all
pip3 install rshell
esptool.py --port COM6 erase_flash
esptool.py --port COM6 --baud 115200 write_flash --flash_size=detect 0 esp8266-20190125-v1.10.bin
Next step: I have created a test.txt file with "Hello world" in it, and then:
Code: Select all
rshell --port COM6 --baud 115200 cp test.txt /
Code: Select all
C:\Python\Projects\MicroPython\firmwares>rshell --port COM6 --baud 115200 cp test.txt /test.txt
Using buffer-size of 32
Connecting to COM6 (buffer-size 32)...
Testing if ubinascii.unhexlify exists ... Y
Retrieving root directories ... /boot.py/
Setting time ... Mar 09, 2019 16:54:44
Evaluating board_name ... pyboard
Retrieving time epoch ... Jan 01, 2000
Unable to copy 'C:\Python\Projects\MicroPython\firmwares/test.txt' to '/test.txt'
-
- Posts: 969
- Joined: Sat Feb 03, 2018 7:02 pm
Re: esp8266 not booting
you have to do:
Code: Select all
rshell --port COM6 --baud 115200 cp test.txt /pyboard/test.txt
Kevin Köck
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Micropython Smarthome Firmware (with Home-Assistant integration): https://github.com/kevinkk525/pysmartnode
Re: esp8266 not booting
I also think that with the esp8266 you need to use the -a option with rshell.
Re: esp8266 not booting
Code: Select all
c:\Python\Projects\MicroPython\firmwares>rshell --port COM6 --baud 115200 -a cp test.txt /pyboard/test.txt
Using buffer-size of 32
Connecting to COM6 (buffer-size 32)...
Testing if ubinascii.unhexlify exists ... b';l\x00d\x9c\xdf|\x00\x8c$\xe0|\x03\x04\x0c\x04\xc4\x0cd\xec\x04c|\xc7\x83\x02\xe4\x1b\x93{\x92c\x8c\x0cb\x8c\xf3og\x9fl\'o\xdc\xe3\xec\x0c#\x1cx\x8c\x8fl{l{$8\xfbg\xe0\x10\x03\x0c\x04\x82\x04l\x0c\x04\x0c\x04\x0c\x0cc\x0c\'\xe3|\x03\xe4l\x04\x8c\x0c\x04c\x84\xfb\'o\xee\x00d\x8c\xc7$`\x03\xd8\x1b\x1b\'ol\x84l \x03\x0f\x03n{\x87\x93\x9bg\x04\x0c\x83cl`\x03`\xf3o\x0c\x04\x0c\x9e\xe0c\x83nl\x84\x04\x8c\xfbg\'\xe7\x00\x0c\x8f\x07dp\xfbg\xe0\x10\x02\x04\x04s\xc4\x9c\x9c\xe3\xe0\x0c\x04\x0c\x04c\x0cn\xe2|\x03ll\x04\x0c\x04c\x8c\xfbg\'\xe7\x00l\xc4\x0cd`\x02\x98\x13\x1bg\'\x0cl`\x03\x07\x03or\xc7\x9b\x92\'\x0c\x0c\x1bl\x93`\x028\xfbg\xe0\x10\x03\x0c\x04r\x84\x9c\xdc\xe3\xe0\x0c\x8e;\x80\x0cc\x0c\'\xe3|\x03\x04\x8c\x04\x87#\xc4\xf2no\xef\x00\x04\x0cd`\x02\x98\x13\x1bgn\x0cd`\x02\x07\x03gs\x8f\xdb\x93o\x0c\x04#\x83\x9b`\x03\x0f;\x93\x9bg\x04\x0cc\x83\x92`\x03\xc4\xe3\x02\xe4\x1b\x83n\xec\x93{\x82\xfbo|\xe4\x04l\x04$ld`\x02\x1cc\x92\x1b\x03\x0c\x9f<\x03s\xdb\x03d\x9c\'\xe0\x0c\x82\'\xe3\x00\x0c$`\x03\x8c\xe3s\xdbl\x84$\x13\x84\x0c\x0c\x04l \x03\x8c\xe3{\x93d\xe4l\x1b\x8c\x0c\x04\x0cd`\x03\xc4\xe3;\x9b$\x0c\x8e\xdf\x00\x8c\x04\x0cd$`\x03sd\x8e\x83r$\x8c\xdf\xe3\x8cb\x04\xc4\x8cb\x1c|\x0c$c\x9c\xe3\x9c\x03b<\x98\x84\xc4\x8c\x04llc\xec\xf3o\xef\xc0\x1bg\'\xe3\x10\x02\x04\x03\x8clg\x9e\x0c\xec\x04\x8c\x04$\xec\x8fll\xc4\x0c\x8e\x8c\x0c\x04l \x03\x80\x02n\xfc\x00\x8c\x9f\xe2\x84c\x04ld\xec\x84\x8f\x13\x04c\x0c\x03\x02\x84\x9f\xe3\xc4c\x0cd\x04\x8cb\x1c{$sdr\xfbg\x9c\xe3\x00\x84\x04\xec\xfbo\xdc\x9f\x80\x80\x03cp\x1bcl\x8e\xc4l\x9c\xccOSError: [Errno 2] ENOENT\r\n\r\nMicroPython v1.10-8-g8b7039d7d on 2019-01-26; ESP module with ESP8266\r\nType "help()" for more information.\r\n>>> '
Traceback (most recent call last):
File "c:\python\python37-64\lib\site-packages\rshell\main.py", line 1249, in connect
ip_address = socket.gethostbyname(port)
socket.gaierror: [Errno 11001] getaddrinfo failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\Python\Python37-64\Scripts\rshell-script.py", line 11, in <module>
load_entry_point('rshell==0.0.18', 'console_scripts', 'rshell')()
File "c:\python\python37-64\lib\site-packages\rshell\command_line.py", line 4, in main
rshell.main.main()
File "c:\python\python37-64\lib\site-packages\rshell\main.py", line 2820, in main
real_main()
File "c:\python\python37-64\lib\site-packages\rshell\main.py", line 2782, in real_main
connect(args.port, baud=args.baud, wait=args.wait, user=args.user, password=args.password)
File "c:\python\python37-64\lib\site-packages\rshell\main.py", line 1255, in connect
connect_serial(port, baud=baud, wait=wait)
File "c:\python\python37-64\lib\site-packages\rshell\main.py", line 1279, in connect_serial
dev = DeviceSerial(port, baud, wait)
File "c:\python\python37-64\lib\site-packages\rshell\main.py", line 1543, in __init__
Device.__init__(self, pyb)
File "c:\python\python37-64\lib\site-packages\rshell\main.py", line 1333, in __init__
unhexlify_exists = self.remote_eval(test_unhexlify)
File "c:\python\python37-64\lib\site-packages\rshell\main.py", line 1453, in remote_eval
return eval(self.remote(func, *args, **kwargs))
File "c:\python\python37-64\lib\site-packages\rshell\main.py", line 1431, in remote
self.pyb.enter_raw_repl()
File "c:\python\python37-64\lib\site-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