telnet with C

Oct 14, 2008 at 9:06pm
Hi,

I am working on a robot automation project and I have run into a road block. To control the robot, one needs to connect with it wirelessly via telnet and send commands through the tcp/ip protocol. (ex. The 'Mabc' command moves it forward based on the left wheel speed (a), the right wheel speed (b) and time (c)). What I am trying to do is do some calculations in a C program and then send a message to the robot based on the value of the calculation.

How can send commands via tcp/ip protocol in a C program?

Thanks!

Erik
Oct 14, 2008 at 10:06pm
Depending on the OS you are writing the client in the code will be slightly different.

Do a google for C Sockets, or C++ Sockets if you have C++ available to you. On Windows it'll be Winsock.

Then it's simple as creating a connection, sending data through it etc.
Topic archived. No new replies allowed.