Phone's screen can't be used keyboard when phone connects to HID device

Dear Nordic Engineers

Our customer use NRF52840 make a electronic lock.They would like to use HID to unlock bike when phone connects to the lock.

They are base on ble_keyboard samples.

In the program they set 

err_code = sd_ble_gap_appearance_set(BLE_APPEARANCE_GENERIC_HID);

But on some Android phones,when the phone connects the lock, keyboards of the phone can't be used.

So can you pls give me some good suggestion about this problem?

  • Hi,

    If the device is a HID keyboard device, or otherwise appears as a keyboard, then it is reasonable for the phone to remove the on-screen keyboard. Since you have connected a physical keyboard, it would be logical to use that connected device for keyboard instead of the on-screen keyboard.

    If a lock appears as a keyboard for a phone, then they are most likely on the wrong track and should reconsider the overall architecture of their solution. They should use a different method for communicating from the lock to the phone. For that they should not use the HID keyboard on the lock. Instead they should either create a completely new custom BLE Service with characteristics for communicating between lock and phone, or base it off of the Nordic UART Service, or find a different suitable BLE Service that fits their need.

    Regards,
    Terje

Related