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.

How to change static IP address in NDK 2.24.0.11

Other Parts Discussed in Thread: SYSBIOS

Hi,

     We are running SYS/BIOS with NDK on our production board using the CPSW interface. Our current software versions:

Processor AM3352
Code Composer Version: 6.0.1.00040
Compiler TI v5.1.6
SYS/BIOS 6.40.3.39
XDCTools 3.30.3.47_core
NDK 2.24.0.11 (with task priority changes)

We are using NDK example code from the ti/am335x_sysbios_ind_sdk_1.1.0.5/sdk/examples/ethernetip_adapter example (this example overides the Global.stackThreadUser = "&NDKACD_stackThread"). The static or dhcp setting is currently located in the eip_main.c, EIPACDInit() routine when the eipDevInitConfig structure is filled in.  We currently fill this structure in with our own flash values before the init routine is called but when the user changes the IP address settings to a different address or to DHCP mode, how would we go about getting the NDK stack to take the change?

Thanks,

John C.

  • John,

    John Conover said:
    when the user changes the IP address settings to a different address or to DHCP mode, how would we go about getting the NDK stack to take the change?

             Do you mean the user changing the IP address at run time? 

    In this case you need to delete the current IP address cfgentry and add a new IP address entry. Please refer to the API  deregisterIPCfg(HANDLE hCfg) in eip_ndk.c to get more info on removing a cfgentry.   

    registerIPCfg(HANDLE hCfg) function has information  on adding a Static IP Cfgentry and DHCP cfg entry.

    Regrads,

    Prajith

  • Hey Prajith,

                 Yes the user is changing the configuration/IP address. We save it to flash and then need to act on the change. Can I just call the deregisterIPCfg() (which will remove the cfgGateway, cfgAddress and cfgHostname) and then call registerIPCfg? My concern was that these functions were called from ti_ndk_config_Global_NetworkOpen and ti_ndk_config_Global_NetworkClose and I would be causing other issues with the stack.

    Thanks,

         John C.

  • John,

            You should be able to use the APIs. Please make sure to use the new  IP address when you call registerIPCfg.

    Regards,

    Prajith