-->
Page 4 of 5

Re: esptool.py: Exception('Invalid head of packet')

PostPosted: Fri Mar 27, 2015 2:39 pm
by Maciej
Hi,

I had the same problem and I spent two days on it.
On the beginning I used RS232 to TTL converter based on FTDI FT232RL IC via USB port. After two days it was the only one suspicious and I decided to use RS232C port which I had on my PCI card inside my PC.

I build simple RS232-TTL converter based on ST232C (or MAX232) circuit. It is working now without any problems. I flashed ESP8266 10 times with success and it works fine now. Remember to add 5V to 3.3V divider on ESP8266_RX pin for safety, but I noticed that ESP is 5V input tolerant circuit (I have no documentation, so it is better to be careful).

Explanation:
I noticed on my oscilloscope that transfer is organized in 1024 bytes packets and after each packet EPS8266 sends acknowledge to the PC. I noticed that after 30..33 packets ESP8266 did not acknowledged received packet and flashing procedure crashed. Probably FT232RL lost some bytes.

Best Regards
Maciej

Re: esptool.py: Exception('Invalid head of packet')

PostPosted: Tue Mar 31, 2015 7:37 pm
by mmcginty
Seems to me the problem is the cheap knock-off FTDI chips, my firmware burn was failing at various spots between 40% and 60%. Then I wired up another FTDI USB serial adapter I happen to have and it went all the was through the burn on the first try.

Strangely (to me anyway) the ESP-12 I have needs GPIO0 high and GPIO15 low for normal operating mode. More, RST doesn't need to be high (as I had read that it did somewhere.)

Re: esptool.py: Exception('Invalid head of packet')

PostPosted: Sat May 30, 2015 7:22 am
by osse
Had a similar issue (uploading firmware using esptool would fail during N%). My solution was to replace serial module used to communicate with the board (201). Replacing FTDI232 based module with PL2303MDL resulted in successful firmware flashing.

Re: esptool.py: Exception('Invalid head of packet')

PostPosted: Fri Oct 09, 2015 11:24 pm
by boneskull
I had this issue as well; "Invalid Head of Packet". Instead of switching the programmer from an FT232RL, I was able to use GPIO2 as TX and left TX floating (ESP-01).