This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2540 HIDAdvRemoteDongle send commands

Other Parts Discussed in Thread: CC2540

Hi All,

I'm new to this group, and also to CC2540.

We have got the TI evaluation kit (CC Debugger + CC2540 USB dongle) with us.

What we are trying to achieve here is 

1) Configure CC2540 with the example (HIDAdvRemoteDongle)

2) Do some changes in HIDAdvRemotedongle so that it pairs with an iPhone or Android which is compatible with BLE.

3) Develop and Android/iPhone App which can send the HID key event to CC2540 dongle.

Note: CC2540 is connected to a target (linux OS machine) where the HID event shall be taken up to a HMI event change in the machine.

I am only successful till Step 1.

Step 2 I need your help?

Step 3 I have the understanding of the Core Bluetooth framework of iOS but not sure if this is achievable in Android, so please confirm that as well?

Awaiting for your reply.

-Suneel

  • Hi Suneel,

    I highly recommend that you read our Software Developer's guide. It can be found in the documents section of our software developer's guide. This will help you to understand our BLE stack and what you need to do to get started.

    For more information on the HID over GATT standard you can read our ARC user guide.
  • Hi Sean,

    Thanks for the response, I've gone through the BLE SW developer guide available here in this location.

    After a complete study what I understood is I should use SimpleBLEPeripheral example availble in Projects section of the BLE stack.

    I've compiled that in IAR embedded work bench and using the LightBlue iOS app available in iPhone Apps I could able to locate this Service and then even write and read the characteristics sent in the service.

    Now one thing what I'm not sure here is my requirement is to have the HIDAdvRemoteControl example used, because without that, if the dongle is placed in the target it is not detecting the device as HID.(Keyboard + mouse)

    So, does that mean like I should make an integration of SimpleBLEPeripheral + HIDAdvRemoteControl to achieve my configuration at the dongle side.

    iOS App side I should look at the LightBlue iOS and create a similar one which can send a HID key event as you said "HID over GATT"?

    Please help as I just started integrating as well.

  • Suneel,

    If your end application is as a HID device, I would recommend starting from the advanced remote project as it has some HID related code for you to look at. You can then modify the remote code to start your development.

    As for the iOS side, that may be a good place to start, but we generally can't provide support for mobile app development. I would suggest posting iOS related questions to sites such as stack overflow for better response.
  • Hi Sean,
    iOS side, yes we do have the expertise to start with, my question is something towards the HIDAdvRemoteDongle.
    When I configure the USB dongle with HIDAdvRemoteDongle and connect the dongle to my host device the USB dongle is detected as a HID device, which is half way through for me.
    Now, the biggest question for me here is I need to integrate the code in SimpleBLEPeripheral to make the pairing/bonding with any smart phone using BLE.
    I did the integration of SimpleBLEPeripheral into HIDAdvRemoteDongle, but to my surprise the Service is not listing in smart phone and also the device is now not detecting as Keyboard in the host device, Error coming as " device not detected"....
    I need support in this part which was not present in any documentation
    Could you please let me know if there is any help done on this point?
  • Hi Suneel,

    Thanks, now I better understand your issue. To re-phrase: you would like to integrate pairing and bonding functionality into the HIDAdvRemoteDongle project?

    Pairing and bonding is handled by the GAP layer and the bond manager. This is really the only code form simple BLE peripheral (SBP) that you should need to integrate, it is possible the the GATT related parts of SBP could be interfering with the advanced remote.

    Can you please post your steps relevant to adding the bond manager to the remote?
  • Hi Sean,

    You have got my query perfectly now.
    These are the steps I have followed.

    1) Took the SimpleBLEPeripheral example
    2) Added a new configuration.
    3) Pulled out Hidapp.c and Hidapp.h from the HIDAdvRemoteDongle example and included in the APP.
    4) Added usbHidInit(); in the SimpleBLEPeripheral_main.c
    5) Done changes in OSAL_SimpleBLEPeripheral.c referring to OSAL_Hidapp.c
    6) Done changes in build_config.app
    7) Removed CC2540_BLE_peri.lib from the libraries and added CC2540_BLE.lib to fix some linking issues.

    And few more changes after referring line to line comparison of both the folders in APP and other places...
    But now after your suggestion I understood that GAP Layer and Bond manager I should give more importance and understand thoroughly.
    Any easy suggestions please?

    Regards,
    Suneel