FreeRTOS:
BLE
BLE
|
Return to main page ↑ |
Connects to one of the saved networks in priority order.
Example usage of this API to connect to provisioned networks in priority order:
uint32_t numNetworks = IotBleWifiProv_GetNumNetworks(); //Gets the number of provisioned networks uint16_t priority; TickType_t xNetworkConnectionDelay = pdMS_TO_TICKS( 1000 ); //1 Second delay
for( priority = 0; priority < numNetworks; priority++ ) //Priority is always in descending order/0 being highest priority. { bool ret = IotBleWifiProv_Connect( priority );
if( ret == true ) { break; }
vTaskDelay( xNetworkConnectionDelay ); }