Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By Ken UF
#90378 K2R79,

Thank you for your help. I did downloaded Pyserial and ESPTOOL but don't know where to put it in. I try to create /Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/
to put these 2 folders in but it's not working. I put it in ~Library/~
It's also not working. " no headers files (.h) found in /Users/kengshome/Documents/Arduino/libraries/pyserial-3.4 "

Please help.

Ken

[img]/Users/kengshome/Desktop/Screen%20Shot%202564-02-01%20at%2010.03.26.png[/img]
[img]/Users/kengshome/Desktop/Screen%20Shot%202564-02-01%20at%2010.04.47.png[/img]
User avatar
By ludiccc
#90470 There's another workaround... the problem appears to be something with esptool.py. In Big Sur the

Code: Select allimport serial.tools.list_ports as list_ports


call is not working. So, one approach is:

* Edit the esptool.py located in:
~/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool

* Comment the lines with the call for list_ports :

Code: Select all#try:
#    import serial.tools.list_ports as list_ports
#except ImportError:
#    print("The installed version (%s) of pyserial appears to be too old for esptool.py (Python interpreter %s). "
#          "Check the README for installation instructions." % (sys.VERSION, sys.executable))
#    raise


* Check (by terminal with ls /dev/tty.* or with the Arduino IDE) the name of the board in the system, and replace the DEFAULT_PORT variable:

Code: Select allDEFAULT_PORT = "/dev/tty.usbserial-1422"


This workaround was taken from https://github.com/espressif/esptool/issues/540. It worked for me. The big problem is that if you change the USB where you connect the board, the "/dev/tty.usbserial-NNNN" will change...
User avatar
By jon_g
#90626 +1 from me, thank you for sharing.

Just to clarify, download and unzip the latest pyserial and esptool zip files from github, in my case this was pyserial-3.4 and esptool-3.0. You then need to remove and overwrite the original pyserial and esptool, so in
~/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools
remove the originals, ie
rm -r pyserial
and
rm -r esptool
and then go to where you extracted the new ones and move them to the correct location, so:
mv pyserial-3.4 ~/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/pyserial
mv esptool-3.0 ~/Library/Arduino15/packages/esp8266/hardware/esp8266/2.7.4/tools/esptool

After that, my sketch uploaded fine.
User avatar
By talsznicer
#91144 Might be helpful for beginners like me:

After following the instruction I didn't get the same error but a new one in the Arduino IDE consule:

Code: Select allthe selected serial port _
 does not exist or your board is not connected


After some time I Just realized that I didn't pick the right Prot in the Arduino IDE:
Image