Can't Connect to ESP32 Thing - "Invalid head of packet"

I got a new Sparkfun ESP32 Thing today but I so far I can’t upload a sketch to it in the Arduino IDE.

I am following the steps here: https://learn.sparkfun.com/tutorials/es … okup-guide

I have installed the ESP32 Arduino Core and tools.

I also did git submodule update --init --recursive

  • I did not understand the part about FTDI Drivers and skipped it. *

The board and port show up as described in the tutorial.

I copied in the Blink sketch and tried to run it but I get the error

A fatal error occurred: Failed to connect to ESP32: Invalid head of packet (‘\x00’)

My error messages:

Arduino: 1.8.5 (Mac OS X), Board: “ESP32 Dev Module, QIO, 80MHz, 4MB (32Mb), 921600, None”

Archiving built core (caching) in: /var/folders/w9/8qrgdgdd0fq8_64g2vhbv59c0000gn/T/arduino_cache_470747/core/core_espressif_esp32_esp32_FlashMode_qio,FlashFreq_80,FlashSize_4M,UploadSpeed_921600,DebugLevel_none_d13fdf85e7630712b5f36ac536480a92.a

Sketch uses 162213 bytes (12%) of program storage space. Maximum is 1310720 bytes.

Global variables use 11064 bytes (3%) of dynamic memory, leaving 283848 bytes for local variables. Maximum is 294912 bytes.

/Users/paul/Documents/Arduino/hardware/espressif/esp32/tools/esptool --chip esp32 --port /dev/cu.usbserial-DN03GFSC --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 /Users/paul/Documents/Arduino/hardware/espressif/esp32/tools/partitions/boot_app0.bin 0x1000 /Users/paul/Documents/Arduino/hardware/espressif/esp32/tools/sdk/bin/bootloader_qio_80m.bin 0x10000 /var/folders/w9/8qrgdgdd0fq8_64g2vhbv59c0000gn/T/arduino_build_795682/sketch_feb15a.ino.bin 0x8000 /var/folders/w9/8qrgdgdd0fq8_64g2vhbv59c0000gn/T/arduino_build_795682/sketch_feb15a.ino.partitions.bin

esptool.py v2.1

Connecting……___

A fatal error occurred: Invalid head of packet (‘\x00’)

A fatal error occurred: Invalid head of packet (‘\x00’)

This report would have more information with

“Show verbose output during compilation”

option enabled in File → Preferences.

Also,

When I do “Get Board Info” I get

BN: Unknown board

VID: 0403

PID: 6015

SN: Upload any sketch to obtain it

Still working on this …

I tried holding boot while programming, also tried holding down GPIO0

I selected ‘Arduino as ISP’

I tried lowering the flash frequency, flash size, and upload speed, all to no avail.

Flash mode is still set to QIO. I did not install a new python or pyserial or FTDI Drivers. Should I try?

Also, I have heard that these boards are sometimes simply faulty or need resoldering. Should I just get a new board?

Here is some more info. I connected to the device with a serial terminal and here is my output. RTS & DTR were turned off.

A lot of gibberish, flash read err, RTCWDT_RTC_RESET over and over. So I am wondering if the dev board is constantly rebooting?

(me)$ screen /dev/cu.usbserial-DN03GFSC 115200

r’&�LLHJi���%E5�%U5UE�b�������́��e5E�e�j��%��J�jR2��͡�ɕ�����ɱ��jR*��}��������݊jR�ets Jun 8 2016 00:22:57

rst:0 (RTCWDT_RTC_RESET),boot:0x13 (SPI_F�e�5��%��E�jR2��͡�ɕ�����ɱ�����:R�Յ�������Ł4"�ets Jun 8 2016 00:22:57

rst:0x10 (WDT_RTC_RESET),boot:0x13 (SPI_FAST_F��%��E�jR2��͡�ɕ�����ɱ�����4"���}��ii��jR�ets Jun 8 2016 00:22:57

lash read err, 1000_FAST_FLASH_BOOT)_BOC!+k��ɕ�����ɱ���jR*��}��������jets Jun 8 ���Ғ�Ҫ�jRjD$���������Q��������Q

}IMI������́��A%}MQ}1M!} ==Q�5)���ɕ�����ɱ���jR*��}��������݊jR�ets Jun 8 2016 00::57

rst:0x10 (RTCWDT_RTC_RESET),b����́��A%}MQ}1M!} ==Q�5)���͡�����ɱ���jR*��}����������jR��ets Jun 8 2016 00:22:

rst:0x10 (RTCWDT_RTC_RESET),boot�́��A%}MQ}1M!} ==Q�5)���͡�ɕ�rr, 1000

ets_main.c 371

rst:0x10 (RTCWDT_RTC_RESET),boot:0x(SPI_FAST_FLASH_BOOT)

flash read e2����jR*��}����������jR��ets Jun 8 2016 00:22:57

}IMQ���������