Netconn API Server Mode Connection Drope Detection

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

Netconn API Server Mode Connection Drope Detection

Mesut Cömert
Hi, guys. I have using Netconn API on my system. I want to work as server mode. I downloaded and examined netconn server examples and I set up my system. I connect to my device with Hercules TCP Client section. First section is that i connect to my device, send to message and receive message then system is closed. This section to let me send to a message and receive. Second option is that i connect to my device, send message and receive over and over again. but when i pressed disconnect button so i can not to connect my device again. Because device has waiting in receive function. I want to detect connection drop in receive function. how can i solve this problem, can you help me?

--
Mesut Cömert
Elektrik Elektronik Mühendisi | Electrical Electronics Engineer

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

Re: Netconn API Server Mode Connection Drope Detection

Stephen Cowell
I'm using RAW, not Netconn... I have to poll my PHY for this... about
once every 10,000 loops.  Read the manual for your PHY... several
different conditions you can detect... you have to access the status
register IIRC.
--

Stephen Cowell
Project Manager/Engineer
Plasmability LLC

On 5/16/2019 1:09 AM, Mesut Cömert wrote:

> Hi, guys. I have using Netconn API on my system. I want to work as
> server mode. I downloaded and examined netconn server examples and I
> set up my system. I connect to my device with Hercules TCP Client
> section. First section is that i connect to my device, send to message
> and receive message then system is closed. This section to let me send
> to a message and receive. Second option is that i connect to my
> device, send message and receive over and over again. but when i
> pressed disconnect button so i can not to connect my device again.
> Because device has waiting in receive function. I want to detect
> connection drop in receive function. how can i solve this problem, can
> you help me?
>
> --
> *Mesut Cömert*
> Elektrik Elektronik Mühendisi | Electrical Electronics Engineer
>
> _______________________________________________
> lwip-users mailing list
> [hidden email]
> https://lists.nongnu.org/mailman/listinfo/lwip-users


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

Re: Netconn API Server Mode Connection Drope Detection

tirmalabenikasibeni
In reply to this post by Mesut Cömert
netconn_receive must return ERR_CLSD when connection closed. Check your error
code in every loop.



--
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: Netconn API Server Mode Connection Drope Detection

Mesut Cömert
yep, i can detecting that ERR_CLSD error code. After that i have to go back netconn_accept function. i couldn't this. Also my system has RTOS. It doesn't turns that task.

tirmalabenikasibeni <[hidden email]>, 16 May 2019 Per, 18:07 tarihinde şunu yazdı:
netconn_receive must return ERR_CLSD when connection closed. Check your error
code in every loop.



--
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


--
Mesut Cömert
Elektrik Elektronik Mühendisi | Electrical Electronics Engineer

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

Re: Netconn API Server Mode Connection Drope Detection

tirmalabenikasibeni
Can I see some code, please?



--
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: Netconn API Server Mode Connection Drope Detection

Mesut Cömert
I solved the problem, it was easy. Inattention..

On Fri, May 17, 2019, 09:43 tirmalabenikasibeni <[hidden email]> wrote:
Can I see some code, please?



--
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

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

Re: Netconn API Server Mode Connection Drope Detection

Mesut Cömert
Thank you for all

On Fri, May 17, 2019, 09:59 Mesut Cömert <[hidden email]> wrote:
I solved the problem, it was easy. Inattention..

On Fri, May 17, 2019, 09:43 tirmalabenikasibeni <[hidden email]> wrote:
Can I see some code, please?



--
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

_______________________________________________
lwip-users mailing list
[hidden email]
https://lists.nongnu.org/mailman/listinfo/lwip-users