What is the proper way to deinit BluFi(want to release memory and resource after connect to WiFi)
Posted: Thu Oct 26, 2017 4:00 pm
Dears,
I'm trying to use BluFi to implement the WiFi connection, which is a great way to do it.
However, when Bluetooth and WiFi coexist, it takes too much resource and the WiFi somehow keep disconnect after few seconds.
So I want to deinitialize the BluFi after connecting the WiFi successfully.
I saw the call back, but didn't see the API for call deinit manually.
Can anyone help me to do it?
Thanks in advance,
Victor
I'm trying to use BluFi to implement the WiFi connection, which is a great way to do it.
However, when Bluetooth and WiFi coexist, it takes too much resource and the WiFi somehow keep disconnect after few seconds.
So I want to deinitialize the BluFi after connecting the WiFi successfully.
I saw the call back, but didn't see the API for call deinit manually.
Code: Select all
static void example_event_callback(esp_blufi_cb_event_t event, esp_blufi_cb_param_t *param)
{
/* actually, should post to blufi_task handle the procedure,
* now, as a example, we do it more simply */
switch (event) {
case ESP_BLUFI_EVENT_INIT_FINISH:
BLUFI_INFO("BLUFI init finish\n");
esp_ble_gap_set_device_name(BLUFI_DEVICE_NAME);
esp_ble_gap_config_adv_data(&example_adv_data);
break;
case ESP_BLUFI_EVENT_DEINIT_FINISH:
BLUFI_INFO("BLUFI deinit finish\n");
break;
Thanks in advance,
Victor