【xavier】USB serial port can not be recognized

Xavier connect Inertial Navigation via USB ,USB to serial port can not be used,I cann’t find the dev/ttyUSB.

nvidia@jetson-0423318033477:~$ ls /dev/tty*
/dev/tty /dev/tty21 /dev/tty35 /dev/tty49 /dev/tty62 /dev/ttyp9
/dev/tty0 /dev/tty22 /dev/tty36 /dev/tty5 /dev/tty63 /dev/ttypa
/dev/tty1 /dev/tty23 /dev/tty37 /dev/tty50 /dev/tty7 /dev/ttypb
/dev/tty10 /dev/tty24 /dev/tty38 /dev/tty51 /dev/tty8 /dev/ttypc
/dev/tty11 /dev/tty25 /dev/tty39 /dev/tty52 /dev/tty9 /dev/ttypd
/dev/tty12 /dev/tty26 /dev/tty4 /dev/tty53 /dev/ttyGS0 /dev/ttype
/dev/tty13 /dev/tty27 /dev/tty40 /dev/tty54 /dev/ttyp0 /dev/ttypf
/dev/tty14 /dev/tty28 /dev/tty41 /dev/tty55 /dev/ttyp1 /dev/ttyS0
/dev/tty15 /dev/tty29 /dev/tty42 /dev/tty56 /dev/ttyp2 /dev/ttyS1
/dev/tty16 /dev/tty3 /dev/tty43 /dev/tty57 /dev/ttyp3 /dev/ttyS2
/dev/tty17 /dev/tty30 /dev/tty44 /dev/tty58 /dev/ttyp4 /dev/ttyS3
/dev/tty18 /dev/tty31 /dev/tty45 /dev/tty59 /dev/ttyp5 /dev/ttyTCU0
/dev/tty19 /dev/tty32 /dev/tty46 /dev/tty6 /dev/ttyp6 /dev/ttyTHS0
/dev/tty2 /dev/tty33 /dev/tty47 /dev/tty60 /dev/ttyp7 /dev/ttyTHS1
/dev/tty20 /dev/tty34 /dev/tty48 /dev/tty61 /dev/ttyp8 /dev/ttyTHS4

Hi,

Do you mean you connect this kind of cable to Xavier USB3 port and there is no ttyUSB nodes being generated?

yes,this cable, i can not find ttyUSB

With no cable connected, run “dmesg --follow”. Now insert the cable…what shows up?

With the cable connected, what do you see from “lsusb”?

yes,this cable, i can not find ttyUSB

The USB side of that cable requires a driver for the particular serial UART chip. The reason for watching “dmesg --follow” while plugging in the cable is to see if hints are given as to driver status.

Hi,
It looks to be a HW enumeration issue. Please connect Xavier to a USB hub and then connect the cable to the hub.

does it work? meeting this issue with NovAtel

Hi,
We don’t see any issue if you plugin in a USB hub. Please give it a try.

I do have tried it with a USB hub(following ORICO usb hub), same result…
https://gd4.alicdn.com/imgextra/i4/741718256/O1CN01hLNa6r2ArIStTnvXk_!!741718256.jpg

Need I try the original USB hub(provided with DRIVE AGX Xavier)? Or are there other solutions that I can try?

any further reply???

Hi,
We don’t hit the issue. Please share the adapter you use. Other users may have same device and can share experience.

