Post Go back to editing

Enable USB Serial Converter Driver

Hello All,

Running Linux on ADRV9361-FMC SoM. I came across the following thread in searching for how to enable the USB serial converter to communicate with peripheral serial devices. This seems like exactly what I need, but I cannot find anything in the operating system that allows me to edit the kernel settings as described. Could someone please provide more detail or point to a good web resource?

https://ez.analog.com/linux-device-drivers/linux-software-drivers/f/q-a/87886/breakout-carrier-how-to-use-second-microusb-interface-to-control-a-serial-device

Quoted from mhennerich ...

"Simply under kernel config goto:

Device Drivers > USB support > USB Serial Converter support

[*]   USB Generic Serial Driver

 <*>   USB CP210x family of UART Bridge Controllers

 <*>   USB FTDI Single Port Serial Driver

Enable the driver in question - most devices use the above checked.

Rebuild your kernel - once you plug in your USB cable.

A device node such as /dev/ttyUSB0 is created which you can use to control your modem.

Just like on any other Linux desktop."

Thanks

Parents Reply Children
  • That was a typo on my part. I do indeed have settings64.sh in /opt/Xilinx/SDK/2016.4/.

    I'll take a look at the link below to see if it provides any help.

    Glen

  • I made sure I had a 32-bit version of GCC installed and the make completed successfully. I followed the rest of the instructions for rebuilding the kernel that included:

    1) making the device tree (make zynq-adrv9361-z7035-fmc)

    2) copying the uImage and devicetree.dtb to the SD card.

    3) rebuilding BOOT.BIN and copying it to the SD card.

    I noticed a couple items in the device tree related to "serial@####" and "usb@#####" that had "disabled" status. I changed these two that were disabled to "okay". Unfortunately, when I plug in my serial device (an Arduino ATSAMD21) it still does not enumerate as a ttyACM# or ttyUSB# device.

    Running #lsusb command displays the VID/PID on Bus 001 Device 005, I just need it mapped to ttyACM# or ttyUSB#.

    Are there any other kernel build steps that I need to perform such as installing a specific module?

    Thanks,

    Glen

  • What is the exact output you get when you do lsusb?

    Even if you don't have a driver for the USB serial converter installed -

    You should see the device when plugged in.

    Do you use a proper MicroUSB to USB type-A adapter?

    -Michael 

  • analog@analog:/dev$ lsusb
    Bus 001 Device 004: ID 046d:c077 Logitech, Inc.
    Bus 001 Device 003: ID 413c:2107 Dell Computer Corp.
    Bus 001 Device 005: ID 239a:800b  
    Bus 001 Device 002: ID 0409:0050 NEC Corp. 7-port hub
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
    analog@analog:/dev$

    The first two are my mouse and keyboard. The third (239a:800b) is the Arduino device I'm trying to connect to. The fourth (0409:0050) is a powered USB hub, which was selected to avoid any issues with the bus-powered Arduino device.

    Both the hub, cables/adapters, and Arduino have been tested on another linux system and the Arduino enumerates as ttyACM0. Data can be transferred over the serial port using Putty, Arduino IDE, QtSerialPort, etc.

    I've tried the following recommended steps from the Arduino community:

    1. adding the user analog to the dialout, tty, uucp, and plugdev groups.

    2. installing Arduino IDE on the target to get the necessary drivers.

    3. adding rules in /etc/udev/rules.d to enermerate and give permissions (lots of options here, I'm open to further suggestions).

    I checked the current kernel configuration using cat /proc/config.gz | gunzip > running.config and verified that the following lines appear

    CONFIG_USB_SERIAL_GENERIC=y
    CONFIG_USB_SERIAL_CP210X=y
    CONFIG_USB_SERIAL_FTDI_SIO=y

    Should I rebuild the kernel with even more drivers enabled? Should there be any installed modules (i.e. lsmod returns nothing)?

    Thanks,

    Glen

  • plug this device into a desktop linux - from dmesg try to see with which driver this device binds.

    [ 7715.680483] usb 1-3.4: new full-speed USB device number 19 using xhci_hcd
    [ 7715.782342] usb 1-3.4: New USB device found, idVendor=10c4, idProduct=ea60
    [ 7715.782346] usb 1-3.4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 7715.782348] usb 1-3.4: Product: CP2103 USB to UART Bridge Controller
    [ 7715.782351] usb 1-3.4: Manufacturer: Silicon Labs
    [ 7715.782353] usb 1-3.4: SerialNumber: 0001
    [ 7715.783760] cp210x 1-3.4:1.0: cp210x converter detected
    [ 7715.786137] usb 1-3.4: cp210x converter now attached to ttyUSB1

    This tells me it uses cp210x - from what you said before - you expected a ttyACM device.

    This leads me to thing that it uses cdc_acm - try to also enable CONFIG_USB_ACM.

    -Michael