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

How to send/received RAW DATA with Microchip/CCS TCP Stack

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



Joined: 18 Oct 2003
Posts: 145

View user's profile Send private message

How to send/received RAW DATA with Microchip/CCS TCP Stack
PostPosted: Mon May 16, 2005 10:32 pm     Reply with quote

Hi,

I have the ETHERNET BOARD from CCS and I need send and received RAW or BINARY Data using TCP/IP, for example I have a TCP server and I need to send the RAW Data 0x01 0x02 0x03 and the server respond me with the RAW Data 0x0A 0x0B 0x0F and I have to obtain this data in the ethernet board.

Which function from CCS - Microchip Stack I have use?
Somebody have and send me a simple program to send and received RAW Data?

I wait for your answer, and THANK YOU VERY MUCH FOR HELP ME.

Best Regards,
Darren Rook



Joined: 06 Sep 2003
Posts: 287
Location: Milwaukee, WI

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

PostPosted: Tue May 17, 2005 7:40 am     Reply with quote

Just open the socket,

do a few tcp_putc(),

and then flush the socket.

All of this has to be done in one task time.

PS - Microchip has a great AN with documenation for their API.
Darren Rook



Joined: 06 Sep 2003
Posts: 287
Location: Milwaukee, WI

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

PostPosted: Tue May 17, 2005 8:27 am     Reply with quote

Darren Rook wrote:
Just open the socket,

do a few tcp_putc(),

and then flush the socket.

All of this has to be done in one task time.

PS - Microchip has a great AN with documenation for their API.


PS - If the socket is already open, you can skip that step. It may take a few tasks for a socket to open, so generally the best way to go about this is a state machine. Also, once a socket is open you will want to verify that the socket is still open before you send data, I believe tcpisputready() does this (among other things)
cfernandez



Joined: 18 Oct 2003
Posts: 145

View user's profile Send private message

PostPosted: Tue May 17, 2005 8:36 am     Reply with quote

Dear Darren,

I make a simple test and then send to you the result.

thank you very much!
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