lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] lwip + modbus TCP + UDP


From: Pablo Ledergerber
Subject: [lwip-users] lwip + modbus TCP + UDP
Date: Mon, 31 Dec 2018 14:31:22 +0100
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.3.3


hello,

I'm working on a project for a new sensor with ethernet connectivity, modbus TCP for data and a kind of discovery function with udp packets for identificationdata. During the sensor is working well, there are sometime packet retransmission and after a cupple of minutes or when I send new data over UDP to the sensor the software got stuck. This is the first time for me that I use the lwip stack in a project. I've tried to set the parameters into the lwipopts.h file without success.
In this function get stuck:

tcp_fasttmr(void)
{
  struct tcp_pcb *pcb;
  ++tcp_timer_ctr;
tcp_fasttmr_start:
  pcb = tcp_active_pcbs;
  while (pcb != NULL) {
    if (pcb->last_timer != tcp_timer_ctr) {  <------ exactly here!

Enclosed you find a wireshark data file. My setup is the following:
- xmc4400 from Infineon
- KSZ8081 Phy from Microchip
- RTOS: CMSIS
- Freemodbus Library for Modbus TCP
- lwip 2.2
The freemodbus library uses the TCP Raw library and the upd discovery function the netconn api. We have one thread for modbusTCP, one for the sensor data (ADC) and one for the discovery function (UDP Netconn API). I tried to implement the netconn API for TCP into the freemodbus library without success. I don't know exactly if I'm having a memory leak or another problem.
I'm a bit lost in the jungle and I would appreciate a lot if somebody could me lead to the right way, so that I could solve this problem. Please don't excitate to ask me. I have done a lot of things and right now I don't know exactly which information is important to find a solution.
Thank you in advance.

Pablo Ledergerber

reply via email to

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