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

PC-BLE-DRIVER turns on notification

I'm using pc-ble-driver(C program) to get the data from other device, I can get character now, but I don't know how to turn on the character's notification like the start key in nrf connect ,is there any api to turn on it?

   

Parents
  • Hi

    Error code 0x103 means that the write operation is not permitted. You'll need to set all the permissions that are needed in order to write there. Please check that the following permissions are set:

    char_md.char_props.read = 1;
    char_md.char_props.write = 1;

    and

    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm);
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm);

    You can also check out this BLE characteristic guide for more info on how to set up custom characteristics.

    Best regards,

    Simon

Reply
  • Hi

    Error code 0x103 means that the write operation is not permitted. You'll need to set all the permissions that are needed in order to write there. Please check that the following permissions are set:

    char_md.char_props.read = 1;
    char_md.char_props.write = 1;

    and

    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.read_perm);
    BLE_GAP_CONN_SEC_MODE_SET_OPEN(&attr_md.write_perm);

    You can also check out this BLE characteristic guide for more info on how to set up custom characteristics.

    Best regards,

    Simon

Children
Related