SimpleLink CC3100/CC3200 Host Driver
Version 1.0.1.6
Simplifies the implementation of Internet connectivity
|
Functions | |
_i16 | sl_WlanConnect (const _i8 *pName, const _i16 NameLen, const _u8 *pMacAddr, const SlSecParams_t *pSecParams, const SlSecParamsExt_t *pSecExtParams) |
Connect to wlan network as a station. More... | |
_i16 | sl_WlanDisconnect (void) |
wlan disconnect More... | |
_i16 | sl_WlanProfileAdd (const _i8 *pName, const _i16 NameLen, const _u8 *pMacAddr, const SlSecParams_t *pSecParams, const SlSecParamsExt_t *pSecExtParams, const _u32 Priority, const _u32 Options) |
add profile More... | |
_i16 | sl_WlanProfileGet (const _i16 Index, _i8 *pName, _i16 *pNameLen, _u8 *pMacAddr, SlSecParams_t *pSecParams, SlGetSecParamsExt_t *pSecExtParams, _u32 *pPriority) |
get profile More... | |
_i16 | sl_WlanProfileDel (const _i16 Index) |
Delete WLAN profile. More... | |
_i16 | sl_WlanPolicySet (const _u8 Type, const _u8 Policy, _u8 *pVal, const _u8 ValLen) |
Set policy values. More... | |
_i16 | sl_WlanPolicyGet (const _u8 Type, _u8 Policy, _u8 *pVal, _u8 *pValLen) |
get policy values More... | |
_i16 | sl_WlanGetNetworkList (const _u8 Index, const _u8 Count, Sl_WlanNetworkEntry_t *pEntries) |
Gets the WLAN scan operation results. More... | |
_i16 | sl_WlanRxStatStart (void) |
Start collecting wlan RX statistics, for unlimited time. More... | |
_i16 | sl_WlanRxStatStop (void) |
Stop collecting wlan RX statistic, (if previous called sl_WlanRxStatStart) More... | |
_i16 | sl_WlanRxStatGet (SlGetRxStatResponse_t *pRxStat, const _u32 Flags) |
Get wlan RX statistics. upon calling this command, the statistics counters will be cleared. More... | |
_i16 | sl_WlanSmartConfigStop (void) |
Stop Smart Config procedure. Once Smart Config will be stopped, Asynchronous event will be received - SL_OPCODE_WLAN_SMART_CONFIG_STOP_ASYNC_RESPONSE. More... | |
_i16 | sl_WlanSmartConfigStart (const _u32 groupIdBitmask, const _u8 cipher, const _u8 publicKeyLen, const _u8 group1KeyLen, const _u8 group2KeyLen, const _u8 *publicKey, const _u8 *group1Key, const _u8 *group2Key) |
Start Smart Config procedure. More... | |
_i16 | sl_WlanSetMode (const _u8 mode) |
Wlan set mode. More... | |
_i16 | sl_WlanSet (const _u16 ConfigId, const _u16 ConfigOpt, const _u16 ConfigLen, const _u8 *pValues) |
Internal function for setting WLAN configurations. More... | |
_i16 | sl_WlanGet (const _u16 ConfigId, _u16 *pConfigOpt, _u16 *pConfigLen, _u8 *pValues) |
Internal function for getting WLAN configurations. More... | |
_i16 | sl_WlanRxFilterAdd (SlrxFilterRuleType_t RuleType, SlrxFilterFlags_t FilterFlags, const SlrxFilterRule_t *const Rule, const SlrxFilterTrigger_t *const Trigger, const SlrxFilterAction_t *const Action, SlrxFilterID_t *pFilterId) |
Adds new filter rule to the system. More... | |
_i16 | sl_WlanRxFilterSet (const SLrxFilterOperation_t RxFilterOperation, const _u8 *const pInputBuffer, _u16 InputbufferLength) |
Sets parameters to Rx filters. More... | |
_i16 | sl_WlanRxFilterGet (const SLrxFilterOperation_t RxFilterOperation, _u8 *pOutputBuffer, _u16 OutputbufferLength) |
Gets parameters of Rx filters. More... | |
_i16 sl_WlanConnect | ( | const _i8 * | pName, |
const _i16 | NameLen, | ||
const _u8 * | pMacAddr, | ||
const SlSecParams_t * | pSecParams, | ||
const SlSecParamsExt_t * | pSecExtParams | ||
) |
Connect to wlan network as a station.
[in] | pName | up to 32 bytes in case of STA the name is the SSID of the Access Point |
[in] | NameLen | name length |
[in] | pMacAddr | 6 bytes for MAC address |
[in] | pSecParams | Security parameters (use NULL key for SL_SEC_TYPE_OPEN) Security types options:
|
[in] | pSecExtParams | Enterprise parameters (set NULL in case Enterprise parameters is not in use) |
_i16 sl_WlanDisconnect | ( | void | ) |
wlan disconnect
Disconnect connection
_i16 sl_WlanGet | ( | const _u16 | ConfigId, |
_u16 * | pConfigOpt, | ||
_u16 * | pConfigLen, | ||
_u8 * | pValues | ||
) |
Internal function for getting WLAN configurations.
[in] | ConfigId | - configuration id
|
[out] | pConfigOpt | - get configurations option
|
[out] | pConfigLen | - The length of the allocated memory as input, when the function complete, the value of this parameter would be the len that actually read from the device. If the device return length that is longer from the input value, the function will cut the end of the returned structure and will return SL_ESMALLBUF. |
[out] | pValues | - get configurations values |
_i16 sl_WlanGetNetworkList | ( | const _u8 | Index, |
const _u8 | Count, | ||
Sl_WlanNetworkEntry_t * | pEntries | ||
) |
Gets the WLAN scan operation results.
Gets scan results , gets entry from scan result table
[in] | Index | - Starting index identifier (range 0-19) for getting scan results |
[in] | Count | - How many entries to fetch. Max is (20-"Index"). |
[out] | pEntries | - pointer to an allocated Sl_WlanNetworkEntry_t. the number of array items should match "Count" sec_type: SL_SCAN_SEC_TYPE_OPEN, SL_SCAN_SEC_TYPE_WEP, SL_SCAN_SEC_TYPE_WPA or SL_SCAN_SEC_TYPE_WPA2 |
_i16 sl_WlanPolicyGet | ( | const _u8 | Type, |
_u8 | Policy, | ||
_u8 * | pVal, | ||
_u8 * | pValLen | ||
) |
get policy values
[in] | Type | SL_POLICY_CONNECTION, SL_POLICY_SCAN, SL_POLICY_PM,SL_POLICY_P2P |
[in] | Policy | argument may be set to any value |
[out] | The | returned values, depends on each policy type, will be stored in the allocated buffer pointed by pVal with a maximum buffer length set by the calling function and pointed to by argument *pValLen |
_i16 sl_WlanPolicySet | ( | const _u8 | Type, |
const _u8 | Policy, | ||
_u8 * | pVal, | ||
const _u8 | ValLen | ||
) |
Set policy values.
[in] | Type | Type of policy to be modified. The Options are:
|
[in] | Policy | The option value which depends on action type |
[in] | pVal | An optional value pointer |
[in] | ValLen | An optional value length, in bytes |
_i16 sl_WlanProfileAdd | ( | const _i8 * | pName, |
const _i16 | NameLen, | ||
const _u8 * | pMacAddr, | ||
const SlSecParams_t * | pSecParams, | ||
const SlSecParamsExt_t * | pSecExtParams, | ||
const _u32 | Priority, | ||
const _u32 | Options | ||
) |
add profile
When auto start is enabled, the device connects to a station from the profiles table. Up to 7 profiles are supported. If several profiles configured the device chose the highest priority profile, within each priority group, device will chose profile based on security policy, signal strength, etc parameters.
[in] | pName | up to 32 bytes in case of STA the name is the SSID of the Access Point in case of P2P the name is the remote device name |
[in] | NameLen | name length |
[in] | pMacAddr | 6 bytes for MAC address |
[in] | pSecParams | Security parameters - security type (SL_SEC_TYPE_OPEN,SL_SEC_TYPE_WEP,SL_SEC_TYPE_WPA_WPA2, SL_SEC_TYPE_P2P_PBC,SL_SEC_TYPE_P2P_PIN_KEYPAD,SL_SEC_TYPE_P2P_PIN_DISPLAY, SL_SEC_TYPE_WPA_ENT), key, and key length in case of p2p security type pin the key refers to pin code |
[in] | pSecExtParams | Enterprise parameters - identity, identity length, Anonymous, Anonymous length, CertIndex (not supported, certificates need to be placed in a specific file ID), EapMethod.Use NULL in case Enterprise parameters is not in use |
[in] | Priority | profile priority. Lowest priority: 0 |
[in] | Options | Not supported |
_i16 sl_WlanProfileDel | ( | const _i16 | Index | ) |
Delete WLAN profile.
Delete WLAN profile
[in] | index | number of profile to delete.Possible values are 0 to 6. Index value 255 will delete all saved profiles |
_i16 sl_WlanProfileGet | ( | const _i16 | Index, |
_i8 * | pName, | ||
_i16 * | pNameLen, | ||
_u8 * | pMacAddr, | ||
SlSecParams_t * | pSecParams, | ||
SlGetSecParamsExt_t * | pSecExtParams, | ||
_u32 * | pPriority | ||
) |
get profile
read profile from the device
[in] | Index | profile stored index, if index does not exists error is return |
[out] | pName | up to 32 bytes, in case of sta mode the name of the Access Point in case of p2p mode the name of the Remote Device |
[out] | pNameLen | name length |
[out] | pMacAddr | 6 bytes for MAC address |
[out] | pSecParams | security parameters - security type (SL_SEC_TYPE_OPEN, SL_SEC_TYPE_WEP, SL_SEC_TYPE_WPA_WPA2 or SL_SEC_TYPE_WPS_PBC, SL_SEC_TYPE_WPS_PIN, SL_SEC_TYPE_WPA_ENT,SL_SEC_TYPE_P2P_PBC,SL_SEC_TYPE_P2P_PIN_KEYPAD or SL_SEC_TYPE_P2P_PIN_DISPLAY), key and key length are not in case of p2p security type pin the key refers to pin code return due to security reasons. |
[out] | pSecExtParams | enterprise parameters - identity, identity length, Anonymous, Anonymous length CertIndex (not supported), EapMethod. |
[out] | Priority | profile priority |
_i16 sl_WlanRxFilterAdd | ( | SlrxFilterRuleType_t | RuleType, |
SlrxFilterFlags_t | FilterFlags, | ||
const SlrxFilterRule_t *const | Rule, | ||
const SlrxFilterTrigger_t *const | Trigger, | ||
const SlrxFilterAction_t *const | Action, | ||
SlrxFilterID_t * | pFilterId | ||
) |
Adds new filter rule to the system.
[in] | RuleType | The rule type |
[in] | FilterFlags | Flags which set the type of header rule Args and sets the persistent flag |
[in] | pRule | Determine the filter rule logic |
[in] | pTrigger | Determine when the rule is triggered also sets rule parent. |
[in] | pAction | Sets the action to be executed in case the match functions pass |
[out] | pFilterId | The filterId which was created |
_i16 sl_WlanRxFilterGet | ( | const SLrxFilterOperation_t | RxFilterOperation, |
_u8 * | pOutputBuffer, | ||
_u16 | OutputbufferLength | ||
) |
Gets parameters of Rx filters.
[in] | RxFilterOperation | possible operations :
|
[in] | pOutputBuffer | The buffer input is _WlanRxFilterRetrieveEnableStatusCommandResponseBuff_t:
|
[in] | OutputbufferLength | The length in byte of the output buffer |
_i16 sl_WlanRxFilterSet | ( | const SLrxFilterOperation_t | RxFilterOperation, |
const _u8 *const | pInputBuffer, | ||
_u16 | InputbufferLength | ||
) |
Sets parameters to Rx filters.
[in] | RxFilterOperation | possible operations :
|
[in] | pInputBuffer | options: The buffer input is _WlanRxFilterOperationCommandBuff_t:
|
[in] | InputbufferLength | The length in byte of the input buffer |
_i16 sl_WlanRxStatGet | ( | SlGetRxStatResponse_t * | pRxStat, |
const _u32 | Flags | ||
) |
Get wlan RX statistics. upon calling this command, the statistics counters will be cleared.
[in] | Flags | should be 0 ( not applicable right now, will be added the future ) |
[in] | pRxStat | a pointer to SlGetRxStatResponse_t filled with Rx statistics results |
_i16 sl_WlanRxStatStart | ( | void | ) |
Start collecting wlan RX statistics, for unlimited time.
_i16 sl_WlanRxStatStop | ( | void | ) |
Stop collecting wlan RX statistic, (if previous called sl_WlanRxStatStart)
_i16 sl_WlanSet | ( | const _u16 | ConfigId, |
const _u16 | ConfigOpt, | ||
const _u16 | ConfigLen, | ||
const _u8 * | pValues | ||
) |
Internal function for setting WLAN configurations.
[in] | ConfigId | - configuration id
|
[in] | ConfigOpt | - configurations option
|
[in] | ConfigLen | - configurations len |
[in] | pValues | - configurations values |
_i16 sl_WlanSetMode | ( | const _u8 | mode | ) |
Wlan set mode.
Setting WLAN mode
[in] | mode | - WLAN mode to start the CC31xx device. Possible options are:
|
_i16 sl_WlanSmartConfigStart | ( | const _u32 | groupIdBitmask, |
const _u8 | cipher, | ||
const _u8 | publicKeyLen, | ||
const _u8 | group1KeyLen, | ||
const _u8 | group2KeyLen, | ||
const _u8 * | publicKey, | ||
const _u8 * | group1Key, | ||
const _u8 * | group2Key | ||
) |
Start Smart Config procedure.
[in] | groupIdBitmask | - each bit represent a group ID that should be searched. The Default group ID id BIT_0. 2 more group can be searched in addition. The range is BIT_0 - BIT_15. |
[in] | chiper | - 0: check in flash, 1 - AES, 0xFF - do not check in flash |
[in] | publicKeyLen | - public key len (used for the default group ID - BIT_0) |
[in] | group1KeyLen | - group ID1 length |
[in] | group2KeyLen | - group ID2 length |
[in] | publicKey | - public key (used for the default group ID - BIT_0) |
[in] | group1Key | - group ID1 key |
[in] | group2Key | - group ID2 key |
[out] | none |
_i16 sl_WlanSmartConfigStop | ( | void | ) |
Stop Smart Config procedure. Once Smart Config will be stopped, Asynchronous event will be received - SL_OPCODE_WLAN_SMART_CONFIG_STOP_ASYNC_RESPONSE.
[in] | none | |
[out] | none |
struct slSmartConfigStartAsyncResponse_t |
struct slSmartConfigStopAsyncResponse_t |
struct slWlanConnFailureAsyncResponse_t |
struct slWlanConnectAsyncResponse_t |
struct slPeerInfoAsyncResponse_t |
union SlWlanEventData_u |
Data Fields | ||
---|---|---|
slPeerInfoAsyncResponse_t | APModeStaConnected | |
slPeerInfoAsyncResponse_t | APModestaDisconnected | |
slPeerInfoAsyncResponse_t | P2PModeDevFound | |
slPeerInfoAsyncResponse_t | P2PModeNegReqReceived | |
slWlanConnFailureAsyncResponse_t | P2PModewlanConnectionFailure | |
slSmartConfigStartAsyncResponse_t | smartConfigStartResponse | |
slSmartConfigStopAsyncResponse_t | smartConfigStopResponse | |
slWlanConnectAsyncResponse_t | STAandP2PModeDisconnected | |
slWlanConnectAsyncResponse_t | STAandP2PModeWlanConnected |
struct SlWlanEvent_t |
Data Fields | ||
---|---|---|
_u32 | Event | |
SlWlanEventData_u | EventData |
struct SlGetRxStatResponse_t |
struct Sl_WlanNetworkEntry_t |
struct SlSecParams_t |
struct SlSecParamsExt_t |
struct SlGetSecParamsExt_t |
struct slWlanScanParamCommand_t |
struct sl_protocol_InfoElement_t |
struct sl_protocol_WlanSetInfoElement_t |
Data Fields | ||
---|---|---|
sl_protocol_InfoElement_t | ie | |
_u8 | index | |
_u8 | role |