Hi, I'm working on a project using s112_nrf52_7.2.0 in nRF52820.
Services are set in initialization function as shown below. However, only PnP id is not set in DIS, and is read as shown in figure below.
I want to find a solution.
Thanks.
static void services_init(void)
{
ret_code_t err_code;
ble_gls_init_t gls_init;
ble_dis_init_t dis_init;
ble_bas_init_t bas_init;
ble_dis_pnp_id_t pnp_id;
nrf_ble_qwr_init_t qwr_init = {0};
// Initialize Queued Write Module.
qwr_init.error_handler = nrf_qwr_error_handler;
err_code = nrf_ble_qwr_init(&m_qwr, &qwr_init);
APP_ERROR_CHECK(err_code);
// Initialize Glucose Service - sample selection of feature bits.
memset(&gls_init, 0, sizeof(gls_init));
gls_init.evt_handler = NULL;
gls_init.p_gatt_queue = &m_ble_gatt_queue;
gls_init.error_handler = service_error_handler;
gls_init.feature = 0;
gls_init.feature |= BLE_GLS_FEATURE_RES_HIGH_LOW;
gls_init.feature |= BLE_GLS_FEATURE_LOW_BATT;
gls_init.feature |= BLE_GLS_FEATURE_TEMP_HIGH_LOW;
gls_init.feature |= BLE_GLS_FEATURE_GENERAL_FAULT;
gls_init.is_context_supported = true;
// Here the sec level for the Glucose Service can be changed/increased.
gls_init.gl_meas_cccd_wr_sec = SEC_MITM;
gls_init.gl_feature_rd_sec = SEC_MITM;
gls_init.racp_cccd_wr_sec = SEC_MITM;
gls_init.racp_wr_sec = SEC_MITM;
err_code = ble_gls_init(&m_gls, &gls_init);
APP_ERROR_CHECK(err_code);
// Initialize Battery Service.
memset(&bas_init, 0, sizeof(bas_init));
// Here the sec level for the Battery Service can be changed/increased.
bas_init.bl_rd_sec = SEC_OPEN;
bas_init.bl_cccd_wr_sec = SEC_OPEN;
bas_init.bl_report_rd_sec = SEC_OPEN;
bas_init.evt_handler = NULL;
bas_init.support_notification = true;
bas_init.p_report_ref = NULL;
gvUtl_GetBatteryLevel(&(bas_init.initial_batt_level));
err_code = ble_bas_init(&m_bas, &bas_init);
APP_ERROR_CHECK(err_code);
// Initialize Device Information Service.
memset(&dis_init, 0, sizeof(dis_init));
pnp_id.vendor_id_source = BLE_DIS_VENDOR_ID_SRC_USB_IMPL_FORUM;
pnp_id.vendor_id = 0x01;
pnp_id.product_id = 0x01;
pnp_id.product_version = 0x01;
dis_init.p_pnp_id = &pnp_id;
ble_srv_ascii_to_utf8(&dis_init.manufact_name_str, MANUFACTURER_NAME);
dis_init.dis_char_rd_sec = SEC_OPEN;
err_code = ble_dis_init(&dis_init);
APP_ERROR_CHECK(err_code);
}