The Breeze protocol provides a secure channel and services to connect to Alibaba Cloud IoT over a Bluetooth link. It also provides a Bluetooth-assisted network provisioning feature to obtain the access point (AP) SSID and password over a Bluetooth Low Energy (BLE) link. The basic software development kit (SDK) APIs are in breeze_export.h. The APIs for Bluetooth network provisioning are in breeze_awss_export.h.
breeze_start
Initializes and starts the Breeze SDK service.
Parameters
| Name | Type | Description |
| dev_conf | device_config | Information to initialize the Breeze SDK. This includes device information and callback functions. |
Return value
0: The call was successful. -1: The call failed.
breeze_end
Stops the Breeze service.
Parameters
None
Return value
0: The call was successful. -1: The call failed.
breeze_post
Pushes device status data to a mobile client using the BLE indicate method.
Parameters
| Name | Type | Description |
| buffer | uint8_t* | A pointer to the data. |
| length | uint32_t | The length of the data in bytes. |
Return value
0: The call was successful. Other values: The call failed.
breeze_post_fast
Similar to `breeze_post`, this interface pushes device status data to a mobile client, but uses the BLE notify method.
Parameters
| Name | Type | Description |
| buffer | uint8_t* | A pointer to the data. |
| length | uint32_t | The length of the data in bytes. |
Return value
0: The call was successful. Other values: The call failed.
breeze_post_ext
Reports data that contains a `cmd` field from the device to a mobile client.
Parameters
| Name | Type | Description |
| buffer | uint8_t* | A pointer to the data. |
| length | uint32_t | The length of the data in bytes. |
| cmd | uint8_t | The `cmd` type to push to the mobile client. |
Return value
0: The call was successful. Other values: The call failed.
breeze_append_adv_data
Adds custom user data to the broadcast content.
Parameters
| Name | Type | Description |
| buffer | uint8_t* | A pointer to the data. |
| length | uint32_t | The length of the data in bytes. |
Return value
None
breeze_restart_advertising
Restarts the Bluetooth broadcast from the SDK.
Parameters
None
Return value
None
breeze_awss_init
Initializes the Bluetooth network provisioning SDK. You should call this interface during the initialization phase of your business logic.
Parameters
| Name | Type | Description |
| cb | apinfo_ready_cb | A callback function that is invoked after the device gets the Wi-Fi information, such as the SSID and password. You must define and provide this function. The SDK calls it. |
| info | breeze_dev_info_t | Device information that you provide. This includes fields such as ProductID, Product Key, Product Secret, Device Name, and Device Secret. |
Return value
None
breeze_awss_end
Stops the Bluetooth network provisioning service.
Parameters
None
Return value
None