Hi, I'm working on a program that requires network connectivity. I can use the RTCS without problem with both a static ip and by using dhcp. The only problem I have is that I don't know how to find what ip the dhcp server gave my program. If I check the dhcp server i can find it and confirm that my device is indeed hosted on that ip, but I figured there was also a way to find the ip inside the program, I just don't know how.
已解决! 转到解答。
Hi
I think you can try the function ifcfg_get_ip
/*FUNCTION*--------------------------------------------------------------
*
* Function Name : ipcfg_get_ip()
* Returned Value : TRUE and IP, mask and gateway, if successful
* Comments : Returns actual ip information from DHCP response, if any.
*
*END--------------------------------------------------------------------*/
Regards
Daniel
Hi
I think you can try the function ifcfg_get_ip
/*FUNCTION*--------------------------------------------------------------
*
* Function Name : ipcfg_get_ip()
* Returned Value : TRUE and IP, mask and gateway, if successful
* Comments : Returns actual ip information from DHCP response, if any.
*
*END--------------------------------------------------------------------*/
Regards
Daniel