-->
Page 1 of 4

Can't Upload with Arduino on Linux but CAN upload on Windows

PostPosted: Thu Aug 19, 2021 11:13 am
by espforuandme
I have set up a fresh Manjaro system (21.0.7) and installed a fresh Arduino version 1.8.15 from the Repository.
Uploading Sketches to my Arduino Nano works.
But i cant upload Sketches on all of my ESP boards.

When i start uploading i get a message like this

esptool.py v3.0
Connecting........_____....._____....._____....._____....._____....._____...

I have a dual boot system with Windows 10.
When i boot into Windows 10 and upload Sketches everything works fine (both with Nano and ESP8266 boards). So i think the problem must be Linux Manjaro.

I use the /dev/ttyUSB0 port and the Permissions are set (as said, uploading via this port onto Arduino Nano works perfectly).

i tried already uploading without opened serial monitor and holding the flash button while uploading.
I tried also different cables (althought the used cables did work with Windows Arduino)
But i didnt have success ;-(

Do you have further tips?

Best wishes

Daniel

Re: Can't Upload with Arduino on Linux but CAN upload on Win

PostPosted: Sat Aug 21, 2021 4:15 am
by espforuandme
Hi,

is there really no one who can help? ;-(
I have installed Visual Studio COde and the PlatformIO extension.
But also in this Platform i get the same error

Looking for upload port...
Auto-detected: /dev/ttyUSB0
Uploading .pio/build/d1_mini_lite/firmware.bin
esptool.py v3.0
Serial port /dev/ttyUSB0
Connecting........_____....._____....._____....._____....._____....._____....._____

A fatal error occurred: Failed to connect to ESP8266: Timed out waiting for packet header
*** [upload] Error 2
============================================================= [FAILED] Took 24.52 seconds =============================================================
Der Terminalprozess "platformio 'run', '--target', 'upload'" wurde mit folgendem Exitcode beendet: 1.

Can python be the problem?
Maybe an incompatibility between the esptool.py and my installed python version?
i have version Python 3.9.6 installed.

Re: Can't Upload with Arduino on Linux but CAN upload on Win

PostPosted: Sat Aug 21, 2021 8:11 pm
by QuickFix
The best way to check if your computer (any OS) can "Talk" to the ESP is by:
  • Taking a terminal application (like PuTTY)
  • Create a new connection using the port the ESP is connected to at a rate of 74880 Baud (this is not a typo)
  • Give the ESP a reset (using its RESET button or by pulling pin 1 momentary LOW)
  • If your connection is correct, you should get something similar to this in your terminal:
    Code: Select all ets Jan  8 2013,rst cause:2, boot mode:(3,6)

    load 0x4010f000, len 3584, room 16
    tail 0
    chksum 0xb0
    csum 0xb0
    v2843a5ac
    ~ld
  • If you don't get any response, check connections, drivers, port mappings, ... and try again until you do

Re: Can't Upload with Arduino on Linux but CAN upload on Win

PostPosted: Tue Aug 24, 2021 1:31 pm
by espforuandme
And this is the strange thing:
I get a connection.
When i set 115200 as baudrate (which is the set baudrate of the last sketch i was able to upload) ind connect, i get the serial output of my last sketch.

But i cant upload sketches.
But why does uploading work on the windows machine (with the same ESP8266 but not at the linux machine??
And why DOES uploading onto a Arduino nano WORK on the linux machine?

I can't get rid of the feeling that it has something to do with the esptool.py uploader.
Is there a way to check if the uploader is correctly installed?
Or can the installed python version by the problem?

Best wishes
Daniel