SWRU368C May 2018 – January 2021 CC3100 , CC3100MOD , CC3200 , CC3200MOD
Host has a single API, using sl_WlanSet(), which allows adding and removing the info element. After command is executed, Basic Response Event will be sent to the Host.
Example:
sl_protocol_WlanSetInfoElement_t infoele;
infoele.index = Index; // Index of the info element. range: 0 - MAX_PRIVATE_INFO_ELEMENTS_SUPPROTED
infoele.role = Role; // INFO_ELEMENT_AP_ROLE (0) or INFO_ELEMENT_P2P_GO_ROLE (1)
infoele.ie.id = Id; // Info element ID. if INFO_ELEMENT_DEFAULT_ID (0) is set, ID will be set to 221.
// Organization unique ID. If all 3 bytes are zero - it will be replaced with 08,00,28.
infoele.ie.oui[0] = Oui0; // Organization unique ID first Byte
infoele.ie.oui[1] = Oui1; // Organization unique ID second Byte
infoele.ie.oui[2] = Oui2; // Organization unique ID third Byte
infoele.ie.length = Len; // Length of the info element. must be smaller than 253 bytes
memset(infoele.ie.data, 0, INFO_ELEMENT_MAX_SIZE);
if ( Len <= INFO_ELEMENT_MAX_SIZE )
{
memcpy(infoele.ie.data, IE, Len); // Info element. length of the info element is [0-252]
sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID,WLAN_GENERAL_PARAM_OPT_INFO_ELEMENT,sizeof(sl_protocol_WlanSetInfoElement_t),(_u8* ) &infoele);
}
sl_WlanSet(SL_WLAN_CFG_GENERAL_PARAM_ID,WLAN_GENERAL_PARAM_OPT_INFO_ELEMENT,sizeof(sl_protocol_WlanSetInfoElement_t),(_u8* ) &infoele);
Parameter | Number of Bytes | Description |
---|---|---|
Index | 1 | Index of the entry |
Role | 1 | AP – 0 , P2P GO = 1 |
Index | 1 | Index of the IE |
Role | 1 | 0 – AP, 1 – P2P GO |
ID | 1 | IE number (null = vendor-specific [221]) |
OUI | 3 | Organization ID in a vendor-specific IE (null = MAC_ADDR_OUI) |
IE Length | 2 | IE Payload Length. 0 means remove this IE. Value is in the range of [0-252]. Total length of all configured info elements should not be greater than (INFO_ELEMENT_MAX_TOTAL_LENGTH) |
IE | IE Length (0-252) | Payload of information element |
The following structure is used for the command.
typedef struct {
UINT8 index;
UINT8 role; //bit0: AP = 0, GO = 1
sl_protocol_InfoElement_t ie;
} sl_protocol_WlanSetInfoElement_t;
Where sl_protocol_InfoElement_t is defined as follow:
typedef struct {
UINT8 id;
UINT8 oui[3];
UINT16 length;
UINT8 data[252];
} sl_protocol_InfoElement_t;
The Host can configure up to 4 IE’s.
#define MAX_PRIVATE_INFO_ELEMENTS_SUPPROTED 4
Info Element max size is 252 Bytes
#define INFO_ELEMENT_MAX_SIZE 252
The total length of all info elements at AP mode is 300 bytes (for example - 4 info elements of 75 bytes each)
#define INFO_ELEMENT_MAX_TOTAL_LENGTH_AP 300
The total length of all info elements at P2P GO mode is 160 bytes
#define INFO_ELEMENT_MAX_TOTAL_LENGTH_AP 160
This limit includes the ID (1 byte) + length (1) + OUI (3).
The Role is defined as follow:
#define INFO_ELEMENT_AP_ROLE 0
#define INFO_ELEMENT_P2P_GO_ROLE 1