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

The Bluetooth keyboard sample does not work in an IOS 14.3 environment.

The Bluetooth keyboard sample does not work in an ipad(IOS 14.3)

The development board I used was nrf52840dk_nrf52840 (PCA10056).

I built nRF Connect SDK v1.4.2 through SEGGER Embedded Studio in desktop.


The sources are as follows:
( github.com/.../main.c)
Pairing works well in window10 (Desktop) android (galaxy20) environments, and "hello" messages are sent well when the switch button is pressed.
However, the pairing was successful in the ipad (IOS) environment, but the data failed to transmit.
And if the device is disconnected, pairing on other devices is not possible.

Why doesn't it work normally in IOS?

What else should I do?

I'd really appreciate it if you could answer.

Parents
  • Hello!

    Can you try to add the following to your prj.conf: 

    CONFIG_BT_GATT_HIDS_DEFAULT_PERM_RW_ENCRYPT=y

    This is a known issue in NCS. You can read more about it in this thread.

    Best regards,
    Carl Richard

  • CONFIG_BT_GATT_HIDS_DEFAULT_PERM_RW_ENCRYPT=y

    (changed to CONFIG_BT_HIDS_DEFAULT_PERM_ENCRYPT) is already set.
    I read the article you sent me, but there is still a problem with data transmission.
    Connection between devices is not a problem, but there seems to be a problem with data transfer.
    I tested it with ipad (4th generation) and iphone 11pro, but both devices had problems.

  • Hi!

    Found the issue! Set the defines INPUT_REP_KEYS_REF_ID and OUTPUT_REP_KEYS_REF_ID to 0 (they are set to 1 in the original sample). This should enable the application to work well with iOS device.

    You can remove the change I purposed earlier. It is erroneous.

    Edit: note that this fix will not work for other HID devices like mouse or custom reports.

    Best regards,
    Carl Richard

  • When I changed INPUT_REP_KEYS_REF_ID and OUTPUT_REP_KEYS_REF_ID to 0, I found that iPhone 11pro works well!
    I don't have an ipad right now, so I'll check the operation next week.
    Thank you!

  • I have one more question.
    After the first connection with the nrf52840dk_nrf52840 and other devices, we checked the behavior of the "hello" character transfer.

    1. First-time connection :

    2. Verify Desktop Connection

    3. Verify desktop (window10) behavior

    4. Resetting power to the board will confirm the paired status

    5. The paired device is connected by pressing the start advertising button (button4)

    6. Press the "hello" message send button(button1), but it is not sent to Notepad and the following error message occurs:

    Once the advertising button is pressed, the paired device is automatically connected, but there is no change in the value of the battery and does not send a "hello" message.
    Disconnecting and reconnecting from desktop works well.
    In conclusion, once the board is reset, the paired device is automatically connected, but it does not work properly.
    I must manually reconnect the board whenever it is powered off and on.
    What should I do to solve this...?

  • Hi again!

    Add CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y to your prj.conf, and then it should work.

    Explanation:

    When devices are bonded the CCCD descriptor value must be stored in the flash as it won't be written to persistent storage if reset while connected. When reconnecting to a Windows/Android device it assumes that the notifications are enabled CCCD isn't written again. The config above ensures that CCCD values are always written to persistent storage.

    Best regards,
    Carl Richard
  • As you said, we tested it by setting it to CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y.
    Once the board has been reset, the connection with the paired device is successful.
    However, the problem is not solved.
    There is still no change in the value of the battery and there is an error in the transmission of keyboard data...

Reply Children
Related