|Subject:||Re: [lwip-users] Data sending problem over TCP|
|Date:||Wed, 22 Jun 2011 11:14:02 +0000|
I am no expert with lwIP but should a server be calling the tcp_connect function? I thought the server just listened for client connects.
Take a look at the example code for the enet_lwip example project in the LM3S6965 Eval board as the project is set up to be a simple example web server.
I am trying to implement a web server with lwip on LM3S6965 Stellaris Cortex M3 Micro Controller and also need to sent anywhere from 25 to 4000 bytes of data over TCP from my board. Right now, i am trying to send a few bytes of data, on a switch press over the board, but i am not being able to send it. I can't see my packets in Wireshark. Below is the code, i have written. Can someone help me out, as to what i am doing wrong or additonal things i need to do. Attached is the wireshark file, when the function gets executed. This is all i get.
unsigned char buff;
struct tcp_pcb *my_pcb;
void send_my_data( void );
void send_my_data( void ) // This function gets called when i press the switch.
struct ip_addr ipaddr;
myipaddr = 0x0A110258; // The IP address 10.17.2.88 to which i need to send the data
ipaddr.addr = htonl( myipaddr );
my_pcb = tcp_new();
tcp_bind( my_pcb, IP_ADDR_ANY, 2101 ); // Bind to any local address the board has been assigned
err = tcp_connect( my_pcb, &ipaddr, 2101, NULL );
Thanks & Best Regards,
Disclaimer: This message (including any attachments) contains confidential information and is intended solely for the use of the individual or entity to whom they are addressed. If you are not the intended recipient you are notified that disclosing, copying, distributing or taking any action based on the contents of this information is strictly prohibited. If you have received this email in error please notify address@hidden Please note that any views or opinions presented in this email are solely those of the author and do not necessarily represent those of Godrej & Boyce Mfg. Co. Ltd. group of companies. The recipient should check this email and any attachments for the presence of viruses. Godrej & Boyce Mfg. Co. Ltd. group of companies accepts no liability for any damage caused by any virus transmitted by this email.
|[Prev in Thread]||Current Thread||[Next in Thread]|