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

How to interact with connected devices through the device manger

Hello, I started implementing a project with the device manager. I am using the S120 as central. I am able to connect to 3 peripherals at the same time (also nordic nrf51822). So in general, the device manger does its work. But now, I can not find the information how to interact (write a characteristic) with one specific peripheral/peer. I believe, writing a characteristic will be done with sd_ble_gattc_write(...). But where to get the right handle?

Also I don`t know, how to disconnect from a specific peer. Must these tasks be done by the client handling? Or can that be done directly with the device manager.

Is there an existing example?

I also had a look to the device manager tutorial and it helped a lot when setting up the device manager. But the tasks I mentioned are not described.

Thanks for any help/hint/link.

Regards, BTprogrammer

Parents
  • Well, yes, it handles multiple connections, but only the pairing and bond information aspect. You get the connection handle with the BLE_GAP_EVT_CONNECTED event. Then you can use the handle do identify events on that connection, and do operations, like write, on that connection. In ble_app_multilink_central you can see that connection handle is assigned with ble_lbs_c_handles_assign() when you get the BLE_GAP_EVT_CONNECTED in on_ble_evt().

Reply
  • Well, yes, it handles multiple connections, but only the pairing and bond information aspect. You get the connection handle with the BLE_GAP_EVT_CONNECTED event. Then you can use the handle do identify events on that connection, and do operations, like write, on that connection. In ble_app_multilink_central you can see that connection handle is assigned with ble_lbs_c_handles_assign() when you get the BLE_GAP_EVT_CONNECTED in on_ble_evt().

Children
No Data
Related