Hi Vincent,

my application is not time critical and due to an error on the PCB the 
interrupt line from my ethernet controller is not connected.

Right now my sollution works like this:

my driver is initied via *_init() and creates the task that periodically 
polls my ethernet controller for new frames and events. When cable 
plug/unplug occurs a function is called (this function is registred as a 
callback to keep the project structure sane). This function then safely 
executes netif_set_link_up/down(). 

The task polling the ethernet controller is run every ~44 ms. I'm not sure 
what sort of response time you are hoping to achieve but for my purposes 
it seem to work fine.

/Åke

-----------------------------
Åke Forslund
0433-273296
NIBE AB
Box 14
S-285 21  Markaryd
Tel +46-(0)433-273296




From:
vincent cui <vincent....@enlogic.com>
To:
Mailing list for lwIP users <lwip-users@nongnu.org>
Date:
2011-09-07 01:15
Subject:
Re: [lwip-users] how lwip know internet cable is unplug
Sent by:
lwip-users-bounces+ake.forslund=nibe...@nongnu.org



>>>> My approach is to send a signal to a separate task to handle the 
cable-plug/unplug events
 
Ake:
 
For your approach, who send a signal to the task ? the driver ?  my driver 
can get the link status by polling, not interrupt, so it takes more cpu 
time..I stop using it 
And try to find another one to replace… maybe it need HW sensor support.
Vincent Cui
Sr.Firmware Engineer
Mobile: +8613482482211
Tel: +86 21 34612525x6104
Fax: +86 21 34619770
E-Mail: vincent....@enlogic.com
Shanghai EnLogic Electric Technology Co., Ltd.
Address: 1104-1106, Building A, No.391, Guiping Road, Xuhui District, 
Shanghai, 200233
http://www.enlogic.com
 
From: lwip-users-bounces+vincent.cui=enlogic....@nongnu.org [
mailto:lwip-users-bounces+vincent.cui=enlogic....@nongnu.org] On Behalf Of 
ake.forsl...@nibe.se
Sent: 2011年9月2日 14:50
To: Mailing list for lwIP users
Subject: Re: [lwip-users] how lwip know internet cable is unplug
 
Hi! 

I think that is something you define in your ethernet driver. My approach 
is to send a signal to a separate task to handle the cable-plug/unplug 
events. In the task I currently disable dhcp (if active) on cable-unplug 
signal and reenable it on cable-connect. it might be good to set an 
auto-ip when unplugged as well, but I'm not sure. Maybe it should be 
handled with the netif_set_up/down-functions instead, I'm still 
experimenting... 

/Åke 

-----------------------------
Åke Forslund
0433-273296
NIBE AB
Box 14
S-285 21  Markaryd
Tel +46-(0)433-273296



From: 
vincent cui <vincent....@enlogic.com> 
To: 
Mailing list for lwIP users <lwip-users@nongnu.org> 
Date: 
2011-09-02 07:27 
Subject: 
[lwip-users] how lwip know internet cable is unplug 
Sent by: 
lwip-users-bounces+ake.forslund=nibe...@nongnu.org
 




Hi;

When unplug internet cable, how lwip deal it ? I want to show message to 
user in LCD to notice user !

锘?Vincent Cui
Sr.Firmware Engineer
Mobile: +8613482482211
Tel: +86 21 34612525x6104
Fax: +86 21 34619770
E-Mail: vincent....@enlogic.com
Shanghai EnLogic Electric Technology Co., Ltd.
Address: 1104-1106, Building A, No.391, Guiping Road, Xuhui District, 
Shanghai, 200233
http://www.enlogic.com

-----Original Message-----
From: lwip-users-bounces+vincent.cui=enlogic....@nongnu.org [
mailto:lwip-users-bounces+vincent.cui=enlogic....@nongnu.org] On Behalf Of 
Kieran Mansley
Sent: 2011年9月2日 3:22
To: Mailing list for lwIP users
Subject: Re: [lwip-users] FreeRTOS / lwip multiple connections


On 31 Aug 2011, at 01:18, vincent cui wrote:

> K:
> You mean I need make accept socket to be non-blocking , right ?

No, I'm not sure why you need any of your sockets to be non-blocking.

Kieran

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


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

Reply via email to