send and receive data via TCP connection using Lwip

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

send and receive data via TCP connection using Lwip

跳至解决方案
5,408 次查看
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!

标签 (3)
0 项奖励
1 解答
4,720 次查看
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.
-------------------------------------------------------------------------------

在原帖中查看解决方案

3 回复数
4,720 次查看
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.
-------------------------------------------------------------------------------

4,720 次查看
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 项奖励
4,721 次查看
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.
-------------------------------------------------------------------------------