Installing Linux on Roboard and FTDI tests


Installing ROBOARD with linux-image-

In the ROBOARD page we found what we need to do the installation following the regular Tutorial of installation of Debian Lenny. We also have in the drivers and the board RB100 manual and RB110 manual.

Everything went well until the installation blocks on the Ethernet devices search.

To solve it, the solution was setting the USB DEVICE on the BIOS, as “Force FDD”.

To Install the Debian on it, we need ethernet connection, which brougth us another problem, the roboard RB110, the one with the FTDI chip, had a problem of non recognized MAC ADDRESS by the bios, to solve this, we’ve used MAC_Tools given by roboard Tech help.

After a successful installation, we needed to install the FTDI drivers to control the chip, install GCC and G++, and editor, in this case, FTE and vim had to be installed using apt-get.

Installing a d2xx driver was simple, just need to follow the instructions on, and it will recognize the chip and use the driver. We didn’t use the on-board chip but rather used an external device (USB2Dynamixel from Robotis) in order to connect the RoBoard to the CM5 Bioloid controller via its UART1.

CM5 UART -> RS232 level converting chip -> USB2Dynamixel -> USB -> RoBoard.

Installing the VCP (Virtual serial Communications Port) driver, was not so easy, the compilation had a lot of errors, found that there was a mismatch of kernel and lib symbolic links, and a lot of other problems, so we did not manage to get it working. The VCP driver for Linux was written by some guy on sourceforge and not formally endorsed by FTDI.

To solve this problem we decided to install ROBOARD with linux-image-, already released, it comes with the FTDI chip VCP drivers, which is automatically recognized on the system, and ready to use, even with hot plug.

A Little program have been made to test the ttyUSB port, based on a loop.

Example code:

#include <sys/time.h>
#include <sys/types.h>
#include <unistd.h>
#include <stdio.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
#include <termios.h>
int main(void)
    fd_set Reading;
    int fdHandler;
    struct timeval timeout;
    char Data;
    struct termios termios_p;
    fdHandler = open(“/dev/ttyUSB0?,O_NONBLOCK|O_RDWR|O_NOCTTY);
        //shit hapened
        puts(“Error Opening”);
    puts(“Port Open\n\rApply Settings”);
    termios_p.c_iflag=0/*IGNPAR | ICRNL*/;
    termios_p.c_cflag= B500000/*|CRTSCTS*/|CREAD|CS8|CLOCAL;
    termios_p.c_cc[VINTR]    = 0;     /* Ctrl-c */
    termios_p.c_cc[VQUIT]    = 0;     /* Ctrl-\ */
    termios_p.c_cc[VERASE]   = 0;     /* del */
    termios_p.c_cc[VKILL]    = 0;     /* @ */
    termios_p.c_cc[VEOF]     = 0;     /* Ctrl-d */
    termios_p.c_cc[VTIME]    = 0;     /* inter-character timer unused */
    termios_p.c_cc[VMIN]     = 0;     /* blocking read until 1 character arrives */
    termios_p.c_cc[VSWTC]    = 0;     /* ” */
    termios_p.c_cc[VSTART]   = 0;     /* Ctrl-q */
    termios_p.c_cc[VSTOP]    = 0;     /* Ctrl-s */
    termios_p.c_cc[VSUSP]    = 0;     /* Ctrl-z */
    termios_p.c_cc[VEOL]     = 0;     /* ” */
    termios_p.c_cc[VREPRINT] = 0;     /* Ctrl-r */
    termios_p.c_cc[VDISCARD] = 0;     /* Ctrl-u */
    termios_p.c_cc[VWERASE]  = 0;     /* Ctrl-w */
    termios_p.c_cc[VLNEXT]   = 0;     /* Ctrl-v */
    termios_p.c_cc[VEOL2]    = 0;     /* ” */
    tcflush(fdHandler, TCIFLUSH);
    if(tcsetattr(fdHandler,TCSANOW, &termios_p)==-1)
        puts(“Error setting configurations”);
        return 0;
        timeout.tv_sec  = 1;
        timeout.tv_usec = 0;
        puts(“Send: A”);
        if(select(100,&Reading, NULL, NULL, &timeout)==-1)
            puts(“Select Fail”);
            puts(“Received: “);
Code to html converted using CodeHTMLer

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: