128bit UUID Service Set in Nrf51822

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.