Score:0

CH340G USB/Serial converter stop communicating with Espressif esptool after upgrading kernel to 5.4.0-88-generic

cn flag

After upgrading to new kernel 5.4.0-88-generic, ESP266 development boards using chip CH340G (usb-serial converter) stop communicating with Espressif flashing tool "esptool" on my ubuntu 20.04 Dell laptop. The tool is written in python and is designed to be run on command line. I solved temporarily the issue by changing grub to boot on 5.4.0-86, but it would be a problem if this failure continues on next kernel upgrades. I wrote a simple code to test usb/serial direct communication using a simple serial terminal (moserial), and in this case the CH340G chip seems to work correctly in both directions, so my guess is there is a problem with python accessing the chip driver in the new kernel. I dont know where to report kernel issues so I decided to mention the problem in this forum. If this is not the right place I'd appreciate if some of you could tell me what would be the best way to report this to the appropiate channel.

David avatar
cn flag
A quick Google search finds this URL. https://help.ubuntu.com/stable/ubuntu-help/report-ubuntu-bug.html.en
Score:1
dz flag

I have got the same kernel and the same issue.

I can program the chip using Windows on my dual boot portable, and I was able to program it from Ubuntu 19.04.

After the update no way to program it. The chip is recognized, and I can communicate with the serial interface, but non way to go in program mode.

Reverting the CH341 module to the one in kernel version 5.4.0-86, will also work.

Simply unload the module:

modprobe -r ch341

Rename the original:

mv /lib/modules/5.4.0-88-generic/kernel/drivers/usb/serial/ch341.ko /lib/modules/5.4.0-88-generic/kernel/drivers/usb/serial/ch341.ko.ori

and than get the one from the previous kernel (hope you still have it onboard)

cp /lib/modules/5.4.0-86-generic/kernel/drivers/usb/serial/ch341.ko /lib/modules/5.4.0-88-generic/kernel/drivers/usb/serial/ch341.ko

and finally:

modprobe ch341

Now you will be able to flash the chip.

Score:0
cn flag

Thanks! As I mentioned I downgraded temporarily the kernel to 5.4.0-86 and will wait to see if the issue is solved in the next version, but taking partially your very nice suggestion I copied the working CH341 driver from /lib/modules/5.4.0-86-generic/kernel/drivers/usb/serial to home, just in case the failure continued in next kernel.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.