I am using NET+OS version 7.4.2 and Connect Core 9P 9215.
I have a Digi Example Application to “changeIpAddress” that toggles the IP Address between two different values.
It works fine in the example application.
A summary of it uses the following calls:
/******************************************************************************************************/
/ Get current configuration settings. */
HANDLE_ERROR(customizeIamGetStaticConfig(interface, &ipParams));
/* Set IP Address. */
ccode = inet_pton(AF_INET, address, &ipParams.ipAddress.addr.ipv4.sin_addr);
if (ccode != 1)
{
printf ("%s is not a valid IP address.
", address);
return;
}
…
/* Write the new configuration to NVRAM. */
HANDLE_ERROR(customizeIamSetStaticConfig(interface, &ipParams))
/* Get the method used to set the current IP address. */
HANDLE_ERROR(naIamGetCurrentMethod(interface, &method));
/* Restart IAM. */
HANDLE_ERROR(naIamRelease(interface, method));
/*******************************************************************************************************/
It also works fine when I use it in my application from within the “root” thread.
However when I run from another thread it locks up my application.
I know there are other threads on changing the IP address, however I have not seen one that
addresses the problem I am experiencing.
Any ideas on why it these calls need to be through the root thread?
Thanks in advance.
Regards,
Adam