Dear Sir,
I am working on a project using Tiva, TM4C1294NCPDT MCU ON TIRTOS environment and uses NDK module for TCP client application. My application requires runtime configuration of static and dynamic IP. I mean, the user should be able to configure the static IP with subnet mask, gateway address etc and also change to dynamic IP mode by selecting automatic IP obtain option. I am using XGCONFIG to Configure NDK.
I am able to select the static IP option in XGCONFIG and configure IP, subnet mask and other parameters using ‘Stack thread begin hook’ function. But I could not find any method to change between static IP and the dynamic ip option. One of the threads mention about using “Network IP address hook” for enabling DHCP but this hook is activated after the static IP is bound. Hence this may not solve my issue.
On a closer analysis of the file ‘ ATMcontroller_pem4f.c ‘, generated by XGCONFIG, I could figure out that the function “Void ti_ndk_config_ip_init(HANDLE hCfg)” is the one which binds the IP, and this is generated by XGCONFIG as per the selected “Obtain IP address Automatically” option in XGCONFIG IP module configuration. I could not a find a way how to bypass this function and select my function to bind the IP depending on my configuration.
With regards
Suresh