A fatal error occurred: Invalid head of packet

jordanj
Posts: 1
Joined: Thu Sep 05, 2019 11:38 pm

A fatal error occurred: Invalid head of packet

Postby jordanj » Fri Sep 06, 2019 12:13 am

Hello everyone,

I have started my adventure with ESP32 and have been having some problems since yesterday. I use Arduino IDE, my ESP32 is powered from bench PSU.

For a few weeks I was able to flash it using Arduino IDE without any issue. ... until yesterday. I have started to encounter following problem:

Sketch uses 193188 bytes (14%) of program storage space. Maximum is 1310720 bytes.
Global variables use 12680 bytes (3%) of dynamic memory, leaving 315000 bytes for local variables. Maximum is 327680 bytes.
esptool.py v2.6
Serial port /dev/cu.usbserial-AM00LYR0
Connecting....
Chip is ESP32D0WDQ5 (revision 1)
Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None
MAC: 3c:71:bf:dc:f9:44
Uploading stub...

A fatal error occurred: Invalid head of packet (0x80)
A fatal error occurred: Invalid head of packet (0x80)


Only packet address changes. I tried with different module, it is all the same. I have completely no idea what may be wrong. Please note that htere is no connection problem. I can open serial port monitor and see logs e.g.

[Just after boot, factory new ESP32 module]
02:06:01.262 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
02:06:01.262 -> configsip: 0, SPIWP:0xee
02:06:01.262 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
02:06:01.262 -> mode:DIO, clock div:2
02:06:01.262 -> load:0x3fff0018,len:4
02:06:01.262 -> load:0x3fff001c,len:5656
02:06:01.262 -> load:0x40078000,len:0
02:06:01.262 -> ho 12 tail 0 room 4
02:06:01.262 -> load:0x40078000,len:13844
02:06:01.262 -> entry 0x40078fc4
02:06:01.262 -> [0;32mI (30) boot: ESP-IDF v3.0.7 2nd stage bootloader[0m
02:06:01.262 -> [0;32mI (30) boot: compile time 09:04:31[0m
02:06:01.262 -> [0;32mI (30) boot: Enabling RNG early entropy source...[0m
02:06:01.262 -> [0;32mI (34) boot: SPI Speed : 40MHz[0m
02:06:01.262 -> [0;32mI (39) boot: SPI Mode : DIO[0m
02:06:01.262 -> [0;32mI (43) boot: SPI Flash Size : 4MB[0m
02:06:01.262 -> [0;32mI (47) boot: Partition Table:[0m
02:06:01.262 -> [0;32mI (50) boot: ## Label Usage Type ST Offset Length[0m
02:06:01.262 -> [0;32mI (58) boot: 0 phy_init RF data 01 01 0000f000 00001000[0m
02:06:01.262 -> [0;32mI (65) boot: 1 otadata OTA data 01 00 00010000 00002000[0m
02:06:01.262 -> [0;32mI (72) boot: 2 nvs WiFi data 01 02 00012000 0000e000[0m
02:06:01.262 -> [0;32mI (80) boot: 3 at_customize unknown 40 00 00020000 000e0000[0m
02:06:01.262 -> [0;32mI (87) boot: 4 ota_0 OTA app 00 10 00100000 00180000[0m
02:06:01.262 -> [0;32mI (95) boot: 5 ota_1 OTA app 00 11 00280000 00180000[0m
02:06:01.262 -> [0;32mI (102) boot: End of partition table[0m
02:06:01.262 -> [0;32mI (107) boot: No factory image, trying OTA 0[0m
02:06:01.262 -> [0;32mI (112) esp_image: segment 0: paddr=0x00100020 vaddr=0x3f400020 size=0x20614 (132628) map[0m
02:06:01.333 -> [0;32mI (167) esp_image: segment 1: paddr=0x0012063c vaddr=0x3ffc0000 size=0x02d7c ( 11644) load[0m
02:06:01.333 -> [0;32mI (172) esp_image: segment 2: paddr=0x001233c0 vaddr=0x40080000 size=0x00400 ( 1024) load[0m
02:06:01.333 -> [0;32mI (174) esp_image: segment 3: paddr=0x001237c8 vaddr=0x40080400 size=0x0c848 ( 51272) load[0m
02:06:01.333 -> [0;32mI (204) esp_image: segment 4: paddr=0x00130018 vaddr=0x400d0018 size=0xdfc80 (916608) map[0m
02:06:01.652 -> [0;32mI (525) esp_image: segment 5: paddr=0x0020fca0 vaddr=0x4008cc48 size=0x02504 ( 9476) load[0m
02:06:01.685 -> [0;32mI (529) esp_image: segment 6: paddr=0x002121ac vaddr=0x400c0000 size=0x00064 ( 100) load[0m
02:06:01.685 -> [0;32mI (541) boot: Loaded app from partition at offset 0x100000[0m
02:06:01.685 -> [0;32mI (541) boot: Disabling RNG early entropy source...[0m
02:06:01.794 -> 1.1.3

02:06:01.794 -> I (648) wifi: wifi firmware version: 703e53b
02:06:01.794 -> I (649) wifi: config NVS flash: enabled
02:06:01.794 -> I (649) wifi: config nano formating: disabled
02:06:01.794 -> I (659) wifi: Init dynamic tx buffer num: 32
02:06:01.794 -> I (659) wifi: Init data frame dynamic rx buffer num: 32
02:06:01.794 -> I (659) wifi: Init management frame dynamic rx buffer num: 32
02:06:01.794 -> I (665) wifi: wifi driver task: 3ffdeeb8, prio:23, stack:3584
02:06:01.794 -> I (670) wifi: Init static rx buffer num: 10
02:06:01.794 -> I (674) wifi: Init dynamic rx buffer num: 32
02:06:01.794 -> I (678) wifi: wifi power manager task: 0x3ffe369c prio: 21 stack: 2560
02:06:01.828 -> I (712) wifi: mode : softAP (3c:71:bf:dc:f9:45)
02:06:01.828 -> I (719) wifi: mode : sta (3c:71:bf:dc:f9:44) + softAP (3c:71:bf:dc:f9:45)
02:06:01.828 -> I (723) wifi: mode : softAP (3c:71:bf:dc:f9:45)
02:06:01.828 -> I (727) wifi: set country: cc=CN schan=1 nchan=13 policy=1
02:06:01.828 ->

[After entering flash mode]
02:07:09.763 -> ets Jun 8 2016 00:22:57
02:07:09.763 ->
02:07:09.763 -> rst:0x1 (POWERON_RESET),boot:0x3 (DOWNLOAD_BOOT(UART0/UART1/SDIO_REI_REO_V2))
02:07:09.796 -> waiting for download

I have tried two different modules on teo different machines and have completely no idea what may be wrong. I am curious because it had been working for two weeks before yesterday. I do not know what I started to do wrong. Initially I thought I destroyed the module but another one, factory new, behaves in exactly the same manner.

Thank you in advance for any suggestions.

Who is online

Users browsing this forum: Baidu [Spider], Bing [Bot] and 23 guests