Can't get LWIP to connect

Hi All,
I have been struggling for two weeks trying to get FreeRTOS and LWIP to connect to a server. Most of the time it fails with errno 103. The server and network are known to be working. I would greatly appreciate any help as I have run out of ideas. My code is here: drive .google .com/file/d/1AOdb8qDYk_2HWSQMwx0rbeSZZw5MjMnc/view?usp=sharing

Can you provide a wireshark trace of the scenario?

What is your target platform? Have you got sample apps for that platform to work?

I’m using the RT1050 EVK. I had a similar demo working and have compared the two projects for differences, but don’t see anything. Sometimes it sends packets but doesn’t see the response, other times it doesn’t seem to send anything. The lights on the ethernet port are on and indicating activity.

Here’s the Wireshark trace

and the console log:

Initializing PHY...
Copyright  2020  NXP

TCP/IP up.
Hello world.

SHELL>> Link Up!
Error connecting: 103
Link Up!
Error connecting: 103
Link Up!
Error connecting: 103
Link Up!
Error connecting: 103
Link Up!
error: socket: 105

Is it the physically identical hardware that the working and failing software runs on? If so, the next step would be to dump the contents of all SFRs (in particular interrupt and ethernet controller) in either scenario and compare them against each other. In the next step, you should analyse the PHY communication to see if the PHY gets initialized identically.

Will MCUXpresso create a FreeRTOS and lwIP project for you? I have had success doing that in an RT1060.

That’s how I started. I feel like there’s a trade condition because it works occasionally.

Looking at your PCAP, I think that the host on is deaf. Meaning that the host is able to send, but it doesn’t receive anything. looks OK, it receives and it responds.

Yes 195 is the PC 11 is the board running FreeRTOS

Hey @michaeldkfowler,

Can you check whether your device is receiving anything at all? I would set up a break point inside the interrupt handler dealing with incoming data.
This would allow you to see whether the device is not capable of receiving data due to misconfiguration or is it able to receive data but the stack is not performing its job.