Dan,

I had been using a RMII phy and noticed similar issues.  Specifically I
could not detect cable connected or disconnected using the RMII, the link
activity bit does not work for cable connected/disconnected.  I was shocked
to find that RMII did not provide this functionality.  Sure the LED blink
but no bits in the RMII register map changes when cable is inserted or not.

We had problems where it timeouts in setting up the netif/lwip  were
causing watch dog time outs if cable was unplugged on boot. Then when cable
was removed and reinserted (not a normal case for our device) we were
having similar issues as you.  We could not find a way to know if the cable
was connected or not, except by redesigning hardware.  So we are
redesigning hardware to use hardware cable connection detection using PHY
carrier sense pin.   The plan was try and shutdown lwip and restart netif
and lwip when cable was plugged back in.

Trampas


On Tue, Mar 31, 2020 at 5:51 PM Bomsta, Dan <dan.bom...@sageglass.com>
wrote:

> I have am working  on an issue with our device.  First here are the
> particulars
>
> Micro:  STM32F427
>
> LwIP: 2.0.3
>
> WolfSSL: 3.15.3
>
> Microchip managed switch KSZ8863RLLI.
>
>
>
> If one removes the Ethernet cable from our device (typically during heavy
> traffic) the network is not usable for many minutes upon reconnecting the
> Ethernet cable.  I have been printing WolfSSL debug messages and Lwip debug
> messages without solving the issue yet.
>
>
>
> No, we do not have the ability to “hardware” determine when the cable is
> unplugged.  Our system has these devices “daisy chained” so one would need
> to ping to determine if the network is available.  The last good trace I
> got is this (then my laptop crashed)
>
>
>
> ip4_route: No route to 172.20.0.14
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> tcp_slowtmr: processing active pcb
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> tcp_slowtmr: processing active pcb
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> tcp_slowtmr: polling application
>
> b
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> ip4_route: No route to 172.20.0.14
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> [512942] Link up? 0
>
> tcp_slowtmr: processing active pcb
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> tcp_slowtmr: processing active pcb
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> tcp_slowtmr: polling application
>
> b
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> ip4_route: No route to 172.20.0.14
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> tcp_slowtmr: processing active pcb
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> tcp_slowtmr: processing active pcb
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> tcp_slowtmr: polling application
>
> b
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> ip4_route: No route to 172.20.0.14
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> [514966] Link up? 0
>
> tcp_slowtmr: processing active pcb
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> tcp_slowtmr: processing active pcb
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> tcp_slowtmr: polling application
>
> b
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> ip4_route: No route to 172.20.0.14
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> tcp_slowtmr: processing active pcb
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> [517070] Link up? 0
>
> tcp_slowtmr: processing active pcb
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> tcp_slowtmr: polling application
>
> b
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> ip4_route: No route to 172.20.0.14
>
> data=0x0
>
> =0x0)
>
> sum)
>
> 4ac (0x14ac, 0x14ac, 0x64080000)
>
> )
>
> x64080000)
>
> ac, 0x14ac, 0x64080000)
>
> JSH˛ÓdĘÚ@¨0Ď$ü‡ouóćq
>
> T
>
>
>
> Any ideas would be greatly appreciated.
>
>
>
> Dan
> _______________________________________________
> 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