Chat freely about anything...

User avatar
By bobdabiulder
#79792 I have a number of modules like this: https://www.sparkfun.com/products/13678, as well as a NodeMCU v1.0. I cannot flash them no matter what I do. I try switching USB ports, baud rates, drivers, and programs, and I cannot flash them! I get various errors, like "invalid head of packet" and "invalid packet header". Do note, none of these devices worked when I used the Arduino IDE, either. What is wrong with my stuff?
User avatar
By QuickFix
#79832 The module from your SparkFun-link is an ESP-01 (which is 4 times cheaper on AliExpress BTW) and isn't really plug-and-play
Although a lot of (older) websites and instructables are using these modules, when you're new it's better to first play around with something like a NodeMCU (see my signature), which you luckilly also already have.

What you need to do first is make sure you've got the correct USB drivers installed on your PC for the used UART -> USB convertor that's on the NodeMCU: this can be either a CP2102 (a square IC next to the USB port) or a CH340 (a rectangular IC next to the USB port) chip.
When you've installed the correct driver (although it shouldn't hurt when installing both at once), you can connect the NodeMCU to a free USB-port (this may be USB 1 or 2, try to avoid a USB 3, blue coloured, port): you should hear the "External device found" chime from the OS and a notifying window.

Now go to device manager (just run "devmgmt.msc" from the start-menu) and under the "Ports (COM & LPT)" node, there should be an entry for a device called "USB-SERIAL CP2102" or "USB-SERIAL CH340" (or a name similar to that) followed by the designated COM-port: "COMxx": make a note of this COM-port number.
Download a good terminal program, like PuTTY and install it on your PC.
Start up PuTTY and create a connection with the following properties:
  • Set the radio-button to "Serial"
  • Set "Serial line" to the COM-port you just made a note of (eg. "COM15", without the quotes)
  • Set the speed to 74880 Baud (yes really 74880, this is not a typo)
  • Choose a name (for instance "ESP on COM 15") under "Saved Sessions" and press the "Save"-button
Select the saved session and press the "Open"-button.
Now press the RESET-button on your NodeMCU and you should see a message like this:
Code: Select all ets Jan  8 2013,rst cause:2, boot mode:(3,6)

load 0x4010f000, len 1384, room 16
tail 8
chksum 0x2d
csum 0x2d
v00000000
~ld
   ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒
If you see this, you have the communication working and are ready to explore the wonderful world of the ESP8266, if not then you should double check all above steps and/or try on another PC.

Good luck!