Part Number: CC3220
So to set a device in to AP mode I can do
sl_WlanSetMode(ROLE_AP);
Is there a way to read what role the device is in? I was looking for WlanGetMode, but didn't see anything.
Thanks
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.
Hi,
For this purpose you can use this API:
_i16 RetVal = 0; _u16 Len = sizeof(SlWlanConnStatusParam_t); SlWlanConnStatusParam_t WlanConnectInfo; RetVal = sl_WlanGet(SL_WLAN_CONNECTION_INFO, NULL , &Len, (_u8*)&WlanConnectInfo);
Jan
Hi Kristen,
Please see:
typedef struct { _u8 Mode; /* ROLE_STA, ROLE_AP, ROLE_P2P */ _u8 ConnStatus; /* SlWlanConnStatusFlags_e */ _u8 SecType; /* Current connection security type - (0 in case of disconnect or AP mode) SL_WLAN_SEC_TYPE_OPEN, SL_WLAN_SEC_TYPE_WEP, SL_WLAN_SEC_TYPE_WPA_WPA2, SL_WLAN_SEC_TYPE_WPA_ENT, SL_WLAN_SEC_TYPE_WPS_PBC, SL_WLAN_SEC_TYPE_WPS_PIN */ _u8 Reserved; SlWlanConnectionInfo_u ConnectionInfo; }SlWlanConnStatusParam_t;
in wlan.h. This structure is returned form API SL_WLAN_CONNECTION_INFO. This feature in new in CC322x, at previous gen was not available.
Jan