Hi Nordic Team,
My dev environment is as follow:
nRF52832 (Central) + S132+ SES
At Peripheral side, I am using nRF connect app to advertise the service I want to discover.
The service I want to discover has 128 bit UUID. The two characteristics of that service have completely different 128 bit UUID.
Ambient Service UUID: 503d7513-99c6-f504-f3ea-7d2aa80cb92b
Ambient Light Characteristic UUID: c613cb6c-cd08-64b2-9b6a-8d6e6665f74e
Configuration Characteristic UUID: d502c51c-2f55-9e34-bfbc-e4fbf3e2ae70
I am trying to discover this service and its characteristics but I am unable to do so.
I have added Ambient Light service UUID and both of the characteristics UUID to Attribute Table using sd_ble_uuid_vs_add() and have tried everything from various posts on this topic .
uint32_t ble_als_c_init(ble_als_c_t * p_ble_als_c, ble_als_c_init_t * p_ble_als_c_init)
{
uint32_t err_code;
ble_uuid_t uart_uuid;
ble_uuid_t uart_al_uuid;
ble_uuid_t uart_config_uuid;
ble_uuid128_t als_base_uuid = ALS_BASE_UUID;
ble_uuid128_t als_al_char_uuid = ALS_AL_CHARACTERISTIC_UUID;
ble_uuid128_t als_config_char_uuid = ALS_CONFIG_CHARACTERISTIC_UUID;
//ble_uuid128_t nus_base_uuid = NUS_SERVICE_BASE_UUID;
VERIFY_PARAM_NOT_NULL(p_ble_als_c);
VERIFY_PARAM_NOT_NULL(p_ble_als_c_init);
VERIFY_PARAM_NOT_NULL(p_ble_als_c_init->p_gatt_queue);
err_code = sd_ble_uuid_vs_add(&als_base_uuid, &p_ble_als_c->uuid_type);
if (err_code != NRF_SUCCESS)
{
return err_code;
}
VERIFY_SUCCESS(err_code);
err_code = sd_ble_uuid_vs_add(&als_al_char_uuid, &p_ble_als_c->uuid_type_al_char);
if (err_code != NRF_SUCCESS)
{
return err_code;
}
VERIFY_SUCCESS(err_code);
err_code = sd_ble_uuid_vs_add(&als_config_char_uuid, &p_ble_als_c->uuid_type_config_char);
if (err_code != NRF_SUCCESS)
{
return err_code;
}
VERIFY_SUCCESS(err_code);
uart_uuid.type = p_ble_als_c->uuid_type;
uart_uuid.uuid = BLE_UUID_ALS_SERVICE ;
uart_al_uuid.type = p_ble_als_c->uuid_type_al_char;
uart_al_uuid.uuid = BLE_UUID_ALS_AL_CHARACTERISTIC;
uart_config_uuid.type = p_ble_als_c->uuid_type_config_char;
uart_config_uuid.uuid = BLE_UUID_ALS_CONFIG_CHARACTERISTIC;
p_ble_als_c->conn_handle = BLE_CONN_HANDLE_INVALID;
p_ble_als_c->evt_handler = p_ble_als_c_init->evt_handler;
p_ble_als_c->error_handler = p_ble_als_c_init->error_handler;
p_ble_als_c->handles.als_al_handle = BLE_GATT_HANDLE_INVALID;
p_ble_als_c->handles.als_config_handle = BLE_GATT_HANDLE_INVALID;
p_ble_als_c->p_gatt_queue = p_ble_als_c_init->p_gatt_queue;
return ble_db_discovery_evt_register(&uart_uuid);
}