Part Number: CC3220MODA
To learn my way into the SL API I am experimenting with code based on the network_terminal application.
I was extending the reported information on the splash screen. See screen shot where I have changed the application title and added Device name, Domain Name and Role Type.
You can see in the screen shot that the CC3220 was set for AP mode and that a station was even added. However the variable I accessed to display role type is stale.
Here is the code I used.
UART_PRINT("\t MAC address: %02x:%02x:%02x:%02x:%02x:%02x", macAddress[0], macAddress[1], macAddress[2], macAddress[3], macAddress[4], macAddress[5]);
UART_PRINT(lineBreak);
UART_PRINT("\t Device Name: %s", my_device_name);
UART_PRINT(lineBreak);
UART_PRINT("\t Domain Name: %s", my_domain_name);
UART_PRINT(lineBreak);
/* Get Role type */ //FLE 20190618
GET_STATUS_BIT(app_CB.Status, STATUS_BIT_CONNECTION); // This does not break the AP connection but does not work
// SET_STATUS_BIT(app_CB.Status, STATUS_BIT_CONNECTION); // This breaks the AP connection
UART_PRINT("\t Role type: ");
if(app_CB.Role == ROLE_AP) {
UART_PRINT("Role is AP");
}
else if (app_CB.Role == ROLE_STA) {
UART_PRINT("Role is STA");
}
else if (app_CB.Role == ROLE_P2P) {
UART_PRINT("Role is P2P");
}
else {
UART_PRINT("Role is ???");
}/* end Get Role type */
UART_PRINT(lineBreak);
UART_PRINT(lineBreak);
UART_PRINT("\t");
So I infer that app_CB.Role is stale and I need to do something to get the app_CB refereshed.
Would like some insight.
Perhaps there is a better way. On page 21 of SWRU455H is a list of APIs and I see a sl_WanSetMode but no corresponding sl_WanGetMode so no joy there.



