Hello,
I am using nRF 52840 DK board and using nRF52SDK17.0.2. I am trying to advertise data in GAP with the name "IG_Last4CharMAC_RFL" for example "IG_4DA8_RFL" but whenever I increase below obj.data.size =2; to obj.data.size =12; it is getting increased, but advertise name is getting a crop and looks like "IG_". I have tried to find an advertising buffer in sdk_config.h file but I did not find anything related to it. What shall I do to avoid this issue?
ret_code_t err_code;
ble_advertising_init_t init;
ble_advdata_service_data_t obj;
obj.service_uuid = BLE_UUID_TX_POWER_SERVICE;
obj.data.p_data = sensorData;
obj.data.size =12;
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; //displayed in raw as type 0x01
init.advdata.uuids_complete.uuid_cnt = sizeof(m_adv_uuids) / sizeof(m_adv_uuids[0]);
init.advdata.uuids_complete.p_uuids = m_adv_uuids;
// init.advdata.p_manuf_specific_data = 0xFF;
init.advdata.p_tx_power_level = &BT_TX_POWER;
init.advdata.p_service_data_array =&obj;
init.advdata.service_data_count=1;
//init.config.ble_adv_primary_phy = BLE_GAP_PHY_1MBPS;
//init.config.ble_adv_secondary_phy = BLE_GAP_PHY_2MBPS;
//init.config.ble_adv_extended_enabled = true;
//init.config.ble_adv_directed_high_duty_enabled = true;
init.config.ble_adv_fast_enabled = true;
init.config.ble_adv_fast_interval = BT_GAP_INT_MAX;
init.config.ble_adv_slow_interval = BT_GAP_INT_MIN;
init.config.ble_adv_fast_timeout = APP_ADV_DURATION;
init.config.ble_adv_slow_timeout = APP_ADV_DURATION;
// init.evt_handler = on_adv_evt;
err_code = ble_advertising_init(&m_advertising, &init);
// APP_ERROR_CHECK(err_code);
NRF_LOG_INFO("ble_advertising_init %d",err_code);
sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, m_advertising.adv_handle, BT_TX_POWER);
ble_advertising_conn_cfg_tag_set(&m_advertising, APP_BLE_CONN_CFG_TAG);
NRF_LOG_INFO("advertising_init done.");
I am attaching my sdk_config.h file. Please have a look and let me know or is there an alternate solution to this?
Please help. Thanks in advance.
Thanks and regards,
Neeraj Dhekale