<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Ethernet cable plug in/out event with Zephyr and W5500</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/109230/ethernet-cable-plug-in-out-event-with-zephyr-and-w5500</link><description>Good afternoon, 
 
 As mentioned in topic, I&amp;#39;m trying to detect moment of ethernet cable plug in and out from my application - I need this to immediately disconnect from wifi when cable is connected. I&amp;#39;m using wiznet W5500 module and nrf5340 . I have</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 19 Mar 2024 12:36:17 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/109230/ethernet-cable-plug-in-out-event-with-zephyr-and-w5500" /><item><title>RE: Ethernet cable plug in/out event with Zephyr and W5500</title><link>https://devzone.nordicsemi.com/thread/474607?ContentTypeID=1</link><pubDate>Tue, 19 Mar 2024 12:36:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8eb52121-97db-46eb-9ccd-225d5b76a6f9</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;That&amp;#39;s great Damian, happy to hear that the patch solved it for you &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ethernet cable plug in/out event with Zephyr and W5500</title><link>https://devzone.nordicsemi.com/thread/474423?ContentTypeID=1</link><pubDate>Mon, 18 Mar 2024 16:08:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:605d6d70-62e9-439f-bb7a-1fb99ce7d876</guid><dc:creator>Dymek117</dc:creator><description>&lt;p&gt;This patch absolutly fixed this issue. Network events works fine for wiznet now ;)&lt;br /&gt;Thank you!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Ethernet cable plug in/out event with Zephyr and W5500</title><link>https://devzone.nordicsemi.com/thread/473939?ContentTypeID=1</link><pubDate>Thu, 14 Mar 2024 15:16:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f49620b-cfb2-4be5-915f-967e2e1cb5b5</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi Damian&lt;/p&gt;
&lt;p&gt;Using the conn_mgr library is not appropriate in this case since you need to choose a specific L2 layer, and conn_mgr will simply choose any L2 layer that is available.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;The main problem in this case is that the eth_w5500.c driver doesn&amp;#39;t support link detection yet, but luckily this was patched in Zephyr just weeks ago:&amp;nbsp;&lt;br /&gt;&lt;a href="https://github.com/zephyrproject-rtos/zephyr/pull/68752"&gt;https://github.com/zephyrproject-rtos/zephyr/pull/68752&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Once this is in place you can monitor the NET_EVENT_IF_UP and NET_EVENT_IF_DOWN events in order to check if the ethernet cable is connected or disconnected.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For an example of how to do this please have a look at &lt;a href="https://github.com/zephyrproject-rtos/zephyr/blob/cb6f44c3b966be0953f4794e729c7fbe3053b0ed/subsys/net/lib/dns/mdns_responder.c#L764"&gt;this code&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>