FTDI Connection

Hello,

I’m using a microcontroller, https://www.parallax.com/. The IDE from this company is not compatible to TK1 since they only have ones for intel and raspberry pi.

Anyhow, what I need to do is just simply to recognize and attach ftdi to ttyUSB#. I tried Grinch Kerenl as well as installed ftdi module, and installed Arduino. Arduino works fine. Yet the micro controller I use doesn’t seem to be recognized. When I type “dmesg | grep FTDI”, it just shows magnufacutre: FTDI. Of course I used dialout. Does anyone know why FTDI is not attached to tty?

There are several products on that URL, so it isn’t possible to know what interface you are looking for just from the web page.

Are you plugging in a USB connector to the JTK1’s USB? Is that connector communicating with a serial UART (FTDI chip set) connected to the remote device? If so, this is normally enabled in a desktop computer, but has to be manually enabled for an embedded system (it’s a waste to enable unused features on something trying to be small and efficient). To enable this you only need a kernel module, you don’t need a new kernel. You will need to have the kernel source and compile the module. If you need to know more about building kernel modules just ask. The JTK1 is capable of building this natively…either cross compile on an x86_64 host or directly on the Jetson.

For reference, the kernel feature you probably want is CONFIG_USB_SERIAL_FTDI_SIO.

If you are using “make menuconfig” to select the feature, it is located here:

-> Device Drivers
  .> USB support
    -> USB Serial Converter support
      -> USB FTDI Single Port Serial Driver
         "m" to select as module

I don’t have a Parallax, so I’m just guessing. I’m assuming you’re using the Grinch kernel, which has FTDI support built in. Try unplugging the Parallax and rebooting the machine. Make sure the Arduino is not connected.

Check to see if there is a FTDI device (there should not be):

$ lsusb

Then plug in the Parallax.

$ lsusb

should show an entry for FTDI, which would be the Parallax.

Then try:

$ dmesg | grep usb

You should get something like (this is for an Arduino) :

[   57.385970] usb 2-1.5: new full-speed USB device number 5 using tegra-ehci
[   57.407931] usb 2-1.5: New USB device found, idVendor=0403, idProduct=6001
[   57.407950] usb 2-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[   57.407964] usb 2-1.5: Product: FT232R USB UART
[   57.407976] usb 2-1.5: Manufacturer: FTDI
[   57.407987] usb 2-1.5: SerialNumber: A601NG2B
[   57.479238] ftdi_sio: version magic '3.10.24 SMP preempt mod_unload ARMv7 p2v8 ' should be '3.10.24-gf455cd4 SMP preempt mod_unload ARMv7 p2v8 '
[   57.504885] usbcore: registered new interface driver ftdi_sio
[   57.507384] usbserial: USB Serial support registered for FTDI USB Serial Device
[   57.508073] ftdi_sio 2-1.5:1.0: FTDI USB Serial Device converter detected
[   57.508917] usb 2-1.5: Detected FT232RL
[   57.508934] usb 2-1.5: Number of endpoints 2
[   57.508948] usb 2-1.5: Endpoint 1 MaxPacketSize 64
[   57.508960] usb 2-1.5: Endpoint 2 MaxPacketSize 64
[   57.508971] usb 2-1.5: Setting MaxPacketSize 64
[   57.511143] usb 2-1.5: FTDI USB Serial Device converter now attached to ttyUSB0

After using dmesg | grep USB, I have

[ 11.606328] op_mode: TEGRA_USB_OPMODE_HOST
[ 12.609657] tegra-ehci tegra-ehci.0: new USB bus registered, assigned bus number 3
[ 12.616099] tegra-ehci tegra-ehci.0: USB 2.0 started, EHCI 1.10
[ 12.616324] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[ 12.616336] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 12.619223] hub 3-0:1.0: USB hub found
[ 543.785589] usb 2-1.2: new full-speed USB device number 8 using tegra-ehci
[ 544.382724] usb 2-1.2: new full-speed USB device number 10 using tegra-ehci
[ 544.403095] usb 2-1.2: New USB device found, idVendor=0403, idProduct=6015
[ 544.403102] usb 2-1.2: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[ 544.403108] usb 2-1.2: Product: FT231X USB UART
[ 1621.377813] usb 2-1.2: USB disconnect, device number 10

And After using dmesg | grep FTDI
[ 544.403165] usb 2-1.2: Manufacturer: FTDI

But currenlty it doesn’t attach to ttyUSB

I’m currently using https://www.parallax.com/product/32214

Also I have used Grinch kernel fro here, http://jetsonhacks.com/2015/05/26/install-grinch-kernel-for-l4t-21-3-on-nvidia-jetson-tk1/

But do i need to turn on CONFIG_USB_SERIAL_FTDI_SIO? If so, please let me know how I can build and configure it.

Also, from here: http://learn.parallax.com/tutorials/language/propeller-c/propeller-c-set-simpleide/linux
I installed the ide on my x64 Ubuntu 14.04 and it works. So I did the same with rapsberry pi version: http://learn.parallax.com/tutorials/language/propeller-c/propeller-c-set-simpleide/raspberry-pi

But, it din’t work for JTK1 ( by altering Qt library, the ide runs, but it doesn’t recognize the chip unlike the desktop ubuntu)

If you are going to build a custom kernel for FTDI support, you may find this article useful:

http://jetsonhacks.com/2016/06/29/build-custom-kernel-nvidia-jetson-tk1/

In the video, at about the 3:08 mark FTDI support is added for the custom kernel.

Device Drivers -> USB Support -> USB Serial Converter Support -> USB FTDI Single Port Serial Driver

This approach uses the stock L4T 21.4 kernel, not the Grinch one. If you want to use the Grinch, you will have to install the Grinch kernel sources instead of the stock kernel sources.

USB has basically two things it’s really good at…detecting and establishing that there is something there, and handing off that “something” to a driver. The FTDI chip obviously is announcing that it is there, but it isn’t handing off for something to handle it as a serial device because the driver isn’t there…that driver is from CONFIG_USB_SERIAL_FTDI_SIO. Add this and not only will the chip be detected, it should correctly hand off at least to a serial UART driver. This should make it possible for your program to talk to the device (via serial UART).

You don’t need to build an entire kernel. You just need to build a module for CONFIG_USB_SERIAL_FTDI_SIO, and copy it to the right place. @Kangalow gave information on building kernels, you can stop after the “make modules_install” if you properly configured your source code to match the current kernel (including the “localversion” blurb).

Note that you can set up the existing version via the steps in the article, and then add new edits via the “make menuconfig” (such as right after “make tegra12_defconfig” or “make oldconfig” or simply copying in the config.gz file as mentioned). I think to use “menuconfig” you need package “libncurses5-dev” (I might be off, just going by memory…you can search via something like “apt search ncurses5-dev” and it’ll find close matches with that in the middle of the package name). Under menuconfig “m” selects module, “y” selects integrated feature, and “n” deselects. Be sure to use “m”.

Ah! I appreciate a lot. Finally it works. And I also found the reason - primarily due to my lack of knowledge - I did not know what I was trying to overclock: https://devtalk.nvidia.com/default/topic/939240/jetson-tk1-overclock/

exerpt: =======================
… After renaming it, copy the file to your /boot/ directory, then open your extlinux.conf file in /boot/extlinux/ and change LINUX /boot/zImage to LINUX /boot/zImageoc …

In that post, I changed zImage to zImageoc. So it kept reading the old kernel. It was also pity that I didn’t check Grinch Kernel was working before by typing uname -r.

Anyway,I’m gonna try to mix overclocking with custom kernel.