I am using the software provided by TI for the HIDEmuKbd project, but it is not working. The only modification I made was to
C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\common\cc2540\ti_51ew_cc2540b.xcl, changing
"-Z(DATA)VREG+_NR_OF_VIRTUAL_REGISTERS=08-7F"
to "-Z(DATA)VREG=08-7F"
to get it to build in IAR, as described on the thread: Linker error with BT and IAR.
Now the project builds and programs correctly. The bluetooth appears to be broadcasting correctly. With my iPhone, which is running iOS 7.0.4, I can see the keyfob, but when I try to connect to it the connection attempt times out.
At this point I switched to the provided USB dongle in the kit and used BTool to try to connect. BTool, just like my phone, correctly identifies the device.
However, when I try to establish a link, I get the following messages:
<Tx> GAP_EstablishLinkRequest
<Rx> GAP_HCI_ExtensionCommandStatus (success) code: GAP_EstablishLinkRequest
Device Connected, Handle = 0x0000, Type = 0x00 (Public)
<Rx> GAP_EstablishLink (success)
<Rx> GAP_SlaveRequestedSecurity (success)
<Rx> GAP_LinkParamUpdate (success)
However, despite the connection established, nothing happens when I press buttons even though that is suposed to trigger reports of left or right arrow keypresses. Then, I get the notification
Device disconnected
<Rx> GAP_TerminateLink, Reason: (Peer Requested)
I am new to bluetooth and TI, and find myself baffled by the fact that the supplied projects don't work to begin with. There are several existing forum posts complaining of difficulties with the HIDEmuKbd project, but none have actual answers and all are from several months ago.
If anyone out there has gotten HIDEmuKbd to work or has any idea what I'm doing wrong, please let me know.