BLEWifiConfigService Class

BLEWifiConfigService Class

Description
A class used for managing a BLE WiFi configuration service running on the device.

Syntax
class BLEWifiConfigService

Members

Public Constructors
BLEWifiConfigService::BLEWifiConfigServiceOnly one instance of this class should be created
Public Methods 
BLEWifiConfigService::beginStart background thread to process WiFi configuration commands
BLEWifiConfigService::endStop background thread processing WiFi configuration commands
BLEWifiConfigService::addServiceAdd the service to the BLE stack
BLEWifiConfigService::advDataGet advertising data correctly formatted for WiFi configuration service

BLEWifiConfigService::BLEWifiConfigService

Description
Create an instance of the BLEWifiConfigService object.

Syntax
void BLEWifiConfigService ();

Parameters
The function requires no input parameter.

Returns
The function returns nothing.

Example Code
Example: BLEWifiConfig

Notes and Warnings
Only one instance of this class / service should be created.
 

BLEWifiConfigService::begin

Description
Start background thread to process WiFi configuration commands.

Syntax
void begin();

Parameters
The function requires no input parameter.

Returns
The function returns nothing.

Example Code
Example: BLEWifiConfig

Notes and Warnings
NA
 

BLEWifiConfigService::end

Description
Stop background thread processing WiFi configuration commands.

Syntax
void end();

Parameters
The function requires no input parameter.

Returns
The function returns nothing.

Example Code
NA

Notes and Warnings
NA
 

BLEWifiConfigService::addService

Description
Add the WiFi configuration service to the BLE stack.

Syntax
void addService();

Parameters
The function requires no input parameter.

Returns
The function returns nothing.

Example Code
Example: BLEWifiConfig

Notes and Warnings
NA
 

BLEWifiConfigService::advData

Description
Get advertising data correctly formatted for WiFi configuration service.

Syntax
BLEAdvertData advData();

Parameters
The function requires no input parameter.

Returns
The function returns a BLEAdvertData object that contains the required advertising data fields for the WiFi configuration service to work.

Example Code
Example: BLEWifiConfig

Notes and Warnings
The advertisement data needs to be correctly formatted for the corresponding smartphone app to recognise the device. WiFi configuration service advertisement data requires the local BT address, and should be called only after peripheral mode is started and may also require stopping and restarting the advertising process.
 

Copyrights ©瑞晟微电子(苏州)有限公司 2021. All rights reserved.
請先確認已安裝QQ通訊軟體