128bit UUID Service Set in Nrf51822
Uint32_tble_dajia_add_service (ble_dajia_t *p_wechat)
{
uint32_t Err_code;
ble_uuid_t Ble_wechat_uuid;
Const BLE_UUID128_TBASE_UUID128 =
{
{
0x23, 0xD1, 0xBC, 0xEA, 0x5f, 0x78,0x23, 0x15,
0xDE, 0xEF, 0x12, 0x12, 0x00, 0x00,0x00, 0x00
}
};
Ble_wechat_uuid.uuid =0x1122;
Ble_uuid_ble_assign (Ble_wechat_uuid,ble_uuid_dajia_service),//?? Uuid
Err_code =sd_ble_uuid_vs_add (&base_uuid128, & (Ble_wechat_uuid.type));
if (err_code! = nrf_success)
{
return err_code;
}
Err_code =sd_ble_gatts_service_add (Ble_gatts_srvc_type_primary, &ble_wechat_uuid,&p_wechat->service_ handle);
return err_code;
}
Android search for the UUID string is: 03-17 16:24:45.595:e/devicescanactivity (31942):-->serviceuuid:00001122-1212- Efde-1523-785feabcd123
In the Nordic Development Board is the small-end format, and the UUID string is the opposite of the byte order set in the Development Board.
128bit UUID Service Set in Nrf51822