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

Device Information Service not correctly recognized

Hi, i'm working on nRF51422 and i'm trying to do a simple BLE object that advertise his name and his services and is connectable by the others.

Advertising and connecting parts are OK, because i'm using an SDK example as base, but when i try to register a "custom" service (i want to implement the Device Information service with Manufacturer Name characteristic) my nRF Control Center app on Android see it as "Unknown Service".

Here is the code i'm using: http://pastebin.com/cqDxQipP

Thank you and regards.

Parents
  • Hi salvatore,

    You should add the ble_dis service provided by Nordic in their SDK. You fill in the necessary information you want and then call the init function.

    EX:

    ble_dis_init_t dis_init;
    
    ble_srv_ascii_to_utf8(&dis_init.manufact_name_str, "MyDev");
    
    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);
    

    HTH,

    Eric

Reply
  • Hi salvatore,

    You should add the ble_dis service provided by Nordic in their SDK. You fill in the necessary information you want and then call the init function.

    EX:

    ble_dis_init_t dis_init;
    
    ble_srv_ascii_to_utf8(&dis_init.manufact_name_str, "MyDev");
    
    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);
    

    HTH,

    Eric

Children
No Data
Related