Перейти к содержанию
    

FreeRTOS + lwip

Добрый день, пришёл с просьбой о помощи.

Моя ситуация: использую FreeRTOS V8.2.3 и lwip 2.0.2, в lwip применяется pppos и сокеты, устанавливаю соединение с сервером, но через 0,5 - 4 часа lwip перестает слать сообщения. Сообщения шлю по таймеру, раз в секунду, доходит даже до того, что таймер перестает срабатывать. Но через какое-то время (20-30 мин) все опять оживает, но поскольку реконнект к серверу я не реализовывал просто сообщает что не удалось отправить сообщение, функция send() вернула ошибку. В структуре lwip_stats никаких ошибок нет.

Буду рад хотя бы идеям в какую сторону копать, что искать. Спасибо.

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

TCP ведет себя вот так:

============================LOG============================

tcp_out.c:1046) tcp_output: nothing to send (0)

(tcp_out.c:1054) tcp_output: snd_wnd 14600, cwnd 30612, wnd 14600, seg == NULL, ack 15221

(pppos.c:474) pppos_input[0]: got 1 bytes

(pppos.c:474) pppos_input[0]: got 37 bytes

(pppos.c:474) pppos_input[0]: got 12 bytes

(ppp.c:874) ppp_input[0]: ip in pbuf len=45

(tcp_in.c:329) +-+-+-+-+-+-+-+-+-+-+-+-+-+- tcp_input: flags

(tcp_in.c:331) -+-+-+-+-+-+-+-+-+-+-+-+-+-+

(tcp_out.c:1046) tcp_output: nothing to send (0)

(tcp_out.c:1054) tcp_output: snd_wnd 14600, cwnd 30612, wnd 14600, seg == NULL, ack 15221

(tcp_out.c:397) tcp_write(pcb=0x2001d290, data=0x2000810e, len=31, apiflags=1)

(tcp_out.c:650) tcp_write: queueing 15221:15252

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 30612, wnd 14600, effwnd 31, seq 15221, ack 15221

(tcp_out.c:1105) tcp_output: snd_wnd 14600, cwnd 30612, wnd 14600, effwnd 31, seq 15221, ack 15221, i 0

(tcp_out.c:1266) tcp_output_segment: 15221:15252

(pppos.c:294) pppos_netif_output[0]: proto=0x21, len = 71

(pppos.c:474) pppos_input[0]: got 2 bytes

(tcp_out.c:397) tcp_write(pcb=0x2001d290, data=0x2000810e, len=31, apiflags=1)

(tcp_out.c:650) tcp_write: queueing 15252:15283

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 30612, wnd 14600, effwnd 62, seq 15252, ack 15221

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 30612, wnd 14600, effwnd 62, seq 15252, ack 15221

(tcp_out.c:397) tcp_write(pcb=0x2001d290, data=0x2000810e, len=31, apiflags=1)

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 30612, wnd 14600, effwnd 93, seq 15252, ack 15221

(tcp.c:1053) tcp_slowtmr: cwnd 1360 ssthresh 7300

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 31, seq 15221, ack 15221

(tcp_out.c:1105) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 31, seq 15221, ack 15221, i 0

(tcp_out.c:1266) tcp_output_segment: 15221:15252

(pppos.c:294) pppos_netif_output[0]: proto=0x21, len = 71

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 93, seq 15252, ack 15221

(tcp_out.c:397) tcp_write(pcb=0x2001d290, data=0x2000810e, len=31, apiflags=1)

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 124, seq 15252, ack 15221

(tcp_out.c:397) tcp_write(pcb=0x2001d290, data=0x2000810e, len=31, apiflags=1)

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 155, seq 15252, ack 15221

(tcp_out.c:397) tcp_write(pcb=0x2001d290, data=0x2000810e, len=31, apiflags=1)

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 186, seq 15252, ack 15221

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 186, seq 15252, ack 15221

(tcp_out.c:397) tcp_write(pcb=0x2001d290, data=0x2000810e, len=31, apiflags=1)

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 217, seq 15252, ack 15221

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 217, seq 15252, ack 15221

(tcp_out.c:397) tcp_write(pcb=0x2001d290, data=0x2000810e, len=31, apiflags=1)

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 248, seq 15252, ack 15221

(tcp_out.c:397) tcp_write(pcb=0x2001d290, data=0x2000810e, len=31, apiflags=1)

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 279, seq 15252, ack 15221

(tcp_out.c:397) tcp_write(pcb=0x2001d290, data=0x2000810e, len=31, apiflags=1)

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 310, seq 15252, ack 15221

(tcp.c:1053) tcp_slowtmr: cwnd 1360 ssthresh 2720

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 31, seq 15221, ack 15221

(tcp_out.c:1105) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 31, seq 15221, ack 15221, i 0

(tcp_out.c:1266) tcp_output_segment: 15221:15252

(pppos.c:294) pppos_netif_output[0]: proto=0x21, len = 71

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 310, seq 15252, ack 15221

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 310, seq 15252, ack 15221

(tcp_out.c:397) tcp_write(pcb=0x2001d290, data=0x2000810e, len=31, apiflags=1)

(tcp_out.c:1061) tcp_output: snd_wnd 14600, cwnd 1360, wnd 1360, effwnd 341, seq 15252, ack 15221

============================LOG============================

 

Полный лог прикреплен в файле.

log.txt

Поделиться сообщением


Ссылка на сообщение
Поделиться на другие сайты

Присоединяйтесь к обсуждению

Вы можете написать сейчас и зарегистрироваться позже. Если у вас есть аккаунт, авторизуйтесь, чтобы опубликовать от имени своего аккаунта.

Гость
Ответить в этой теме...

×   Вставлено с форматированием.   Вставить как обычный текст

  Разрешено использовать не более 75 эмодзи.

×   Ваша ссылка была автоматически встроена.   Отображать как обычную ссылку

×   Ваш предыдущий контент был восстановлен.   Очистить редактор

×   Вы не можете вставлять изображения напрямую. Загружайте или вставляйте изображения по ссылке.

×
×
  • Создать...