FTDI-FT232 chip USB to RS232 ,how to use in JETSON TX2?

Hello,all:

I want to use the RS232 to read data in the JETSON TX2.
But there is not the 9 pins RS232 port in the board.
I use a usb to RS232 which chip is FTDI-FT232.
And then I connected the device into the TX2 board,but I didn’t the device in the “/dev” dir.

I tried to cross compile the driver “ftdi_sio”,but I couldn’t finish cross compile.
Some header file can’t find.

I want to ask how do I compile the driver “ftdi_sio”?

The attachment is the source code of “ftdi_sio”.

Thanks in advice!
ftdi_sio.tar.gz (33.7 KB)

The serial ports on the Jetson are 3.3V TTL level…same protocol as RS232, but voltages differ. You can get TTL level USB serial UARTs which function exactly like the RS232 version, but which work on the UART pins of the developer carrier board. Example:
https://www.digikey.com/product-detail/en/TTL-232R-3V3/768-1015-ND/1836393

@linuxdev,thanks for your answering!

I want to know,how could the USB to RS232 work?
I tried to cross compile the driver in my JETSON TX2.
When I make the source code,it prompt some header files cannot find.

Could you teach me how to solove the question?

e.g.Do I need download the kernel source code?
What URL can download the correct source code?

Thanks in advice!

RS232 physical connector on a 9-pin D-sub connector is not supported…the protocol is. RS232 has a wide voltage range supported, the Jetson supports a 3.3V interface only…everything else is already built in if you directly use one of the embedded UARTs.

To verify an FTDI USB serial UART could be used (in addition to the built-in UARTs):

gunzip < /proc/config.gz | egrep 'FTDI'

So this should verify there is nothing which needs to be done. The question is if you are trying to use a 9-pin D-sub connector…if so, then you’d need an adapter between the RS232 levels and the 3.3V levels.

It is hard to be specific since it isn’t known how you intend to use serial port data…what is your example use-case?

@linuxdev,thanks!

I use the USB to RS232,but the driver of the device is not installed successfully.
I want to know why the driver didn’t install successfully.
And how can I install the driver successfully?

The attachments is my device picture.


So the USB end is plugged into the Jetson? This should work fairly well and be simple if FTDI. To know more two pieces of information would be quite helpful. First is the output from this:

gunzip < /proc/config.gz | egrep 'FTDI'

Second, if monitoring “dmesg --follow” while inserting or removing the USB connector, what shows up?

@linuxdev thanks!

I tried with your command.

1.When I input the command “gunzip < /proc/config.gz | egrep ‘FTDI’”,the terminal output is as following:

CONFIG_USB_FTDI_ELAN is not set

2.1 When I was inserting the USB connector,it is as following:
[27549.243310] usb 1-1: new full-speed USB device number 29 using xhci-tegra
[27549.383354] usb 1-1: New USB device found, idVendor=0403, idProduct=6001
[27549.390146] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[27549.397472] usb 1-1: Product: USB Serial Converter
[27549.402344] usb 1-1: Manufacturer: FTDI
[27549.406335] usb 1-1: SerialNumber: FTAMGNY2
[27549.411714] xhci-tegra 3530000.xhci: tegra_xhci_mbox_work mailbox command 6

2.2 When I was removing it,the terminal output is as following:
[27486.155718] usb 1-1: USB disconnect, device number 28
[27486.161788] xhci-tegra 3530000.xhci: tegra_xhci_mbox_work mailbox command 6

The above is the output in the terminal.

Do you see “CONFIG_USB_SERIAL_FTDI_SIO”? This is serial I/O from FTDI.

If this does not show up there is a serious difference between your kernel and the stock kernel (in which case the next question would be "what does ‘uname -r’ show).

“CONFIG_USB_FTDI_ELAN” is unrelated, it is a PCMCIA adapter:
http://cateee.net/lkddb/web-lkddb/USB_FTDI_ELAN.html

@linuxdev,thanks for your help !

–>"what does ‘uname -r’ show

It show up 4.4.15-tegra.

4.4.15-tegra is probably R27.1. CONFIG_USB_SERIAL_FTDI_SIO is enabled by default on R27.1, so I don’t know why yours would not be enabled unless the kernel is different. Perhaps it isn’t R27.1…what is the output from “head -n 1 /etc/nv_tegra_release”?

@linuxdev,thanks!

When I input the following command,it outputs like this:

what is the output from “head -n 1 /etc/nv_tegra_release”?
–># R27 (release), REVISION: 0.1, GCID: 8462615, BOARD: t186ref, EABI: aarch64, DATE: Thu Feb 9 02:14:58 UTC 2017

Yes, that’s R27.1. So you should find this result from checking for the driver:

# cat /proc/config.gz | gunzip | egrep SERIAL_FTDI
CONFIG_USB_SERIAL_FTDI_SIO=y

If this is the case, then FTDI serial USB chips are already supported. If not, then it means your kernel was modified and during the modification the feature was removed.

Do keep in mind that even if the FTDI chip is working you will find other software is often required for it to work “as expected”, e.g., udev might rename a serial device. So you have to know first if the chipset feature is there…after that you can concentrate on configuration.