Hi,
I have a problem in maintaining an older project. The devices are based on DM642, built with CCS 3.0 and NDK 1.71. Yes I know this versions are very old, but the project is not under development, only maintainance.
Here is the problem: On startup the device is configured do be a DHCP client usingthis code, similar to the example in the manual:
bzero( &dhcpc, sizeof(dhcpc) );
dhcpc.cisargs.Mode = CIS_FLG_IFIDXVALID;
dhcpc.cisargs.IfIdx = 1;
dhcpc.cisargs.pCbSrv = NDK_serviceReport;
status = CfgAddEntry(NDK_Data.hCfg, CFGTAG_SERVICE, CFGITEM_SERVICE_DHCPCLIENT, 0,
sizeof(dhcpc), (UINT8 *) &dhcpc, 0);
assert(status == 0);
Everything is fine after booting, the DHCP server respond and the devices get a lease. Now we disconnect the network cable from the device, a "link lost" event is found and reported. Now we expect that the lease is removed but it is not! If the device is reconnected then it uses its old IP address, but we recommend to get a new lease, like a Windows PC does.
How can we force the DHCP client to remove its lease on lost network connections?
Thanx,
Andi