Uploading code to LoRa Gateway - 1-Channel (ESP32)

I am having difficulty programming the SparkFun LoRa Gateway - 1-Channel (ESP32).

I have two of these, and experience the same problem with each.

I have been trying to follow the “Tutorial for LoRa Gateway - 1-Channel (ESP32)”.

I have not been able to get even the Blink code to load.

Using Arduino 1.8.8 on Ubuntu Linux 18.04.

I have installed the ESP32 Arduino core.

I have added the variant definition to the boards.txt file in the appropriate location under .arduino15/*.

The device /dev/ttyUSB0 appears when the boards are plugged in, and I have that set in the Arduino Interface.

No terminal windows or other connections to the serial device is running.

The code compiles as expected.

No combination of use/non-use of the rst or ‘button 0’ seems to allow me to upload the code as described under “User Buttons, LEDs, and USB” in the tutorial. Though I find that (and other) parts of the tutorial unclear. I am familiar with the oddities of the SamD21 upload process, but double clicking rst doesn’t seem to help.

The output in from the compile/upload process is inevitably:

Arduino: 1.8.8 (Linux), Board: “SparkFun LoRa Gateway 1-Channel, Default, QIO, 80MHz, 4MB (32Mb), 921600”

Sketch uses 192024 bytes (14%) of program storage space. Maximum is 1310720 bytes.

Global variables use 12800 bytes (4%) of dynamic memory, leaving 282112 bytes for local variables. Maximum is 294912 bytes.

python /home/dave/.arduino15/packages/esp32/tools/esptool_py/2.6.0/esptool.py --chip esp32 --port /dev/ttyUSB0 --baud 921600 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 /home/dave/.arduino15/packages/esp32/hardware/esp32/1.0.1/tools/partitions/boot_app0.bin 0x1000 /home/dave/.arduino15/packages/esp32/hardware/esp32/1.0.1/tools/sdk/bin/bootloader_qio_80m.bin 0x10000 /tmp/arduino_build_455131/Blink.ino.bin 0x8000 /tmp/arduino_build_455131/Blink.ino.partitions.bin

esptool.py v2.6-beta1

Serial port /dev/ttyUSB0

Connecting…

Chip is ESP32D0WDQ6 (revision 1)

Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None

MAC: 84:0d:8e:0c:58:38

Uploading stub…

Running stub…

Stub running…

Changing baud rate to 921600

Changed.

Configuring flash size…

A fatal error occurred: Timed out waiting for packet content

A fatal error occurred: Timed out waiting for packet content

Can anyone point out the error of my ways?

Dave

lower your speed to connect to the ESP32 board to 230K, maybe even lower depending on the quality of the cable and speed of your USB/system. Also make sure your serial monitor is NOT active.

Thanks! Fixed my problem.

Dave

I should have been more clear for the sake of others with a similar problem: Changing the connect speed to 230K fixed the problem immediately.

Problem solved!

Dave

I am having the exact same issue with uploading the Blink sketch to the board. I’m using the latest Arduino IDE (1.8.8) in Windows 10 and have also followed the hookup guide.

I’ve tried all the baud rates available in the board.txt file for this variant. The lowest upload speed selectable from the IDE is 115200. I also made sure to set the baud rate of the USB serial COM port to the same speed via the Device Manager. I’ve tried several different cables and different USB2.0 ports. Like wittend mentioned, the onboard pushbuttons do not appear to be connected to anything right out of the box. I did, however, verify the reset pin goes low with a multimeter when the button is pushed.

Here are the results from upload attempts:

Arduino: 1.8.8 (Windows Store 1.8.19.0) (Windows 10), Board: “SparkFun LoRa Gateway 1-Channel, Default, QIO, 80MHz, 4MB (32Mb), 115200”

Build options changed, rebuilding all

Sketch uses 192024 bytes (14%) of program storage space. Maximum is 1310720 bytes.

Global variables use 12800 bytes (4%) of dynamic memory, leaving 282112 bytes for local variables. Maximum is 294912 bytes.

C:\Users\Justin\Documents\ArduinoData\packages\esp32\tools\esptool_py\2.6.0/esptool.exe --chip esp32 --port COM9 --baud 115200 --before default_reset --after hard_reset write_flash -z --flash_mode dio --flash_freq 80m --flash_size detect 0xe000 C:\Users\Justin\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.1/tools/partitions/boot_app0.bin 0x1000 C:\Users\Justin\Documents\ArduinoData\packages\esp32\hardware\esp32\1.0.1/tools/sdk/bin/bootloader_qio_80m.bin 0x10000 C:\Users\Justin\AppData\Local\Temp\arduino_build_195561/Blink.ino.bin 0x8000 C:\Users\Justin\AppData\Local\Temp\arduino_build_195561/Blink.ino.partitions.bin

esptool.py v2.6-beta1

Serial port COM9

Connecting…__

Chip is ESP32D0WDQ6 (revision 1)

Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None

MAC: 84:0d:8e:0b:70:70

Uploading stub…

Running stub…

Stub running…

Configuring flash size…

Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB

Compressed 8192 bytes to 47…

A fatal error occurred: Timed out waiting for packet content

A fatal error occurred: Timed out waiting for packet content

Any ideas?

Getting same error. Followed the hookup guide exactly. I’m getting this error:

Arduino: 1.8.8 (Windows Store 1.8.19.0) (Windows 10), Board: “SparkFun LoRa Gateway 1-Channel, Default, QIO, 80MHz, 4MB (32Mb), 921600”

Build options changed, rebuilding all

Sketch uses 192024 bytes (9%) of program storage space. Maximum is 1966080 bytes.

Global variables use 12800 bytes (4%) of dynamic memory, leaving 282112 bytes for local variables. Maximum is 294912 bytes.

esptool.py v2.6-beta1

Serial port COM15

Traceback (most recent call last):

File “esptool.py”, line 2865, in

File “esptool.py”, line 2858, in _main

File “esptool.py”, line 2565, in main

File “esptool.py”, line 213, in init

File “site-packages\serial_init_.py”, line 88, in serial_for_url

File “site-packages\serial\serialwin32.py”, line 78, in open

File “site-packages\serial\serialwin32.py”, line 222, in _reconfigure_port

serial.serialutil.SerialException: Cannot configure port, something went wrong. Original message: WindowsError(31, ‘A device attached to the system is not functioning.’)

Failed to execute script esptool

the selected serial port Failed to execute script esptool

does not exist or your board is not connected

This report would have more information with

“Show verbose output during compilation”

option enabled in File → Preferences.

Same problem here, how did you fix it?

I am experiencing this same problem. I have used all available baud rates, and several different USB ports on my computer.

============================================

Arduino: 1.8.13 (Windows 10), Board: “SparkFun LoRa Gateway 1-Channel, Default, QIO, 80MHz, 4MB (32Mb), 230400”

Sketch uses 207705 bytes (15%) of program storage space. Maximum is 1310720 bytes.

Global variables use 15228 bytes (5%) of dynamic memory, leaving 279684 bytes for local variables. Maximum is 294912 bytes.

esptool.py v2.6

Serial port COM12

Connecting…_

Chip is ESP32D0WDQ6 (revision 1)

Features: WiFi, BT, Dual Core, 240MHz, VRef calibration in efuse, Coding Scheme None

MAC: 4c:11:ae:c8:5e:38

Uploading stub…

Running stub…

Stub running…

Changing baud rate to 230400

Changed.

Configuring flash size…

Warning: Could not auto-detect Flash size (FlashID=0xffffff, SizeID=0xff), defaulting to 4MB

Compressed 8192 bytes to 47…

A fatal error occurred: Timed out waiting for packet content

A fatal error occurred: Timed out waiting for packet content

=========================

I am successfully programming Heltec esp32 LoRa boards, and NodeMCUs with the same ports and 3 cables.

I have1.8.13 version of Arduino IDE. I have attached my IDE setting for this unit.

I searched the forum and found baud rate, pressing the button, and none of those changes made a difference.

The Code I am tying to put is the simple blink example program which is quite straight forward.

Any other advice would be appreciated.

15006 setting.png