I tried to flash an ESP32 but I didn't succeed, I tried with esptool.py and Arduino IDE. I tried to press the boot button and reset but it didn't work. Here is the error:
A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header
If using the Arduino IDE, try lowering the upload speed (Tools/Upload Speed). Lowering mine from 921600 to 460800 did the trick.
First ensure that you are in download mode:
Start the serial monitor and set the speed (mine is 115200).
While pressing the "boot" button, press and release the "en" button (your buttons may be labeled differently).
You should see something like this on the serial monitor:
waiting for download
Now start the upload
My development machine, a 2013 iMac is connected via USB to the USB-c port on my ESP32 Dev Module. Apparently the iMac's USB or ESP32 board's USB cannot keep up at the 921600 upload speed.
DISCLAIMER! May not be correct answer but may help to save time for someone.
Quick answer if you do not want read my experience: Disconnect all wires from pins and try uploading again! It may help.
I came across with the same error and could not figure it out. I first thought that something is wrong with the code, because it happened after I edited working code while figuring out where to connect what pin 😀. I also wasn't able to upload simple HelloWorld after it happened with connected wires. But then I disconnected all my wires from the board and the upload works fine.
I can not figure out the WHY factor but I think it must had been the input/data pin I was using, in my case D13. I have the DevKit with fewer pins. Maybe someone can comment why connected pins may make the error come up?
To make your ESP32 board go into flashing/uploading mode automatically, you can connect a 10 μF electrolytic capacitor between the EN pin and GND. When I had the same problem, when I followed this advice, the problem was solved.
References
Failed to connect to ESP32: Timed out waiting for packet header
espressif/arduino-esp32 - issue
On some AliExpress-like ESP32s you have to press the boot button in order to upload your sketch.
If you are watching the Arduino IDE console ouput and Connecting ... appears, you have to press the boot button for approximately 2 seconds until the console output changes.
Try to do this one after the other
Press the boot button when press uploading button until it write the code.
Try disconnect esp32 from the board/header/pcb that you are using right at the time.
Disconnect any other connection that your esp32 might have.
Do not connect to anything even your hand if possible.
Try put it in something that doesnt have a moist surface. look pic number 3.
MY CASES(30 pin version):
Case 1: I dont know why. I was connecting the pin to a female header it doesnt work and sometimes it just work like that. look pic number 1.
Case 2: when Im holding esp32 on my hand sometimes it wont work then i put it on my table and another time it doing well.
Case 3: pressing boot button when uploading it helped sometimes, and the other time it just work like it should.
Case 4: when it connected to pcb its simply just wont work, but when disconnected boom it work like nothing ever happen. look pic number 2.
Maybe just maybe something with capacitive or something like that (just assuming because number Case 1). hope that will help you out.
pic 1pic 2pic 3
This technique definitely working
Goto Tools > programmer, Select ISP and Upload Your Code.
if you can't see any programmer, then download 1.8.12 version.
https://www.arduino.cc/en/software/OldSoftwareReleases
With Arduino IDE
Make sure the Com port is selected under Tools menu. My experience with ESP32 is Com 5.
If it is not available as an option, try changing USB ports and/or re-select Tools - Board - ESP32 dev module.
Watch the "Compiling Sketch" window.
Press the "Boot" button as soon as you get the red message "Serial port Com 5" You can release the button as soon as it starts to upload.
If this doesn't work,try plugging into another USB port.
The Reset button only resets the uploaded sketch to re-initialise and has nothing to do with the uploading.
Install expressif.exe and port drivers,connect the port and flash the esp32 ,upload the code using ardiuno,solve the error
in my case buttons are new but not shorting properly as multimeter showed ..opened both scratched resoldered and all working
Changing by upload speed from 921600bps to 115200bps fixed it. No need to press any buttons.
Just download the drivers x)
CP210x: CP210x USB to UART Bridge VCP Drivers
FTDI: FTDI Virtual COM Port Drivers
I need help at my GSM-Project. Somehow I am not able to connect to the Network. I already checked if I forgot something, but I don't think so. The LTE- and GPS-Antenna are connected correctly to the board and a valid SIM(my own for testing, without PIN) is inserted. I did manage to receive a Message and get some GPS-Informations(which had a little deviation). The "NET" indicator LED keeps flashing fast, which tells me that the module hasn't logged in to the Network, but I couldn't it explain to myself.
Here is a link to the module's Manual:
SIM7600E-H-4G-HAT-Manual
Try the AT+CREG? command to check the status of network registration.
I have an Arduino Uno that is successfully registered as a device with IBM IoTF. It can send information to the Bluemix Node-RED app without any issues now.
Now, I would like the Node-RED app to send commands to the device (the Arduino Uno). The Arduino is subscribed to the MQTT without any error. But, it is not receiving any commands from the Node-RED. I followed the directions at the link below to create another flow in Node-RED to show when a command is published and the commands are being shown, so they seem to be going to the MQTT broker. But, the device (Arduino) is not receiving them.
How can I figure out how to get this working?
Node-RED, IOT Foundation Out Node Not Sending Commands
I have the IBM IoT Out Node parameters set as follows:
Authentication: Bluemix Service
Output type: Device command
Device type: Arduino-tempsensor (this is the same string I used for the device type (name) when I registered it in IoTF)
Device ID: I put the MAC address here, should it be more
Command Type: status (I used the word "status" here. Does capitalization matter? Where should I get this value from? I used "status" because it is in the topic: "iot-2/cmd/status/fmt/json" is that correct?)
Format: json (does capitalization matter here?)
data: {"d":{"myName":"Arduino Uno", "temperature":989}} (I used this because it's JSON and I wanted to just see anything at the device)
Name: IBM IoT App Out
I typed up this whole question and then it occurred to me that the test flow to look for the published command should have all of the parameters set to exactly the same as the output. When I tried that, I was not getting the command message coming back. Then, I realized that my mac address (device ID) was capitalized in one place, but not the other. The MAC address (Device ID) I used to register the device was all in caps, so I make the Iot-out node for the command so that it was all capitalized and made the Iot-in node to test for the message so that it was all capitalized. Now it works! Then, I looked back at the device (which was printing to the serial monitor so I could see what was happening) and I am now seeing the messages! So, make sure your parameters follow the same capitaliztion!
Just received my first ESP8266 wifi module with some excitement. However I've been unable to fully communicate with it. I have connected the module to my computer via a usb to serial cable and I'm power the module via a separate power supply (3.3v).
After powering the module up I receive the following information (via PuTTY or and Arduino serial monitor window):
[Vendor:www.ai-thinker.com Version:0.9.2.4]
ready
I have tried sending various AT commands e.g.
AT+RST
But I get no response. Using ctrl+m and ctrl+j in putty didn't help either.
Please see my youtube video if its helpful:
https://www.youtube.com/watch?v=RvasOuHuWDc
To get AT OK .
1.AT + PRESS ENTER + THEN CTRL +J WILL GIVE OK
2.Then Enter commands to execute
eg AT+GMR ->presss enter then ctrl+j
to get firmware
repeat step 1 for each command.
Make sure that you have putty or the Arduino serial console configured to send both a newline \n and a carriage return \r character. So AT+RST actually ends up being AT+RST\r\n. This took me a bit when I first received my ESP8266 modules. On the Arduino serial console this option is at the bottom of the window. I can see in your video you have it set to no line ending. Hopefully that does it for you.
I'm trying to establish a PPP connection using pppd and AT Commands. This usually works fine with a SIM card of my local provider. However, I received a card from a friend that is living in Germany and I wanted to give it a try from Switzerland but I have a very strange behavior.
First I cannot activate the error message (AT+CMEE), I always get the error message "ERROR" despite I activated the full verbose previously (AT+CMEE=2). This commands works with my local provider SIM card ...
Then if I check the network status:
AT+CGREG?
+CGREG: 1,3
Believing the "3", this means "Registration denied".
When I try to attach or detach, I always have an error without more explanation (Despite AT+CMEE=2):
AT+CGATT=0
ERROR
AT+CGATT=1
ERROR
AT+CGATT?
+CGATT: 0
OK
I can send SMS with AT commands! Putting the SIM card in a phone, I cannot establish any call!
So is it possible to send SMS without the need to register to the network? Is it possible that error message reporting is deactivated on the SIM card? I'm wondering if this is a problem of configuration, a problem of the SIM card or a problem of provider...
Edit
If this could help someone. I tried to send an SMS when I'm detached from the network with my working SIM card, it works! Believing this website I guess my friend didn't pay the bill or my local network provider refuses me to use its network ...
Probably roaming of circuit switched data (GSM) is allowed. And roaming of GPRS service is not allowed.
AT+CGREG? returns status of GPRS registration.
AT+CREG? returns status of network registration (GSM/UMTS).
Try command:
AT+CREG?
It probably will return 5 (Registered, roaming).
SMS message sending works because it does not need GPRS. Attach and +CGREG stuff are all for GPRS.