lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] how lwip know internet cable is unplug


From: ake . forslund
Subject: Re: [lwip-users] how lwip know internet cable is unplug
Date: Wed, 7 Sep 2011 09:48:53 +0200

Yes (The interrupt output-pin that is muxed with the Power-down-signal on the DP83848c)

/Åke

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



From: vincent cui <address@hidden>
To: Mailing list for lwIP users <address@hidden>
Date: 2011-09-07 09:35
Subject: Re: [lwip-users] how lwip know internet cable is unplug
Sent by: address@hidden





The normal IRQ is Ethernet_IRQ ?  
 
Vincent Cui
Sr.Firmware Engineer

Mobile:
+8613482482211
Tel:
+86 21 34612525x6104
Fax:
+86 21 34619770
E-Mail:
address@hidden
Shanghai EnLogic Electric Technology Co., Ltd.

Address:
1104-1106, Building A, No.391, Guiping Road, Xuhui District, Shanghai, 200233

http://www.enlogic.com
 
From: address@hidden [mailto:address@hidden] On Behalf Of address@hidden
Sent:
2011
97 15:30
To:
Mailing list for lwIP users
Subject:
Re: [lwip-users] how lwip know internet cable is unplug

 
The DP83848c seem to have IRQ on link status change (data sheet page 53). Why can't you use the normal IRQ?

/Åke


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


From: vincent cui <address@hidden>
To: Mailing list for lwIP users <address@hidden>
Date: 2011-09-07 09:09
Subject: Re: [lwip-users] how lwip know internet cable is unplug
Sent by: address@hidden

 






I use STM32F107 board, Cortex M3…

DP83848c,,,,
 
Vincent Cui

Sr.Firmware Engineer

Mobile:
+8613482482211
Tel:
+86 21 34612525x6104
Fax:
+86 21 34619770
E-Mail:
address@hidden
Shanghai EnLogic Electric Technology Co., Ltd.

Address:
1104-1106, Building A, No.391, Guiping Road, Xuhui District, Shanghai, 200233

http://www.enlogic.com
 

From:
address@hidden [
mailto:address@hidden] On Behalf Of address@hidden
Sent:
2011
97 14:52
To:
Mailing list for lwIP users
Subject:
Re: [lwip-users] how lwip know internet cable is unplug

 

I agree that polling isn't the best way of dealing with it. If your ethernet-controller really doesn't support interrupt on link-status change the hardware hack you propose might be the only way to go. What controller is it you're working with?


/Åke


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

From: vincent cui <address@hidden>
To: Mailing list for lwIP users <address@hidden>
Date: 2011-09-07 08:46
Subject: Re: [lwip-users] how lwip know internet cable is unplug
Sent by: address@hidden


 


 






Alk


Thank you for your reply …. Now, I know your method to deal with ….but it is not a good idea with polling …

I ask my HW guys support LED_LINK pin with interrupt. So I can receive the event at real time


Vincent Cui

Sr.Firmware Engineer

Mobile:
+8613482482211
Tel:
+86 21 34612525x6104
Fax:
+86 21 34619770
E-Mail:
address@hidden
Shanghai EnLogic Electric Technology Co., Ltd.

Address:
1104-1106, Building A, No.391, Guiping Road, Xuhui District, Shanghai, 200233

http://www.enlogic.com

From:
address@hidden [
mailto:address@hidden] On Behalf Of address@hidden
Sent:
2011
97 14:26
To:
Mailing list for lwIP users
Subject:
Re: [lwip-users] how lwip know internet cable is unplug


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 <address@hidden>
To: Mailing list for lwIP users <address@hidden>
Date: 2011-09-07 01:15
Subject: Re: [lwip-users] how lwip know internet cable is unplug
Sent by: address@hidden


 



 








>>>>
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:
address@hidden
Shanghai EnLogic Electric Technology Co., Ltd.

Address:
1104-1106, Building A, No.391, Guiping Road, Xuhui District, Shanghai, 200233

http://www.enlogic.com

From:
address@hidden [
mailto:address@hidden] On Behalf Of address@hidden
Sent:
2011
92 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 <address@hidden>
To: Mailing list for lwIP users <address@hidden>
Date: 2011-09-02 07:27
Subject: [lwip-users] how lwip know internet cable is unplug
Sent by: address@hidden


 




 









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: address@hidden
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: address@hidden [
mailto:address@hidden] 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
address@hidden

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

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

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

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

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


reply via email to

[Prev in Thread] Current Thread [Next in Thread]