Legacy Forum: Preserving Nearly 20 Years of Community History - A Time Capsule of Discussions, Memories, and Shared Experiences.

USB2Dynamixel + Linux + ftdi_sio latency

Bioloid robot kit from Korean company Robotis; CM5 controller block, AX12 servos..
3 postsPage 1 of 1
3 postsPage 1 of 1

USB2Dynamixel + Linux + ftdi_sio latency

Post by albertosatan » Tue Sep 08, 2009 5:07 pm

Post by albertosatan
Tue Sep 08, 2009 5:07 pm

Hi all,

I'm using a USB2Dynamixel unit to connect the PC to the dynamixel bus. I'm a Linux user and initialy I get a speed of 60 (reads/second) with the ftdi_sio linux driver, half the speed that I get throught the toss mode of de CM-5.

After some inquiries I discover that the latency parameter of the ftdi_sio driver should be changed from the original value (16) to 2. In Linux you can consult the value of your driver doing,

cat /sys/bus/usb-serial/drivers/ftdi_sio/ttyUSB0/latency_timer

changing the ttyUSB0 by the ttyUSB that you use. And you can reprogram this value doing as root,

echo "2" > /sys/bus/usb-serial/drivers/ftdi_sio/ttyUSB0/latency_timer

This way I can get up to 480 reads/second!!! Reprogramming the latency to 1 is possible obtaining a better performance, but sometimes packets get corrupted.

Bests,

Alberto.
Hi all,

I'm using a USB2Dynamixel unit to connect the PC to the dynamixel bus. I'm a Linux user and initialy I get a speed of 60 (reads/second) with the ftdi_sio linux driver, half the speed that I get throught the toss mode of de CM-5.

After some inquiries I discover that the latency parameter of the ftdi_sio driver should be changed from the original value (16) to 2. In Linux you can consult the value of your driver doing,

cat /sys/bus/usb-serial/drivers/ftdi_sio/ttyUSB0/latency_timer

changing the ttyUSB0 by the ttyUSB that you use. And you can reprogram this value doing as root,

echo "2" > /sys/bus/usb-serial/drivers/ftdi_sio/ttyUSB0/latency_timer

This way I can get up to 480 reads/second!!! Reprogramming the latency to 1 is possible obtaining a better performance, but sometimes packets get corrupted.

Bests,

Alberto.
albertosatan
Newbie
Newbie
Posts: 2
Joined: Tue Sep 08, 2009 4:51 pm

Post by limor » Tue Sep 08, 2009 9:38 pm

Post by limor
Tue Sep 08, 2009 9:38 pm

Hi Alberto

Thank you very much for sharing this information!
The FTDI linux driver latency has been an issue that comes up occasionally on the forum. I played around with Gumstix a couple of years ago and had some semi documented way of modifying the driver source to get better latency. Your trick looks nice and clean. Please see the FTDI latency pointers on the Bioloid Wiki.

Please mention what version of Linux are you using and any information about the specific driver. I hope this driver will also work with non-intel embedded linux systems.
Hi Alberto

Thank you very much for sharing this information!
The FTDI linux driver latency has been an issue that comes up occasionally on the forum. I played around with Gumstix a couple of years ago and had some semi documented way of modifying the driver source to get better latency. Your trick looks nice and clean. Please see the FTDI latency pointers on the Bioloid Wiki.

Please mention what version of Linux are you using and any information about the specific driver. I hope this driver will also work with non-intel embedded linux systems.
limor
Savvy Roboteer
Savvy Roboteer
User avatar
Posts: 1845
Joined: Mon Oct 11, 2004 1:00 am
Location: London, UK

Post by albertosatan » Wed Sep 09, 2009 10:13 am

Post by albertosatan
Wed Sep 09, 2009 10:13 am

Hi!

The trick works too with my gumstix overo that use a 2.6.29 linux kernel.

My PC runs a 2.6.24 linux kernel.

The driver is the ftdi_sio.ko, it is the one that comes with the kernel for ftdi chips.

I will have a look to the Wiki site. Thanks.

Bests,

Alberto.
Hi!

The trick works too with my gumstix overo that use a 2.6.29 linux kernel.

My PC runs a 2.6.24 linux kernel.

The driver is the ftdi_sio.ko, it is the one that comes with the kernel for ftdi chips.

I will have a look to the Wiki site. Thanks.

Bests,

Alberto.
albertosatan
Newbie
Newbie
Posts: 2
Joined: Tue Sep 08, 2009 4:51 pm


3 postsPage 1 of 1
3 postsPage 1 of 1