lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Try to manipulate the pbuf payload


From: User431
Subject: [lwip-users] Try to manipulate the pbuf payload
Date: Fri, 1 Sep 2017 02:40:02 -0700 (MST)

Hello,

I have got some issues in reading the payload of the pbuf. 
I'm using a STM32 microcontroller and run on it the LwIP Stack in the raw
API without a RTOS. 
It's based on a example from ST with a Webserver and is working fine. 

But now I want to read the payload, when a new packet is recieved. 
Whit printf I can send messages throug UART to a computer and see them with
a terminal programm. This works fine so far. 

My first try was just to printf the payload, with: printf("%d\n",
p->payload); 
I recieve messages, but they are wrong, just 10 characters long. And they
have always the same long. 
Then I tried to send the lenght of the packets with printf("%d\n", p->len);
This works fine, the length is the same as Wireshark is showing.

I implemented my code just beetween this line:
/* move received packet into a new pbuf */
  p = low_level_input(netif);

and this:
  /* entry point to the LwIP stack */
  err = netif->input(p, netif);

I also tried first to copy the payload with memcpy, but the result is the
same.

I also debbuged with SW4STM32, and this shows the same results. 

What am I doing wrong? 
Thank you very much. 



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html



reply via email to

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