This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Stack Thread Hooks Network Callback Hooks

Hi  all

      

        Network callback hooks allow the user to define the code that should run for the NDK callbacks 'ti_ndk_config_Global_serviceReport', 'ti_ndk_config_Global_NetworkOpen', 'ti_ndk_config_Global_NetworkClose' and the 'ti_ndk_config_Global_NetworkIPAddr'.

1.But I do not understand the function of these hook.

2.I do not know what order they are running.

3.If I want to chang IP address in NDK during run-time,Which  hook should I use, and how to configure the sample?

Thanks

  • Hi Lewis,

    Lewis said:

    1.But I do not understand the function of these hook.

    2.I do not know what order they are running.

    Please see the NDK User's Guide (spru523i.pdf), section "3.1.4 Global Hook Configuration" For an explanation of these hooks.

    You can find additional (advanced) information in the NDK's help (found under Code Composer Studio's help):

    Lewis said:
    3.If I want to chang IP address in NDK during run-time,Which  hook should I use, and how to configure the sample?

    Are you configuring your app to use a static IP address initially?  If so, please see this forum thread for how to change the initially configured static IP (chosen at compile time) to a different static IP (during run time).  Note that the thread discusses a problem + workaround, but that issue has since been fixed so my original suggestion in the thread should work assuming you have a newer version of the NDK.

    If you are trying to enable DHCP client at run time, then please see this forum thread which discusses how to do that.

    Steve