send and receive data via TCP connection using Lwip

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

send and receive data via TCP connection using Lwip

Jump to solution
6,847 Views
gonzalo_sipel
Contributor I

I'm new on using LWIP and I'm taking my first steps into it. I'm using a self-designed board based on LPC1788 microcontroller and I've been able to run both the lwip_tcpecho and the lwip_web projects successfully so far (I'm using raw API without RTOS).
Now, I would like to send and receive data via a TCP connection but I'm a bit lost where and how to start doing this. I was thinking, as my first step, that I might modify the lwip_tcpecho example in order to show via the DEBUGOUT UART the received data and to send via the TCP connection the data read from DEBUGIN. (Something like a simple RS-232 to TCP converter).

Has anyone done something like this? If so, could you share some piece of code that helps me?

Am I taking the right path? I'm not using RTOS since in the future I have to add this to my existing code which doesn't run RTOS.

what function should I call to get the data received into my app buffer and what function should I call to send data from my app buffer?

Regards!

Labels (3)
0 Kudos
Reply
1 Solution
6,159 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Gonzalo Sanchez,

Thanks for your reply.
To provide the fastest possible support, I'd like to you refer to the LwIP Application Developers Manual.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

View solution in original post

3 Replies
6,159 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Gonzalo Sanchez,

Thank you for your interest in NXP Semiconductor products and for the opportunity to serve you.
Whether you use the Lwip demos which comes from the LPCOpen library as the template demo, if yes, it's a good start.
Meanwhile, implement a simple RS-232 to TCP converter is the right choice to move further, so please give a try, and ask the question if you encounter some troubles

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------

6,159 Views
gonzalo_sipel
Contributor I

Hi Jeremy, thank you for let me know that I'm on the right path.

What I do not totally understand is how my application can interact with LWIP to receive and send information. I mean, what function should I call to get the data received into my app buffer and what function should I call to send data from my app buffer?

I've updated my post with this question too.

Regards, 

Gonzalo.

0 Kudos
Reply
6,160 Views
jeremyzhou
NXP Employee
NXP Employee

Hi Gonzalo Sanchez,

Thanks for your reply.
To provide the fastest possible support, I'd like to you refer to the LwIP Application Developers Manual.

Have a great day,
TIC

 

-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!

 

- We are following threads for 7 weeks after the last post, later replies are ignored
Please open a new thread and refer to the closed one, if you have a related question at a later point in time.
-------------------------------------------------------------------------------