SWRU455M February 2017 – October 2020 CC3120 , CC3120MOD , CC3130 , CC3135 , CC3135MOD , CC3220MOD , CC3220MODA , CC3220R , CC3220S , CC3220SF , CC3230S , CC3230SF , CC3235MODAS , CC3235MODASF , CC3235MODS , CC3235MODSF , CC3235S , CC3235SF
The SimpleLink Wi-Fi device lets users get the current number of connected stations and get the full list of connected stations.
Example:
_i16 Status;
_u8 NumConnectedStations;
_u16 ValueLen = sizeof(_u8);
_u32 i;
SlNetCfgStaInfo_t ApStaList[4];
_u16 sta_info_len;
_u16 start_sta_index = 0;
_u16 actual_num_sta;
Status = sl_NetCfgGet(SL_NETCFG_AP_STATIONS_NUM_CONNECTED, NULL, &ValueLen, &NumConnectedStations);
if( Status )
{
/* error */
}
/* get list of connected stations */
start_sta_index = 0; /* from index */
sta_info_len = sizeof(ApStaList); /* 4 stations to get */
Status = sl_NetCfgGet(SL_NETCFG_AP_STATIONS_INFO_LIST, &start_sta_index, &sta_info_len, (_u8 *)ApStaList);
if( Status )
{
/* error */
}
/* extract actual stations in the response */
actual_num_sta = sta_info_len / sizeof(SlNetCfgStaInfo_t);