Avatar for daw


Member since Oct 2017 • Last active Dec 2017
  • 1 conversations

Semi-retired software engineer who can't remember how he found out about Espruino.

Maybe the motivation I need to finally learn Javascript. ;-)

Most recent activity

  • in Pico / Wifi / Original Espruino
    Avatar for daw

    Looks like that could be the case... If you did this code: ...
    I'd have thought you might be able to reflash it.

    Well, I'd hoped it would be possible. So am I to conclude that it isn't? I don't want to spend any more of your time or mine on this if it isn't. Time, maybe, to back way up and use it as intended. New to JS so I have lots to learn. :)

    But if you do decide to reflash it externally, try and give it a try without resoldering. You can >issue JS commands to boot the ESP8266 into bootloader mode, and can set the RX and TX lines >to be open circuit with (digitalRead(A2) and A3).

    I will give that a try first. Likely easier than removing the ESP8266 since that would likely be tougher than I first thought without removing the 2.54mm breadboard headers first.

    The holes in the ESP8266 are small enough that you can actually just push dupont male pins
    (the standard jumper leads that you get with everything now) right into the holes and they'll
    stay there enough - all you need to connect is RX and TX (ground should already be handled by

    I see the holes but the board I received from Adafruit have the RX/TX ones filled with solder. A bit of flux and desolder wick should do the trick, though. (Not relevant, but interesting, the ESP-12S modules that Adafruit is selling don't even have holes, just the castellations.)

    Thanks again for your help.

  • in Pico / Wifi / Original Espruino
    Avatar for daw

    Well now I am starting to think that my official/known-to-work board is no longer working.

    I just re-tried the following code that I had used earlier to determine the esp8266 firmware version on my EspruinoWiFi:

    var serial = Serial2;
    var pins = { rx: A3, tx : A2 };
    function test(baud) {
      var l="";
      serial.on('data', function(d) {l+=d;});
      serial.setup(baud, pins);
    //digitalWrite(B9,1); // enable on Pico Shim V2
    digitalWrite(A14,1); // enable on EspruinoWiFi
    setTimeout(function() { test(9600); }, 2000);
    setTimeout(function() { test(115200); }, 3000);
    setTimeout(function() { test(57600); }, 4000);
    setTimeout(function() { console.log("Done!"); }, 5000);

    It used to return the response to AT+GMR as expected but now is just appears to be returning the output of the AT+RST command?????!!!!!

    As well, the blue LED on the EspruinoWiFi and the ESP-12 module are continuously blinking on and off after issuing the code as well until the board is unplugged and plugged back in.

    "" "\r\n ets Jan 8 2013,rst cause:1, boot mode:(3,7)\r\n\r\nload
    0x40100000, len 1396, room 16 \r\ntail 4\r\nchksum 0x89\r\nload
    0x3ffe8000, len 776, room 4 \r\ntail 4\r\nchksum 0xe8\r\nload
    0x3ffe8308, len 540, room 4 \r\ntail 8\r\nchksum 0xc0\r\ncsum
    0xc0\r\n\r\n2nd boot version : 1.4(b1)\r\n SPI Speed : 40MHz\r\n
    SPI Mode : DIO\r\n SPI Flash Size & Map:
    8Mbit(512KB+512KB)\r\njump to run user1 @ 1000\r\n\r\n" "" Done!

    I am at a loss, but at least I can still blink LEDs. :)


    It's looking like this EspruinoWiFi is definitely broken. The two test programs (1. get esp8266 firmware version and 2. Get hello.txt webpage) that I have tried from the documentation pages have failed.

    I soldered a flashed ESP-12 module onto the clone EspruinoWiFi that I build and I was pleased to see that the same two samples work on it! :)

    I am guessing that I may have corrupted the esp8266 firmware on the EspruinoWiFi board that I purchased.

    I am going to remove the WiFi module from the board and put it into my programming jig in the morning if unless there are other suggestions on things to try first before then.

    This stuff makes desoldering multi-leaded components a breeze. :D


  • in Pico / Wifi / Original Espruino
    Avatar for daw

    Still fighting with this.

    I tried the following code in an attempt to communicate directly with the onboard ESP-12 module but it just resets in it continuously resetting and spewing out the boot up messages.

    Serial2.setup(115200, { rx: A3, tx : A2 });
    Serial2.on('data', function(d) { USB.write(d); });
    USB.on('data', function(d) { Serial2.write(d); });

    What am I missing?

  • in Pico / Wifi / Original Espruino
    Avatar for daw

    Yup, that was it. :(

    So now flash_id is working but read_flash is not...

    C:\Work\Development\ESP8266\esptool-1.3>­esptool.py -p COM5 -b 115200 read_flash 0 1024 test.bin
    esptool.py v1.3
    Running Cesanta flasher stub...

    A fatal error occurred: Invalid head of packet ('\x13')

    I have changed the sizes in the script to the following as directed, but it appears that this is for writing the flash, not reading:

    # Maximum block sized for RAM and Flash writes, respectively.
    ESP_RAM_BLOCK   = 0x80
    ESP_FLASH_BLOCK = 0x80

    I really don't want to try write flash on this board since I don't want to screw up the only good one that I have. :)

    I'll get the ESP module soldered onto my "clone" and see where that leads me.

    Thanks again for your help.

  • in Pico / Wifi / Original Espruino
    Avatar for daw

    Oh, crap. Maybe the missing new-line at the end of the last line of pasted code?

  • in Pico / Wifi / Original Espruino
    Avatar for daw

    Well that is interesting.

    I executed the code as before but this time, before clicking the disconnect button, I pressed the enter key in the console window and saw it respond with

    -> Serial1

    I was then able to run esptool and saw:

    C:\Work\Development\ESP8266\esptool-1.3>­esptool.py -p COM5 -b 115200 flash_id
    esptool.py v1.3
    Manufacturer: e0
    Device: 4016

    Terrific, it works!!!!

    So what foolish mistake did I make? ;-)

  • in Pico / Wifi / Original Espruino
    Avatar for daw

    Using a logic probe, I have verified that I see activity on RX/TX of the ESP when I am running a "normal" WiFi application but no apparent activity on those pins when trying to communicate with the ESP via the STM32 with the ESP in bootloader mode.

  • in Pico / Wifi / Original Espruino
    Avatar for daw

    Strange, I just noticed that the first time I tried this it said

    boot mode:(1,7)

    now I can only seem to get

    boot mode:(1,0)

    not sure if what that means or if it is relevant

  • in Pico / Wifi / Original Espruino
    Avatar for daw

    Exactly. :)

    I am pretty confident that the ESP is going into boot mode, though.

    I tweaked the code slightly setting the Serial2 baud rate to 74880 and now when I run it I see this in the console window:

    digitalWrite(A14,0); // power off
    digitalWrite(A13,0); // boot mode
    Serial2.setup(74880, { rx: A3, tx : A2 });
    Serial2.on('data', function(d) { USB.write(d); });
    ets Jan 8 2013,rst cause:1, boot mode:(1,0)