I am having issues uploading code to the ESP8266. I have seen crazy amount of support for the ESP8266 NodeMCU but zero support for the this ESP8266 (see picture).
I have a ESP8266 USB adaptor like this one and has a little switch to move from uart to programming mode. The issue I have is that when I try to upload the simple blink example provided by the ESP8266 library I get this message:
"the selected serial port does not exist or your board is not connected"
It reaches all the way to "connecting......._" and after that it displays the error above.
Any thoughts?
Thanks
EDIT: the error also spits "Timed out waiting for packet header"
I also had that problem. Is your Esp8266 connected to any board? Unplug ALL the wires besides for the ground wires and try again, this time it should work. Hope this helps you.
I tried it and no luck - it did not work. I set it to UART mode and then press upload, as soon as the process started I swap to PROG mode. I got the same error (the selected serial port...)
It should be in 'Prog-mode' (GPIO 0 pulled LOW) Make sure that the Serial port is not otherwise occupied, close things like putty etc (even the Serial monitor of the IDE, just in case) What are your other board settings ?
The instructions say that you might have to install drivers for the CH340g device. Also it says to unplug the adapter, then switch to program, then plug in again.
Hope this helps.
G
Are you using the ESP exclusively with the Raspberry Pi? Do you have access to a PC for a quick test?
(I will use /dev/ttyS1 as example, change that to the correct device name)
Set the USB adapter to PROG, plug the ESP on top, and plug the adapter to a USB port.
What is the result if you type something like this:
esptool.py -p /dev/ttyS1 chip_id
Alternatively, you can try opening a terminal to /dev/ttyS1 with baud rate set to 74880. I'm not familiar with the programs available on your Pi, so no specific command suggestion here.
Examine the pinout:
Then carefully short the pins GND and Reset using a piece of wire or fine tweezers. Don't hold, just a quick touch. You should get something similar to this in the terminal:
ets Jan 8 2013,rst cause:2, boot mode:(1,6)
If you get that, then the communication is fine and you should look for an issue within the IDE.
If you can test on a Windows PC:
Get Termite. The link marked as (program only) is enough.
Plug the adapter to your PC. Install the CH340 driver if needed. Note the COM port assigned to it.
Start Termite. Click on the Settings button.
Change the Port setting to the correct COM.
Type 74880 in the Baud rate field.
Click OK.
Now quickly short the GND and Reset pins. You should get a response like in the example above.
Thanks for the help @rainyshadow. I tried the above in my mac and this is what I got (not good news):
frank@frank ~ % esptool.py -p /dev/tty.usbserial-110 chip_id
esptool.py v3.0
Serial port /dev/tty.usbserial-110
Connecting........_____....._____....._____....._____....._____....._____....._____
A fatal error occurred: Failed to connect to Espressif device: Timed out waiting for packet header
I got a pack of four ESP8266 and tried with the four of them. I wonder if the usb adapter is faulty?
You can easily check this.
Remove the ESP from the adapter, then plug one end of a wire into the TX pin and the other end in the RX pin (pins 2 and 7 according to the above picture).
Plug the adapter to your mac, open a terminal to /dev/tty.usbserial-110 and type something.
If each character you type is doubled, then the adapter should be working.
[edit]
You can also try this command with the ESP attached (and without the wire ):