Using Socket API in imxrt1176

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Using Socket API in imxrt1176

Jump to solution
552 Views
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 Kudos
Reply
1 Solution
524 Views
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

 

View solution in original post

0 Kudos
Reply
3 Replies
464 Views
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 Kudos
Reply
462 Views
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 Kudos
Reply
525 Views
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 Kudos
Reply