This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

CODED PHY using the BLE Advertising module - INVALID PARAMS

Hi! I'm using S140 and I'm using the ble_advertising module to set up advertising.

This is my advertising_init function which is working properly until I uncomment the enabling of the extended advertising. When executing advertising_start, an INVALID_PARAMS error gets thrown in the sd_ble_gap_adv_set_configure function which by the docs points at an invalid adv_params or adv_data. I've verified through the debugger that in adv_params passed into this function, properties->type is set to 0x06 (BLE_GAP_ADV_TYPE_EXTENDED_CONNECTABLE_NONSCANNABLE_UNDIRECTED).

On first glance it looks a lot like https://devzone.nordicsemi.com/f/nordic-q-a/34543/ble-long-range but seeing how in my case the type is set correctly, I'm at a bit of an ends on how to proceed. I can't seem to step further into the functions to see what part of my adv_params or adv_data is invalid. 

Fullscreen
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
/**@brief Function for initializing the Advertising functionality.
*/
static void advertising_init(uint16_t interval_ms)
{
ret_code_t err_code;
ble_advertising_init_t init;
memset(&init, 0, sizeof(init));
NRF_LOG_INFO("Initializing advertising with interval %d", interval_ms);
init.advdata = get_prox_advdata();
init.srdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
init.srdata.uuids_complete.p_uuids = m_adv_uuids;
init.config.ble_adv_fast_enabled = true;
init.config.ble_adv_fast_interval = MSEC_TO_UNITS(interval_ms, UNIT_0_625_MS);
init.config.ble_adv_fast_timeout = 0; //Set advertising to permanent
//init.config.ble_adv_extended_enabled = true;
//init.config.ble_adv_primary_phy = BLE_GAP_PHY_CODED;
//init.config.ble_adv_secondary_phy = BLE_GAP_PHY_CODED;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX