wersion 1.9
Fork of BLE_API by
Diff: ble/services/UARTService.h
- Revision:
- 1209:9067ecccc4fc
- Parent:
- 728:997ba5e7b3b6
--- a/ble/services/UARTService.h Tue Sep 29 09:54:19 2015 +0100 +++ b/ble/services/UARTService.h Wed Nov 08 10:24:54 2017 +0000 @@ -59,6 +59,10 @@ txCharacteristic(UARTServiceTXCharacteristicUUID, receiveBuffer, 1, BLE_UART_SERVICE_MAX_DATA_LEN, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE_WITHOUT_RESPONSE), rxCharacteristic(UARTServiceRXCharacteristicUUID, sendBuffer, 1, BLE_UART_SERVICE_MAX_DATA_LEN, GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY) { + + rxCharacteristic.requireSecurity(SecurityManager::SECURITY_MODE_ENCRYPTION_WITH_MITM); + txCharacteristic.requireSecurity(SecurityManager::SECURITY_MODE_ENCRYPTION_WITH_MITM); + GattCharacteristic *charTable[] = {&txCharacteristic, &rxCharacteristic}; GattService uartService(UARTServiceUUID, charTable, sizeof(charTable) / sizeof(GattCharacteristic *));