Dear Sara, dear Rui
I bought your Book “MicroPython Programming with ESP32 and ESP8266”. I had a great time walking through your recipes. It was fun! Thank you for this great work.
But I had to do this under Windows, since I can’t connect to the WeMos D1 Mini from Linux, my platform I am working with. I followed the steps that were given in your recipe to install Thonny IDE. It seems, that the system recognises the hardware connected:
heinz@heinz-HP-ENVY-Notebook:~$ lsmod | grep ch34
ch341 24576 0
usbserial 57344 1 ch341 => this is the chip on the D1 mini
Restarting the ESP8266 and then calling sudo demsg
[ 3317.836334] usb 1-1.4.1: new full-speed USB device number 12 using xhci_hcd
[ 3317.937874] usb 1-1.4.1: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.54
[ 3317.937882] usb 1-1.4.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 3317.937886] usb 1-1.4.1: Product: USB2.0-Ser!
[ 3318.052977] usbcore: registered new interface driver usbserial_generic
[ 3318.052994] usbserial: USB Serial support registered for generic
[ 3318.055232] usbcore: registered new interface driver ch341
[ 3318.055249] usbserial: USB Serial support registered for ch341-uart
[ 3318.055274] ch341 1-1.4.1:1.0: ch341-uart converter detected
[ 3318.055954] ch341-uart ttyUSB0: break control not supported, using simulated break
[ 3318.056079] usb 1-1.4.1: ch341-uart converter now attached to ttyUSB0
[ 3318.088972] input: PC Speaker as /devices/platform/pcspkr/input/input22
[ 3318.611519] input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input23
[ 3318.740597] usb 1-1.4.1: usbfs: interface 0 claimed by ch341 while ‘brltty’ sets config #1
[ 3318.741113] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 3318.741136] ch341 1-1.4.1:1.0: device disconnected:
Do you have a hint what I could do?
Thank you
Heinz
One part of the solution I found via github.com. The developper Aivar Annamaa mentioned an issue https://github.com/thonny/thonny/issues/2360. I followed the steps there and now there is a connection to the ESP, but there is always an error message in the REPL:
_Traceback (most recent call last):
File “/home/heinz/apps/thonny/lib/python3.10/site-packages/thonny/plugins/esp/esp_back.py”, line 5, in
from thonny.plugins.micropython.bare_metal_backend import (
ModuleNotFoundError: No module named ‘thonny.plugins.micropython.bare_metal_backend’
Process ended with exit code 1._
I searched the paths mentioned and found as far as I can understand coding everything OK. I posted the error on https://github.com/thonny/thonny/issues/2616
Hi.
I’m sorry for taking so long to get back to you.
For some reason, I missed your first publication.
I’m not familiar with that error… Do you think it is related with the board or with the installation?
If you can’t solve the issue, you may consider using a different MicroPython IDE.
Meanwhile, if you find the solution, please share.
Thank you.
Regards,
Sara
The problem is solved:
I got a hint from Aivar Annamaa, developer of Thonny (github.com):
There was a second older installation of Thonny on my computer in ~/.local/lib/python3.10/site-packages
. I removed the directory thonny in this path – and everything worked as expected.