From 55186085543a950374e2386b0940908be8fad631 Mon Sep 17 00:00:00 2001 From: Martin Williams Date: Thu, 10 Dec 2020 22:03:54 +0000 Subject: [PATCH 1/2] Allow more than one base UUID to be used in a service --- source/bluetooth/MicroBitBLEService.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/source/bluetooth/MicroBitBLEService.cpp b/source/bluetooth/MicroBitBLEService.cpp index c9a69b77..cb314dc7 100644 --- a/source/bluetooth/MicroBitBLEService.cpp +++ b/source/bluetooth/MicroBitBLEService.cpp @@ -65,9 +65,6 @@ MicroBitBLEService::~MicroBitBLEService() void MicroBitBLEService::RegisterBaseUUID( const uint8_t *bytes16UUID) { - if ( bs_uuid_type) - return; - ble_uuid128_t uuid128; for ( int i = 0; i < 16; i++) uuid128.uuid128[i] = bytes16UUID[ 15 - i]; From 6242c63d4fd9c17a3c08231d47f32c1fee0ed87e Mon Sep 17 00:00:00 2001 From: Martin Williams Date: Fri, 11 Dec 2020 13:37:45 +0000 Subject: [PATCH 2/2] Reduce RAM region ORIGIN --- ld/nrf52833.ld | 2 +- source/bluetooth/MicroBitBLEManager.cpp | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/ld/nrf52833.ld b/ld/nrf52833.ld index 165ed09b..26baabb9 100644 --- a/ld/nrf52833.ld +++ b/ld/nrf52833.ld @@ -6,7 +6,7 @@ MEMORY BOOTLOADER (rx) : ORIGIN = 0x77000, LENGTH = 0x7E000 - 0x77000 SETTINGS (rx) : ORIGIN = 0x7E000, LENGTH = 0x2000 UICR (rx) : ORIGIN = 0x10001014, LENGTH = 0x8 - RAM (rwx) : ORIGIN = 0x20002440, LENGTH = 0x20000 - 0x2440 + RAM (rwx) : ORIGIN = 0x20002030, LENGTH = 0x20020000 - 0x20002030 } OUTPUT_FORMAT ("elf32-littlearm", "elf32-bigarm", "elf32-littlearm") ENTRY(Reset_Handler) diff --git a/source/bluetooth/MicroBitBLEManager.cpp b/source/bluetooth/MicroBitBLEManager.cpp index bb70ce9f..69d32622 100644 --- a/source/bluetooth/MicroBitBLEManager.cpp +++ b/source/bluetooth/MicroBitBLEManager.cpp @@ -235,6 +235,9 @@ void MicroBitBLEManager::init( ManagedString deviceName, ManagedString serialNum MICROBIT_DEBUG_DMESG( "MicroBitBLEManager::init"); + MICROBIT_DEBUG_DMESG( "NRF_SDH_BLE_VS_UUID_COUNT = %d", (int) NRF_SDH_BLE_VS_UUID_COUNT); + MICROBIT_DEBUG_DMESG( "NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE = %x", (int) NRF_SDH_BLE_GATTS_ATTR_TAB_SIZE); + pairingTime = 0; shutdownTime = 0; storage = &keyValueStorage;