Error when trying to flash via arduinoIDE from a Manjrao(linux arch) System.

nobbynobby
Posts: 5
Joined: Thu May 02, 2019 8:12 pm

Error when trying to flash via arduinoIDE from a Manjrao(linux arch) System.

Postby nobbynobby » Thu May 02, 2019 8:17 pm

My new ESP32 just arrived!

I wanted to use the arduinoIDE to write some sketches and wanted to start with a simple LED blink as a test. Here is code that i want to put on the esp:

Code: Select all

/*
* https://circuits4you.com
* ESP32 LED Blink Example
* Board ESP23 DEVKIT V1
*
* ON Board LED GPIO 2
*/
#define LED 2
void setup() {
// Set pin mode
pinMode(LED,OUTPUT);
}
void loop() {
delay(5000);
digitalWrite(LED,HIGH);
delay(5000);
digitalWrite(LED,LOW);
}


I already installed the git stuff so that i can select the ESP32 dev board from the drop down menu inside the IDE. So that worked. I don't know which board i have to select from the dropdown menu. Can you tell me which one i should click? i bought this one here: https://www.amazon.de/dp/B071P98VTG?ref ... E_DDE_dt_1





I followed a guide that was written for ubuntu and not for manjaro. Ubuntu is based on debian and manjaro is based on arch so this might be the source of the problems. This command does not work for me:


Code: Select all

/home/artur c=3 sudo usermod -a -G dialout $USER

usermod: group 'dialout' does not exist


But i read somehwere that i need to add the user to the uucp group instead. I don;t remember how but i did that and can check that i am part of the group:


Code: Select all

/home/artur c=3 groups

sys lp wheel uucp lock network video optical storage scanner power autologin artur





When i try to upload the sketch i get the following error:

Code: Select all


Arduino: 1.8.9 (Linux), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"



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

Global variables use 13348 bytes (4%) of dynamic memory, leaving 314332 bytes for local variables. Maximum is 327680 bytes.

esptool.py v2.6

Serial port /dev/ttyUSB0

Connecting........_____....._____....._____....._____....._____....._____....._____



A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

Almost the same happens when i use the other port:

Code: Select all

Arduino: 1.8.9 (Linux), Board: "ESP32 Dev Module, Disabled, Default 4MB with spiffs (1.2MB APP/1.5MB SPIFFS), 240MHz (WiFi/BT), QIO, 80MHz, 4MB (32Mb), 921600, None"



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

Global variables use 13348 bytes (4%) of dynamic memory, leaving 314332 bytes for local variables. Maximum is 327680 bytes.

esptool.py v2.6

Serial port /dev/ttyS0

Connecting........_____....._____....._____....._____....._____....._____.....____An error occurred while uploading the sketch

_



A fatal error occurred: Failed to connect to ESP32: Timed out waiting for packet header

I did try to hold down the 'boot' button on my device until the Connecting part of the ide appeared.



Here is a dmesg | grep tty output:

Code: Select all

[ 0.000000] console [tty0] enabled

[ 1.414333] systemd[1]: Created slice system-getty.slice.

[ 1.992146] dw-apb-uart.1: ttyS0 at MMIO 0xdcc32000 (irq = 20, base_baud = 115200) is a 16550A

[ 2.343860] usb 1-1: cp210x converter now attached to ttyUSB0

[ 751.546600] cp210x ttyUSB0: cp210x converter now disconnected from ttyUSB0

[ 769.159488] usb 1-1: cp210x converter now attached to ttyUSB0

Can you please help me get this awesome board to play nice with my laptop?


same error output if i start my arduinoIDE with sudo. Also the same error when i switch to upload speed 115200.

ESP_Angus
Posts: 2344
Joined: Sun May 08, 2016 4:11 am

Re: Error when trying to flash via arduinoIDE from a Manjrao(linux arch) System.

Postby ESP_Angus » Fri May 03, 2019 1:21 am

What ESP32 board do you have, exactly?

I don't think this issue is OS or permissions related. /dev/ttyUSB0 looks like the right port.

The problem is probably related to the automatic reset functionality on the board:
https://github.com/espressif/esptool/#troubleshooting
https://github.com/espressif/esptool/wi ... -Selection

Some third party boards benefit from adding a capacitor between the EN and GND pins, as mentioned at the second link.

You can also try holding down the BOOT button for the entire time that esptool is trying to contact the board, and/or quickly pressing and releasing the EN button a few times while esptool is trying the "Connecting..." stage (while not releasing BOOT).

nobbynobby
Posts: 5
Joined: Thu May 02, 2019 8:12 pm

Re: Error when trying to flash via arduinoIDE from a Manjrao(linux arch) System.

Postby nobbynobby » Fri May 03, 2019 12:53 pm

What ESP32 board do you have, exactly?
i have this one here:
https://www.amazon.de/dp/B071P98VTG?ref ... E_DDE_dt_1

You can also try holding down the BOOT button for the entire time that esptool is trying to contact the board, and/or quickly pressing and releasing the EN button a few times while esptool is trying the "Connecting..." stage (while not releasing BOOT).
I have tried every thinkable combination of those buttons already.

Same errors when i am using a windows machine. So i think its not a linux problem but a ESP32 problem

Who is online

Users browsing this forum: No registered users and 97 guests