Hello All,
I am using LWIP stack (2.0.2) with pppos.I have NXP MC5748 board wi SIM900a 
interface with one UART channel.

I am trying to send data to server using LWIP socket programming.
Steps of programming:
1. lwip_socket(PF_INET, SOCK_STREAM, 0);
2. lwip_connect(socket_fd,(struct sockaddr_in*)&sa,sizeof(struct sockaddr_in));
3. lwip_write(socket_fd, "test", 4);
4. lwip_read(socket_fd, rxbuf, 512)

and this above operations are working fine. But there is issue.
Step 3 & 4 ie WRITE & READ are called in WHILE LOOP. 
after some number of successful  write and read operations, code get stuck in 
read operation.
So I have enabled some #define and put some console print, for debugging,.
And my observation is following:

1. while successful operation, I was getting log as 
ip_input: iphdr->dest 0x646494b2 netif->ip_addr 0x646494b2 (0x646494b2, 
0x646494b2, 0x0)ip4_input: packet accepted on interface pp
2. Getting this log, When read is not getting data :
ip_input: iphdr->dest 0xb8482fbb netif->ip_addr 0x646494b2 (0xb8482fbb, 
0x646494b2, 0x0)ip4_input: packet not for us.

my further analysis is /* match packet against an interface, i.e. is this 
packet for us? */  if (ip4_addr_ismulticast(ip4_current_dest_addr())) in ip4.c  
   When Issue occurs, IF conditions gets FAILED

In unsuccessful opertion "ip_data.current_iphdr_dest.addr" is 0xb8482fbb And 
for successful operation it is 0x646494b2.
Is above mentioned difference gives some kind of HINT ? 
I don't know much about lwip, So please help me to understand this issue and 
how to resolve it ?



ThanksRahul
_______________________________________________
lwip-users mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/lwip-users

Reply via email to