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

about BLE_HIDS_EVT_NOTIF_ENABLED

Hi Nordic team,

I have a simple HID BLE device which send volume+/- multimedia keys to a Android device, it works well if it is first time to pair with the Android device, but if I switch off Bluetooth in Android's setting menu and switch on again, the volume+/- keys no longer working.

I checked and debugged and found it is caused by the BLE device not getting the BLE_HIDS_EVT_NOTIF_ENABLED from the Android phone, so the HVX return code is 0x8 and failed. I also search the forum and found there's no way to enable the notify on peripheral side, I also found there're solutions is to call "sd_ble_gatts_sys_attr_set(m_conn_handle, NULL, 0, 0)", but I'm not sure where to put this function, I have tried that function in "BLE_GAP_EVT_CONNECTED", "BLE_GATTS_EVT_SYS_ATTR_MISSING" events but none of them works.

Any suggestion where am I doing wrong and how to fix this to enable the notify? Thanks very much..

added main.c here: main.c

Parents
  • Hi,

    I tried again with the unchanged ble_app_hids_keyboard example of SDK9.0(softdevice 8.0) with Android phone, this time i found if switch off the Bluetooth in Android phone's setting menu and switch on again, nordic_keyboard will automatically re-connect, but after re-connect, the "hello" string is no longer be sent. the return code of "send_key_scan_press_release" is 0x3401.

    it looks like the original example has this issue already and is there's a way to fix it? I will be very appreciated if i can get a solution.

    Thanks very much,

Reply
  • Hi,

    I tried again with the unchanged ble_app_hids_keyboard example of SDK9.0(softdevice 8.0) with Android phone, this time i found if switch off the Bluetooth in Android phone's setting menu and switch on again, nordic_keyboard will automatically re-connect, but after re-connect, the "hello" string is no longer be sent. the return code of "send_key_scan_press_release" is 0x3401.

    it looks like the original example has this issue already and is there's a way to fix it? I will be very appreciated if i can get a solution.

    Thanks very much,

Children
No Data
Related