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

HID Keyboard Example Not Recognized by iPad

I programmed a PCA10001 with the HID Keyboard example and changed the preprocessor code from NRF6310 to PCA10001. The functions were tested according to the online HID Keyboard Application notes and everything worked as expected. (Note: The Application notes used were flagged as "old documentation" but it still worked.)

I then tried to connect the HID to an iPad. After enabling BT in Settings on the iPad the HID was not recognized. I thought the problem might be that the Company ID needed to be changed from Nodic's (x59) to Apple's (4C) but answers from a previous post say that the HID does not use Company ID so this should not be a problem. I installed the LightBlue app on the iPad and it does find the HID. Why can I not link to the iPad directly?

  • I am not switching between beacon and HID Keyboard - HID Keyboard only. Just a note, I am connecting to an iPad and not an iPhone (probably not a significant point).

    I just did a test running off a battery (not debugger) and found that when the battery was inserted it would not connect in Settings unless it connected through NRF MCP first.

    Then I removed the battery and reinserted it again. Same thing - required NRF MCP to connect first before Settings would show it connected.

    I have never installed or used the sniffer so it may take some time to get that information if you think it is necessary.

    I still have the problem where the "hello" is not received on the iPad when Button 0 is pressed. This was working on July 1 but when I came back to the project several days later the device would not advertise. There were no changes to the code or hardware during that time. I then started from scratch by loading the original Nordic HID Keyboard example (no source changes). As mentioned before, the only change made was setting PCA10001 in the preprocessor. Also, using Debug the code runs through ble_hids_inp_rep_send() in ble_hids.c with good err_code (not DATA_SIZE, INVALID_STATE, or INVALID_PARAM errors) as mentioned before.

  • @Tom: I suspect that the iPad didn't detect your device as a HID device (that's why you couldn't write hello by pressing the button). Make sure you have bonded to the device, and no previous bonding information is stored. Also please test with the stock example, just in case there is some unaware modification added.

    A sniffer trace would really help. Also a screenshot of the MCP screen when you connected and do service discovery would be useful.

  • I am using the stock example (except changing to PCA10001).

    After connecting with MCP I went to Settings and selected Forget This Device and then reset the PCA10001. Settings showed it as an option and I selected it, it connected and I could send characters using Button 0.

    I have tried to repeat this numerous time without success. I have cycled power on the PCA10001, enabled Bluetooth using both MCP and Settings in various sequences but it keeps saying "Pairing Unsuccessful". When selecting OK it indicates it is connected for about 10 seconds and then disconnects. There was no opportunity to Forget Device and Button 0 does not send characters. I have not tried to reboot the iPad.

    It seems like this may be an iPad issue and not the HID Keyboard.

    I have rushed this off this morning because I know you will be leaving the office soon. I will spend more time today and try to get a sniffer trace.

    I have some screenshots - how do I upload them?

  • @Tom: Have you also erased the bond information on the PCA10001 when you click forget this device on iPad? On the first time when you connect did you bond ? I don't get this part "Settings showed it as an option and I selected it, it connected and I could send characters using Button 0." Which option was that ? A screenshot would be useful.

    You chip is QFAAG0, according to this, it's rev 2, it may not be compatible with S130 v2 in the SDK v11. I would suggest to test with SDK v7, S110 v7. Just to check if the issue is with the iOS device.

    If you want to attach files, screenshot, please edit the question and add them .

  • When I said "Settings showed it as an option and I selected it" I meant that the Nordic Keyboard was found by the iPad's Bluetooth search and I tapped on "Nordic Keyboard" to enable the BT connection. I was then able to tap on the icon to the right of “Nordic Keyboard” and then tap "Forget this device". I did nothing to the PCA10001 (did not reprogram it). Then it connected and Button 0 sent characters to the iPad.

    After removing power from the PCA10001 it would only connect using MCP and when going to Settings it said “Pairing unsuccessful” and disconnected in 8-10 seconds. Therefore I cannot force it to "forget" again.

    You asked if I also erased the bond information on the PCA10001. How do I do that? Reprogram?

    My PCA10001 and our custom boards all have QFAAG0 parts (all rev 2). You say they "may not be compatible." How do we definitively determine that?

    I can test the PCA10001 with S110 but isn't S130 required for the HID Keyboard? If so, how do I test with S110? Are you asking me to test S110 with Beacon code to see if it connects?

    The iPad uses the term "connect". Is “connect the same as "bond"?

    I started ble_sniffer.exe in 32K Win7 (2GB RAM) and Nordic_Keyboard was found. After pressing “w” to load Wireshark, Network Protocol Analyzer starts registering plugins but stops at 52%. Another window opens saying “Wireshark has stopped working.” The only option is to Close Program. Could not find anything in Google to help resolve this.

    How can I add screen shot images to comment? Must I use Photobucket or similar?

Related