Hello! I’m workin’ on project and I need to use GPS-module (SIM18-EVB). So, when I plug-in it to USB-port and type on terminal:
dmesg | grep tty
It’s return:
[ 0.000000] Kernel command line: console=ttyS0,115200n8 console=tty1 no_console_suspend=1 lp0_vec=2064@0xf46ff000 mem=2015M@2048M memtype=255 ddr_die=2048M@2048M section=256M pmuboard=0x0177:0x0000:0x02:0x43:0x00 tsec=32M@3913M otf_key=c75e5bb91eb3bd947560357b64422f85 usbcore.old_scheme_first=1 core_edp_mv=1150 core_edp_ma=4000 tegraid=40.1.1.0.0 debug_uartport=lsport,3 power_supply=Adapter audio_codec=rt5640 modem_id=0 android.kerneltype=normal fbcon=map:1 commchip_id=0 usb_port_owner_info=0 lane_owner_info=6 emc_max_dvfs=0 touch_id=0@0 board_info=0x0177:0x0000:0x02:0x43:0x00 root=/dev/mmcblk0p1 rw rootwait tegraboot=sdmmc gpt
[ 0.000000] console [tty1] enabled
[ 1.822392] serial8250.0: ttyS0 at MMIO 0x70006300 (irq = 122) is a Tegra
[ 4.148345] console [ttyS0] enabled
[ 4.154252] serial-tegra.0: ttyTHS0 at MMIO 0x70006000 (irq = 68) is a SERIAL_TEGRA
[ 4.166135] serial-tegra.1: ttyTHS1 at MMIO 0x70006040 (irq = 69) is a SERIAL_TEGRA
[ 4.178118] serial-tegra.2: ttyTHS2 at MMIO 0x70006200 (irq = 78) is a SERIAL_TEGRA
On desktop (Ubuntu 14.04) it’s worked fine and detected as ttyUSB0. Well… I don’t know anything about linux drivers, but may be should I install drivers for CP210x? Okay, if so I download driver from here (kernel 3.x). This contain instruction:
Ubuntu:
1. make ( your cp210x driver )
2. cp cp210x.ko to /lib/modules/<kernel-version>/kernel/drivers/usb/serial
3. insmod /lib/modules/<kernel-version/kernel/drivers/usb/serial/usbserial.ko
4. insmod cp210x.ko
Well, when I do this:
ubuntu@tegra-ubuntu:~/Downloads/Linux_3.x.x_VCP_Driver_Source$ sudo make
I have:
ubuntu@tegra-ubuntu:~/Downloads/Linux_3.x.x_VCP_Driver_Source$ sudo make
[sudo] password for ubuntu:
make -C /lib/modules/3.10.40-gdacac96/build M= modules
make[1]: Entering directory `/usr/src/linux-headers-3.10.40-gdacac96'
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[2]: `include/generated/mach-types.h' is up to date.
CC scripts/mod/devicetable-offsets.s
GEN scripts/mod/devicetable-offsets.h
HOSTCC scripts/mod/file2alias.o
HOSTLD scripts/mod/modpost
make[3]: *** No rule to make target `fs/cifs/cifsfs.o', needed by `fs/cifs/cifs.o'. Stop.
make[2]: *** [fs/cifs] Error 2
make[1]: *** [fs] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.10.40-gdacac96'
make: *** [all] Error 2
Can anybody help me? (May be I do some thing wrong)
The CP210x driver is included in L4T kernel source tree, it just isn’t built by default.
Here are similar instructions for turning on the FTDI serial-to-USB converter: [url]Jetson/Tutorials/Program An Arduino - eLinux.org
In the past I used a similar procedure, selecting ‘CP210x’ instead of ‘FTDI’ during menuconfig.
The device I was working with was Robopeak rpLIDAR, it worked after building.
dusty_nv, thank you for answer, I did all in this instruction, but It doesn’t work.
ubuntu@tegra-ubuntu:~/kernel$ lsusb
Bus 002 Device 005: ID 0bda:8153 Realtek Semiconductor Corp.
Bus 002 Device 004: ID 09da:054f A4 Tech Co., Ltd
Bus 002 Device 003: ID 09da:0260 A4 Tech Co., Ltd KV-300H Isolation Keyboard
<b>Bus 002 Device 006: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light</b>
Bus 002 Device 002: ID 2109:2812
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
and
ubuntu@tegra-ubuntu:~/kernel$ dmesg | grep tty
[ 0.000000] Kernel command line: console=ttyS0,115200n8 console=tty1 no_console_suspend=1 lp0_vec=2064@0xf46ff000 mem=2015M@2048M memtype=255 ddr_die=2048M@2048M section=256M pmuboard=0x0177:0x0000:0x02:0x43:0x00 tsec=32M@3913M otf_key=c75e5bb91eb3bd947560357b64422f85 usbcore.old_scheme_first=1 core_edp_mv=1150 core_edp_ma=4000 tegraid=40.1.1.0.0 debug_uartport=lsport,3 power_supply=Adapter audio_codec=rt5640 modem_id=0 android.kerneltype=normal fbcon=map:1 commchip_id=0 usb_port_owner_info=0 lane_owner_info=6 emc_max_dvfs=0 touch_id=0@0 board_info=0x0177:0x0000:0x02:0x43:0x00 root=/dev/mmcblk0p1 rw rootwait tegraboot=sdmmc gpt
[ 0.000000] console [tty1] enabled
[ 1.850563] serial8250.0: ttyS0 at MMIO 0x70006300 (irq = 122) is a Tegra
[ 4.157640] console [ttyS0] enabled
[ 4.158244] serial-tegra.0: ttyTHS0 at MMIO 0x70006000 (irq = 68) is a SERIAL_TEGRA
[ 4.158580] serial-tegra.1: ttyTHS1 at MMIO 0x70006040 (irq = 69) is a SERIAL_TEGRA
[ 4.158889] serial-tegra.2: ttyTHS2 at MMIO 0x70006200 (irq = 78) is a SERIAL_TEGRA
When building, can you try setting the kernel local version? In make menuconfig, it is under ‘General setup’ → ‘Local version’. Set it to ‘-gdacac96’ (including the dash). Then, here is log of re-building:
ubuntu@tegra-ubuntu:~/workspace/R21.4/source/kernel$ cat .config | grep LOCALVERSION
CONFIG_LOCALVERSION="-gdacac96"
CONFIG_LOCALVERSION_AUTO=y
ubuntu@tegra-ubuntu:~/workspace/R21.4/source/kernel$ make prepare
ubuntu@tegra-ubuntu:~/workspace/R21.4/source/kernel$ make modules_prepare
ubuntu@tegra-ubuntu:~/workspace/R21.4/source/kernel$ make M=drivers/usb/serial
ubuntu@tegra-ubuntu:~/workspace/R21.4/source/kernel$ sudo cp drivers/usb/serial/cp210x.ko /lib/modules/$(uname -r)/kernel
ubuntu@tegra-ubuntu:~/workspace/R21.4/source/kernel$ sudo ls /lib/modules/$(uname -r)/kernel
cp210x.ko crypto drivers fs net
ubuntu@tegra-ubuntu:~/workspace/R21.4/source/kernel$ sudo depmod -a
The next time you plug in your CP210x USB device, the dmesg log should include:
[ 535.908597] usb 2-1.1: new full-speed USB device number 8 using tegra-ehci
[ 535.936943] usb 2-1.1: New USB device found, idVendor=10c4, idProduct=ea60
[ 535.936957] usb 2-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 535.936965] usb 2-1.1: Product: CP2102 USB to UART Bridge Controller
[ 535.936972] usb 2-1.1: Manufacturer: Silicon Labs
[ 535.936979] usb 2-1.1: SerialNumber: 0001
[ 535.979138] usbcore: registered new interface driver cp210x
[ 535.980529] usbserial: USB Serial support registered for cp210x
[ 535.980637] cp210x 2-1.1:1.0: cp210x converter detected
[ 536.062165] usb 2-1.1: reset full-speed USB device number 8 using tegra-ehci
[ 536.080963] usb 2-1.1: cp210x converter now attached to ttyUSB0
Here’s the relevant lsmod and lsusb -vvv:
ubuntu@tegra-ubuntu:~/workspace/R21.4/source/kernel$ lsmod
Module Size Used by
cp210x 12828 0
dm_crypt 13259 0
dm_mod 73887 1 dm_crypt
rfcomm 38359 0
bnep 10469 2
bluetooth 307068 10 bnep,rfcomm
rfkill 10365 3 bluetooth
joydev 8875 0
nvhost_vi 3064 0
ubuntu@tegra-ubuntu:~/workspace/R21.4/source/kernel$ sudo lsusb -vvv
Bus 002 Device 008: ID 10c4:ea60 Cygnal Integrated Products, Inc. CP210x UART Bridge / myAVR mySmartUSB light
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x10c4 Cygnal Integrated Products, Inc.
idProduct 0xea60 CP210x UART Bridge / myAVR mySmartUSB light
bcdDevice 1.00
iManufacturer 1 Silicon Labs
iProduct 2 CP2102 USB to UART Bridge Controller
iSerial 3 0001
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 32
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 0
bmAttributes 0x80
(Bus Powered)
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 2
bInterfaceClass 255 Vendor Specific Class
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 2 CP2102 USB to UART Bridge Controller
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x01 EP 1 OUT
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
Device Status: 0x0000
(Bus Powered)
I’m trying to connect my RPlidar to my jetson TK1 as well but it doesn’t work event after doing all the instructions you said. After dmesg, i’ve got this:
[ 2031.968302] tegra-xhci tegra-xhci: Firmware timestamp: 2014-09-16 02:10:07 UTC, Falcon state 0x20
[ 2032.301708] usb 1-3: new full-speed USB device number 5 using tegra-xhci
[ 2032.340303] usb 1-3: New USB device found, idVendor=10c4, idProduct=ea60
[ 2032.340530] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 2032.340696] usb 1-3: Product: CP2102 USB to UART Bridge Controller
[ 2032.345171] usb 1-3: Manufacturer: Silicon Labs
[ 2032.345190] usb 1-3: SerialNumber: 0001
[ 2032.423440] cp210x: version magic '3.10.24-gdacac96 SMP preempt mod_unload ARMv7 p2v8 ' should be '3.10.40-gdacac96 SMP preempt mod_unload ARMv7 p2v8 '
It looks like the USB side is working fine, but the kernel module was compiled against a different base kernel, which may or may not break it in different ways. The 3.10.24 kernel is from the earlier R19.x, while the 3.10.40 is from current L4T. The next step would be to compile against current kernel source with a base configuration of the running system.
On your running JTK1, get the /proc/config.gz compressed config file for your starting point. Under general settings of the make menuconfig, you’ll want LOCALVERSION to be set to “-gdacac96”. After that you should be able to do as needed to build the module against your running kernel.