Skip to main content
csuson
Associate
Sep 25, 2011 4:13 PM UTC
Question

Accessing iNEMO from an embedded linux device

Posted on September 25, 2011 at 18:13

has anybody tried accessing the iNEMO board from an embedded linux device using the usb interface? I am able to power the iNEMO from my device and also able to load a usb-serial driver. What I don't know is the correct serial interface parameters to use to open the port. I hope that somebody in this forum has already gone through this exercise.

thx!

#inemo
    This topic has been closed for replies.

    6 replies

    Fabio
    Associate II
    Sep 28, 2011 12:09 PM UTC
    Posted on September 28, 2011 at 14:09

    You can find useful information in the ''UM1017: STEVAL- MKI062V2 communication protocol'' available at ww.st.com/inemo.

    Regards

    Fabio

    csuson
    csusonAuthor
    Associate
    Sep 28, 2011 8:35 PM UTC
    Posted on September 28, 2011 at 22:35

    Hi Fabio,

    I've read that document which is very helpful but I could not find any mention of serial parameters i need to use to open the port like (baud rate, data bits, stop bit, parity and flow control) settings.

    regards.

    Fabio
    Associate II
    Sep 30, 2011 1:46 PM UTC
    Posted on September 30, 2011 at 15:46

    There are no favorite settings for the virtual com over the usb (if you want you can set the bps 115200 and 8N1 with no control flow: hothese values are not used)

    Best Regards

    iNEMO Team

    hg_it
    Visitor II
    Oct 4, 2011 11:57 PM UTC
    Posted on October 05, 2011 at 01:57

    The following code works for me:

    ========

        int     fd;

        struct  termios inemo;

        if((fd = open(port, O_NOCTTY|O_RDWR)) < 0){

            perror(''open'');

            _exit(errno);

        }

        tcgetattr(fd, &inemo);

        inemo.c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON);

        inemo.c_oflag &= ~OPOST;

        inemo.c_lflag &= ~(ECHO | ECHONL | ICANON | ISIG | IEXTEN);

        inemo.c_cflag &= ~(CSIZE | PARENB);

        inemo.c_cflag |= CS8;

        tcsetattr(fd, TCSANOW, &inemo);

    =======
    csuson
    csusonAuthor
    Associate
    Oct 5, 2011 4:15 AM UTC
    Posted on October 05, 2011 at 06:15

    I was able to access the inemo board now. It turned out that I need to modify my usb2serial driver. Thx for the help anyways.

    gianluca23
    Visitor II
    Sep 27, 2012 9:14 PM UTC
    Posted on September 27, 2012 at 23:14

    Hi there,

    I have the same problem. I'm not able to talk with the device. Coul'd you please more detailed on ''modify my usbtoserial'' driver ?

    Thanks in advance.