What's new

Support for usb-serial adapter based on cp210x

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

mad_ady

Regular Contributor
Hello all!
I was planning to use my RT-AC56U as a serial debug bridge for an Odroid board which is close by. I hooked up a USB cp210x adapter into its USB port, but it seems that support for it was not included in the kernel:

Code:
$ lsusb
Bus 003 Device 116: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light

Code:
usb 3-1: new full speed USB device using ohci_hcd and address 2
usbcore: registered new interface driver usbserial
USB Serial support registered for generic
usbcore: registered new interface driver usbserial_generic
usbserial: USB Serial Driver core
option: `0x10c4 product=0xea60' invalid for parameter `vendor'
admin@arcturus:/tmp/home/root# find  /lib/modules/2.6.36.4brcmarm/kernel/ -name
'cp210x.ko'

Since I noticed that AC56U is getting discontinued in newer releases, I'd like to ask to be pointed in the direction of the following information:
1. Are there packages with extra modules that can be downloaded directly?
2. Are there instructions on how to compile the kernel/extra modules? I plan on getting only the cp210x module and insmodding it myself, without replacing the kernel. I'm guessing the kernel only changes rarely, since it's 2.6.x

Thanks!
 
Ok, so I followed the guide above in a Ubuntu 12.04 lxc, combined with info from https://hqt.ro/how-to-compile-modules-for-asuswrt-routers/.
I went to /home/ubuntu/asuswrt-merlin.ng/release/src-rt-6.x.4708/linux/linux-2.6 and ran 'make menuconfig', selected CONFIG_USB_SERIAL_CP210X=m followed by 'make linux', 'make modules', etc.
It compiled most of the modules without dying, but for cp210x it didn't create a ko file:
Code:
root@ubuntu12:/home/ubuntu/asuswrt-merlin.ng/release/src-rt-6.x.4708/linux/linux-2.6# grep -i cp210 .config
CONFIG_USB_SERIAL_CP210X=m
root@ubuntu12:/home/ubuntu/asuswrt-merlin.ng/release/src-rt-6.x.4708/linux/linux-2.6# make drivers/usb/serial
make: Nothing to be done for `drivers/usb/serial'.
root@ubuntu12:/home/ubuntu/asuswrt-merlin.ng/release/src-rt-6.x.4708/linux/linux-2.6# ls -l drivers/usb/serial/*.ko
-rw-r--r-- 1 root root 218294 Mar 20 09:27 drivers/usb/serial/option.ko
-rw-r--r-- 1 root root 153168 Mar 20 09:27 drivers/usb/serial/usb_wwan.ko
-rw-r--r-- 1 root root 447044 Mar 20 09:27 drivers/usb/serial/usbserial.ko
root@ubuntu12:/home/ubuntu/asuswrt-merlin.ng/release/src-rt-6.x.4708/linux/linux-2.6# ls -l drivers/usb/serial/cp210x.*
-rw-r--r-- 1 root root  25671 Mar 19 17:33 drivers/usb/serial/cp210x.c
-rw-r--r-- 1 root root 129512 Mar 20 09:46 drivers/usb/serial/cp210x.o
How do I turn a .o file into a .ko?
 
... must be something wrong with my setup/environment because kernel make fails/make modules as well:
Code:
  CC [M]  drivers/usb/core/notify.o
  CC [M]  drivers/usb/core/generic.o
  CC [M]  drivers/usb/core/quirks.o
  CC [M]  drivers/usb/core/devices.o
  CC [M]  drivers/usb/core/hcd-pci.o
  CC [M]  drivers/usb/core/inode.o
  LD [M]  drivers/usb/core/usbcore.o
  CC [M]  drivers/usb/host/ehci-hcd.o
In file included from drivers/usb/host/ehci-hcd.c:1158:0:
drivers/usb/host/ehci-pci.c:438:22: fatal error: bcmutils.h: No such file or directory
compilation terminated.
make[3]: *** [drivers/usb/host/ehci-hcd.o] Error 1
make[2]: *** [drivers/usb/host] Error 2
make[1]: *** [drivers/usb] Error 2
make: *** [drivers] Error 2
root@ubuntu12:/home/ubuntu/asuswrt-merlin.ng/release/src-rt-6.x.4708/linux/linux-2.6# make kernel
  CHK     include/linux/version.h
  CHK     include/generated/utsrelease.h
make[1]: `include/generated/mach-types.h' is up to date.
  CALL    scripts/checksyscalls.sh
  CC      kernel/sched.o
  CC      kernel/fork.o
  CC      kernel/exec_domain.o
  CC      kernel/panic.o
  CC      kernel/printk.o
  CC      kernel/cpu.o
  CC      kernel/exit.o
  CC      kernel/itimer.o
  TIMEC   kernel/timeconst.h
  CC      kernel/time.o
  CC      kernel/softirq.o
kernel/softirq.c:38:22: fatal error: typedefs.h: No such file or directory
compilation terminated.
make[1]: *** [kernel/softirq.o] Error 1
make: *** [kernel] Error 2
 

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top