I have the CCS demo board. I am just trying to open a connection to a server with a specific IP and Port number and send 10 numbers to it.. I am very new to TCP/IP stuff but have been working with pic's for years. I am unsure how to change the IP address in the code. But to send info all I have to do is open the connection and use a tcp_putc() correct??
Let me know . Any help would be appreciated.. Thanx
Darren Rook
Joined: 06 Sep 2003 Posts: 287 Location: Milwaukee, WI
Posted: Sat Dec 10, 2005 3:27 pm
First, I would grab a copy of the Microchip TCP/IP API documentation. I can't remember what AN it is, maybe AN833 (off the top of my head).
Ok, all this is off the top of my head so if the function names are wrong then I'm sorry - but the method is the same.
What you need to do first is TCPConnect(). TCPConnect() requires a valid MAC address, so if you don't have a MAC address of the IP you want to connect to then first you have to use the ARP functions to find the MAC functions.
Once you call TCPConnect() it returns a socket number, but that doesn't mean TCP has connected yet. You then have to wait until TCPIsPutReady() returns TRUE.
Once that returns TRUE then you can use TCPPut().
Guest
Posted: Sat Dec 10, 2005 3:37 pm
I need to change the IP adress of the remote server.
So I want to initiate connection to a remote server whose IP and port number I know. But where in the code do I change that IP and Port number to the server i am trying to connect to.. Thanx
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum