View previous topic :: View next topic |
Author |
Message |
cfernandez
Joined: 18 Oct 2003 Posts: 145
|
How to send/received RAW DATA with Microchip/CCS TCP Stack |
Posted: Mon May 16, 2005 10:32 pm |
|
|
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, |
|
![](templates/subSilver/images/spacer.gif) |
Darren Rook
Joined: 06 Sep 2003 Posts: 287 Location: Milwaukee, WI
|
|
Posted: Tue May 17, 2005 7:40 am |
|
|
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. |
|
![](templates/subSilver/images/spacer.gif) |
Darren Rook
Joined: 06 Sep 2003 Posts: 287 Location: Milwaukee, WI
|
|
Posted: Tue May 17, 2005 8:27 am |
|
|
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) |
|
![](templates/subSilver/images/spacer.gif) |
cfernandez
Joined: 18 Oct 2003 Posts: 145
|
|
Posted: Tue May 17, 2005 8:36 am |
|
|
Dear Darren,
I make a simple test and then send to you the result.
thank you very much! |
|
![](templates/subSilver/images/spacer.gif) |
|