Synergy Software Package User's Manual

RTOS-integrated WiFi Framework example. Implementation of Atheros WiFi Driver. It implements the following interfaces: More...

Data Structures

struct  sf_wifi_on_gt202_cfg_t
 

Macros

#define SF_WIFI_GT202_CODE_VERSION_MAJOR   (2U)
 
#define SF_WIFI_GT202_CODE_VERSION_MINOR   (0U)
 

Functions

ssp_err_t SF_WIFI_GT202_Open (sf_wifi_ctrl_t *p_ctrl, sf_wifi_cfg_t const *const p_cfg)
 Initialize WiFi module. More...
 
ssp_err_t SF_WIFI_GT202_Close (sf_wifi_ctrl_t *const p_ctrl)
 Stop WiFi module functionality. More...
 
ssp_err_t SF_WIFI_GT202_ProvisioningSet (sf_wifi_ctrl_t *const p_ctrl, sf_wifi_provisioning_t const *const p_wifi_provisioning)
 Provisions the WiFi module. More...
 
ssp_err_t SF_WIFI_GT202_ProvisioningGet (sf_wifi_ctrl_t *const p_ctrl, sf_wifi_provisioning_t *const p_wifi_provisioning)
 Reads the current WiFi Provisioning information of the WiFi module. More...
 
ssp_err_t SF_WIFI_GT202_MulticastListAdd (sf_wifi_ctrl_t *const p_ctrl, uint8_t const *const p_mac_addr)
 Add MAC address in multicast list. More...
 
ssp_err_t SF_WIFI_GT202_MulticastListDelete (sf_wifi_ctrl_t *const p_ctrl, uint8_t const *const p_mac_addr)
 Delete MAC address from multicast list. More...
 
ssp_err_t SF_WIFI_GT202_StatisticsGet (sf_wifi_ctrl_t *const p_ctrl, sf_wifi_stats_t *const p_wifi_device_stats)
 Get the interface statistics. More...
 
ssp_err_t SF_WIFI_GT202_Transmit (sf_wifi_ctrl_t *const p_ctrl, uint8_t *const p_buf, uint32_t length)
 Transmit data packets. More...
 
ssp_err_t SF_WIFI_GT202_InfoGet (sf_wifi_ctrl_t *const p_ctrl, sf_wifi_info_t *const p_wifi_info)
 Get WiFi module information. More...
 
ssp_err_t SF_WIFI_GT202_Scan (sf_wifi_ctrl_t *const p_ctrl, sf_wifi_scan_t *const p_scan, uint8_t *const p_cnt)
 Scans for available APs. More...
 
ssp_err_t SF_WIFI_GT202_ACLAdd (sf_wifi_ctrl_t *const p_ctrl, uint8_t const *const p_mac)
 Add MAC address from Access control list. More...
 
ssp_err_t SF_WIFI_GT202_ACLDelete (sf_wifi_ctrl_t *const p_ctrl, uint8_t const *const p_mac)
 Delete MAC address from Access control list. More...
 
ssp_err_t SF_WIFI_GT202_MACAddressSet (sf_wifi_ctrl_t *const p_ctrl, uint8_t const *const p_mac)
 Set MAC address of WiFi module. More...
 
ssp_err_t SF_WIFI_GT202_MACAddressGet (sf_wifi_ctrl_t *const p_ctrl, uint8_t *const p_mac)
 Get MAC address of WiFi module. More...
 
ssp_err_t SF_WIFI_GT202_WpsStart (sf_wifi_ctrl_t *const p_ctrl, sf_wifi_wps_t const *const p_wps)
 Start WiFi WPS. More...
 
ssp_err_t SF_WIFI_GT202_VersionGet (ssp_version_t *const p_version)
 Set driver version based on compile time macros. Implements sf_wifi_api_t::versionGet. More...
 

Detailed Description

RTOS-integrated WiFi Framework example. Implementation of Atheros WiFi Driver. It implements the following interfaces:

