Page 1 of 4

[SOLVED]Issues running on ESP8266MOD(NODEMCU board)

Posted: Thu Nov 28, 2019 3:09 am
by dps
hello all,
i am having a weird issue trying to use uPython on this esp8266MOD board. after flashing the firmware to the board, the wifi activity light just constantly blinks, and when i try to open up the REPL via picocom, all i get is a bunch of garbage output that just keeps going and going.
some info:
1.) i have tried both the esp8266-20190529-v1.11.bin and this one esp8266-20190125-v1.10.bin.
2.) i am uploading via the built in USB connection that is controlled by Cygnal Integrated Products, Inc. CP2102/CP2109.
3.) i am on Ubuntu 18.04.3.
4.) this is the command that i am using to upload the firmware:

Code: Select all

esptoo --chip esp8266 --port /dev/ttyUSB0 --baud 460800 write_flash 0x1000 <then the firmware file>l
.
I have also tried this command:

Code: Select all

esptool --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0 <then the firmware>
I understand that the .py is missing from the tool, but i am using the tool that is packaged in the standard Ubuntu repositories, and have not installed it via pip or anything. this is what i used on the esp32 and it worked.

If there is any more info that i could provide that would be of any use to anyone, please let me know.
I also want to point out again that this is literally my first coding language, and i have little (even though i have done a few simple projects by following directions) experience with Arduino's or other micro controllers. Although i have tons of them. So what may seem obvious to you, will probably not be to me, so if you could, pleeeaaassseee point it out to me, so that i can learn :)

dps

Re: Issues running on ESP8266MOD(NODEMCU board)

Posted: Thu Nov 28, 2019 7:25 am
by Roberthh
Try the various -fm options about flash mode. There are four. And try to manually set the proper flash size. Options:

Code: Select all

  --flash_mode {keep,qio,qout,dio,dout}, -fm {keep,qio,qout,dio,dout}
                        SPI Flash mode
  --flash_size FLASH_SIZE, -fs FLASH_SIZE
                        SPI Flash size in MegaBytes (1MB, 2MB, 4MB, 8MB, 16M)
                        plus ESP8266-only (256KB, 512KB, 2MB-c1, 4MB-c1)

Re: Issues running on ESP8266MOD(NODEMCU board)

Posted: Thu Nov 28, 2019 7:38 am
by dps
As always, thank you for your help! I will get on this as soon as I get up in the morning, and ill report back as soon as possible!

Re: Issues running on ESP8266MOD(NODEMCU board)

Posted: Thu Dec 05, 2019 2:53 am
by dps
I have to be honest, I totally spaced that I was supposed to be trying what you suggested. I just encountered the issue again, and was about to post another post haha. Going to try your suggestions now

Re: Issues running on ESP8266MOD(NODEMCU board)

Posted: Thu Dec 05, 2019 2:55 am
by dps
I do want to note though, that I was able to upload and run uPython on 1 out of 3 of these boards, successfully. Two of them though, are still doing the original stuff.

Re: Issues running on ESP8266MOD(NODEMCU board)

Posted: Thu Dec 05, 2019 3:03 am
by dps
What i really just am not getting, is why i can keep uploading to the one board, and it works flawlessly. Just not with the other two. do you think that there is some minor variation between them? They all came in a set, and they were allegedly the same.
Is there any kind of way to do some sort of... hardware check on it? Like you can do with your PC in Linux, with `sudo lshw`?
Im also having a bit of an issue trying to suggested commands. I add them where exactly into my

Code: Select all

└──╼ $esptool --port /dev/ttyUSB0 --baud 460800 write_flash --flash_size=detect 0
?

Re: Issues running on ESP8266MOD(NODEMCU board)

Posted: Thu Dec 05, 2019 4:28 am
by MostlyHarmless
Whenever a module acts up like that, I try an erase/flash sequence. Did you try that?


Regards, Jan

Re: Issues running on ESP8266MOD(NODEMCU board)

Posted: Thu Dec 05, 2019 9:55 am
by pythoncoder
Agreed 100%.

Code: Select all

esptool.py  --port /dev/ttyUSB0 erase_flash
Then install firmware.

Re: Issues running on ESP8266MOD(NODEMCU board)

Posted: Fri Dec 06, 2019 9:11 pm
by dps
hmm, whenever i try to erase the flash, it tells me that its not supported. Here is the output:

Code: Select all

┌─[✗]─[dps@silversurfer]─[~]
└──╼ $esptool --port /dev/ttyUSB0 erase_flash
esptool.py v2.1
Connecting....
Detecting chip type... ESP8266
Chip is ESP8266
Enabling default SPI flash mode...
Erasing flash (this may take a while)...

A fatal error occurred: ESP8266 ROM does not support function erase_flash.

Re: Issues running on ESP8266MOD(NODEMCU board)

Posted: Fri Dec 06, 2019 9:24 pm
by dps
Although, it does say that it erases the flash when I upload firmware to it. Also, I tried the different flash mode params (dio,dout,qio,qout, etc), and using them hasnt made it work. is there something else that i am missing here?