3.2 Connecting to UART Interfaces from Linux Hosts

If the Curiosity Kit is being used with a Linux host PC, udev rules must be added to allow Linux to detect the FTDI USB to UART bridge. Without these settings, the COM ports may not appear on the Linux host. No additional driver is required to be installed.

  1. Open the file at /etc/udev/rules.d/70-microchip.rules.
  2. Add the following text (using a text editor, such as, VIM or nano) running as sudo.
    # Bind ftdi_sio driver to all input 
    ACTION=="add", ATTRS{idVendor}=="1514", ATTRS{idProduct}=="200a", \
    ATTRS{product}=="MCHP-Debug", ATTR{bInterfaceNumber}!="00", \
    RUN+="/sbin/modprobe ftdi_sio", RUN+="/bin/sh -c 'echo 1514 200a > /sys/bus/usb-serial/drivers/ftdi_sio/new_id'"
    
    # Unbind ftdi_sio driver for channel A which should be the JTAG
    SUBSYSTEM=="usb", DRIVER=="ftdi_sio", ATTR{bInterfaceNumber}=="00", \
    RUN+="/bin/sh -c 'echo $kernel > /sys/bus/usb/drivers/ftdi_sio/unbind'"
     
    # Helper (optional)
    KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", \
    ATTRS{interface}=="MCHP-Debug", ATTRS{bInterfaceNumber}=="01", \
    SYMLINK+="ttyUSB-MCHPDebugSerialB" GROUP="dialout" MODE="0666"
    
    KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", \
    ATTRS{interface}=="MCHP-Debug", ATTRS{bInterfaceNumber}=="02", \
    SYMLINK+="ttyUSB-MCHPDebugSerialC" GROUP="dialout" MODE="0666"
    
    KERNEL=="ttyUSB[0-9]*", SUBSYSTEM=="tty", SUBSYSTEMS=="usb", \
    ATTRS{interface}=="MCHP-Debug", ATTRS{bInterfaceNumber}=="03", \
    SYMLINK+="ttyUSB-MCHPDebugSerialD" GROUP="dialout" MODE="0666"
    
  3. After adding the new udev rules, run the following command to apply the changes: sudo udevadm control --reload.
To identify the COM port numbers used in Linux, execute the following command.
ls /dev/tty*
Note: This command must be run without the kit connected to see the serial terminals available when there is no kit connected, and then re-run with the kit connected to see the additional serial terminals that are available once the kit is connected. The new ports that appear once the kit has been connected are the COM ports for the kit.