All of lore.kernel.org
 help / color / mirror / Atom feed
* Problem with the CH341 driver in Ubuntu 20.04
@ 2021-01-05 15:14 Augusto Ciuffoletti
  2021-01-05 15:27 ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Augusto Ciuffoletti @ 2021-01-05 15:14 UTC (permalink / raw)
  To: linux-usb

I run into this problem trying to program an ESP8266 board, which uses
the CH341 chip in the programming interface as a USB-to-Serial
interface. The problem appeared after an upgrade from Ubuntu 19.10 to
20.04 (that I carried out one week ago).

This is the kernel I am using:

===
$ uname -r
5.4.0-58-generic
===

When I connect the ESP8266 board (a Wemos D1 mini) to the USB there is
no activity on the syslog (or dmesg), and the kernel module is not
loaded. In fact I do not see the /dev/ttyACM0 device in the /dev
directory and no useful device appears in the Arduino GUI.

I have found the module in the kernel tree but, even forcing the
installation, nothing happens:

===
augusto@Legion:~$ ls
/usr/lib/modules/5.4.0-58-generic/kernel/drivers/usb/serial/ch*
/usr/lib/modules/5.4.0-58-generic/kernel/drivers/usb/serial/ch341.ko
augusto@Legion:~$ sudo modprobe ch341
[sudo] password di augusto:
augusto@Legion:~$ lsusb
Bus 002 Device 002: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 13d3:56a6 IMC Networks Integrated Camera
Bus 001 Device 005: ID 0cf3:e500 Qualcomm Atheros Communications
Bus 001 Device 006: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
Bus 001 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
augusto@Legion:~$ lsmod | grep ch34
ch341                  20480  0
usbserial              53248  1 ch341
===

Without this module it is impossible to work with a relevant number of
SBC devices, besides the named Wemos D1 Mini.

Trying to solve the problem I also downloaded and installed the module
source from https://github.com/juliagoda/CH341SER and compiled on my
PC, after removing the "secure boot" feature.

Thank you for any help.

