Hi, I've tried to set BLE power to max but an app error is raised when I use the sd_ble_gap_tx_power_set function. Parameters should be wrong but as far as I've read over the documentation and forum, they should be good.
To advertising code is
void advertising_init(void)
{
__IO uint32_t err_code;
ble_advertising_init_t init;
memset(&init, 0, sizeof(init));
init.advdata.name_type = BLE_ADVDATA_FULL_NAME;
init.advdata.include_appearance = false;
init.advdata.flags = BLE_GAP_ADV_FLAGS_LE_ONLY_GENERAL_DISC_MODE;
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_whitelist_enabled = false;
//init.config.ble_adv_primary_phy = BLE_GAP_PHY_2MBPS;
init.config.ble_adv_fast_enabled = true;
init.config.ble_adv_fast_interval = APP_ADV_INTERVAL;
init.config.ble_adv_fast_timeout = APP_ADV_DURATION;
init.config.ble_adv_slow_enabled = true;
init.config.ble_adv_slow_interval = APP_ADV_INTERVAL;
init.config.ble_adv_slow_timeout = 0;
init.evt_handler = on_adv_evt;
err_code = ble_advertising_init(&m_advertising, &init);
APP_ERROR_CHECK(err_code);
sd_ble_gap_tx_power_set( BLE_GAP_TX_POWER_ROLE_ADV,m_advertising.adv_handle,4);
ble_advertising_conn_cfg_tag_set(&m_advertising, APP_BLE_CONN_CFG_TAG);
}