Lwip stack gets hanged in netconn_recv api

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Lwip stack gets hanged in netconn_recv api

ソリューションへジャンプ
9,048件の閲覧回数
rak14
Contributor III

I'm sending continuous data packets from PC client to S32k148 uC server, after some point the netconn_recv gets hanged and doesn't come out of loop.

I've sent the packets from client but noe received in server.

What's the problem here and how can it be solved?

Thanks in advance..

 

0 件の賞賛
返信
1 解決策
6,181件の閲覧回数
rak14
Contributor III

Hi @Nhi_Nguyen ,

Thanks for sharing the source code we'll test it and get back to you.

I enabled the DHCP as it's needed for our project initially ut assigns a IP from DHCP server, ping also works but after sometime it's showing request timeout and the destination host unreachable.

What might be the reason and how to resolve this?

Thanks & regards

Rak

元の投稿で解決策を見る

0 件の賞賛
返信
38 返答(返信)
2,512件の閲覧回数
rak14
Contributor III

Hi @Nhi_Nguyen ,

This are the packages I've installed :

But still in peripheral it's showing error.

rak14_0-1696828096534.png

Thanks

Rak

 

0 件の賞賛
返信
3,912件の閲覧回数
Nhi_Nguyen
NXP Employee
NXP Employee

Hi rak14,

Developer said that could you please send them tcpip configuration's pex file? They want to ensure that this configuration is correct to don't take time to investigate it. Because they didn't reproduce the issue yet, so it is better if you can send them your project.

Best regards,

Nhi

 

 

0 件の賞賛
返信
3,856件の閲覧回数
rak14
Contributor III

Hi @Nhi_Nguyen ,

Please find the configuration file of tcp/ip and ethernet.

Thanks

0 件の賞賛
返信
3,573件の閲覧回数
rak14
Contributor III

Hi @Nhi_Nguyen ,

Any update from development team?

 

0 件の賞賛
返信
3,795件の閲覧回数
Nhi_Nguyen
NXP Employee
NXP Employee

Hi rak14,

Unfortunately, they said that SDK version is old, so they have to take much time to look at it.

I'll remind them and come back to you as soon as I get response from them.

Best regards,

Nhi

 

0 件の賞賛
返信
3,724件の閲覧回数
rak14
Contributor III

Hi @Nhi_Nguyen ,

Any updates on this? we are waiting for the response from your side..

From our side when debugged the points we got:

  • The PHY we are using is LAN8710A in MII mode.
  • The data when sent from TCP client (PC) to TCP server(uC) the ethernet frame is not received by Ethernet driver itself. 
  • When working the ethernet data length is 60. And when it hangs it is 54.

 

Thanks 

 

0 件の賞賛
返信
3,665件の閲覧回数
Nhi_Nguyen
NXP Employee
NXP Employee

Hi rak14,

SW team said that they're working on this, so could you please share configuration/project that you're using and encountered this issue?

Best regards,

Nhi

 

 

0 件の賞賛
返信
3,640件の閲覧回数
rak14
Contributor III

Hi @Nhi_Nguyen ,

Configurations:

  • We are using LAN8710A as an ethernet transceiver.
  • The ethernet driver, lwip stack are taken from NXP examples.
  • And it is integrated with LAN8710A ethernet transceiver driver code which works in MII mode.
  • The ethernet is working in 100Mbps speed, and in tcp/ip configurator we have enabled TCP_ECHO_NETCONN application.

Problem:

  • When we send the data continuously from TCP client (PC) to server (uC). at some point connection has been established data is also sent from client but not received in server side.
0 件の賞賛
返信
3,677件の閲覧回数
Nhi_Nguyen
NXP Employee
NXP Employee

Hi Rak14,

Unfortunately, I didn't receive any update on this. I reminded them already and come back to you as soon as I get response from them.

Best regards,

Nhi

 

0 件の賞賛
返信
2,506件の閲覧回数
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @rak14 ,

Did you see Update Code in your site?

Nhi_Nguyen_1-1696838258113.png

Best regards,

Nhi

 

0 件の賞賛
返信
2,499件の閲覧回数
rak14
Contributor III

Hi @Nhi_Nguyen ,

Yes, I'm able to see the update code but in the peripherals it's showing error:

rak14_0-1696918186282.png

Thanks,

Rak

 

0 件の賞賛
返信
2,495件の閲覧回数
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @rak14 ,

You can try to run this command:

go to where install ds ->eclipse-> open cmd

Nhi_Nguyen_0-1696920677165.png

Then launch this command: s32ds.exe -consoleLog

Nhi_Nguyen_1-1696920755911.png

Read log

Nhi_Nguyen_2-1696920826762.png

Maybe you will find any error.

I attached the project that I compiled successful.

Best regards,

Nhi

 

0 件の賞賛
返信
6,182件の閲覧回数
rak14
Contributor III

Hi @Nhi_Nguyen ,

Thanks for sharing the source code we'll test it and get back to you.

I enabled the DHCP as it's needed for our project initially ut assigns a IP from DHCP server, ping also works but after sometime it's showing request timeout and the destination host unreachable.

What might be the reason and how to resolve this?

Thanks & regards

Rak

0 件の賞賛
返信
305件の閲覧回数
RKS1110
Contributor II

If you use the socket API, which I recommend, I found a bug on connection close that I needed to fix. But this was in an older version of the NXP SDK, not sure if it still exists.

Best regards

Looking for embedded projects.
0 件の賞賛
返信
3,815件の閲覧回数
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @rak14 ,

What version of RTD, FreeRTOS and TCPIP you are using? 

Could you please share your configuration/project?

Best regards,

Nhi

 

0 件の賞賛
返信
3,784件の閲覧回数
rak14
Contributor III

Hi @Nhi_Nguyen ,

Microcontroller used: FS32K148UJT0VLUT

RTM Version: v3.0.0

FreeRTOS: v10.0.1

LWIP stack: stable v2.0.2

TCP/IP stack: v3.0.2

We are using LAN8710A as an ethernet transceiver.

The ethernet driver, lwip stack are taken from NXP examples and it is integrated with LAN8710A ethernet transceiver driver code which works in MII mode. The ethernet is working in 100Mbps speed, and in tcp/ip configurator we have enabled TCP_ECHO_NETCONN application.

When we send continuously the data packets from the PC (as a client) to the microcontroller (as a server) after some time the entire Mainloop task is getting stuck in xQueueReceive API and the tcpecho thread is getting stuck in netconn_recv_data API in turn stuck in xQueueReceive API.

So, what might be the problem causing this and how can it be fixed?

 

 

0 件の賞賛
返信
3,771件の閲覧回数
Nhi_Nguyen
NXP Employee
NXP Employee

Hi @rak14 ,

Because we don't do stack, so I created the ticket to stack team. As I known, they start handling this ticket. I'll come back to you as soon as I receive their response.

Best regards,

Nhi

 

0 件の賞賛
返信
3,692件の閲覧回数
rak14
Contributor III

Hi @Nhi_Nguyen ,

Any updates regarding the query?

Further we debugged the tcpecho application and got to know when we send the data from client tcp application to uC the data is not being read in ethernet driver itself in the API ENET_DRV_ReadFrame as we added a printf for data received.
Any inputs on the same?

0 件の賞賛
返信