The iRobot Create 2 base interfaces with the NVIDIA Jetson TK1 via a serial to USB FTDI converter. Unfortunately, under Linux for Tegra (L4T) release 21.4 the USB FTDI module is not part of the normal software distribution.
There are a couple of ways to get the USB FTDI module. The first, and probably the easiest, is to replace the stock kernel with the community supported Grinch kernel for the Jetson which includes the FTDI driver. You can read how to do that here. Another way is to build your own USB FTDI module. Looky here:
So why would you choose one method over the other? In the case of the JetsonBot, we currently only have one unsupported hardware device, which is the USB FTDI converter. If you use the Grinch kernel you get a whole kit and caboodle of drivers and such, which is great but has some overhead. The advantage of compiling the USB FTDI module yourself is that it is the minimum amount of extra code and support needed to control the JetsonBot.
There is a script that will download the kernel source for L4T 21.4, build and then install the module in an automated manner. Basically fire off the script and when the script has finished executing, the USB FTDI driver is installed.
First open a Terminal and download the buildJetsonFTDIModule repository:
$ git clone https://github.com/jetsonhacks/buildJetsonFTDIModule.git
Next, switch to the buildJetsonFTDIModule directory and prepare the module.
$ cd buildJetsonFTDIModule
$ sudo ./prepareModule.sh
After the script has completed, you can then plug the Create 2 base (or another FTDI device) into the Jetson USB and execute:
$ dmesg | grep FTDI
You should some something like:
FTDI USB Serial device converter now attached to ttyUSB0
Then you’re good to go.
After installation you have the option of running another script to remove the kernel sources and free up some space. Note that this is not mandatory. To remove the kernel sources:
$ sudo ./removeSources.sh
The video above was created after flashing L4T 21.4 onto the Jetson TK1 (in a procedure similar to this write up except using JetPack 1.2). After the flash, the postFlash procedure was followed using the updated for L4T 21.4 postFlash script.
Thank you Kangalow,
A very useful script!!!
See you soon
I not only try this method but also the method from elinux.org .It is almost the same ,but I cannot successfuly install FTDI module yet I don’t know why I can only detect FTDI attached to usb port but I cannot see any ttyUSB
Which version of L4T are you using?
I use L4T 21.4
Does the file
exist in the directory:
show the module as installed?
the .ko file is in that directory but lsmod show the module haven’t be install. I use lsmod but cannot find the module. I try to use insmod to mount the driver but it shows it cannot mount. I compile the kernel file on L4T.
Are you using the Grinch kernel?
not yet.I will try it this afternoon
The ‘depmod -a’ command should have loaded the driver. I believe that the driver belongs in
but it should work in just the kernel directory.
When you perform the insmod, are there any error messages?
I put the drivers in /lib/modules/$(uname -r)/kernel directory .
when I perform insmod it shows invalid module format.
I try grinch kernel this afternoon and it can connect to ftdi chip now.
I wan’t to know why the driver works with grinch kernel.any difference between the default kernel and grinch? and how can I change the kernel between each other?
This doesn’t describe a fix to your issue, but I tried to replicate the issue here.
I tried the FTDI install script with a new installation of L4T 21.4 several times and did not experience any problems. Each test was:
1. Flash L4T 21.4 from host (Both JetPack 1.2 and JetPack 2.0)
2. Install Git
3. git clone the FTDI installer from Github
4. run the install script
I did notice that a couple of times I needed to reboot the machine for the changes to take effect.
The name of the created driver should have been ftdi_sio.ko
Unfortunately I do not know what is wrong at this point and I am afraid that I cannot be of much more help. I’m sorry that this installation did not work for you.
As for the Grinch, it is a modified version of a regular kernel that contains drivers for many. Unfortunately it is not maintained, but here’s a link of the changes:
I believe that the only way to go back to the regular kernel is to reflash the board from the PC.
another question is that I used to use MINI PCI-E 3G network module on L4T 19 but when I change to 21.x it cannot use with mini PCI-E.I can only use the 3G module when I use a usb adapter to connect my mini PCI-E 3G network card and the board.I don’t know what is the problem
This seems like a strange problem, I have not heard of anyone experiencing this issue. Please post this question to the Jetson Users Forum at https://devtalk.nvidia.com/default/board/139/ Maybe some other people have experienced this issue.
Thanks a lot
insmod: ERROR: could not insert module cp210x.ko: Invalid module format
some others meet the same problem
did you install the L4T directory other than JetsonPack?
I installed L4T using JetPack, both version 1.2 and version 2.0. You can install L4T manually, of course.
I an not sure that insmod works correctly without having the symver information, which means that you have to make all of the modules, i.e.
$ make module
It sounds like there are issues with your L4T install or development system setup. I would try to perform each step of the install script manually to see if there are any issues that might have been missed.