我有一个 USB 转串行适配器。它在我的台式电脑上可以正常工作,但在笔记本电脑上却不行。我的台式电脑是一台普通电脑(搭载 MSI K9AGM 的 Athlon 64 X2 6000+,6 个 USB 2.0 端口,没有 USB 3.0 端口),我的笔记本电脑是 HP ENVY4-1015DX(2 个 USB 2.0 端口,1 个 USB 3.0 端口)
我的台式机装有 Ubuntu 12.04.2 64 位,内核 3.5.0-37。当我将其插入此 PC 上的任何 USB 端口时,我在 kern.log 中看到以下内容:
Sep 9 15:31:07 amdx2 kernel: [ 57.968035] usb 4-2: new full-speed USB device number 2 using ohci_hcd
Sep 9 15:31:07 amdx2 kernel: [ 58.128306] usb 4-2: New USB device found, idVendor=4348, idProduct=5523
Sep 9 15:31:07 amdx2 kernel: [ 58.128311] usb 4-2: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Sep 9 15:31:07 amdx2 kernel: [ 58.302088] usbcore: registered new interface driver usbserial
Sep 9 15:31:07 amdx2 kernel: [ 58.302530] usbcore: registered new interface driver usbserial_generic
Sep 9 15:31:07 amdx2 kernel: [ 58.302544] USB Serial support registered for generic
Sep 9 15:31:07 amdx2 kernel: [ 58.302548] usbserial: USB Serial Driver core
Sep 9 15:31:07 amdx2 kernel: [ 58.318155] usbcore: registered new interface driver ch341
Sep 9 15:31:07 amdx2 kernel: [ 58.318178] USB Serial support registered for ch341-uart
Sep 9 15:31:07 amdx2 kernel: [ 58.318194] ch341 4-2:1.0: ch341-uart converter detected
Sep 9 15:31:07 amdx2 kernel: [ 58.340514] usb 4-2: ch341-uart converter now attached to ttyUSB0
但是,当我将完全相同的适配器使用相同的 USB 电缆插入笔记本电脑上的任何端口时(无论插入 USB 2.0 还是 USB 3.0 端口),我得到:
Sep 9 15:31:50 envy4 kernel: [10776.099052] usb 3-1: new full-speed USB device number 37 using xhci_hcd
Sep 9 15:31:50 envy4 kernel: [10776.115364] usb 3-1: device descriptor read/8, error -71
Sep 9 15:31:50 envy4 kernel: [10776.235486] usb 3-1: device descriptor read/8, error -71
Sep 9 15:31:50 envy4 kernel: [10776.450932] usb 3-1: new full-speed USB device number 38 using xhci_hcd
Sep 9 15:31:50 envy4 kernel: [10776.467242] usb 3-1: device descriptor read/8, error -71
Sep 9 15:31:50 envy4 kernel: [10776.587459] usb 3-1: device descriptor read/8, error -71
Sep 9 15:31:50 envy4 kernel: [10776.802756] usb 3-1: new full-speed USB device number 39 using xhci_hcd
Sep 9 15:31:50 envy4 kernel: [10776.819142] usb 3-1: device descriptor read/8, error -71
Sep 9 15:31:51 envy4 kernel: [10776.939484] usb 3-1: device descriptor read/8, error -71
Sep 9 15:31:51 envy4 kernel: [10777.042877] hub 3-0:1.0: unable to enumerate USB device on port 1
我的笔记本电脑有 Ubuntu 12.04.3 64 位,内核 3.8.0-30。
我发现主要的区别在于,在我的 PC 中,Ubuntu 使用驱动程序 ohci_hcd,而在我的笔记本电脑中,Ubuntu 使用 xhci_hcd。我尝试过这样做:
sudo modprobe ohci_hcd
并且还尝试过:
sudo modprobe -r xhci_hcd
但是,这些都不起作用。在第一种情况下,modprobe 没有错误,但系统仍然使用 xhci_hcd。在第二种情况下,modprobe 出现错误:
FATAL: Module xhci_hcd is builtin
我还能做什么来解决我的问题?谢谢!
答案1
我发现我的串行转 USB 转换器 (ch341-uart) 不适用于 USB 3.0 端口。不幸的是,我的 HP Envy 没有 USB 2.0 集线器,所有端口都向操作系统报告为 USB 3.0 端口。似乎此设备在 USB 3.0 下不受支持。但是,我有一个 USB 2.0 集线器。如果我将此集线器连接到任何端口,然后将串行转换器连接到此集线器,即使使用 xhci_hcd,它也能正常工作:
Sep 13 10:36:36 envy4 kernel: [ 1852.477261] usb 3-3: new high-speed USB device number 53 using xhci_hcd
Sep 13 10:36:36 envy4 kernel: [ 1852.493499] usb 3-3: New USB device found, idVendor=1a40, idProduct=0101
Sep 13 10:36:36 envy4 kernel: [ 1852.493504] usb 3-3: New USB device strings: Mfr=0, Product=1, SerialNumber=0
Sep 13 10:36:36 envy4 kernel: [ 1852.493508] usb 3-3: Product: USB 2.0 Hub
Sep 13 10:36:36 envy4 kernel: [ 1852.493811] hub 3-3:1.0: USB hub found
Sep 13 10:36:36 envy4 kernel: [ 1852.493842] hub 3-3:1.0: 4 ports detected
Sep 13 10:36:37 envy4 kernel: [ 1852.781193] usb 3-3.1: new full-speed USB device number 54 using xhci_hcd
Sep 13 10:36:37 envy4 kernel: [ 1852.798586] usb 3-3.1: New USB device found, idVendor=4348, idProduct=5523
Sep 13 10:36:37 envy4 kernel: [ 1852.798592] usb 3-3.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
Sep 13 10:36:37 envy4 kernel: [ 1852.799069] ch341 3-3.1:1.0: ch341-uart converter detected
Sep 13 10:36:37 envy4 kernel: [ 1852.800220] usb 3-3.1: ch341-uart converter now attached to ttyUSB0
答案2
如果有人在 Ubuntu 14.04 上使用 ch341 驱动程序时遇到问题,我有一个修补过的驱动程序,它可以与 3.13.X 内核一起使用:
https://www.mediafire.com/?3ph5x6ttc7ddde4
谢谢: