Other Parts Discussed in Thread: UNIFLASH
Hi all,
I have an application with the CC3235MODSF. I want to change the DHCP server settings with the following code:
int16_t CheckDHCPserverSettings(uint32_t *APipAddr) { int16_t RetVal; uint32_t dhcp_start_addr; uint32_t dhcp_last_addr; uint32_t dhcp_lease_time = 86400; SlNetAppDhcpServerBasicOpt_t dhcpParams; uint8_t outLen = sizeof(SlNetAppDhcpServerBasicOpt_t); RetVal = sl_NetAppGet(SL_NETAPP_DHCP_SERVER_ID, SL_NETAPP_DHCP_SRV_BASIC_OPT, &outLen, (_u8* )&dhcpParams); ASSERT_ON_ERROR(RetVal, DEVICE_ERROR); dhcp_start_addr = *APipAddr + 1; dhcp_last_addr = (*APipAddr & 0xFFFFFF00) + 254; if ((dhcpParams.ipv4_addr_start != dhcp_start_addr) || (dhcpParams.ipv4_addr_last != dhcp_last_addr) || (dhcpParams.lease_time != dhcp_lease_time)) { RetVal = sl_NetAppStop(SL_NETAPP_DHCP_SERVER_ID); ASSERT_ON_ERROR(RetVal, DEVICE_ERROR); dhcpParams.ipv4_addr_start = dhcp_start_addr; // first IP Address for allocation dhcpParams.ipv4_addr_last = dhcp_last_addr; // last IP Address for allocation. dhcpParams.lease_time = dhcp_lease_time; RetVal = sl_NetAppSet(SL_NETAPP_DHCP_SERVER_ID, SL_NETAPP_DHCP_SRV_BASIC_OPT, outLen, (_u8* )&dhcpParams); ASSERT_ON_ERROR(RetVal, DEVICE_ERROR); RetVal = sl_NetAppStart(SL_NETAPP_DHCP_SERVER_ID); // Start DHCP server with new settings ASSERT_ON_ERROR(RetVal, DEVICE_ERROR); } return RetVal; } /* ModifyDHCPserverSettings() */
The call of "sl_NetAppStart(SL_NETAPP_DHCP_SERVER_ID)" in column 34 returns 161. Please refer the screenshoots.
sl_NetAppStart() should return 0 for success and negative numbers for errors. But 161 is something I do not understand.
The code runs without any problems on the CC3235SF-Launchpad, but the Launchpad boards uses X-samples of the CC3235.
I am using simplelink_cc32xx_sdk_5_10_00_02 5. The servicepack on the NWP is sp_4.10.0.1_3.7.0.1_3.1.0.26.
The same problem occur with the SDK versions simplelink_cc32xx_sdk_4_40_00_07 or simplelink_cc32xx_sdk_4_20_00_07 and
there corresponding servicepacks.
Any idea what is the reason for that bug?
Best regards,
Ulrich