Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of BLE_API by
Revision 1209:a593e0ecff7d, committed 2018-05-14
- Comitter:
- vrou44
- Date:
- Mon May 14 12:32:05 2018 +0000
- Parent:
- 1208:65474dc93927
- Commit message:
- changes for Book And Plug Proto
Changed in this revision
--- a/ble/SecurityManager.h Wed Sep 14 14:18:00 2016 +0100 +++ b/ble/SecurityManager.h Mon May 14 12:32:05 2018 +0000 @@ -106,7 +106,8 @@ * @return BLE_ERROR_NONE on success. */ virtual ble_error_t init(bool enableBonding = true, - bool requireMITM = true, + // bool requireMITM = true, HD + bool requireMITM = false, SecurityIOCapabilities_t iocaps = IO_CAPS_NONE, const Passkey_t passkey = NULL) { /* Avoid compiler warnings about unused variables. */
--- a/ble/UUID.h Wed Sep 14 14:18:00 2016 +0100 +++ b/ble/UUID.h Mon May 14 12:32:05 2018 +0000 @@ -313,7 +313,8 @@ return !(*this == other); } -private: +//private: // HD !!!! +public: /** * The UUID type. Refer to UUID_Type_t. */
--- a/ble/services/UARTService.h Wed Sep 14 14:18:00 2016 +0100 +++ b/ble/services/UARTService.h Mon May 14 12:32:05 2018 +0000 @@ -164,13 +164,15 @@ return receiveBuffer[receiveBufferIndex++]; } -protected: +//protected: +public: //HD /** * This callback allows the UART service to receive updates to the * txCharacteristic. The application should forward the call to this * function from the global onDataWritten() callback handler; if that's * not used, this method can be used as a callback directly. */ +#if 0 //HD void onDataWritten(const GattWriteCallbackParams *params) { if (params->handle == getTXCharacteristicHandle()) { uint16_t bytesRead = params->len; @@ -181,8 +183,12 @@ } } } +#else + void onDataWritten(const GattWriteCallbackParams *params) ; +#endif -protected: +//protected: +public: //HD BLE &ble; uint8_t receiveBuffer[BLE_UART_SERVICE_MAX_DATA_LEN]; /**< The local buffer into which we receive
--- a/source/services/UARTService.cpp Wed Sep 14 14:18:00 2016 +0100 +++ b/source/services/UARTService.cpp Mon May 14 12:32:05 2018 +0000 @@ -20,6 +20,7 @@ 0x6E, 0x40, 0x00, 0x00, 0xB5, 0xA3, 0xF3, 0x93, 0xE0, 0xA9, 0xE5, 0x0E, 0x24, 0xDC, 0xCA, 0x9E, }; + const uint16_t UARTServiceShortUUID = 0x0001; const uint16_t UARTServiceTXCharacteristicShortUUID = 0x0002; const uint16_t UARTServiceRXCharacteristicShortUUID = 0x0003; @@ -38,4 +39,5 @@ const uint8_t UARTServiceRXCharacteristicUUID[UUID::LENGTH_OF_LONG_UUID] = { 0x6E, 0x40, (uint8_t)(UARTServiceRXCharacteristicShortUUID >> 8), (uint8_t)(UARTServiceRXCharacteristicShortUUID & 0xFF), 0xB5, 0xA3, 0xF3, 0x93, 0xE0, 0xA9, 0xE5, 0x0E, 0x24, 0xDC, 0xCA, 0x9E, -}; \ No newline at end of file +}; +