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?

  • Hi Tom,

    To determine which rev your chip is please have a look here.

    After that you can find which softdevice and SDK is compatible with your chip by looking at here.

    To erase bonding information on the PCA10001 you press and hold the BTN_ID_WAKEUP_BOND_DELETE (button 1) when reset the chip. Another option is to do a "Erase All" on the chip, only reprogram the chip won't help erase bond information.

    It's been quite long thread and maybe I am lost at some points but I don't know why you have to click "Forget this device" ? What happens if you simply click to connect (and they bond automatically) and use the keyboard ?

    You click "Forget this device" only if you want to have a new bond to the device, don't click it every time you connect. And when you want a new bond to the device, make sure you delete old bond on both of the device.

    Connect is not the same as Bond. However in your case with HID device, the iOS device will do bonding automatically (Popup message "if you want to pair with ... "). If you don't click "Forget this device" , simply connect, press button 0 to write hello, and then reset the PCA10001, what happens ?

    Regarding Wiresharks issue, please download wireshark v1.10 here. It's the only version we support with the sniffer.

    To upload photo, please click on the image button next to the 101 101 button when you edit the question, you can also add them as attachment (the paperclip button)

  • OK, I did not realize that SDK and softstack versions were tied to chip versions. With that in mind, our chips are all QFAAG0 which are rev 2 chips. I was using SDK v11.0.0 (now changed to v6.1.0) and S130 (now changed to S110).

    The HID Keyboard example for S110 uses the nRF6310 and I am using the PCA10001 (will go to custom board after this is running). I loaded the HID Keyboard example from the nRF6310 directory made several changes:

    1. Changed the preprocessor symbols to BOARD_PCA10001
    2. Set Device = nRF51822_xxAA, IROM1 = 0x1B000, Size = 0x25000, IRAM1 = 0x20002000, Size = 0x5F80
    3. Set Debug to J-Link / J-Trace Cortex

    After running Build All there were errors due to LED's and buttons that are not available on the PCA10001. I commented out the lines that included the LED's and buttons that are unavailable on PCA10001 (LED_2 thru LED_7 and BUTTON_2). Then Build All was successful.

    Loaded/ran the code. NRF MCP and iPad (in Settings) did not find Nordic Keyboard. Debug shows that the code never reaches main() and appears to be hanging in the startup code.

    Am I on the right track now?

    Was my major problem that I was using the incorrect SDK and softstack?

    Do you have any suggestions to help determine why the PCA10001 is not advertising?

  • @Tom: Why did you changed the parameters:

    "Set Device = nRF51822_xxAA, IROM1 = 0x1B000, Size = 0x25000, IRAM1 = 0x20002000, Size = 0x5F80" ?

    You should keep them unchanged since it's configured to meet with the Softdevice v7.x

    I attached in my answer below the example I ported for PCA10001 SDK v6.1 SDK v7.x

  • Did the example that you sent in the zip file work for you on a Rev 2 chip with s110?

    I unzipped the file into Nordic nRF51 SDK 6.1.0 > nrf51822 > Board > pca10001 > s110 > ble_app_hids_keyboard PCA10001. Erased and programmed s110_nrf51822_6.0.0_softdevice.hex. Build all was successful in uVision5 (no errors). Loaded successfully and started running.

    Advertising light never comes on. Loaded Debug and it never reaches main(). Starts at 12898 after reset (why not 00000?), runs several instructions down to 12BB2 then hangs at 12B94/12B96.

    I have made NO changes to the code or uVision5 Target Options at all.

    Also unzipped into Board > nrf6310 folder with same results.

  • @Tom: I mentioned in the comment: It's to be used with Softdevice v7.x.

    All examples in SDK v6 are to be used with Softdevice S110 v.7 not S110 v6.0.

    Have a look here.

Related