Using TCP socket in LwIP on iMXRT1176

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

Using TCP socket in LwIP on iMXRT1176

610 Views
Devaharsha
Contributor III

Hi,

We have used lwip_ping_freertos_cm7 example. The example is working fine i.e. Its pinging the host device.

My understanding is that-

1) lwip_ping_bm example uses Raw APIs (i.e. Non OS uses Raw API)

2) OS mode can use Socket API and Raw API

3) lwip_ping_freertos example uses Socket API

My question is, during the socket creation, it's using SOCK_RAW as socket type and ICMP as socket protocol.

          lwip_socket(AF_INET, SOCK_RAW, IP_PROTO_ICMP);

I want to create SOCK_STREAM as socket type that uses TCP protocol. But if I directly modify it, its giving me error. 

My requirement is to use ethernet with normal tcp/ip server-client example. But the above code is using sendto() ,recvfrom() APIs that are for UDP transmission. Can you help me, where to modify the code?

 

Thanks,

Devaharsha

0 Kudos
4 Replies

587 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Devaharsha ,

    I highly recommend you use the company email to create the question in the future instead of the gmail, then that will have the higher support priority.

   I have the RT1060 socket example, both client and server, you can refer it, as the lwip is the same for RT1060 and RT1176.

   If you want to get the project, please use your company email to create the new question, then @me(kerry zhou), I will share th code to you in your new question post, thanks.

 

Best Regards,

Kerry

0 Kudos

310 Views
Radoslaw
Contributor I
Hi, Kerry
Could I also ask for the code for the raw sockets, I use RT1052 as MCU.

Thanks
Radoslaw
0 Kudos

547 Views
Devaharsha
Contributor III

Hi,

My requirement is to use ethernet with normal tcp/ip server-client example. But the above code is using sendto() ,recvfrom() APIs that are for UDP transmission. Can you help me, where to modify the code?

I have used company email ID. Can you share the code?

Another question, there is ipv4_ipv6_freertos example. I have gone through the readme file, but I didnt get. Can you tell the steps how to test it?

Thanks,

Devaharsha

0 Kudos

539 Views
kerryzhou
NXP TechSupport
NXP TechSupport

Hi @Devaharsha ,

  Which case or the community linker you have used your company email?

  Please share your case number and community, where did you get the socket code? In my memory, I still didn't receive your company email requirement, thanks.

 

Best Regards,

Kerry

0 Kudos