AnsweredAssumed Answered

Modifying LWIP ping demo FRDMK64F

Question asked by TurboMan on Oct 10, 2015

I have some issues modifying this demo to do what I want. Here's the configuratioon, correct me if I'm wrong:


* Static IP assignment (no DHCP)

* Static IP address target

* No status update for link / interface

* Demo appears to stall when cable removed - no error checking? I can see there should be a timeout message on ping fail. Doesn't happen for me though.


Here's what I want it to do:

* Use DHCP

* Update status when cable is unplugged / plugged back in

* Update status when an IP address is given from DHCP server

* Give an error message / timeout when a ping fails.

* Accept a ping command over the serial port (I've done the serial IO part already)


The status updates I think need me to write a callback function? The status and link callback function pointers in the interface are both 0.


Firstly, does the hardware support cable detection? I assume so as the green led seems to indicate so.

Secondly, is it a trivial task to add DHCP?


Suggestions here would be welcome, and I'm happy to share code as this is an open project... Basically this will be a serial terminal that pings a connection you specify, and tells you if the cable has been unplugged, or if the network has failed (well, whether the ping has failed that is.)