Macro Definition Documentation

◆ SF_WIFI_GT202_CODE_VERSION_MAJOR

#define SF_WIFI_GT202_CODE_VERSION_MAJOR   (2U)

WiFi Interface. Major Version of code that implements the API defined in this file

◆ SF_WIFI_GT202_CODE_VERSION_MINOR

#define SF_WIFI_GT202_CODE_VERSION_MINOR   (0U)

Minor Version of code that implements the API defined in this file

Function Documentation

◆ SF_WIFI_GT202_ACLAdd()

ssp_err_t SF_WIFI_GT202_ACLAdd ( sf_wifi_ctrl_t *const  p_ctrl,
uint8_t const *const  p_mac 
)

Add MAC address from Access control list.

Implements sf_wifi_api_t::ACLAdd Add specified mac address in access control list

Return values
SSP_ERR_UNSUPPORTEDFunctionality is not supported.

◆ SF_WIFI_GT202_ACLDelete()

ssp_err_t SF_WIFI_GT202_ACLDelete ( sf_wifi_ctrl_t *const  p_ctrl,
uint8_t const *const  p_mac 
)

Delete MAC address from Access control list.

Implements sf_wifi_api_t::ACLDelete Delete specified mac address from access control list

Return values
SSP_ERR_UNSUPPORTEDFunctionality is not supported.

◆ SF_WIFI_GT202_Close()

ssp_err_t SF_WIFI_GT202_Close ( sf_wifi_ctrl_t *const  p_ctrl)

Stop WiFi module functionality.

Implements sf_wifi_api_t::close This function performs the following tasks: Update global variables for future use. Disable the Interrupt and suspend the driver task thread.

Return values
SSP_SUCCESSSuspend the driver functionality.
SSP_ERR_NOT_OPENDevice is not opened.
SSP_ERR_ASSERTIONArgument NULL is passed
SSP_ERR_IN_USEModule in use
SSP_ERR_WIFI_FAILEDFailed to close

Dis-associate or Stop Access Point

Stop WiFi Driver

Delete byte pool used by WiFi driver

Terminate and Delete WiFi Driver task thread

Set init done flag to false and driver handle to NULL

◆ SF_WIFI_GT202_InfoGet()

ssp_err_t SF_WIFI_GT202_InfoGet ( sf_wifi_ctrl_t *const  p_ctrl,
sf_wifi_info_t *const  p_wifi_info 
)

Get WiFi module information.

Implements sf_wifi_api_t::infoGet Get WiFi module information like chipset/driver information, RSSI, noise level, link quality

Return values
SSP_SUCCESSSuccessfully get the WiFi information
SSP_ERR_NOT_OPENDriver not opened.
SSP_ERR_ASSERTIONArgument NULL is passed
SSP_ERR_WIFI_FAILEDFailed reading WiFi information
SSP_ERR_IN_USEModule in use

◆ SF_WIFI_GT202_MACAddressGet()

ssp_err_t SF_WIFI_GT202_MACAddressGet ( sf_wifi_ctrl_t *const  p_ctrl,
uint8_t *const  p_mac 
)

Get MAC address of WiFi module.

Implements sf_wifi_api_t::getMACAddress Read configured MAC address of the WiFi module.

Return values
SSP_SUCCESSSuccessfully reads the mac address.
SSP_ERR_WIFI_FAILEDFailed to read mac address
SSP_ERR_NOT_OPENDriver not opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONArgument NULL is passed

Driver param structure for ioctl

◆ SF_WIFI_GT202_MACAddressSet()

ssp_err_t SF_WIFI_GT202_MACAddressSet ( sf_wifi_ctrl_t *const  p_ctrl,
uint8_t const *const  p_mac 
)

Set MAC address of WiFi module.

Implements sf_wifi_api_t::setMACAddress Configure MAC address of the WiFi module.

