So you're a Noob? Post your questions here until you graduate! Don't be shy.

User avatar
By HeinzE
#95762 I have just started programming with MicroPython. My favorite OS is Linux Ubuntu. I use Thonny to program. But I cannot connect to the ESP8266 (WeMos D1 mini).
In the terminal I can see, that the hardware, the is recognized:

heinz@heinz-HP-ENVY-Notebook:~$ lsmod | grep ch34
ch341 24576 0
usbserial 57344 1 ch341 => serial chip on D1 mini

and sudo demsg shows:
[ 4201.030065] usb 1-1.4.1: new full-speed USB device number 14 using xhci_hcd
[ 4201.131948] usb 1-1.4.1: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.54
[ 4201.131970] usb 1-1.4.1: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 4201.131981] usb 1-1.4.1: Product: USB2.0-Ser!
[ 4201.233594] usbcore: registered new interface driver usbserial_generic
[ 4201.233612] usbserial: USB Serial support registered for generic
[ 4201.244829] usbcore: registered new interface driver ch341
[ 4201.244859] usbserial: USB Serial support registered for ch341-uart
[ 4201.244880] ch341 1-1.4.1:1.0: ch341-uart converter detected
[ 4201.245577] ch341-uart ttyUSB0: break control not supported, using simulated break
[ 4201.247507] usb 1-1.4.1: ch341-uart converter now attached to ttyUSB0
[ 4201.274377] input: PC Speaker as /devices/platform/pcspkr/input/input22
[ 4201.797396] input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input23
[ 4201.918566] usb 1-1.4.1: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
[ 4201.919523] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 4201.919556] ch341 1-1.4.1:1.0: device disconnected

(although I do not understand why the ttUSB0 is disconnected)

Has anyone a hint, what is going wrong and what I could do?
Thanks
Heinz
User avatar
By HeinzE
#95786 Thank you for your answer!
Well, I have worked successfully with Thonny and my D1 mini under Windows. So Thonny might also do so under Windows.
The links you included are interesting. The code for retrieving information about the board, I will use to inspect my D1 board. And yes, there is an important difference between my D1 and the one in the JarutEx blog: my D1 has only 4 MB of ROM. And another difference is that my D1 is not a PRO.
Since my D1 is already flashed, I will not follow the instructions of your second link.
User avatar
By HeinzE
#95836 The issue is solved.
1) TTUSB0 is taken by BRLTTY (6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input23 ) Since I do not need this software, I removed it following the instructions on https://github.com/thonny/thonny/issues/2360
2) I made sure to have the current user in the dialout group (see https://github.com/thonny/thonny/issues/2360)
3) I had an older installation of Thonny under ~/.local/lib/python3.10/site-packages (hint from Aivar Annamaa, the developer of Thonny; github.com). I removed the directory thonny in the mentioned path and the latest Thonny installation worked perfectly.