Error on modyfying hid_ble report after ble_disable

Hello

I am developping a HID BLE device with a nRF52840. Seems my device can emulate AZERTY and QWERTY keyboard I am trying to use the bcountrycode in the hid descriptor to let the central know I am from France or United State so the smartphone put a suitable default keyboard.

So I would like to be able to change the hid_ble descriptor after the bluetooth has been enable. I tried to : disable the bluetooth, modyfy my descriptor and start bt again, but I have errors.

Here is my code

I tried with and without the delay

And my LOGs : 

I tried to do this disable/enable when I am connected and after the reconnection, when I send something in HID the device crash.

Is there any better way to change the hid_ble report dynamicaly ?

Best regards

Thibaud

Parents Reply Children
  • Hello

    Sorry for the late reply I did not get the reply notification.

    See this thread, which discusses a similar issue.

    For now, i will let my hid descriptor  static and maybe one day I will try to test somethign with the "Service Changed Characteristic".

    An other point is, I tried to froce AZERTY keyboard on smartphone by putting b_countrycode = 8 but android phones are still putting QWERTY keyboard by default, I need to change physical keyboard to French then go back to default to make my "default" physical keyboard to AZERTY. Am I missing something on top of b_countrycode here ?

    Kind regards
    Thibaud

Related