| поискавой системы для электроныых деталей |
|
UM1870 датащи(PDF) 41 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
UM1870 датащи(HTML) 41 Page - STMicroelectronics |
|
41 / 58 page ![]() DocID027602 Rev 1 41/58 UM1870 BlueNRG-MS chat demo application 58 First, BlueNRG-MS must be set up on both devices. In order to do this, a series of ACI commands need to be sent to the processor. 6.2.1 Initialization BlueNRG-MS’s stack must be correctly initialized before establishing a connection with another Bluetooth LE device. This is done with two commands • ACI_GATT_INIT • BLE Chat, “Server” role: – ACI_GAP_INIT(Role=0x01): peripheral. BLE Chat, “Client role: – ACI_GAP_INIT(Role=0x04): central. Peripheral & central BLE roles must be specified inside the GAP_INIT command. See ACI documentation for more information on these commands and on those that follow. 6.2.2 Add service and characteristics The chat service is added on the BLE chat, server role device using the following command: aci_gatt_add_serv(UUID_TYPE_128, service_uuid, PRIMARY_SERVICE, 7, &chatServHandle); Where service_uuid is the private service UUID 128 bits allocated for the chat service (Primary service). The command will return the service handle in chatServHandle. The TX characteristic is added using the following command (on BLE Chat, Server role device): aci_gatt_add_char(chatServHandle, UUID_TYPE_128, charUuidTX, 20, CHAR_PROP_NOTIFY, ATTR_PERMISSION_NONE, 0, 16, 1, &TXCharHandle); Where charUuidTX is the private characteristic UUID 128 bits allocated for the TX characteristic (notify property). The characteristic handle is also returned (on TXCharHandle). The RX characteristic is added using the following command (on BLE Chat, Server role device): aci_gatt_add_char(chatServHandle, UUID_TYPE_128, charUuidRX, 20, CHAR_PROP_WRITE|CHAR_PROP_WRITE_WITHOUT_RESP, ATTR_PERMISSION_NONE, GATT_SERVER_ATTR_WRITE,16, 1, &RXCharHandle); Where charUuidRX is the private characteristic UUID 128 bits allocated for the RX characteristic (write property). The characteristic handle is also returned (on RXCharHandle). See ACI documentation for more information on these commands as well as those that follow. 6.2.3 Set security requirements BlueNRG-MS exposes a command that the application can use to specify its security requirements. If a characteristic has security restrictions, a pairing procedure must be |
|
ссылки URL |
| Вашему бизинису помогли Аллдатащит? [ DONATE ] |
Что такое Аллдатащит | реклама | контакт | Конфиденциальность | Ссылка на техническое описание | обмен ссыками | поиск по производителю 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 |