[SOLVED]Issues running on ESP8266MOD(NODEMCU board)

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
User avatar
dps
Posts: 51
Joined: Mon Oct 28, 2019 9:37 pm

[SOLVED]Issues running on ESP8266MOD(NODEMCU board)

Post by dps » Thu Nov 28, 2019 3:09 am

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
Last edited by dps on Fri Dec 06, 2019 10:39 pm, edited 1 time in total.

User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: Issues running on ESP8266MOD(NODEMCU board)

Post by Roberthh » Thu Nov 28, 2019 7:25 am

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)

User avatar
dps
Posts: 51
Joined: Mon Oct 28, 2019 9:37 pm

Re: Issues running on ESP8266MOD(NODEMCU board)

Post by dps » Thu Nov 28, 2019 7:38 am

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!

User avatar
dps
Posts: 51
Joined: Mon Oct 28, 2019 9:37 pm

Re: Issues running on ESP8266MOD(NODEMCU board)

Post by dps » Thu Dec 05, 2019 2:53 am

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

User avatar
dps
Posts: 51
Joined: Mon Oct 28, 2019 9:37 pm

Re: Issues running on ESP8266MOD(NODEMCU board)

Post by dps » Thu Dec 05, 2019 2:55 am

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.

User avatar
dps
Posts: 51
Joined: Mon Oct 28, 2019 9:37 pm

Re: Issues running on ESP8266MOD(NODEMCU board)

Post by dps » Thu Dec 05, 2019 3:03 am

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
?

User avatar
MostlyHarmless
Posts: 166
Joined: Thu Nov 21, 2019 6:25 pm
Location: Pennsylvania, USA

Re: Issues running on ESP8266MOD(NODEMCU board)

Post by MostlyHarmless » Thu Dec 05, 2019 4:28 am

Whenever a module acts up like that, I try an erase/flash sequence. Did you try that?


Regards, Jan

User avatar
pythoncoder
Posts: 5956
Joined: Fri Jul 18, 2014 8:01 am
Location: UK
Contact:

Re: Issues running on ESP8266MOD(NODEMCU board)

Post by pythoncoder » Thu Dec 05, 2019 9:55 am

Agreed 100%.

Code: Select all

esptool.py  --port /dev/ttyUSB0 erase_flash
Then install firmware.
Peter Hinch
Index to my micropython libraries.

User avatar
dps
Posts: 51
Joined: Mon Oct 28, 2019 9:37 pm

Re: Issues running on ESP8266MOD(NODEMCU board)

Post by dps » Fri Dec 06, 2019 9:11 pm

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.

User avatar
dps
Posts: 51
Joined: Mon Oct 28, 2019 9:37 pm

Re: Issues running on ESP8266MOD(NODEMCU board)

Post by dps » Fri Dec 06, 2019 9:24 pm

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?

Post Reply