This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi,
I am trying to implement Modbus TCP/IP using lwip. I was able to run enet_lwip, and it worked properly. Then I wanted to read data using Ethernet_rxBuffer. I used the Packet_Sender app to generate TCP packet and sent to the control card via ethernet. But Ethernet_rxBuffer was not updating accordingly. Can anyone suggest a solution.
Thank you
Hi,
For the C2000ware v3.4 the enet_lwip example Ethernet_rxBuffer[] is segregated into multiple packets based on ETHERNET_NO_OF_RX_PACKETS value so it will store the packets at different location for every packet. If you want the received packet stored in the beginning of the the buffer, you can change its value to 1.
If this is not the case can you clarify on the statement
But Ethernet_rxBuffer was not updating accordingly.
Regards,
Yashwant
Hi,
Thank you for the reply. When I send a TCP/IP packet to the control card, I can see there some changes in memory. But the Ethernet_rxBuffer does not update and does not shows the actual data that I sent. Then I observed the payload in memory allocations. The next packet buffer payload updates with the actual data, but it changes to another value as soon as it updates.
Have you tried changing the ETHERNET_NO_OF_RX_PACKETS value to 1. And do increase the interpacket delay so that you can visualise the new data before getting updated.
-Yashwant
Yes, I did. But the thing is when I send a packet I can saw the memory locations updated immediately. But in few milliseconds those values changed.
Can you paste the wireshark log. There could be other packets on the network that the device is receiving and updating the buffer.
-Yashwant
Can you tell me what are changes need to do for the change interpacket delay?