• Please tell me what I'm doing wrong.

    I have about 20 x Geekcreit® NodeMcu Lua ESP8266 ESP-12E
    I even have a ESP32 with the same results.
    I have tried it on a 1) Ubuntu 19.04 laptop 2) Macbook Pro 2016 3) Windows 10 desktop.
    Always the same results.
    I've changed the port to show you the ubuntu, but i've tried "erase_flash" first. and you can see from the commands below that It even VERIFIES! and it's dead. I show the "screen" line but the IDE and CLI both say there's no connection.

    The device blinks when it's being written to and if I plug it and unplug it or press the "reset" button it will blink once and nothing. (As if it's ready) but nothing.

    the ONLY success (and I'm calling it as success) was on an OLD chromebook in dev mode where it at least showed giberrish (you know random characters with no reply)

    I've tried the originan version 1.4 and I've tried the latest (see below)

    What I am doing wrong. I've tried it on 3 different laptops on 3 8266 devices. with 5 different cables.
    THis is crazy. Why does no one ever get this resolved in any of the posts where I see this asked?

    Please show me where I'm being a morron and correct my mistakes. I'm happy to say I'm sorry and I'll be thankful. but am I the only one that can't get this to work?

    $ sudo esptool.py --port /dev/ttyUSB0 --baud 460800 write_flash   --flash_freq 80m --flash_mode qio --flash_size 4MB-c1  0x0000 espruino_2v03_esp8266_4mb_combined_4096.bin 
    esptool.py v2.6
    Serial port /dev/ttyUSB0
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    MAC: 60:01:94:70:84:30
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Configuring flash size...
    Flash params set to 0x006f
    Compressed 4194304 bytes to 351183...
    Wrote 4194304 bytes (351183 compressed) at 0x00000000 in 8.0 seconds (effective 4190.3 kbit/s)...
    Hash of data verified.
    
    Leaving...
    Hard resetting via RTS pin...
    
    
    $ sudo esptool.py --port /dev/ttyUSB0 --baud 460800 verify_flash   --flash_freq 80m --flash_mode qio --flash_size 4MB-c1  0x0000 espruino_2v03_esp8266_4mb_combined_4096.bin 
    esptool.py v2.6
    Serial port /dev/ttyUSB0
    Connecting....
    Detecting chip type... ESP8266
    Chip is ESP8266EX
    Features: WiFi
    MAC: 60:01:94:70:84:30
    Uploading stub...
    Running stub...
    Stub running...
    Changing baud rate to 460800
    Changed.
    Configuring flash size...
    Flash params set to 0x006f
    Verifying 0x400000 (4194304) bytes @ 0x00000000 in flash against espruino_2v03_esp8266_4mb_combined_4096.bin...
    -- verify OK (digest matched)
    Hard resetting via RTS pin...
    
    $ screen /dev/ttyUSB0 115200
    [screen is terminating]
    
    
  • Hi Damian!
    Check the flash size esptool.py --port XXXX flash_id. Had similar experience with a Wemos D1 mini Pro with 16M flash. Somewhere in the output it showed

    Stub running...
    Manufacturer: ef
    Device: 4018
    Detected flash size: 16MB
    

    Maybe that has different flash map?

  • change the qio to dio and try again

    --flash_mode dio

  • Flasher.js never gets a mention, but has, for me at least, become a foolproof way to flash ESP8266 with Espruino. I rarely if ever use the esptool.py now. Your mileage may vary but I'd recommend trying it, especially if just starting out.

  • Yes, cool flasher, afaik there is no way to figure out if you can use qio or have to use dio, which is slower.

  • esptool.py --port COM10 --baud 460800 write_flash --flash_freq 80m --flash_mode dio --flash_size 4MB 0x0000 espruino_2v03_esp8266_4mb_combi$
    
  • sorry. I couldn't copy and paste and then write something.
    IT'S NOW Solved.

    And I don't like how!
    The line above is how I did it. I swear to you I tried

  • AHHH!!! the editor on this forum is NOT hapy with anything I paste in.

    OK. So WHAT was the solution? It was MORE than just those settings that came from the post that maze1980 suggested. and the key was also that the 8266 needs for you to refer to the not just D4 (for the default LED) but instead

  • AHHHHH!!!! Sheesh.
    what you need is NodeMCU.D4
    var LED = NodeMCU.D4; add that to the default blink script.

    and this is the other BIG things. A new machine. (a 4th one) and ANOTHER usb cable.

  • Please ignore the $ at the end of that ESPTOOL.PY line. it's just me trying to copy and paste what was on my command line. It's the full name of the .bin full file.

  • Sun 2019.06.23

    It is unfortunate that your experience with the forum editor hasn't been as smooth as you would have liked. I too, have accidentally hit the edit link while attempting to 'un-preview' which appears to be what happened in #10 during an edit.

    But then it must have been realized that the code block inside #7 could have been re-edited:

    re #11: 'Please ignore the $ at the end'



    For what it's worth, just this last week, I came across the same leading NodeMCU requirement in post:

    http://forum.espruino.com/comments/14779266/

    having me bewildered for a while. I have wondered and it appears that in order to utilize the companion ESP32 boards, that this prefix allows for the original source to stay as one unit through mapping, rather than having multiple source copies to maintain under version control.

    It wouldn't have been as much an issue with an Authentic Espruino board, but I'm sure the few that labor on the port for the ESP32 are doing their best, as their freely made contributions and their precious time permits.

    EDIT:

    'A new machine. (a 4th one) and ANOTHER usb cable.'

    Curious, please do tell of this thing you call a 'new machine' which camp did this fall under? Win/Linux/Mac/Cray I? Any pics? . . . . Puzzling, why another USB cable? A suspect purchase frustration not getting it all working perhaps?

  • 1) I know the 8266 has a lot of PINS that don't line up with arduino boards so it's not crazy or a problem (for me) to have to use the NodeMCU prefix. besides a lot of code talks about the B1 or B3 etc of the espruino but of coruse they're no B* in the 8266 or ESP32. so they're talking about the D1 or D3 in those examples. so predefining a
    var B3 = NodeMCU.D3
    means I have to fink of it only once.

  • As for the "new machine" and "new cable".
    I was using a Chromebook Pixel that now has Ubuntu 19.04 Installed and it seemed to be the problem.
    I have another Chromebook (the original CR48) with Ubuntu 18.04 and it doesn't seem to have any trouble.
    The fix ended up being again with simply a newcable. Nothing special. And using a windows desktop computer without a hub. I can't figure out if there is a small change in the ESPTOOL.PY line that made the difference. but I was able to then run the script and build two esp8266 and that worked on the CR48 ubuntu machine, a Macbook Pro 2016 and a windows 10 machine all working now.

    The Top of the linue Ubuntu box doesn't work and I frankly can't figure out why. It's able to use other arduino devices just fine and is my main computer for everythign else.

    and of coruse my amazing Pixl.js device works on that perfectly but of course that's through bluetooth.

  • The blink script for the ESP8266 now looks like this

    var  on = false;
    let LED1 = NodeMCU.D4;
    setInterval(function() {
      on = !on;
      LED1.write(on);
    }, 500);
    

    for anyone that needs it.

    this successfully will blink any LED on D4 and of course all 8266 seem to have a little light on the board that will also blink this (so nothing but your board is needed)

    The Espruino IDE is of course set to the suggest 115200 baud and I'm connecting to what ever the connection is for the device.
    COM10 in my case for windows /dev/ttyUSB0 on my linux and I cannot remember which port is the one on my mac but it was the one that DIDN'T start with /dev/tty.*

  • The designers of NodeMCU decided (for whatever reason) to come with new pin naming, and don't use the ESP8266 pin names.
    For example NodeMCU.D4 is GPIO2 on the ESP8266.
    And Wemos is using the same pin numbering. Pretty annoying IMO.

    The ESP8266 is pretty sensitive to power supply: voltage drops on a longer or thinner (thinner copper conductor) cable, or not enough decoupling on the board can cause all kinds of issues like brownout resets and crashes.
    I added a 100uF cap to the 5V rail of the boards that behaved erratically, and they are fine now.

  • I was setting out 50 ESP8266 for July's NodeBot Days (down here in south florida) and I want to make sure I know as much about these as possible. The particular combination of this one cable and this one computer seems to work with at least the 3 I've done so far, so I think we're good.

    @AkosLukacs question: Can I then rely that all NodeMCU.* match what's printed on the boards?

    if I see D3 on the board it's always NodeMCU.D3 right?

    I have 20 x Geekcreit® NodeMcu Lua ESP8266 ESP-12E and 30 x WeMos D1 for this event.

    and you're absolutely right: I had to create a js file (for johnny-five.js ) that matched each PIN so that people didn't have to guess. This is just silly.

    Here's the file for anyone needed. but for Espruino this the same as this NodeMCU built in object in espruino.
    https://github.com/bocajs/NodeBotDays/blob/master/esp8266Pins.js

  • Mon 2019.06.24

    Good Morning @DamianMontero,

    I feel your frustration:

    '. . . rely that all NodeMCU.* match what's printed on the boards?'

    Caveat Emptor

    Note that the pin numbering that is listed in #17 doesn't quite match the board I have, WavGat D1 mini.

    I found this WeMos <==> ESP8266 pin mapping table helpful:

    https://wiki.wemos.cc/products:d1:d1_mini



    I gave these rogue boards a try as I had a knockoff WeMos D1 as part of a sensor kit I bought two years ago, and had laying around. Post link #12 shows the fun (not) I had with my first attempt while learning. What frustrated me is that I was taught numbering counter-clockwise looking top down from upper left corner for DIPs. Life stayed that way until I got into programming. Now everyone seems to think that their own convention is better. Now we have the actual pin referenced from drill pattern, the breakout board label, the chip pin reference, what the chip mfg datasheet uses, what the breakout board mfg decides is their preferred method, what the competitor knockoff board mfg indicates is better and so on. Then there is the lack of documentation in the Arduino (have only attempted Arduino for six weeks now) community. A pin could be any of the indications above, actual chip, breakout board label, mfg datasheet, etc. and there doesn't appear to be any consistency. I ended up using the above link to create my own table, just as you did in that .js file.

    I finally am relieved that someone else has had the same experience, albeit not as much fun and easier as it should have been. For me back to Authentic Original Espruino boards, as there aren't that many weekends left for me to handle this frustration. Bucket list getting longer, and time getting shorter. ;-)

    Don't want to take away your time with 'July's NodeBot Days' but would it be possible to take some pics, or a web page link and post it here, or in the other boards::general or projects forum should there be any content related to Espruino?

    Is your plan to create a set of Espruino Javascript variations of the creations that exist now? Create tutorials for the Espruino community?


    re #13 'a lot of code talks about the B1 or B3 etc of the espruino . . . . . . they're talking about the D1 or D3 in those examples.'

    I jumped in with Espruino a little over two years ago. Two new BLE boards were introduced along with the Puck just before that a little over a year ago. The entire site's tutorial section was based on the Original board, the Pico and WiFi. That is why most references indicate 'B1 or B3' and don't seem consistent with all boards. As there is a tremendous amount of web page content that existed, the entire site would have had to be reworked. Quite an undertaking, when Gordon's time is much needed keeping up with the current versions of Espruino for the variants that now exist.

  • @Robin I'd love to make a video or tutorials and plan to update the our nodebotdays github with a lot of espruino code and examples.

    I want to give everyone on that day options, and for me BY FAR this espruino way of doing javascript of these amazing little devices is the way to go.

    I'll post something here when I've updated everything.

  • You can't AFAIK but I've not found it to be an issue. Maybe I've been lucky with the hardware flash chips on my boards. I've got Wemos D1 mini clones and NodeMCU boards all of which are a couple of years old now.

  • I believe you all asked for photos from the event (Where I brought 50 ESP8266 and compotents to the NodeBot Days 2019)

    https://www.meetup.com/BocaJS/photos/30208032/483502797/#483502840

    Yes I'm the guy excited and presenting to the crow about the wonders of Espruino and the amazing @Gordon

  • Post a reply
    • Bold
    • Italics
    • Link
    • Image
    • List
    • Quote
    • code
    • Preview
About

NodeMcu Lua ESP8266 ESP-12E not flashing. [SOLVED]

Posted by Avatar for DamianMontero @DamianMontero

Actions