lwip-users
[Top][All Lists]
Advanced

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

[lwip-users] Reconnect cable to a DIFFERENT network


From: Ray Martin
Subject: [lwip-users] Reconnect cable to a DIFFERENT network
Date: Mon, 4 Feb 2013 09:22:54 -0800

Hello,

I poll the PHY chip to detect the Link state and call netif_set_link_down (or up) when it changes. Im able to disconnect then reconnect the cable to the same network and everything magically continues to work even if the connection used DHCP. In other words, I dont reset the PHY or close my original TCP and UDP ports but theyre still able to receive and send packets after the reconnect.

But what happens if I reconnect the cable to a completely different network? I cant assume that network supports the DHCP address granted by the other network. It seems I should reset the PHY to reestablish Link, negotiate the protocol/speed of the new network then call dhcp_start. But Id like to avoid doing this if its the same network since it seems to work fine if I dont. Plus, if its the same network, I should also go through a dhcp_release and dhcp_stop sequence of the old IP first. Another reason to avoid resetting and restarting everything is if Link was briefly  lost due to a cable glitch.

Could someone please outline and explain the approved LWIP and PHY sequence when reconnecting the cable to a different network or the same network? Is there a way to detect if the cable was connected to a different network or the same network and not just that the Link state changed?

Ray Martin


reply via email to

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