lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Raw TCP Client and Server NO_SYS


From: Pedro
Subject: [lwip-users] Raw TCP Client and Server NO_SYS
Date: Sun, 2 Jun 2019 18:45:00 -0300

Hello there, how are you?

Well, I'm working with a STM32H7 board and lwIP stack (2.0.3), no RTOS. The idea is running a TCP Client and a TCP Server at the same time, so I've started using echo demos as reference. TCP Client can use an IP address or a host name, so "dns_gethostbyname" is helping me. Also, I've set TCP_SYNMAXRTX to 3, so if no Server is found, "tcp_err" is called to close the client and then, try again later ("tcp_new").

To test the routine, I've provided a simple terminal on my Windows, with both TCP Client and Server functions. So if I type the board IP address and Port, I can connect to lwIP Server. And if I opens a Port, lwIP Client connects to it.

Everything works fine if lwIP Client connects first. If lwIP Server gets a connection first or even if Windows server is offline, the board get stucked on "tcp_fasttmr" method, with "pcb" and "pcb->next" pointing to the same address (established Server).

I've created some kind of state machine for both connection, running on main while, so I can't see any concurrent process (maybe SYNC by lwIP and the Server stack?).

Do you have any clue how can I solve this? I'm planning to add more functions to my board, something close to Microchip TCPIP stack, with HTTP server, DDNS and NTP clients.

Thanks a lot!

reply via email to

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