Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, I'm new to the Linux world and I'm writing a program using C++. I need to send some instructions using a USB port to a microcontroller with a RS232-USB ...
  1. #1
    Just Joined!
    Join Date
    Oct 2007
    Posts
    3

    Question Serial Communication USB on Linux

    Hi, I'm new to the Linux world and I'm writing a program using C++. I need to send some instructions using a USB port to a microcontroller with a RS232-USB converter. I would like to know how can I do this in a simple way.

    I just need to send some characters at a 9600 baud rate.

    I'll be really thankful if anyone could help me with this.

    Thanks in advance.

  2. #2
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Do this at the command line, and all will be revealed.
    Code:
    man 2 open
    man 2 read
    man 2 write
    man 2 close
    man tcgetattr
    man tesetattr
    man cfsetispeed
    man cfsetospeed
    man select           # (optional)
    Hope this helps.

  3. #3
    Just Joined!
    Join Date
    Oct 2007
    Posts
    3
    Hi, thanks for your answer.

    I'll check that and tell you the results.

  4. #4
    Just Joined!
    Join Date
    Oct 2007
    Posts
    3
    Hi, I just tried the commands you suggested but it gives me the following answer:

    No manual entry for open in section 2
    See 'man 7 undocumented' for help when manual pages are not available.

    No manual entry for read in section 2

    No manual entry for write in section 2
    See 'man 7 undocumented' for help when manual pages are not available.

    Any ideas of what's happening?

    Thanks

  5. #5
    Linux Engineer wje_lf's Avatar
    Join Date
    Sep 2007
    Location
    Mariposa
    Posts
    1,192
    Hoo boy. It looks as though you don't have man pages installed.

    Here's a quick fix: http://www.die.net/man/

    If you know the section number, click on that section number. (You'll soon get a feel for that.) Otherwise, enter the function name in the box at the top.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...