SimpleLink CC31xx/CC32xx Host Driver
Version 3.0.1.54
Simplifies the implementation of Internet connectivity
|
Controls the use of the WiFi WLAN module. More...
Functions | |
_i16 | sl_WlanConnect (const _i8 *pName, const _i16 NameLen, const _u8 *pMacAddr, const SlWlanSecParams_t *pSecParams, const SlWlanSecParamsExt_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 SlWlanSecParams_t *pSecParams, const SlWlanSecParamsExt_t *pSecExtParams, const _u32 Priority, const _u32 Options) |
Add profile. More... | |
_i16 | sl_WlanProfileUpdate (const _u32 Index, const _i8 *pName, const _i16 NameLen, const _u8 *pMacAddr, const SlWlanSecParams_t *pSecParams, const SlWlanSecParamsExt_t *pSecExtParams, const _u32 Priority) |
Profile Update. More... | |
_i16 | sl_WlanProfileGet (const _i16 Index, _i8 *pName, _i16 *pNameLen, _u8 *pMacAddr, SlWlanSecParams_t *pSecParams, SlWlanGetSecParamsExt_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 *pPolicy, _u8 *pVal, _u8 *pValLen) |
Get policy values. More... | |
_i16 | sl_WlanGetNetworkList (const _u8 Index, const _u8 Count, SlWlanNetworkEntry_t *pEntries) |
Gets the WLAN scan operation results. More... | |
_i16 | sl_WlanGetExtNetworkList (const _u8 Index, const _u8 Count, SlWlanExtNetworkEntry_t *pEntries) |
Gets the WLAN scan operation results. More... | |
_i16 | sl_WlanRxStatStart (void) |
Start collecting wlan RX statistics, for unlimited time. More... | |
_i16 | sl_WlanRxStatGet (SlWlanGetRxStatResponse_t *pRxStat, const _u32 Flags) |
Get wlan RX statistics. Upon calling this command, the statistics counters will be cleared. More... | |
_i16 | sl_WlanRxStatStop (void) |
Stop collecting wlan RX statistic, (if previous called sl_WlanRxStatStart) More... | |
_i16 | sl_WlanProvisioning (_u8 ProvisioningCmd, _u8 RequestedRoleAfterSuccess, _u16 InactivityTimeoutSec, char *pSmartConfigKey, _u32 Flags) |
The simpleLink will switch to the appropriate role according to the provisioning mode requested and will start the provisioning process. 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) |
Setting WLAN configurations. More... | |
_i16 | sl_WlanGet (const _u16 ConfigId, _u16 *pConfigOpt, _u16 *pConfigLen, _u8 *pValues) |
Getting WLAN configurations. More... | |
_i16 | sl_WlanRxFilterAdd (SlWlanRxFilterRuleType_t RuleType, SlWlanRxFilterFlags_u Flags, const SlWlanRxFilterRule_u *const pRule, const SlWlanRxFilterTrigger_t *const pTrigger, const SlWlanRxFilterAction_t *const pAction, SlWlanRxFilterID_t *pFilterId) |
Adds new filter rule to the system. More... | |
Typedefs | |
typedef struct SlWlanEventSTAAdded_t | SlWlanEventSTARemoved_t |
typedef struct SlWlanEventP2PClientAdded_t | SlWlanEventP2PClientRemoved_t |
typedef struct SlWlanEventP2PDevFound_t | SlWlanEventP2PRequest_t |
typedef struct SetAntennaCmd | SetAntennaIndex_t |
typedef _i8 | SlWlanRxFilterID_t |
typedef _u8 | SlWlanRxFilterIdMask_t[128/8] |
typedef _u8 | SlWlanRxFilterSysFilters_t |
typedef _u8 | SlWlanRxFilterSysFiltersMask_t[SL_WLAN_RX_FILTER_MAX_SYS_FILTERS_SETS/8] |
typedef _u8 | SlWlanRxFilterRuleType_t |
typedef _u8 | SlWlanRxFilterFlags_u |
typedef _u8 | SlWlanRxFilterRuleHeaderCompareFunction_t |
typedef _u8 | SlWlanRxFilterTriggerCompareFunction_t |
typedef _u8 | SlWlanRxFilterRuleHeaderField_t |
typedef _u8 | SlWlanRxFilterRuleCombinationOperator_t |
typedef _u8 | SlWlanRxFilterTriggerRoles_t |
typedef _u8 | SlWlanRxFilterTriggerConnectionStates_t |
typedef _u8 | SlWlanRxFilterCounterId_t |
typedef _u8 | SlWlanRxFilterActionType_t |
Controls the use of the WiFi WLAN module.
_i16 sl_WlanConnect | ( | const _i8 * | pName, |
const _i16 | NameLen, | ||
const _u8 * | pMacAddr, | ||
const SlWlanSecParams_t * | pSecParams, | ||
const SlWlanSecParamsExt_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_WLAN_SEC_TYPE_OPEN) security types options:
|
[in] | pSecExtParams | Enterprise parameters (set NULL in case Enterprise parameters is not in use) |
Definition at line 72 of file wlan.c.
_i16 sl_WlanDisconnect | ( | void | ) |
Wlan disconnect.
Disconnect connection
_i16 sl_WlanGet | ( | const _u16 | ConfigId, |
_u16 * | pConfigOpt, | ||
_u16 * | pConfigLen, | ||
_u8 * | pValues | ||
) |
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 |
- WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS_5G:
- SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS:
Definition at line 1203 of file wlan.c.
_i16 sl_WlanGetExtNetworkList | ( | const _u8 | Index, |
const _u8 | Count, | ||
SlWlanExtNetworkEntry_t * | pEntries | ||
) |
Gets the WLAN scan operation results.
Gets scan results with extended information (Country info), gets entry from scan result table
[in] | Index | Starting index identifier (range 0-29) for getting scan results |
[in] | Count | How many entries to fetch. Max is (30-"Index"). |
[out] | pEntries | Pointer to an allocated SlWlanExtNetworkEntry_t. The number of array items should match "Count" sec_type:
|
_i16 sl_WlanGetNetworkList | ( | const _u8 | Index, |
const _u8 | Count, | ||
SlWlanNetworkEntry_t * | pEntries | ||
) |
Gets the WLAN scan operation results.
Gets scan results , gets entry from scan result table
[in] | Index | Starting index identifier (range 0-29) for getting scan results |
[in] | Count | How many entries to fetch. Max is (30-"Index"). |
[out] | pEntries | Pointer to an allocated SlWlanNetworkEntry_t. The number of array items should match "Count" sec_type:
|
_i16 sl_WlanPolicyGet | ( | const _u8 | Type, |
_u8 * | pPolicy, | ||
_u8 * | pVal, | ||
_u8 * | pValLen | ||
) |
Get policy values.
[in] | Type |
|
[out] | pPolicy | argument may be set to any value |
[out] | pVal | 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 |
[out] | pValLen | actual value length |
Definition at line 284 of file wlan.c.
_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 |
SL_WLAN_POLICY_CONNECTION:
defines options available to connect the CC31xx device to the AP: The options below could be combined to a single action, if more than one action is required.
SL_WLAN_POLICY_SCAN:
defines system scan time interval. interval is 10 minutes. After settings scan interval, an immediate scan is activated.
The next scan will be based on the interval settings. For AP scan, minimum interval is 10 seconds.
SL_WLAN_POLICY_PM:
defines a power management policy for Station mode only:
SL_WLAN_POLICY_P2P:
defines p2p negotiation policy parameters for P2P role:
Definition at line 242 of file wlan.c.
_i16 sl_WlanProfileAdd | ( | const _i8 * | pName, |
const _i16 | NameLen, | ||
const _u8 * | pMacAddr, | ||
const SlWlanSecParams_t * | pSecParams, | ||
const SlWlanSecParamsExt_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 (SL_WLAN_MAX_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 (use NULL key for SL_WLAN_SEC_TYPE_OPEN) Security types options:
|
[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, Highest priority: 15. |
[in] | Options | Not supported |
Definition at line 346 of file wlan.c.
_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 SL_WLAN_DEL_ALL_PROFILES will delete all saved profiles |
Definition at line 786 of file wlan.c.
_i16 sl_WlanProfileGet | ( | const _i16 | Index, |
_i8 * | pName, | ||
_i16 * | pNameLen, | ||
_u8 * | pMacAddr, | ||
SlWlanSecParams_t * | pSecParams, | ||
SlWlanGetSecParamsExt_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 types options:
|
[out] | pSecExtParams | Enterprise parameters - identity, identity length, Anonymous, Anonymous length CertIndex (not supported), EapMethod. |
[out] | pPriority | Profile priority |
Definition at line 720 of file wlan.c.
_i16 sl_WlanProfileUpdate | ( | const _u32 | Index, |
const _i8 * | pName, | ||
const _i16 | NameLen, | ||
const _u8 * | pMacAddr, | ||
const SlWlanSecParams_t * | pSecParams, | ||
const SlWlanSecParamsExt_t * | pSecExtParams, | ||
const _u32 | Priority | ||
) |
Profile Update.
Update one or more of the existing profile parameters: SSID, BSSID, priority, security parameters
[in] | Index | Profile index to update |
[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. NULL in case update is not needed |
[in] | NameLen | Name length. zero in case update is not needed |
[in] | pMacAddr | 6 bytes for MAC address, NULL in case update is not needed |
[in] | pSecParams | Security parameters (use NULL key for SL_WLAN_SEC_TYPE_OPEN) Security types options:
|
[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 or does not need to be updated |
[in] | Priority | Profile priority. Lowest priority: 0, Highest priority: 15. In case update is not needed, set to SL_WLAN_DONT_UPDATE |
Definition at line 529 of file wlan.c.
_i16 sl_WlanProvisioning | ( | _u8 | ProvisioningCmd, |
_u8 | RequestedRoleAfterSuccess, | ||
_u16 | InactivityTimeoutSec, | ||
char * | pSmartConfigKey, | ||
_u32 | Flags | ||
) |
The simpleLink will switch to the appropriate role according to the provisioning mode requested and will start the provisioning process.
[in] | ProvisioningCmd |
|
[in] | RequestedRoleAfterSuccess | The role that the SimpleLink will switch to in case of a successful provisioning. 0: STA 2: AP 0xFF: stay in current role (relevant only in provisioning_stop) |
[in] | InactivityTimeoutSec | - The period of time (in seconds) the system waits before it automatically stops the provisioning process when no activity is detected. set to 0 in order to stop provisioning. Minimum InactivityTimeoutSec is 30 seconds. |
[in] | pSmartConfigKey | Smart Config key: public key for smart config process - must be 16 chars (relevant for smart config only) |
[in] | Flags | Can have the following values:
|
Definition at line 1062 of file wlan.c.
_i16 sl_WlanRxFilterAdd | ( | SlWlanRxFilterRuleType_t | RuleType, |
SlWlanRxFilterFlags_u | Flags, | ||
const SlWlanRxFilterRule_u *const | pRule, | ||
const SlWlanRxFilterTrigger_t *const | pTrigger, | ||
const SlWlanRxFilterAction_t *const | pAction, | ||
SlWlanRxFilterID_t * | pFilterId | ||
) |
Adds new filter rule to the system.
[in] | RuleType | The rule type
|
[in] | Flags | 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_WlanRxStatGet | ( | SlWlanGetRxStatResponse_t * | pRxStat, |
const _u32 | Flags | ||
) |
Get wlan RX statistics. Upon calling this command, the statistics counters will be cleared.
[in] | pRxStat | Pointer to SlWlanGetRxStatResponse_t filled with Rx statistics results |
[in] | Flags | Should be 0 ( not applicable right now, will be added the future ) |
Definition at line 983 of file wlan.c.
_i16 sl_WlanRxStatStart | ( | void | ) |
Start collecting wlan RX statistics, for unlimited time.
Definition at line 956 of file wlan.c.
_i16 sl_WlanRxStatStop | ( | void | ) |
Stop collecting wlan RX statistic, (if previous called sl_WlanRxStatStart)
Definition at line 1009 of file wlan.c.
_i16 sl_WlanSet | ( | const _u16 | ConfigId, |
const _u16 | ConfigOpt, | ||
const _u16 | ConfigLen, | ||
const _u8 * | pValues | ||
) |
Setting WLAN configurations.
[in] | ConfigId | - configuration id
|
[in] | ConfigOpt | - configurations option
|
[in] | ConfigLen | - configurations len |
[in] | pValues | - configurations values |
Reset:
Non- Persistent:
SL_WLAN_AP_OPT_SSID:
- SL_WLAN_GENERAL_PARAM_OPT_SCAN_PARAMS_5G:
Definition at line 1161 of file wlan.c.
_i16 sl_WlanSetMode | ( | const _u8 | Mode | ) |
Wlan set mode.
Setting WLAN mode
[in] | Mode | WLAN mode to start the CC31xx device. Possible options are
|
Definition at line 1126 of file wlan.c.
struct SlWlanSmartConfigStartAsyncResponse_t |
struct SlWlanSmartConfigStopAsyncResponse_t |
struct SlWlanConnFailureAsyncResponse_t |
struct SlWlanProvisioningStatusAsyncResponse_t |
struct SlWlanEventRxFilterInfo_t |
struct SlWlanEventConnect_t |
struct SlWlanEventDisconnect_t |
struct SlWlanEventSTAAdded_t |
struct SlWlanEventP2PConnect_t |
struct SlWlanEventP2PDisconnect_t |
struct SlWlanEventP2PClientAdded_t |
struct SlWlanEventP2PDevFound_t |
struct SlWlanEventP2PConnectFail_t |
struct SlWlanEventProvisioningStatus_t |
struct SlWlanEventProvisioningProfileAdded_t |
struct SlWlanLinkQualityAsyncEvent_t |
union SlWlanEventData_u |
Data Fields | ||
---|---|---|
SlWlanEventConnect_t | Connect | |
SlWlanEventDisconnect_t | Disconnect | |
SlWlanLinkQualityAsyncEvent_t | LinkQualityTrigger | |
SlWlanEventP2PClientAdded_t | P2PClientAdded | |
SlWlanEventP2PClientRemoved_t | P2PClientRemoved | |
SlWlanEventP2PConnect_t | P2PConnect | |
SlWlanEventP2PConnectFail_t | P2PConnectFail | |
SlWlanEventP2PDevFound_t | P2PDevFound | |
SlWlanEventP2PDisconnect_t | P2PDisconnect | |
SlWlanEventP2PRequest_t | P2PRequest | |
SlWlanEventProvisioningProfileAdded_t | ProvisioningProfileAdded | |
SlWlanEventProvisioningStatus_t | ProvisioningStatus | |
SlWlanEventRxFilterInfo_t | RxFilterInfo | |
SlWlanEventSTAAdded_t | STAAdded | |
SlWlanEventSTARemoved_t | STARemoved |
struct SlWlanEvent_t |
Data Fields | ||
---|---|---|
SlWlanEventData_u | Data | |
_u32 | Id |
struct SlWlanGetRxStatResponse_t |
struct SlWlanNetworkEntry_t |
struct SlWlanExtNetworkEntry_t |
struct SlWlanSecParams_t |
struct SlWlanSecParamsExt_t |
struct SlWlanGetSecParamsExt_t |
union SlWlanConnectionInfo_u |
Data Fields | ||
---|---|---|
SlWlanEventP2PConnect_t | P2PConnect | |
SlWlanEventConnect_t | StaConnect |
struct SlWlanConnStatusParam_t |
Data Fields | ||
---|---|---|
SlWlanConnectionInfo_u | ConnectionInfo | |
_u8 | ConnStatus | |
_u8 | Mode | |
_u8 | Reserved | |
_u8 | SecType |
struct SlWlanScanParamCommand_t |
struct SlWlanScanParam2GCommand_t |
struct SlWlanScanParam5GCommand_t |
struct SlWlanUserCountryAttrib_t |
struct SlWlanInfoElement_t |
struct SlWlanSetInfoElement_t |
Data Fields | ||
---|---|---|
SlWlanInfoElement_t | IE | |
_u8 | Index | |
_u8 | Role |
struct SlWlanPmPolicyParams_t |
struct SlWlanRegisterLinkQualityEvents_t |
struct SlWlanCoexConfig_t |
struct SlWlanAntSelectionConfig_t |
struct SlWlanExtConnectionInfo_t |
struct SlWlanRxFilterPatternArg_t |
union SlWlanRxFilterHeaderArg_u |
Data Fields | ||
---|---|---|
_u8 | Bssid[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][6] | |
_u32 | EtherType[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS] | |
_u32 | FrameLength[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS] | |
_u8 | FrameSubtype[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS] | |
_u8 | Frametype[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS] | |
_u8 | FrametypeAscii[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][4] | |
_u8 | IpProtocol[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS] | |
_u8 | IpProtocolAscii[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][5] | |
_u8 | Ipv4[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][4] | |
_u8 | Ipv4Ascii[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][16] | |
_u8 | Ipv6[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][16] | |
_u8 | IpVersion | |
_u8 | IpVersionAscii[4] | |
_u8 | Mac[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][6] | |
_u8 | MacAscii[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS][18] | |
SlWlanRxFilterPatternArg_t | Pattern | |
_u32 | Port[SL_WLAN_RX_FILTER_NUM_OF_FILTER_HEADER_ARGS] |
struct SlWlanRxFilterRuleHeaderArgs_t |
Data Fields | ||
---|---|---|
_u8 | Mask[16] | |
SlWlanRxFilterHeaderArg_u | Value |
struct SlWlanRxFilterRuleHeader_t |
Data Fields | ||
---|---|---|
SlWlanRxFilterRuleHeaderArgs_t | Args | |
SlWlanRxFilterRuleHeaderCompareFunction_t | CompareFunc | |
SlWlanRxFilterRuleHeaderField_t | Field | |
_u8 | Padding[2] |
struct SlWlanRxFilterRuleCombination_t |
union SlWlanRxFilterRule_u |
Data Fields | ||
---|---|---|
SlWlanRxFilterRuleCombination_t | Combination | |
SlWlanRxFilterRuleHeader_t | Header |
struct SlWlanRxFilterTrigger_t |
struct SlWlanRxFilterAction_t |
struct SlWlanRxFilterOperationCommandBuff_t |
struct SlWlanRxFilterUpdateArgsCommandBuff_t |
Data Fields | ||
---|---|---|
SlWlanRxFilterRuleHeaderArgs_t | Args | |
_u8 | BinaryOrAscii | |
_u8 | FilterId | |
_u8 | Padding[2] |
struct SlWlanRxFilterRetrieveStateBuff_t |
struct SlWlanRxFilterSysFiltersSetStateBuff_t |