Introduction and AAARRRRRRRGGGGGG!!!! Trying to get ESP-12 for EspruinoWiFi Flashed with Correct Firmware. #4558
Replies: 1 comment
-
Posted at 2017-12-08 by @gfwilliams Sounds like an interesting project :) So you also tweaked those values in the bootloader itself? What you're doing with the code there seems fine. I guess you could try setting A15 to 1 or 0? That's the 'clear to send' wire. Usually I leave it alone (I'd intended to enable it in a firmware update), but maybe the bootloader pays attention to it. Failing that you could try flashing the red & green LEDs in JS code when data is sent/received over USB to see if anything is happening... Maybe you could try the same code on one of the official boards? Not to rewrite the firmware, but maybe just to read it out as a test? I guess it's possible there's a short on your board. Posted at 2017-12-08 by daw Hello Gordon, thank you for your reply. My apologies, but I think my previous post was not entirely clear and complete based on a couple of things in your reply. (I have not modified the boot loader and A15 should already be tied low per your design) The board I am attempting to build is essentially an exact copy of the official EspruinoWiFi built from the Eagle files you have made available and running the latest version of Espruino software updated via the IDE. Now, onto my issues attempting to flash the ESP-12 module through the EspruinoWiFi board. I had read the following instructions and forum post in an attempt to see if it would work on the EspruinoWiFi board: http://www.espruino.com/ESP8266#use-espruino and http://forum.espruino.com/conversations/308773/#comment13792058 In the linked forum post, the user soldered wires to RX/TX on the onboard ESP module and I would prefer to avoid that if possible. I am actually running the code shown in my previous post on the officially purchased board as a “proof of concept”. Board is connected to the IDE, code shown is pasted into the left side of the IDE and certainly seems to execute as written, disconnect button on IDE is pressed, and then I issue the following command on my PC: esptool.py -p COM7 -b 115200 flash_id My thinking is that if the non-destructive flash_id command works, then the write_flash command should also work. I hope am making some sense. Thanks again. Dale p.s. I finally managed to get the AT firmware flashed onto my leadless, unmounted ESP-12S module so none of the above is any way a show stopper. Posted at 2017-12-08 by @gfwilliams So you're saying that using those instructions, you can't even get the flash ID on an official Espruino WiFi? Posted at 2017-12-08 by 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:
Posted at 2017-12-08 by daw Strange, I just noticed that the first time I tried this it said
now I can only seem to get
not sure if what that means or if it is relevant Posted at 2017-12-08 by 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. Posted at 2017-12-08 by @gfwilliams Once you've uploaded the code to the Espruino WiFi, is it responsive at all? Hopefully when the console is moved over to Serial1 any characters you type in the ide will then go right to the wifi - and you could see those with your probe? Posted at 2017-12-08 by 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
I was then able to run esptool and saw:
Terrific, it works!!!! So what foolish mistake did I make? ;-) Posted at 2017-12-08 by daw Oh, crap. Maybe the missing new-line at the end of the last line of pasted code? Posted at 2017-12-08 by daw Yup, that was it. :( So now flash_id is working but read_flash is not...
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:
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. Posted at 2017-12-11 by 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.
What am I missing? Posted at 2017-12-11 by 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:
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.
I am at a loss, but at least I can still blink LEDs. :) Update 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 http://www.chipquik.com/store/product_info.php?products_id=210001 Posted at 2017-12-12 by @gfwilliams
Looks like that could be the case... If you did this code:
I'd have thought you might be able to reflash it. 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 ( 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 USB) Posted at 2017-12-12 by daw
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. :)
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.
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. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Posted at 2017-12-07 by daw
Hello, I have purchased an official EspruinoWiFi and the book and both are wonderful. :)
However, being that the hardware is opensource, and that I am apparently a glutton for punishment, I decided to try my hand at making my own EspruinoWiFi from scratch.
I had PCBs made by OSH Park and, after one failed attempt at assembly, had a solder paste stencil made by OSH stencil.
The board actually appears to work with the WebIDE and I am ready to test the WiFi.
However, the ESP modules, purchased through Digikey, who get them from Adafruit, come with NodeMCU flashed onto them. Obviously not what is required for Espruino.
I see that the official board that I purchased comes with AT version:0.40.0.0 so I thought it would be good to flash the module with that version.
I tried following the instructions shown here after altering the code as such:
The LED on the ESP module blinked once which I understand means that it has entered bootloader mode.
After that, I clicked on the disconnect button on the IDE and then tried communicating with the ESP-12 via the Espruino but no joy.
I just keep getting
I know that I can either try soldering wires directly to the RX/TX pins on the ESP module and try that or just simply flash the ESP before soldering it onto the Espruino but it would be really awesome to get it to work through the Espruino itself.
Thanks in advance for any suggestions.
Beta Was this translation helpful? Give feedback.
All reactions