How do make tcp server and tcp client on stm32 using SOCKET?

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

How do make tcp server and tcp client on stm32 using SOCKET?

MrFord
Hello. I use the LwIP SOCKET library and I need to make a tcp server and tcp
client on the same STM32 microcontroller using this library. Is there any
way to do this and is there any source code for the code who did this?



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: How do make tcp server and tcp client on stm32 using SOCKET?

kapilsinghi
Are you using netconn API ? STM32 cube?  which device,OS ?





--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: How do make tcp server and tcp client on stm32 using SOCKET?

MrFord
I am using BSD Socket API, stm32f767ZIT6. I also use STM32CUBEMX



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: How do make tcp server and tcp client on stm32 using SOCKET?

kapilsinghi
One Way is to have 2 different tasks/Threads for each one and play with task
priorities so as to avoid clashes.

Another way is to have timeouts for Server and run client in between.



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users
Reply | Threaded
Open this post in threaded view
|

Re: How do make tcp server and tcp client on stm32 using SOCKET?

MrFord
This post was updated on .
I wrote like this:
sys_thread_new ("tcp_server", tcp_thread, NULL, DEFAULT_THREAD_STACKSIZE,
osPriorityNormal);
sys_thread_new ("tcp_client", send_thread, NULL, DEFAULT_THREAD_STACKSIZE,
osPriorityNormal);
As a result, FreeRTOS wrote to me:
defaultTask X 3 13 1
IDLE R 0 109 2
tcpip_thread B 6 965 3
EthIf B 6 300 4
tcp_server B 3 501 5
I tried changing priorities in sys_thread_new but the same thing.
How do I start the client and server?



--
Sent from: http://lwip.100.n7.nabble.com/lwip-users-f3.html

_______________________________________________
lwip-users mailing list
lwip-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/lwip-users