1

I am running the latest version of Raspbian on an R Pi 5 and trying to use a CH348 serial hub with it, but it needs the driver.

All the instructions and guides haven't worked, and I get errors about directories not existing or the driver file not being in the right format.

I want to install the driver to use this hub board for a project I have been working on.

  • Error1:

    $ make make -C /lib/modules/6.6.62-v8-16k+/build M=/home/amp/Downloads/LINUX/driver make[1]: *** /lib/modules/6.6.62-v8-16k+/build: No such file or directory. Stop. make: *** [Makefile:7: default] Error 2 
  • Error2:

    $ rpi-source File "/usr/bin/rpi-source", line 111 except urllib2.HTTPError, e: ^^^^^^^^^^^^^^^^^^^^ SyntaxError: multiple exception types must be parenthesized 

New Details:

  • When I run lsusb the board shows up:
    Bus 003 Device 004: ID 1a86:55d9 QinHeng Electronics USB2.0 To Multi Serial 
  • But the ports do not register/show-up when I run ls /dev/tty*
  • dmesg:
    [ 29.329064] usb 3-2: new high-speed USB device number 2 using xhci-hcd [ 29.479177] usb 3-2: New USB device found, idVendor=1a86, idProduct=55d9, bcdDevice= 1.3a [ 29.479180] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 29.479183] usb 3-2: Product: USB2.0 To Multi Serial Ports [ 29.479184] usb 3-2: Manufacturer: wch.cn [ 99.373486] usb 3-2: USB disconnect, device number 2 [ 137.636035] usb 3-2: new high-speed USB device number 3 using xhci-hcd [ 137.786126] usb 3-2: New USB device found, idVendor=1a86, idProduct=55d9, bcdDevice= 1.3a [ 137.786131] usb 3-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0 [ 137.786134] usb 3-2: Product: USB2.0 To Multi Serial Ports [ 137.786137] usb 3-2: Manufacturer: wch.cn 

So it sees the hub is there but not making the ports accessable.

1
  • 1
    If you show the commands you executed, and their error messages, you might receive helpful responses. Commented Nov 20, 2024 at 19:24

2 Answers 2

2

Your Error1 indicates you currently don't have installed the linux-headers-* package corresponding to your current linux-image-* kernel package. Solution: find out the name of the currently installed actual kernel package, and install the corresponding linux-headers-* package.

Without the kernel development headers contained in the linux-headers-* package, you cannot build kernel modules for the prebuilt kernel. The name and version of the header package must exactly match the kernel package your system is currently running, otherwise the resulting module ABI won't interface correctly with the kernel you're running.

If you had compiled your own kernel from scratch, the /lib/modules/$(uname -r)/build should be a symbolic link pointing to your kernel build directory. But rebuilding the entire kernel would be overkill (and would take a long time on a RasPi), if you just need a single extra kernel module.

See: https://www.raspberrypi.com/documentation/computers/linux_kernel.html#kernel-headers

4
  • I do have the linux-headers-rpi-v8 install as well as 6.6.31+rpt-rpi-2712 6.6.51+rpt-rpi-2712 6.6.62-v8+ 6.6.31+rpt-rpi-v8 6.6.51+rpt-rpi-v8 6.6.62-v8-16k+. I am not sure what I am missing now. Commented Nov 21, 2024 at 18:12
  • /lib/modules/6.6.62-v8-16k+/kernel has these folders but not a build directory '''arch crypto drivers fs kernel lib mm net sound''' Commented Nov 21, 2024 at 18:14
  • Are there any linux-headers... directories in /usr/src? If not, you definitely do not have the headers package installed properly. If so, you can ln -s /usr/src/linux-headers[...] /lib/modules/[version]/build. Commented Nov 21, 2024 at 19:28
  • @goldilocks this is whats in my /usr/src folder: linux-headers-6.6.31+rpt-common-rpi linux-headers-6.6.51+rpt-common-rpi linux-kbuild-6.6.31+rpt sense-hat linux-headers-6.6.31+rpt-rpi-2712 linux-headers-6.6.51+rpt-rpi-2712 linux-kbuild-6.6.51+rpt linux-headers-6.6.31+rpt-rpi-v8 linux-headers-6.6.51+rpt-rpi-v8 python3.11 Commented Nov 21, 2024 at 19:33
0

If you have kernel headers installed, they will be in versioned directories in /usr/src, eg. linux-headers-6.6.51+rpt-rpi-2712. These correspond to directories in /lib/modules sans linux-headers-. If one of the latter does not contain a build subdirectory (which is actually a symlink to the headers directory), you can create it:

ln -s /usr/src/linux-headers-6.6.51+rpt-rpi-2712/build /lib/modules/6.6.51+rpt-rpi-2712 

Before you do this, make sure you are using the source that corresponds to the kernel you are actually using:

> uname -r 6.6.51+rpt-rpi-2712 

That version string will be identical to the name of the /lib/modules subdirectory.

7
  • so if my kernel is 6.6.62-v8-16k+ I should run "ln -s /usr/src/linux-headers-6.6.62-v8-16k+ /lib/modules/6.6.62-v8-16k+" ? Commented Nov 21, 2024 at 21:16
  • Whoops, sorry, I left off the the /build from the first path (edited in above), but yes. Commented Nov 21, 2024 at 21:25
  • amp@AutoCal:/usr/src $ sudo ln -s /usr/src/linux-headers-6.6.62-v8-16k+ /lib/modules/6.6.62-v8-16k+/build amp@AutoCal:/usr/src $ /lib/modules/$(uname -r)/build -bash: /lib/modules/6.6.62-v8-16k+/build: No such file or directory amp@AutoCal:/lib/modules/6.6.62-v8-16k+ $ sudo /lib/modules/$(uname -r)/build sudo: /lib/modules/6.6.62-v8-16k+/build: command not found Commented Nov 25, 2024 at 16:24
  • Why are you trying to execute something that (should be, if it was created properly) a symlink to a directory? That you get no such file implies $(uname -r) is not 6.6.62-v8-16k+, or that ln -s failed, in which case there should have been an error shown. Commented Nov 25, 2024 at 20:11
  • I am just trying to get this hub to be usable because I want to use a serial hub that I can have different RS types on. Commented Nov 25, 2024 at 20:46

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.