Hi.
My target device is nRF51822 and SDK version is 12.3.0.
I try to add Device Information Service to example "ble_app_uart_pca10028_s130"
---------- main.c (added code below)
#include "ble_dis.h"
static ble_uuid_t m_adv_uuids[] = {
{BLE_UUID_NUS_SERVICE, NUS_SERVICE_UUID_TYPE}
, {BLE_UUID_DEVICE_INFORMATION_SERVICE, BLE_UUID_TYPE_BLE}
};
static void services_init(void)
{
ble_dis_init_t dis_init;
memset(&dis_init, 0, sizeof(dis_init));
ble_srv_ascii_to_utf8(&dis_init.manufact_name_str, (char *)MANUFACTURER_NAME);
ble_srv_ascii_to_utf8(&dis_init.model_num_str , (char *)MODEL_NUMBER);
ble_srv_ascii_to_utf8(&dis_init.serial_num_str , (char *)SERIALNUMBER);
ble_srv_ascii_to_utf8(&dis_init.hw_rev_str , (char *)HW_REV);
ble_srv_ascii_to_utf8(&dis_init.fw_rev_str , (char *)FW_REV);
BLE_GAP_CONN_SEC_MODE_SET_OPEN(&dis_init.dis_attr_md.read_perm);
BLE_GAP_CONN_SEC_MODE_SET_NO_ACCESS(&dis_init.dis_attr_md.write_perm);
err_code = ble_dis_init(&dis_init);
APP_ERROR_CHECK(err_code);
}
-------- Project tree (added files)
/nRF_BLE_Service/ble_dis.c
After build and load, BLE advetiseing data shows Device Information Service exsting, but it does not works.
Nordic UART service (NUS) is works well.
Is there any other implemation or setting to activate DIS?
I know this isse https://devzone.nordicsemi.com/f/nordic-q-a/47105/working-principle-of-db-discovery-module
I already try to reset BLE On/Off of my iPhonem and nothig happen.