Using Socket API in imxrt1176

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Using Socket API in imxrt1176

跳至解决方案
676 次查看
Devaharsha
Contributor III

Hi @kerryzhou,

I have changed my personal email ID to company email ID in the setting. Can you help me, where to change in code for using TCP socket API using ethernet.

Please refer to this thread: https://community.nxp.com/t5/i-MX-Processors/Using-TCP-socket-in-LwIP-on-iMXRT1176/m-p/1664154/emcs_...

0 项奖励
回复
1 解答
648 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Devaharsha ,

   Thanks a lot for your cooperation, and sorry for my later reply because of my PTO.

   I already send you the lwip client and server socke code based on the freertos, please check your message attachment:

kerryzhou_0-1686545241936.png

 

If you still have issues about it, please kindly let me know.

Wish it helps you!

Best Regards,

Kerry

 

在原帖中查看解决方案

0 项奖励
回复
3 回复数
588 次查看
Devaharsha
Contributor III

Hi,

Sorry for late reply. I was busy with other tasks.

 Thanks for the files. I have written the client socket code as you mentioned in the attached file. And I am running a server on my laptop written using python. Everything is working fine. 

The issue I am facing is:

 1) When I am trying to receive data over socket, its not receiving correctly. Like if I am sending "Hello", its receiving as "Hell" or "llo", etc. Though its receiving correctly also sometimes. 

Correct me if I am wrong, I suspect a problem is in:

1) Send socket is done using server which is executing send function in an infinite for loop without delay.

2) Recv function is executing on imxrt1176 with 1ms task delay.

3) Is the issue related to timing? 

and also if I want to set socket in non-blocking state, I can't see any non-blocking option under setsockopt() function. But in send and recv function, under flags parameters it can be given. Is it correct or I am missing something?

0 项奖励
回复
586 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Devaharsha ,

  This case is opened so long time, it is closed automatically by the system.

  So, to the new issues, please help to create the new question post, thanks.

 

Best Regards,

Kerry

0 项奖励
回复
649 次查看
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Devaharsha ,

   Thanks a lot for your cooperation, and sorry for my later reply because of my PTO.

   I already send you the lwip client and server socke code based on the freertos, please check your message attachment:

kerryzhou_0-1686545241936.png

 

If you still have issues about it, please kindly let me know.

Wish it helps you!

Best Regards,

Kerry

 

0 项奖励
回复