Return values
SSP_ERR_UNSUPPORTEDFunctionality is not supported.

◆ SF_WIFI_GT202_MulticastListAdd()

ssp_err_t SF_WIFI_GT202_MulticastListAdd ( sf_wifi_ctrl_t *const  p_ctrl,
uint8_t const *const  p_mac_addr 
)

Add MAC address in multicast list.

Implements sf_wifi_api_t::multicastListAdd Adds specified MAC address in Multicast list

Return values
SSP_ERR_UNSUPPORTEDFunctionality is not supported by WiFi module

◆ SF_WIFI_GT202_MulticastListDelete()

ssp_err_t SF_WIFI_GT202_MulticastListDelete ( sf_wifi_ctrl_t *const  p_ctrl,
uint8_t const *const  p_mac_addr 
)

Delete MAC address from multicast list.

Implements sf_wifi_api_t::multicastListDelete Deletes specified MAC Address from Multicast list

Return values
SSP_ERR_UNSUPPORTEDFunctionality is not supported.

◆ SF_WIFI_GT202_Open()

ssp_err_t SF_WIFI_GT202_Open ( sf_wifi_ctrl_t p_ctrl,
sf_wifi_cfg_t const *const  p_cfg 
)

Initialize WiFi module.

Implements sf_wifi_api_t::open This function performs the following tasks: Initializes WiFi module and Configure the parameters as per the p_cfg Update global variables for future use.

Return values
SSP_SUCCESSModule initialization successful
SSP_ERR_ALREADY_OPENWiFi module is already opened
SSP_ERR_WIFI_CONFIG_FAILEDWiFi module Configuration failed
SSP_ERR_WIFI_INIT_FAILEDWiFi module initialization failed
SSP_ERR_ASSERTIONArgument NULL is passed
SSP_ERR_IN_USEModule in use
SSP_ERR_WIFI_FAILEDFailed to initialize
SSP_ERR_UNSUPPORTEDUnsupported Parameter configuration
SSP_ERR_INTERNALExtended Configuration is NULL

◆ SF_WIFI_GT202_ProvisioningGet()

ssp_err_t SF_WIFI_GT202_ProvisioningGet ( sf_wifi_ctrl_t *const  p_ctrl,
sf_wifi_provisioning_t *const  p_wifi_provisioning 
)

Reads the current WiFi Provisioning information of the WiFi module.

Implements sf_wifi_api_t::provisioningGet Reads the provisioning information

Return values
SSP_SUCCESSSuccessfully reads provisioning information
SSP_ERR_NOT_OPENDevice is not opened
SSP_ERR_WIFI_FAILEDFailed to get provisioning information
SSP_ERR_ASSERTIONArgument NULL is passed

◆ SF_WIFI_GT202_ProvisioningSet()

ssp_err_t SF_WIFI_GT202_ProvisioningSet ( sf_wifi_ctrl_t *const  p_ctrl,
sf_wifi_provisioning_t const *const  p_wifi_provisioning 
)

Provisions the WiFi module.

Implements sf_wifi_api_t::provisioningSet This function performs the following tasks: Provisions the WiFi driver. Start WiFi interface in AP or Client mode as provisioned.

Return values
SSP_SUCCESSSuccessfully provisioned the driver.
SSP_ERR_ASSERTIONArgument NULL is passed
SSP_ERR_NOT_OPENDevice is not opened
SSP_ERR_WIFI_FAILEDFailed to set provisioning configuration.
SSP_ERR_INVALID_SIZEInvalid length of security key
SSP_ERR_INVALID_ARGUMENTInvalid encryption type for given security
SSP_ERR_IN_USEModule in use

if is_opened

◆ SF_WIFI_GT202_Scan()

ssp_err_t SF_WIFI_GT202_Scan ( sf_wifi_ctrl_t *const  p_ctrl,
sf_wifi_scan_t *const  p_scan,
uint8_t *const  p_cnt 
)

Scans for available APs.

