| Electronic Components Datasheet Search |
|
PM0237 Datasheet(PDF) 53 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
PM0237 Datasheet(HTML) 53 Page - STMicroelectronics |
|
53 / 88 page ![]() DocID027104 Rev 2 53/88 PM0237 Design an application using BlueNRG, BlueNRG-MS ACI APIs 88 const uint8_t charUuid_2[16] = {0x66,0x9a,0x0c,0x20,0x00,0x08,0x96,0x9e,0xe2,0x11,0x9e,0xb1,0xe2,0xf2,0x7 3,0xd9}; /* Add the service with service_uuid 128bits UUID to the GATT server database. The service handle ServHandle is returned */ ret = aci_gatt_add_serv(UUID_TYPE_128, service_uuid, PRIMARY_SERVICE, 7, &ServHandle); if (ret != BLE_STATUS_SUCCESS) PRINTF("Failure.\n")} /* Add the characteristic with charUuid_1 128bits UUID to the service ServHandle. This characteristic has 20 as Maximum length of the characteristic value, Notify properties(CHAR_PROP_NOTIFY), no security permissions(ATTR_PERMISSION_NONE), no GATT event mask (0), 16 as key encryption size, and variable-length characteristic (1). The characteristic handle (CharHandle_1) is returned. */ ret = aci_gatt_add_char(ServHandle, UUID_TYPE_128, charUuid_1, 20, CHAR_PROP_NOTIFY, ATTR_PERMISSION_NONE, 0,16, 1, &CharHandle_1); if (ret != BLE_STATUS_SUCCESS) PRINTF("Failure.\n")} /* Add the characteristic with charUuid_2 128bits UUID to the service ServHandle.This characteristic has 20 as Maximum length of the characteristic value, Read, Write and write without response properties, no security permissions(ATTR_PERMISSION_NONE), notify application when attribute is written (GATT_NOTIFY_ATTRIBUTE_WRITE) as GATT event mask , 16 as key encryption size, and variable-length characteristic (1). The characteristic handle (CharHandle_2) is returned. */ ret = aci_gatt_add_char(ServHandle, UUID_TYPE_128, charUuid_2, 20, CHAR_PROP_WRITE|CHAR_PROP_WRITE_WITHOUT_RESP, ATTR_PERMISSION_NONE, GATT_NOTIFY_ATTRIBUTE_WRITE,16, 1, &CharHandle_2); if (ret != BLE_STATUS_SUCCESS) PRINTF("Failure.\n")} return ret ; }/* end Add_Server_Services_Characteristics() */ |
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |