CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to support@ccsinfo.com

Help with TCP/IP and RAW DATA

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
guest
Guest







Help with TCP/IP and RAW DATA
PostPosted: Sat Dec 10, 2005 3:23 pm     Reply with quote

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

View user's profile Send private message Send e-mail

PostPosted: Sat Dec 10, 2005 3:27 pm     Reply with quote

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








PostPosted: Sat Dec 10, 2005 3:37 pm     Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2005 phpBB Group