Actually I have shared as mentioned above…(https://gd4.alicdn.com/imgextra/i4/741718256/O1CN01hLNa6r2ArIStTnvXk_!!741718256.jpg)… Thus, I should try to use the original NVIDIA’s hub?

If you monitor “dmesg --follow”, and then plug in the device, what log do you see? Not all serial devices are named with a “/dev/ttyUSB#” format…some get udev to rename the device. In other cases a different USB serial UART chip might need an extra driver.

Hi, @linuxdev @DaneLLL, here is the info:

nvidia@tegra-a:~$ dmesg --follow
....

[   36.610598] eqos 2490000.ether_qos eth0: Link is Up - 1Gbps/Full - flow control off
[   36.610650] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   58.842440] mttcan c320000.mttcan can1: Bitrate set
[   58.846164] mttcan_controller_config: ctrlmode 0
[   58.846184] mttcan c320000.mttcan can1: Bitrate set
[   58.857873] can: controller area network core (rev 20120528 abi 9)
[   58.858114] NET: Registered protocol family 29
[   58.864727] can: raw protocol (rev 20120528)
[   64.066428] mttcan c310000.mttcan can0: Bitrate set
[   64.086527] mttcan_controller_config: ctrlmode 10
[   64.086547] mttcan c310000.mttcan can0: Bitrate set
[   64.110613] mttcan c320000.mttcan can1: Bitrate set
[   64.131075] mttcan_controller_config: ctrlmode 10
[   64.131135] mttcan c320000.mttcan can1: Bitrate set
[   64.164622] EXT4-fs (vblkdev3): mounted filesystem with ordered data mode. Opts: (null)

[  158.380973] usb 1-1.1: new high-speed USB device number 7 using tegra-xusb
[  158.486047] usb 1-1.1: New USB device found, idVendor=09d7, idProduct=0100
[  158.486056] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  158.486060] usb 1-1.1: Product: NovAtel GPS Receiver
[  158.486064] usb 1-1.1: Manufacturer: NovAtel Inc.
[  158.486067] usb 1-1.1: SerialNumber: BMAW18060002P

nvidia@tegra-a:~$ lsusb 
Bus 002 Device 002: ID 05e3:0612 Genesys Logic, Inc. 
Bus 002 Device 003: ID 0781:558c SanDisk Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 1546:01a8 U-Blox AG 
Bus 001 Device 005: ID 046d:c534 Logitech, Inc. Unifying Receiver
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
nvidia@tegra-a:~$ 
nvidia@tegra-a:~$ 
nvidia@tegra-a:~$ lsusb 
Bus 002 Device 002: ID 05e3:0612 Genesys Logic, Inc. 
Bus 002 Device 003: ID 0781:558c SanDisk Corp. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 1546:01a8 U-Blox AG 
Bus 001 Device 005: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 007: ID 09d7:0100 Novatel Wireless NovAtel FlexPack GPS receiver
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
nvidia@tegra-a:~$

And I see there are some udev rules:

nvidia@tegra-a:/etc/udev/rules.d$ ll
total 28
drwxr-xr-x 2 root root 4096 Jul  4  2017 ./
drwxr-xr-x 4 root root 4096 Nov 12 18:16 ../
-rw-r--r-- 1 root root 2338 Oct 17 11:59 60-vblkdev-storage.rules
-rw-r--r-- 1 root root  571 Oct 17 11:59 99-hide-disks.rules
-r--r--r-- 1 root root 2412 Oct 17 12:07 99-hyperion-storage.rules
-r--r--r-- 1 root root   35 Oct 17 12:07 99-nvpps.rules
-r--r--r-- 1 root root  588 Oct 17 12:07 99-usb-serial.rules
nvidia@tegra-a:/etc/udev/rules.d$ cat 99-usb-serial.rules 
SUBSYSTEM=="tty", ATTRS{idVendor}=="2639", ATTRS{idProduct}=="d00d", SYMLINK+="ttyUSBXSENS" RUN+="/bin/sh -c 'echo 0 > /sys/bus/usb-serial/devices/%k/latency_timer'"
SUBSYSTEM=="tty", ATTRS{idVendor}=="067b", ATTRS{idProduct}=="2303", SYMLINK+="ttyUSBXSENS" RUN+="/bin/sh -c 'echo 0 > /sys/bus/usb-serial/devices/%k/latency_timer'"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", SYMLINK+="ttyUSBXSENS" RUN+="/bin/sh -c 'echo 0 > /sys/bus/usb-serial/devices/%k/latency_timer'"
SUBSYSTEM=="tty", ATTRS{idVendor}=="0e8d", ATTRS{idProduct}=="3329", SYMLINK+="ttyUSBRTC"
nvidia@tegra-a:/etc/udev/rules.d$

