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

How to connect to the PC with ble_app_template

Hi,

I would like to know how to program the code to connect the PC based on the ble_app_template.

The SDK version I used is V11 and the board I used is PCA2006, and I have already changed the board description.

I am not sure of the critical different of the ble_app_template and the ble_hid_keyboard which can connect with the PC.

Thanks.

Parents Reply Children
  • You wont be able to connect PC to ble_app_template as the template example does not have hids support. why don't you use the ble_hid_keyboard instead of template?

    Is there something specific about the template example that you want to use? 

  • Hi Susheel,

    Sorry let me clarify my understanding... you maned if I won't to make it connect with PC, I must add and include the hids service file? Or I just  can include some reference from the reference header files it used?

    Actually, I just try to do a practice sample. I would like to figure out the different of the protocol from template and hid. Because I am not sure which function and command I should add in the template to get the same performance, connect to PC.

  • Hi Wedy,

    There are two ways you can connect your nRF device to PC

    1. using another nRF DK, which is connected to the PC by usb and using the nRF Connect for desktop app. This way your second nRF DK will be PC's BLE extention through nRF Connect app.
    2. If you want to connect your nRF device natively to PC, then you need to run the hids(keyboard/mouse) example in your nrf device, so that the device can communicate with hids protocol implemented natively in any OS

    If you are trying to learn and understand things, i know that it can be confusing. But I highly recommend you to go through our tutorials first and read a bit more on our examples.

  • Hi Susheel,

    Here is a thing that I want to confirm with you.

    As you mentioned, if I want to connect with PC I must use the HID example to achieve the event.

    However, is it possible that I can keep the possibility to connect with PC as mouse and run the beacon or other BT function (heart rate detection) on PC (developed APP) at the same time? 

    Moreover, is that possible I can keep the mouse and beacon capability in the same hardware?

    In detail, I would like to try to use the mouse when I was connecting with PC, after the disconnecting I can link with my mobile as beacon.

    The reason I ask for these questions is based on the initial motivation, what is the difference between HID and other profiles? Or just depend on the UUID service rule? 

    Briefly, I would like to integrated HID, HRD, Beacon into the same hard ware at the same time? Is it possible to do with Nordic? Or the Nordic can support the RTOS? And do you have provide the sample code like TI CC2650 sensortag (Multiple service)?

    Thanks,

    BR,

    Wedy 

Related