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

Central Multilink: how to add custom characteristic uuid?

Hi,

I'm using Central multilink example to connect with our Custom Peripheral sensors.
I'm using board PCA10040, nRF52832, SDK_14.2.0, s132.

Sensors have a custom service (UUID 128 bit) with 4 custom characteristics (UUID 128 bit) and I know all these UUID of service and characteristics.

From the Central multilink example I used the function "ble_lbs_c_init" where I modified it to set our SERVICE_UUIDBASE of the custom service of the sensor.
In this case, Do I need to add something else regarding the 4 custom characteristics?

uint32_t ble_lbs_c_init(ble_lbs_c_t * p_ble_lbs_c, ble_lbs_c_init_t * p_ble_lbs_c_init)
{
    uint32_t      err_code;
    ble_uuid_t    lbs_uuid;
    ble_uuid128_t lbs_base_uuid = {LBS_UUID_BASE};

    VERIFY_PARAM_NOT_NULL(p_ble_lbs_c);
    VERIFY_PARAM_NOT_NULL(p_ble_lbs_c_init);
    VERIFY_PARAM_NOT_NULL(p_ble_lbs_c_init->evt_handler);

    p_ble_lbs_c->peer_lbs_db.button_cccd_handle = BLE_GATT_HANDLE_INVALID;
    p_ble_lbs_c->peer_lbs_db.button_handle      = BLE_GATT_HANDLE_INVALID;
    p_ble_lbs_c->peer_lbs_db.led_handle         = BLE_GATT_HANDLE_INVALID;
    p_ble_lbs_c->conn_handle                    = BLE_CONN_HANDLE_INVALID;
    p_ble_lbs_c->evt_handler                    = p_ble_lbs_c_init->evt_handler;

    err_code = sd_ble_uuid_vs_add(&lbs_base_uuid, &p_ble_lbs_c->uuid_type);
    if (err_code != NRF_SUCCESS)
    {
        return err_code;
    }
    VERIFY_SUCCESS(err_code);

    lbs_uuid.type = p_ble_lbs_c->uuid_type;
    lbs_uuid.uuid = LBS_UUID_SERVICE;

    return ble_db_discovery_evt_register(&lbs_uuid);
}

Because I'm able to connect with sensors but when I receive the event BLE_DB_DISCOVERY_COMPLETE (function ble_lbs_on_db_disc_evt), I don't read the uuid of the 4 custom characteristics but I read characteristic.uuid.uuid = 0x00.

Please could someone help me please?

Related