I set up the LwIP Stack on two microcontroller and use the raw mode. Now I'm trying to build up a connection and send some data over TCP with static IP. But it doesn't work. I can see the ARP request with wireshark but there is no response. Also the request is send only one time. The strange thing is that I can connect and send some data with putty over a PC.
Is there anything special I have to consider when connecting from LwIP to LwIP?
I have enabled TCP, ARP, ICMP and call every 250ms tcp_tmr(), every 5000ms etharp_tmr() also every 1ms a tick is generated for sys_now().
The initialization of the listening pcb is:
struct tcp_pcb *receive_pcb;
receive_pcb = tcp_new();
tcp_bind(receive_pcb, IP_ADDR_ANY, 4098);
receive_pcb = tcp_listen(receive_pcb);
The initialization of the active pcb is:
struct tcp_pcb *transmit_pcb;
struct ip_addr ipAddr_dest;
transmit_pcb = tcp_new();
tcp_connect(transmit_pcb, &ipAddr_dest, 4098, tcp_send_data);
I had a similar issue. I was seeing the ARP request from the PC but no reponse from the embedded platform with Lwip running.
In my case it was due to a wrong configuration of the ethernet driver which was discarding all ethernet frames with a broadcast address.