I do have remove the “99-usb-serial.rules” and restart, still not working…

I have also tried another DRIVE AGX Xavier, same result…

nvidia@tegra-a:~$ lsusb 
Bus 002 Device 002: ID 05e3:0612 Genesys Logic, Inc. 
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 006: ID 1546:01a8 U-Blox AG 
Bus 001 Device 005: ID 046d:c534 Logitech, Inc. Unifying Receiver
Bus 001 Device 003: ID 09d7:0100 Novatel Wireless NovAtel FlexPack GPS receiver
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

nvidia@tegra-a:~$ dmesg --follow
...
ports DPO and FUA
[  170.832840]  sda: sda1
[  170.836841] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, supports DPO and FUA
[  170.837111] sd 0:0:0:0: [sda] Attached SCSI disk
[  207.053706] usb 1-1.1: USB disconnect, device number 3

[  280.493665] usb 1-1.1: new high-speed USB device number 7 using tegra-xusb
[  280.594746] usb 1-1.1: New USB device found, idVendor=09d7, idProduct=0100
[  280.594753] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  280.594785] usb 1-1.1: Product: NovAtel GPS Receiver
[  280.594788] usb 1-1.1: Manufacturer: NovAtel Inc.
[  280.594791] usb 1-1.1: SerialNumber: BMAW18060002P

Besides, I try to install NovAtel Linux USB Drivers, https://www.novatel.com/assets/Documents/Downloads/ngpsusbpackage.tar.gz, but got:

nvidia@tegra-a:~/Workspace/ngpsusbpackage$ sudo bash ngpsusb-install 
...
DKMS: add completed.
Error! Your kernel headers for kernel 4.9.131-rt93-tegra cannot be found.
Please install the linux-headers-4.9.131-rt93-tegra package,
or use the --kernelsourcedir option to tell DKMS where it's located
Error! Your kernel headers for kernel 4.9.131-rt93-tegra cannot be found.
Please install the linux-headers-4.9.131-rt93-tegra package,
or use the --kernelsourcedir option to tell DKMS where it's located
dpkg: error processing package ngpsusbpackage (--install):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 ngpsusbpackage

And seems that hard to fetch linux-headers-4.9.131-rt93-tegra

It isn’t clear which log is specifically occurring on plug in of that device, but I suspect this is because the USB cable is hosting more than one device type. Is it correct that this is the only dmesg text which occurred as a result of connecting the cable?

[  280.493665] usb 1-1.1: new high-speed USB device number 7 using tegra-xusb
[  280.594746] usb 1-1.1: New USB device found, idVendor=09d7, idProduct=0100
[  280.594753] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  280.594785] usb 1-1.1: Product: NovAtel GPS Receiver
[  280.594788] usb 1-1.1: Manufacturer: NovAtel Inc.
[  280.594791] usb 1-1.1: SerialNumber: BMAW18060002P

Some other devices showed up, but may not be part of this and I’d like to make sure I’m looking at the right device. For example, “sda1” is a disk partition…perhaps the device has a writable partition, but perhaps this is not from plugging in the device. There is also some “mttcan” text, and this would probably be a CAN bus (looks like a network device in “ifconfig” if it is configured).

The actual NovAtel device is a custom USB device needing a custom driver, and is not an ordinary serial UART. Underneath this customization there may indeed be an ordinary serial UART, but the plug-n-play information published by the device upon plugin is such that generic drivers cannot be used. If this is the serial device, then you’ll need the NovAtel driver to get the ttyUSB# to show up. USB has seen the device connect and has reported the specifications, but nothing took ownership (there is no driver, or else the customization of the information prevented the generic driver from recognizing it can handle the device).

