NovAtel USB Driver on DRIVE Software 10

Hardware Platform: DRIVE AGX Xavier™ Developer Kit
DRIVE OS: 5.1.6.1-16902563
Software Version: DRIVE Software 10
Host Machine Version: Ubuntu 18.04.5 LTS
SDK Manager Version: 1.4.0.7363

How can I install the NovAtel USB Driver on Xavier under DRIVE Software 10?
For DRIVE Software 9, I made it in this way: 【xavier】USB serial port can not be recognized

Here I provide the kernel driver usb-serial-simple.ko (285.7 KB) , cross-compile from DRIVE OS, which was introduced in the last step.

Test the driver

nvidia@tegra-a:~$ sudo modprobe usbserial
nvidia@tegra-a:~$ sudo insmod usb-serial-simple.ko
nvidia@tegra-a:~$ dmesg
...
[30217.836456] usbcore: registered new interface driver usbserial
[30217.837500] usbcore: registered new interface driver usb_serial_simple
[30217.837548] usbserial: USB Serial support registered for carelink
[30217.837591] usbserial: USB Serial support registered for zio
[30217.837642] usbserial: USB Serial support registered for funsoft
[30217.837677] usbserial: USB Serial support registered for flashloader
[30217.837715] usbserial: USB Serial support registered for google
[30217.837754] usbserial: USB Serial support registered for libtransistor
[30217.837795] usbserial: USB Serial support registered for vivopay
[30217.837817] usbserial: USB Serial support registered for moto_modem
[30217.837859] usbserial: USB Serial support registered for motorola_tetra
[30217.837894] usbserial: USB Serial support registered for novatel_gps
[30217.837932] usbserial: USB Serial support registered for hp4x
[30217.837972] usbserial: USB Serial support registered for suunto
[30217.838009] usbserial: USB Serial support registered for siemens_mpi
[30454.361656] tegra-xusb 3610000.xhci: exiting ELPG
[30454.366213] tegra-xusb 3610000.xhci: Firmware timestamp: 2018-03-29 14:24:42 UTC, Version: 60.05 release
[30454.367234] tegra-xusb 3610000.xhci: exiting ELPG done
[30454.600681] usb 1-2: new high-speed USB device number 2 using tegra-xusb
[30454.749981] usb 1-2: New USB device found, idVendor=09d7, idProduct=0100
[30454.749989] usb 1-2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[30454.750018] usb 1-2: Product: NovAtel GPS Receiver
[30454.750023] usb 1-2: Manufacturer: NovAtel Inc.
[30454.750027] usb 1-2: SerialNumber: DMMU19350049A
[30454.752212] usb_serial_simple 1-2:1.0: novatel_gps converter detected
[30454.752725] usb 1-2: novatel_gps converter now attached to ttyUSB0
[30454.753261] carmel_ras carmel_ras: Deferring probe, arm64_ras hasnt been probed yet
[30454.753592] usb 1-2: novatel_gps converter now attached to ttyUSB1
[30454.753743] carmel_ras carmel_ras: Deferring probe, arm64_ras hasnt been probed yet
[30454.753946] usb 1-2: novatel_gps converter now attached to ttyUSB2
[30454.754306] carmel_ras carmel_ras: Deferring probe, arm64_ras hasnt been probed yet
...

Enable the Driver Automatically into Flashed Kernel

nvidia@tegra-a:~$ sudo cp usb-serial-simple.ko /lib/modules/`uname -r`/kernel/drivers/usb/serial/
nvidia@tegra-a:~$ sudo depmod -a
nvidia@tegra-a:~$ sudo modprobe usb-serial-simple

Cross-compile the driver: usb-serial-simple.ko

  1. Fetch NovAtel Device ID from Linux USB Driver
    ngpsusb.c (2.2 KB)

    // ngpsusb.c
    /*
     * NovAtel GPS USB to RS232 serial adaptor driver
     */
    ...
    static const struct usb_device_id id_table[] = {
    { USB_DEVICE(0x09d7, 0x0100) },     /* NovAtel GPS USB interface */
    {}	                            /* Terminating Entry */
    };
    ...
    

    And the Device ID already in usb-serial-simple.c

  2. Follow the Compiling the Kernel (NVIDIA DRIVE Linux) and add
    CONFIG_USB_SERIAL_SIMPLE in <top>/drive-oss-src、kernel/arch/arm64/configs/tegra_defconfig as following:

     959 CONFIG_USB_SERIAL_CP210X=m
     960 CONFIG_USB_SERIAL_FTDI_SIO=m
     961 CONFIG_USB_SERIAL_GARMIN=m
     962 CONFIG_USB_SERIAL_KEYSPAN=m
     963 CONFIG_USB_SERIAL_PL2303=m
     964 CONFIG_USB_SERIAL_OPTION=m
     965 CONFIG_USB_SERIAL_XSENS_MT=m
     966 CONFIG_USB_SERIAL_SIMPLE=m
     967 CONFIG_USB_EMI62=m
     968 CONFIG_USB_EMI26=m
     969 CONFIG_USB_SEVSEG=m
     970 CONFIG_USB_RIO500=m
     971 CONFIG_USB_LCD=m
    
  3. Fetch usb-serial-simple.ko after building kernel.

    xxx@<top>/drive-oss-src$ find . -name "usb-serial-simple.ko"
    ./out-t186ref-linux/drivers/usb/serial/usb-serial-simple.ko
    

Here I share the kernel module for DRIVE OS 5.2.0 refer to DRIVE OS Linux
usb-serial-simple.ko (286.2 KB)

Thank you for sharing the information to other developers.

1 Like