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.

  • 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...

  • Hi again!

    We just tested with successful results on a Windows computer. Are you sure that the configuration is set correctly? When changing your configuration in Segger Embedded Studio it may be necessary to reload the project or reopen it with a clean build folder.

    I've attached a .hex file with the correct configuration that you may try to confirm whether this is a configuration issue or not.

    8322.zephyr.hex


    Best regards,
    Carl Richard

  • Thank you for always answering.
    It worked when I opened a new project and built it!!
    Thank you!
    This time, we tested the CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y option in zephyr using zephyr-sdk on Linux.
    Setting CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y when built using nrfconnect source and Segger Embedded Studio will result in changes in the value of the battery or successful transfer of keyboard data when the board is reset.

    However, when you build zephyr-sdk on Linux, the option CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y does not seem to work well.

    This is what I asked Zephyr mainline:
    zephyr mainline

    (It is a source that was tested simply by changing the value of the battery.)

    I tested it up to zephyr-sdk-0.11.4.
    Is there a reason why the option CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y is normal only on the nrfconnect source?
    What did I miss? Is it a bug from a zephyr mainline source?

    The test was performed on the nrf52840dk_nrf52840dk board.

Reply
  • Thank you for always answering.
    It worked when I opened a new project and built it!!
    Thank you!
    This time, we tested the CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y option in zephyr using zephyr-sdk on Linux.
    Setting CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y when built using nrfconnect source and Segger Embedded Studio will result in changes in the value of the battery or successful transfer of keyboard data when the board is reset.

    However, when you build zephyr-sdk on Linux, the option CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y does not seem to work well.

    This is what I asked Zephyr mainline:
    zephyr mainline

    (It is a source that was tested simply by changing the value of the battery.)

    I tested it up to zephyr-sdk-0.11.4.
    Is there a reason why the option CONFIG_BT_SETTINGS_CCC_STORE_ON_WRITE=y is normal only on the nrfconnect source?
    What did I miss? Is it a bug from a zephyr mainline source?

    The test was performed on the nrf52840dk_nrf52840dk board.

Children
Related