I’m thinking there is more software you need to install for this, but keep in mind that desktop PC drivers won’t work on this architecture. If you go to the device’s support web site, then you’ll need the arm64/aarch64 drivers. If the CAN device is part of this, then you may also need user space software to talk to the CAN interface.

All your reply are correct, and that’s dmesg info from NovAtel (I separated them by several empty lines).

Currently we’re trying to install NovAtel USB Driver, no any official arm64/aarch64 release.

Any suggestions?

Fixed by installing usb-serial-simple.ko, which contains novatel_gps

nvidia@tegra-a:~$ sudo modprobe usbserial
nvidia@tegra-a:~$ sudo insmod usb-serial-simple.ko 
nvidia@tegra-a:~$ dmesg
...
[ 9421.234635] usbcore: registered new interface driver usbserial
[ 9424.247233] usbcore: registered new interface driver usb_serial_simple
[ 9424.247273] usbserial: USB Serial support registered for carelink
[ 9424.247294] usbserial: USB Serial support registered for zio
[ 9424.247316] usbserial: USB Serial support registered for funsoft
[ 9424.247336] usbserial: USB Serial support registered for flashloader
[ 9424.247381] usbserial: USB Serial support registered for google
[ 9424.247427] usbserial: USB Serial support registered for libtransistor
[ 9424.247470] usbserial: USB Serial support registered for vivopay
[ 9424.247514] usbserial: USB Serial support registered for moto_modem
[ 9424.247552] usbserial: USB Serial support registered for motorola_tetra
[ 9424.247591] usbserial: USB Serial support registered for novatel_gps
[ 9424.247630] usbserial: USB Serial support registered for hp4x
[ 9424.247666] usbserial: USB Serial support registered for suunto
[ 9424.247702] usbserial: USB Serial support registered for siemens_mpi

Then NovAtel can successfully attached to /dev/ttyUSB0…2

[ 1361.124082] usb_serial_simple 1-1.1:1.0: device disconnected
[ 1364.157877] usb 1-1.1: new high-speed USB device number 8 using tegra-xusb
[ 1364.258824] usb 1-1.1: New USB device found, idVendor=09d7, idProduct=0100
[ 1364.258832] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 1364.258835] usb 1-1.1: Product: NovAtel GPS Receiver
[ 1364.258837] usb 1-1.1: Manufacturer: NovAtel Inc.
[ 1364.258839] usb 1-1.1: SerialNumber: BMAW18060002P
[ 1364.260571] usb_serial_simple 1-1.1:1.0: novatel_gps converter detected
[ 1364.260797] usb 1-1.1: novatel_gps converter now attached to ttyUSB0
[ 1364.261169] usb 1-1.1: novatel_gps converter now attached to ttyUSB1
[ 1364.261388] usb 1-1.1: novatel_gps converter now attached to ttyUSB2

Fetch usb-serial-simple.ko by kernel cross-compilation, only need change following configuration, adding line 483

$ vim drive-oss-src/kernel/arch/arm64/configs/tegra_gnu_linux_defconfig
...
475 CONFIG_USB_SERIAL=m
476 CONFIG_USB_SERIAL_CH341=m
477 CONFIG_USB_SERIAL_CP210X=m
478 CONFIG_USB_SERIAL_FTDI_SIO=m
479 CONFIG_USB_SERIAL_GARMIN=m
480 CONFIG_USB_SERIAL_KEYSPAN=m
481 CONFIG_USB_SERIAL_PL2303=m
482 CONFIG_USB_SERIAL_XSENS_MT=m
483 USB_SERIAL_SIMPLE=m
484 CONFIG_USB_HSIC_USB4604=y
485 CONFIG_DUAL_ROLE_USB_INTF=y
486 CONFIG_USB_GADGET=y
...