2

I want to program my ESP32 as I did 100000000000 times before. Now I want to try it on linux ubuntu :) In preferences I put in the *.json link and installed the espressif board. I think I chose the right board. Something is wrong with the serial port: When I click on board information it shows some serial number

BN: Unbekanntes Board
VID: 10C4
PID: EA60
SN: Laden Sie ir(...)

But when I want to upload it to the board it just shows:

Traceback (most recent call last):
  File "/root/.arduino15/packages/esp32/tools/esptool_py/3.0.0/esptool.py", line 38, in <module>
    import serial
ImportError: No module named serial
exit status 1
Fehler beim Kompilieren für das Board DOIT ESP32 DEVKIT V1.

I also did pip install pyserial ~$ python --version Python 2.7.18

hmm there must also be something wrong?

~$ sudo ls -l /dev/ttyUSB0
crw-rw----+ 1 root dialout 188, 0 Sep  8 15:02 /dev/ttyUSB0

I can open Arduino IDE with sudo, which is with root i think. And also with my account without sudo. .. I have different workspaces i think because i needed to install the board again, when I opened Arduino IDE with sudo .. actually I dont know what dialout is maybe I did it by mistake when installing esp support-.- ..

I also tried to change the group and give all permission via chmod 777 but it doesnt work

/dev# ls -l ttyUSB0 
crwxrwxrwx+ 1 root root 188, 0 Sep  8 15:02 ttyUSB0

anyway after put esp32 out and in again ttyUSB0 chmod777 config is resetted ............................

ls -l ttyUSB0
crw-rw----+ 1 root dialout 188, 0 Sep  8 15:36 ttyUSB0

I also checked my esp32 board now on w10 and there is no problem. Installation was done in 10 minutes (with a big break, making a banana shake xD)

jento
  • 39

3 Answers3

5

I had this problem and I tried below codes, and it worked for me:

sudo apt-get install python-serial -y

or if you are using the python3 try:

sudo apt-get install python3-serial -y

Also use lower baudrate as you can see below: enter image description here

Soheil Paper
  • 1,417
0

I had the same problem.

The problem was that I have multiple python versions installed and serial was only available for python 3.

Check if serial is installled for python version 2:

ls /usr/local/lib/python2.7/dist-packages/

If it doesn't appear, copy the library from python version 3:

sudo cp -r /usr/local/lib/python3.8/dist-packages/serial/ /usr/local/lib/python2.7/dist-packages/
0

Here is where I just found the solution, fellows! I installed pyserial in every way without results, but this one worked!

https://www.esp32.com/viewtopic.php?f=19&t=26670

  1. Open a terminal;
  2. Type in 'sudo apt install python-is-python3'

This package is about 500 Mega bytes big, but it did the trick I was expecting for months.