a2dp + wifi ap mode at the same time is not work

VietPham
Posts: 1
Joined: Thu Oct 26, 2017 3:47 am

a2dp + wifi ap mode at the same time is not work

Postby VietPham » Thu Oct 26, 2017 5:06 am

hi all
i want to run a2dp and wifi ap mode at the same time but it's not work.
this is a step by step i do that:
+ use a2dp_sink examble code
+ in menuconfig, enable "Software controls WiFi/Bluetooth coexistence"
+ in menuconfig, use partitions.csv and change size to 2M (1M is not enough)
+ in app_main(), add initialise_wifi() to last line of this function.

Code: Select all

static void initialise_wifi(void)
{
    tcpip_adapter_init();
    wifi_event_group = xEventGroupCreate();
    ESP_ERROR_CHECK( esp_event_loop_init(event_handler, NULL) );
    wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
    ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
    ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) );
    wifi_config_t wifi_config = {
        .ap = {
            .ssid = "VIETTEST",
            .password = "12345678",
            .authmode = WIFI_AUTH_WPA2_PSK,
            .channel = 5,
            .max_connection = 4,
            .ssid_len = strlen("VIETTEST"),
            .beacon_interval = 100,
            .ssid_hidden = 0,
        },
    };
    ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_AP));
    ESP_ERROR_CHECK(esp_wifi_set_config(ESP_IF_WIFI_AP, &wifi_config));
    ESP_ERROR_CHECK(esp_wifi_start());
}
when i play music via bluetooth first, so hard to scan and connect wifi (so easy if i connect wifi first).
anyone help me :( :( :( :(

sdk version:
"commit de750e99214a51c1bcfdb42b5ada931652a3c531 (HEAD -> master, origin/master, origin/HEAD)
Merge: 08b756b6 5795ccc8
Author: Angus Gratton <angus@espressif.com>
Date: Fri Oct 6 13:14:51 2017 +0800"


Who is online

Users browsing this forum: Baidu [Spider] and 86 guests