Implements sf_wifi_api_t::scan Scan for available AP's SSID and return the list to caller.

Return values
SSP_SUCCESSSuccessfully scan the network for available APs
SSP_ERR_NOT_OPENDriver not opened
SSP_ERR_WIFI_FAILEDFailed to scan
SSP_ERR_ASSERTIONArgument NULL is passed
SSP_ERR_IN_USEModule in use

◆ SF_WIFI_GT202_StatisticsGet()

ssp_err_t SF_WIFI_GT202_StatisticsGet ( sf_wifi_ctrl_t *const  p_ctrl,
sf_wifi_stats_t *const  p_wifi_device_stats 
)

Get the interface statistics.

Implements sf_wifi_api_t::statisticsGet Collect the statistics information of WiFi interface

Return values
SSP_SUCCESSSuccessfully get the Statistics information.
SSP_ERR_UNSUPPORTEDFunctionality is not supported.
SSP_ERR_NOT_OPENDevice not opened
SSP_ERR_ASSERTIONArgument NULL is passed
SSP_ERR_IN_USEModule in use
SSP_ERR_WIFI_FAILEDFailed reading WiFi statistics

Statistics are not available in case of On chip Stack

◆ SF_WIFI_GT202_Transmit()

ssp_err_t SF_WIFI_GT202_Transmit ( sf_wifi_ctrl_t *const  p_ctrl,
uint8_t *const  p_buf,
uint32_t  length 
)

Transmit data packets.

Implements sf_wifi_api_t::transmit Adds packets in transmit Queue.

Return values
SSP_SUCCESSSuccessfully added the packet in transmit queue
SSP_ERR_NOT_OPENWiFi driver is not opened
SSP_ERR_OUT_OF_MEMORYMemory allocation failed
SSP_ERR_WIFI_TRANSMIT_FAILEDTransmission failed
SSP_ERR_ASSERTIONArgument NULL is passed
SSP_ERR_IN_USEModule in use
SSP_ERR_WIFI_FAILEDFailed to transmit
SSP_ERR_UNSUPPORTEDWhen using On-Chip stack

Transmit function will be used only when using NSAL

◆ SF_WIFI_GT202_VersionGet()

ssp_err_t SF_WIFI_GT202_VersionGet ( ssp_version_t *const  p_version)

Set driver version based on compile time macros. Implements sf_wifi_api_t::versionGet.

Return values
SSP_SUCCESSSuccessful close.
SSP_ERR_ASSERTIONThe parameter p_version is NULL.

◆ SF_WIFI_GT202_WpsStart()

ssp_err_t SF_WIFI_GT202_WpsStart ( sf_wifi_ctrl_t *const  p_ctrl,
sf_wifi_wps_t const *const  p_wps 
)

Start WiFi WPS.

Implements sf_wifi_api_t::wpsStart Start WPS to connect device.

Return values
SSP_SUCCESSWPS started Successfully and device is able to connect
SSP_ERR_INTERNALInternal error
SSP_ERR_WIFI_FAILEDFailed to connect WiFi module using WPS method
SSP_ERR_NOT_OPENDriver not opened
SSP_ERR_IN_USEModule in use
SSP_ERR_ASSERTIONArgument NULL is passed
SSP_ERR_INVALID_ARGUMENTInvalid input parameters
SSP_ERR_WIFI_WPS_MULTIPLE_PB_SESSIONSAnother Push button session is already in progress
SSP_ERR_TIMEOUTWPS Timer expired
SSP_ERR_WIFI_WPS_M2D_RECEIVEDM2D Error code received which means Registrar is unable to authenticate with the Enrollee
SSP_ERR_WIFI_WPS_AUTHENTICATION_FAILEDWPS authentication failed
SSP_ERR_WIFI_WPS_CANCELLEDWPS Request was not accepted by underlying driver
SSP_ERR_WIFI_WPS_INVALID_PINInvalid WPS Pin