nRF Connect SDK API 2.8.99
Loading...
Searching...
No Matches

◆ bt_nus_handles_assign()

int bt_nus_handles_assign ( struct bt_gatt_dm * dm,
struct bt_nus_client * nus )

#include <include/bluetooth/services/nus_client.h>

Assign handles to the NUS Client instance.

This function should be called when a link with a peer has been established to associate the link to this instance of the module. This makes it possible to handle several links and associate each link to a particular instance of this module. The GATT attribute handles are provided by the GATT DB discovery module.

Parameters
[in]dmDiscovery object.
[in,out]nusNUS Client instance.
Return values
0If the operation was successful.
(-ENOTSUP)Special error code used when UUID of the service does not match the expected UUID.
Otherwise,anegative error code is returned.