I wonder if there is any way to get information about failed dhcp process? I need to start dhcp, and if it's not succeeded, disable dhcp and use a default local ip (case of a direct connect to a pc). I understand, that i can monitor local ip, but is there a better way? Also when dhcp is not succesful, the mcb2300_debug complains that retransmit timeout is too big.
Thanks, Gennady
DHCP client tries to obtain a valid IP. It uses exponential backoff retransmission on timeout. After 30 seconds, DHCP client is restarted. This process repeats indefinetly or until a valid IP is obtained. There is no such function to check if a DHCP has failed.
You can monitor the IP address as you have figured out. However I see no reason for doing this. For example a PC can be configured either to use a DHCP or a static IP, but not both at the same time.
After 30 seconds, DHCP client is restarted.
Maybe you can check this restart somehow and allow the DHCP client to try for only x*30 seconds? After that you could disable the DHCP client and set your own fixed IP. I don't know this specific client so I don't really know what I'm talking about anyway :-)
I don't suppose you have the source code of the client?
Regards, Joost Leeuwesteijn
View all questions in Keil forum