BLE HID Gamepad on nRF52805: Not Recognized on iOS

I am working on a Bluetooth Low Energy (BLE) project using the nRF52840 Development Kit (DK), which has been reconfigured to simulate an nRF52805 chip. The firmware is based on Nordic Semiconductor's ble_app_hids_keyboard example, with modifications to implement a BLE HID Gamepad. I am using the S113 SoftDevice and have successfully tested the functionality with Android devices. The gamepad is recognized as a HID device, and it works as expected on Android, verified using the hardwareTester website.

However, when I connect the gamepad to an iPhone via BLE, the same hardwareTester website does not respond as it does on Android, indicating that the iPhone does not recognize the device as a gamepad. The BLE connection is established successfully, but it seems iOS does not interpret the HID report descriptor or the BLE HID service correctly. I suspect there might be compatibility issues with the HID descriptor or the GATT attributes for iOS-specific BLE HID requirements.

I would like to have some help.

Parents
  • Matan,

    Several users raised issue here in devzone with the strict restrictions IOS has on implementation details of profiles and how it differs in behavior when compared to other OS implementation of that BLE profile.

    This below is from our AI and I think it is very relevant information in your case. Please consider each of this step and let me know if this helped
    ---------------------------------------------

    Issues with HID devices working on some platforms but not on iOS seems to be a recurring theme, especially with custom HID implementations.
    One possible solution comes from a discussion about a HID keyboard sample. A Nordic Semiconductor employee suggested that reordering the HID keyboard and HID mouse reports definitions in the HID report map (placing the HID keyboard report before the HID mouse report) seemed to work around a similar issue Forum Discussion on HID Keyboard. While this is not exactly your case, it suggests that the order and structure of the HID report descriptor can be crucial for iOS compatibility.
    Another user encountered issues with a BLE MIDI device not being recognized by iOS and macOS. The suggested solution was to ensure that the correct MIDI device UUID was included in the advertisement packet Forum Discussion on BLE MIDI Device. While your device is a gamepad and not a MIDI device, this highlights the importance of correct advertisement data for iOS recognition.
    It's also worth noting that some users have found success by adding the following configuration:
    CONFIG_BT_HIDS_DEFAULT_PERM_RW_ENCRYPT=y
    This was suggested for a HID mouse example, but it might be worth trying for your gamepad implementation Forum Discussion on HID Mouse.
    Lastly, it's important to ensure that your HID report descriptor is correctly formatted for a gamepad. The knowledge sources don't provide a specific example for a gamepad, but they do mention that HID descriptors can be tricky to find and modify in the nRF5 SDK Forum Discussion on Custom HID Gamepad.
    Given the complexity of HID implementations and the specific requirements of different operating systems, it might be necessary to carefully review and possibly modify your HID report descriptor and GATT attributes to ensure compatibility with iOS. 
Reply
  • Matan,

    Several users raised issue here in devzone with the strict restrictions IOS has on implementation details of profiles and how it differs in behavior when compared to other OS implementation of that BLE profile.

    This below is from our AI and I think it is very relevant information in your case. Please consider each of this step and let me know if this helped
    ---------------------------------------------

    Issues with HID devices working on some platforms but not on iOS seems to be a recurring theme, especially with custom HID implementations.
    One possible solution comes from a discussion about a HID keyboard sample. A Nordic Semiconductor employee suggested that reordering the HID keyboard and HID mouse reports definitions in the HID report map (placing the HID keyboard report before the HID mouse report) seemed to work around a similar issue Forum Discussion on HID Keyboard. While this is not exactly your case, it suggests that the order and structure of the HID report descriptor can be crucial for iOS compatibility.
    Another user encountered issues with a BLE MIDI device not being recognized by iOS and macOS. The suggested solution was to ensure that the correct MIDI device UUID was included in the advertisement packet Forum Discussion on BLE MIDI Device. While your device is a gamepad and not a MIDI device, this highlights the importance of correct advertisement data for iOS recognition.
    It's also worth noting that some users have found success by adding the following configuration:
    CONFIG_BT_HIDS_DEFAULT_PERM_RW_ENCRYPT=y
    This was suggested for a HID mouse example, but it might be worth trying for your gamepad implementation Forum Discussion on HID Mouse.
    Lastly, it's important to ensure that your HID report descriptor is correctly formatted for a gamepad. The knowledge sources don't provide a specific example for a gamepad, but they do mention that HID descriptors can be tricky to find and modify in the nRF5 SDK Forum Discussion on Custom HID Gamepad.
    Given the complexity of HID implementations and the specific requirements of different operating systems, it might be necessary to carefully review and possibly modify your HID report descriptor and GATT attributes to ensure compatibility with iOS. 
Children
Related