Not able to send non-connectable advertising packets, bluetooth

jesseb
Posts: 29
Joined: Tue Jan 10, 2017 5:36 pm

Not able to send non-connectable advertising packets, bluetooth

Postby jesseb » Mon Feb 06, 2017 6:23 pm

I am not able to send non-connectable advertising packets with esp gap api. I would like some help in doing this. I'm trying send these non-advertisable packets after establishing a gatt connection. The packets send with the correct data but are labeled as ADV_IND not ADV_NONCONN_IND as I would expect. Does the normal bluetooth initialization for the gatt server set something that won't allow me to send non-connectable packets?

I initialize bluetooth as showed in the gatt server demo but I want to advertise non-connectable. I set the params as follows:

static esp_ble_adv_params_t adv_params = {
.adv_int_min = 0x20,
.adv_int_max = 0x20,
.adv_type = ADV_TYPE_NONCONN_IND,
.own_addr_type = BLE_ADDR_TYPE_PUBLIC,
//.peer_addr = peer_address,
//.peer_addr_type = BLE_ADDR_TYPE_PUBLIC,
.channel_map = ADV_CHNL_ALL,
.adv_filter_policy = ADV_FILTER_ALLOW_SCAN_ANY_CON_ANY,
};

Below is the code I use to set the advertising data. Advertising is started on the gap event ESP_GAP_BLE_ADV_DATA_SET_COMPLETE_EVT.

setAdvData(int length, uint8_t *data)
{
REQUIRE(length <= 20);

esp_ble_adv_data_t advData;

memset(&advData, 0, sizeof(esp_ble_adv_data_t));

advData.service_data_len = length;
advData.p_service_data = data;

esp_ble_gap_config_adv_data(&advData);
}

skateone
Posts: 7
Joined: Fri May 19, 2017 12:06 pm

Re: Not able to send non-connectable advertising packets, bluetooth

Postby skateone » Fri May 19, 2017 12:13 pm

Has anyone looked into this as i have a similar issue

Who is online

Users browsing this forum: atm_turbo, audris, Google [Bot] and 91 guests