Has anyone gotten Espruino to work on a Wemos D1 Mini? What am I missing?[SOLVED: dio mode] #5967
Replies: 1 comment
-
Posted at 2018-01-11 by Wilberforce Baud is 115200. You need to set that in the ide Sometime first time connects can be dodgy so use putty or a Linux term to connect first Posted at 2018-01-11 by DrAzzy I know that when Espruino is running correctly, I should be able to connect at 115200 baud and after pressing reset, see the Espruino splash screen, and if I don't press reset, sending a few CRLF sequences should generate =undefined in response. Neither of those things happens. When I connect at 115200 baud (and every other baud rate setting that hTerm will let me select), I get gibberish (like with a baud rate mismatch) after pressing reset, instead of the Espruino splash screen. Also, if I press enter (after setting the serial terminal application to send a CRLF sequence upon enter, for the terminal programs that need that to be set), I don't get anything back from it at all (not even gibberish). I have used hTerm, the Arduino serial monitor, Termite and PuTTY and get the same results on all of them. I do not have this issue with an ESP12F on other breakout boards; only on the WeMos D1 Mini. There must be something different about the D1 Mini - I'm just hoping someone knows what it is! If not, any suggestions for how to debug this? I'm going crazy, this isn't hard stuff, and I'm sort of embarrassed that I am asking questions like this - I should know better. But I just can't seem to get it sorted, and I don't know what's different that's keeping it from working like it does on my own breakout boards. Posted at 2018-01-11 by @yerpj Maybe a bad output state on RTS/DTR ? Just had a look at the schematic (https://wiki.wemos.cc/_media/products:d1:mini_new_v2_2_0.pdf) and saw that those signals can have control of RST pin (see U4 on the PDF). Posted at 2018-01-11 by DrAzzy Tried every permutation of DTR and RTS states, pressing reset after each one. On the other board, I also removed those transistors entirely. It did not change the behavior (other than that I had to manually manipulate GPIO2 to upload to it successfully. Posted at 2018-01-11 by @yerpj If you have a solder iron you could try to access it direct on UART side by removing resistors R3 and R4 and soldering wires to a FTDI chip or cable. the USB-serial chip CH240G is well known for not having good ESD protections, it is not excluded that it is damaged. In the past I already smoked a few of them. Posted at 2018-01-11 by DrAzzy We know the serial adapter chip is working though - otherwise I wouldn't be able to flash the firmware with ESPTOOL Posted at 2018-01-11 by Ollie I use the D1 Mini - well I think they're clones. I'm behind on versions but I flashed 1.91 recently and could connect via Espruino IDE no issues. Have you tried an older version out of interest? Edit: espruino_1v95.4819_esp8266.tgz works fine. I didn't set When started with these I needed a different serial driver (wchusbserial1410) it took a bit of finding. I wonder if that's relevant? Though if you've flashed it ok I'd guess not. Posted at 2018-01-11 by @MaBecker I recommend to start with esptool.py --port COM3 erase_flash next check id to make sure to use the correct parameter for write_flash esptool.py -port COM3 flash_id and write_flash statement Posted at 2018-01-12 by DrAzzy Thanks - I haven't tried older versions (though 1v95 versions do work for me on ESP8266 on my own breakout boards)... The CH340G driver on mac is harder to find, because the one you need changed with high sierra. It's not such a bad situation on Windows. But it's not that - I use a lot of CH340G serial adapters (just quickly looking in the places I know that they live, I counted over 50... They are my go-to serial adapters. Surprised to hear you've managed to damage them. I treat them with reckless abandon and have never had one fail, and the people on the Arduino forum almost never trash the CH340G's (compared to the 16u2 programmed as serial adapter on the official Uno, which burns out if you even think of abusing the +5v rail) But I've gotten a bit of new information here. flash_id:
Output from programming:
But most excitingly, I was able to read the output on startup. It's at 74880 baud, the bootlog output! Here's that - does anyone have any thoughts?
Posted at 2018-01-12 by @MaBecker Use flash_size 32m-c1 or 4MB-c1 for espruino_1v95_esp8266_4mb firmware. Posted at 2018-01-12 by DrAzzy 4MB-c1 and 32m produce the same behavior:
Same output at 74880 baud:
I have two boards showing identical behavior (the new one, and the one I removed the transistors between DTR/RTS and the strapping pins on). They are being powered off MicroUSB (could it be a power problem? Do I need an external 3.3v power supply? If so, that makes them a bit less appealing) Posted at 2018-01-12 by Ollie Mine run from Mac USB power. These and the NodeMCU have always been pretty reliable on USB power. Only when I've been using the 01 and 12 directly have I needed to use a capacitor and maybe supply power from a source other than the USB FTDI adapter. Are yours genuine D1s? You don't think you could have got a bad batch? The quality varies with the cheap boards and I've bought ESP8266 boards that don't do what they should before now (Wifi Node-M). Posted at 2018-01-12 by @MaBecker Hmm, strange...it should look like this:
What about flashing the 1v95 4mb combined bin file?
Posted at 2018-01-13 by DrAzzy Nope, no change....
verify_flash passes. An external 3.3v regulator doesn't change it. The ESP8266 windows download tool does not change results. Edit: AAHA! I got it! It needs to be flashed with flash_mode dio instead of qio... I examined the module closely, and it's marked ESP-12N - so it sounds like it's not an ESP-12F but a slightly different module, with a different flash mode... Posted at 2018-01-13 by @MaBecker Hmm, so first try qio and if it does not work try dio Found this hint on https://github.com/espressif/esptool#flash-mode---flash_mode--fm
Which ESP board is on your Wemos board? Posted at 2018-01-13 by @MaBecker Original Attachments: Posted at 2018-01-13 by @MaBecker or Clone Attachments: Posted at 2018-01-14 by DrAzzy The ones I've got are these. The prototyping shields are of my design, you can buy em here. Attachments: Posted at 2018-01-14 by @MaBecker looks like we all missed that post :) Posted at 2018-01-15 by @MaBecker |
Beta Was this translation helpful? Give feedback.
-
Posted at 2018-01-11 by DrAzzy
THE ACTUAL SOLUTION: D1 MINI BOARDS (or most of them, at least) NEED TO BE FLASHED IN dio MODE NOT qio (and GPIO9 and 10 can be used - though they aren't brought out to pins on the D1 mini boards). There is NO DEFECT ON THESE BOARDS - it was USER ERROR on my part! It has come to my attention that people are citing this thread as a proof that these boards are no good - that is TOTALLY UNTRUE!
They don't need any of the modifications discussed below (other than if you actually do need QIO for performance, in which case you either remove the module from one with a torch or heat-gun (I found them just a bit too much for my heat gun; the torch worked way better), or buy a D1 mini without the ESP module from robotdyn on aliexpress and mount your own QIO-supporting ESP-12 on it).
Hi
I'd really like to get Espruino running on some Wemos D1 Mini boards - it would let me save a huge amount of space in a very tightly packed room. But I can't seem to get it running the first time.
I flashed v1.95 with
But now when I try to connect to it with hterm (at 115200 baud, which works for naked ESP12F's) to configure the wifi, I'm clearly not talking to Espruino. It seems like it might be stuck in the bootloader?
When I press reset with serial terminal connected, I get a bunch of garbage - like the wrong baud rate is selected, except I can't figure out what the right baud rate is. It looks like the ESP8266 likes to use some obscenely high baud rate, 460800 (is that the baud rate I should use to see WTF it's outputting?) - but none of my serial console software gives me an option to select that baud rate; I tried downloading several terminal programs, and none would go higher than 230400. Does anyone know of a program that will (assuming that's the correct baud rate)?
I originally thought I had a defective board, and wound up trashing the board trying to figure this out (as I started pulling everything connected to the strapping pins off the board ("There's gotta be something about this WeMos stuff that's holding the strapping pins in the wrong state, so remove everything that seems to be connected to it" but nothing I did seemed to fix the behavior I was seeing. The second board behaves the same as the first though, so it seems like it's something wrong with what I'm doing, not with the board I had.
Has anyone managed to get these to work? What am I missing? I suspect it's something really simple here, but I've put I'd say 5-6 hours into it at this point, and am no closer to making it work than I was when I started.
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions