[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] lwip_read is not working after some successful operatio

From: rahul.mane .
Subject: Re: [lwip-users] lwip_read is not working after some successful operations.
Date: Thu, 23 May 2019 13:05:13 +0000 (UTC)

Hello All,

I am still investing above issue.

There is one more observation. I am not able to send more than 1024 bytes  using lwip socket operation.

I am sending 128 bytes through lwip socket. And server side i am getting this bytes correctly.

Above operation works successfully 8 times( i.e. 128*8 =1024). On 9 th times data is not getting to server.

Any recommendation for debug path. 



On Monday, May 20, 2019, 4:10:21 PM GMT+5:30, rahul.mane . <address@hidden> wrote:

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 ?


reply via email to

[Prev in Thread] Current Thread [Next in Thread]