Note: I originally posted this question on AskUbuntu
(https://askubuntu.com/questions/1304116/problem-with-the-ch341-driver-in-ubuntu-20-04),
but with no answer after 40+ views.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem with the CH341 driver in Ubuntu 20.04
  2021-01-05 15:14 Problem with the CH341 driver in Ubuntu 20.04 Augusto Ciuffoletti
@ 2021-01-05 15:27 ` Greg KH
  2021-01-05 15:55   ` Augusto Ciuffoletti
  0 siblings, 1 reply; 4+ messages in thread
From: Greg KH @ 2021-01-05 15:27 UTC (permalink / raw)
  To: Augusto Ciuffoletti; +Cc: linux-usb

On Tue, Jan 05, 2021 at 04:14:14PM +0100, Augusto Ciuffoletti wrote:
> I run into this problem trying to program an ESP8266 board, which uses
> the CH341 chip in the programming interface as a USB-to-Serial
> interface. The problem appeared after an upgrade from Ubuntu 19.10 to
> 20.04 (that I carried out one week ago).
> 
> This is the kernel I am using:
> 
> ===
> $ uname -r
> 5.4.0-58-generic

That's an old kernel, you should get support from your distro if you
want to stick with that, but:

> ===
> 
> When I connect the ESP8266 board (a Wemos D1 mini) to the USB there is
> no activity on the syslog (or dmesg), and the kernel module is not
> loaded. In fact I do not see the /dev/ttyACM0 device in the /dev
> directory and no useful device appears in the Arduino GUI.
> 
> I have found the module in the kernel tree but, even forcing the
> installation, nothing happens:
> 
> ===
> augusto@Legion:~$ ls
> /usr/lib/modules/5.4.0-58-generic/kernel/drivers/usb/serial/ch*
> /usr/lib/modules/5.4.0-58-generic/kernel/drivers/usb/serial/ch341.ko
> augusto@Legion:~$ sudo modprobe ch341
> [sudo] password di augusto:
> augusto@Legion:~$ lsusb
> Bus 002 Device 002: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub
> Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> Bus 001 Device 003: ID 13d3:56a6 IMC Networks Integrated Camera
> Bus 001 Device 005: ID 0cf3:e500 Qualcomm Atheros Communications
> Bus 001 Device 006: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
> Bus 001 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
> Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Where is your usb-to-serial device here?  Are you sure it's actually
working?  I don't see it in the list of devices, which is a pretty good
reason why the serial driver isn't working :)

Try looking in the kernel log when you plug the device in, perhaps it
says something?

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem with the CH341 driver in Ubuntu 20.04
  2021-01-05 15:27 ` Greg KH
@ 2021-01-05 15:55   ` Augusto Ciuffoletti
  2021-01-05 16:11     ` Greg KH
  0 siblings, 1 reply; 4+ messages in thread
From: Augusto Ciuffoletti @ 2021-01-05 15:55 UTC (permalink / raw)
  To: Greg KH; +Cc: linux-usb

Hi Greg,

thank you for your reply.

The kernel version I am using is the one currently shipped with the
latest release of Ubuntu 20.04 (LTS). They will certainly upgrade the
kernel in the future: if you tell me that the problem does not exist
in a successive kernel release, I will post the info and close the
issue.

You ask me "Where is your usb-to-serial device here?". The point is
that nothing appears in the lsusb related to the device, although it
is plugged in (the device receives power). Plugin/unplugging the
device does not result in any output in syslog/dmesg. I tried to
manually insert the driver, with no result. The device is not
discovered at all, but it was (and worked perfectly) in the previous
Ubuntu release (19.10), and I just guess the kernel was
5.3.0-64-generic. So I have no clue..., and it would be helpful to
have a way to obtain any sort of.

Thank you,

Augusto

Il giorno mar 5 gen 2021 alle ore 16:26 Greg KH
<gregkh@linuxfoundation.org> ha scritto:
>
> On Tue, Jan 05, 2021 at 04:14:14PM +0100, Augusto Ciuffoletti wrote:
> > I run into this problem trying to program an ESP8266 board, which uses
> > the CH341 chip in the programming interface as a USB-to-Serial
> > interface. The problem appeared after an upgrade from Ubuntu 19.10 to
> > 20.04 (that I carried out one week ago).
> >
> > This is the kernel I am using:
> >
> > ===
> > $ uname -r
> > 5.4.0-58-generic
>
> That's an old kernel, you should get support from your distro if you
> want to stick with that, but:
>
> > ===
> >
> > When I connect the ESP8266 board (a Wemos D1 mini) to the USB there is
> > no activity on the syslog (or dmesg), and the kernel module is not
> > loaded. In fact I do not see the /dev/ttyACM0 device in the /dev
> > directory and no useful device appears in the Arduino GUI.
> >
> > I have found the module in the kernel tree but, even forcing the
> > installation, nothing happens:
> >
> > ===
> > augusto@Legion:~$ ls
> > /usr/lib/modules/5.4.0-58-generic/kernel/drivers/usb/serial/ch*
> > /usr/lib/modules/5.4.0-58-generic/kernel/drivers/usb/serial/ch341.ko
> > augusto@Legion:~$ sudo modprobe ch341
> > [sudo] password di augusto:
> > augusto@Legion:~$ lsusb
> > Bus 002 Device 002: ID 05e3:0626 Genesys Logic, Inc. USB3.1 Hub
> > Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
> > Bus 001 Device 003: ID 13d3:56a6 IMC Networks Integrated Camera
> > Bus 001 Device 005: ID 0cf3:e500 Qualcomm Atheros Communications
> > Bus 001 Device 006: ID 046d:c517 Logitech, Inc. LX710 Cordless Desktop Laser
> > Bus 001 Device 004: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
> > Bus 001 Device 002: ID 05e3:0610 Genesys Logic, Inc. 4-port hub
> > Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> Where is your usb-to-serial device here?  Are you sure it's actually
> working?  I don't see it in the list of devices, which is a pretty good
> reason why the serial driver isn't working :)
>
> Try looking in the kernel log when you plug the device in, perhaps it
> says something?
>
> thanks,
>
> greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Problem with the CH341 driver in Ubuntu 20.04
  2021-01-05 15:55   ` Augusto Ciuffoletti
@ 2021-01-05 16:11     ` Greg KH
  0 siblings, 0 replies; 4+ messages in thread
From: Greg KH @ 2021-01-05 16:11 UTC (permalink / raw)
  To: Augusto Ciuffoletti; +Cc: linux-usb

On Tue, Jan 05, 2021 at 04:55:41PM +0100, Augusto Ciuffoletti wrote:
> Hi Greg,
> 
> thank you for your reply.
> 
> The kernel version I am using is the one currently shipped with the
> latest release of Ubuntu 20.04 (LTS). They will certainly upgrade the
> kernel in the future: if you tell me that the problem does not exist
> in a successive kernel release, I will post the info and close the
> issue.

You will have to work with them, we have no clue what they put in their
kernels.

> You ask me "Where is your usb-to-serial device here?". The point is
> that nothing appears in the lsusb related to the device, although it
> is plugged in (the device receives power). Plugin/unplugging the
> device does not result in any output in syslog/dmesg. I tried to
> manually insert the driver, with no result. The device is not
> discovered at all, but it was (and worked perfectly) in the previous
> Ubuntu release (19.10), and I just guess the kernel was
> 5.3.0-64-generic. So I have no clue..., and it would be helpful to
> have a way to obtain any sort of.

That seems like the root problem here.  Work with the Ubuntu developers
to solve that please, once the device is seen then the driver can be
properly bound to the device.  Good luck!

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-01-05 16:11 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-05 15:14 Problem with the CH341 driver in Ubuntu 20.04 Augusto Ciuffoletti
2021-01-05 15:27 ` Greg KH
2021-01-05 15:55   ` Augusto Ciuffoletti
2021-01-05 16:11     ` Greg KH

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.