Commit graph

82 commits

Author SHA1 Message Date
Joe Finney
e042a55522 microbit: Added compile time option to enabe support for BLE private resolvable addresses.
Introduced MICROBIT_BLE_PRIVATE_ADDRESSES configuration option.
Disabled by default, as it did not resolve binds correctly on Android 4.4.2
2015-12-11 01:38:22 +00:00
Joe Finney
6f5ad99aa2 BUGFIX: Enabled BLE_COMMON_OPT_RADIO_CPU_MUTEX option
This option is now configured when the BLE stack is initialised. This ensures that SoftDevice is never
starved of CPU during periods of criticality. This does lock out the CPU for application use, but prevents
MIC failures caused by __disable_irq() operations (as found in the mbed Ticker API for example).
2015-12-11 01:16:48 +00:00
Joe Finney
b6ca1365f7 microbit: Added explicit BLE disconnection requests on DFU and soft reset 2015-12-11 00:55:33 +00:00
Joe Finney
1e5d5c8dcf Updates to BLE 2.1.11 / ble-nrf51822 2.2.3
Minor amends:
  - bleDisconnectionCallback signature change
  - bleSetAdvertisingInterval now takes milliseconds as a parameter
  - event based invocation of DFU bootloader
2015-12-11 00:24:21 +00:00
Joe Finney
ae93079a65 code cleanup 2015-11-25 21:21:04 +00:00
Joe Finney
6d1004fb28 Updates to DFU service to align with BLE standard BLE security
- Removed flashcode base authorization
- silenced unused parameter in MicroBitHeapAllocator
- bugfixed BLUEZONE mode so that sensor data is still available via BLE
2015-11-20 11:32:42 +00:00
Robert May
051575d911 Tidy up gcc -Wall fixes. 2015-11-18 23:13:57 +00:00
Joe Finney
ac381fa5dc microbit: Alpha version of standard BLE MITM passkey security
- refactored BLE funcitonality into BLEManager class.
- added security requirements standard BLE profile services.
- updated bluezone pairing process to use BLE passkey exchange.
2015-11-16 13:44:27 +00:00
Joe Finney
79c739674c first compiling build. 2015-11-15 14:31:44 +00:00
Joe Finney
6dca3ed8d4 microbit: pre-compilation backup only. 2015-11-13 20:38:37 +00:00
Joe Finney
435debffed Merge branch 'quiet-gcc-build' of https://github.com/remay/microbit-dal into remay-quiet-gcc-build 2015-11-08 13:50:33 +00:00
Joe Finney
13456c60c1 microbit: Removal of explicit Serial instance for debugging.
Debugging now runs via the standrad MicroBit::serial interface.
2015-11-01 23:42:53 +00:00
Robert May
1a1a5976a8 Silence GCC -Wall 2015-11-01 20:19:17 +00:00
Joe Finney
194f19a428 Merge branch 'simplified-eventing' 2015-11-01 18:22:27 +00:00
Joe Finney
7f64a4c703 microbit: BUGFIX Corrected incorrect handling of MicroBitMessageBus::add return values. 2015-10-26 16:37:12 +00:00
Joe Finney
424b825185 Merge branch 'master' into simplified-eventing
Conflicts:
	inc/MicroBitMessageBus.h
2015-10-18 18:20:03 +01:00
Joe Finney
db3eccf6ff microbit: Final updates to BLE profile
Minor changes to BLE profile services (cleanup prior to merge with master branch):

  - Added temperature period characteristic to match design pattern of other sensors.
  - Updated endinaness of MicroBitLEDService Matrix to be more intuitive.
  - Cleaned up Microbit.cpp by removing unused reference to BLE services.
  - Exposed serial number and naming information thr BLE DeviceInformation and API.
  - Updated BLE advertisement period to be alightly more repsonsive (200ms vs 1000ms).
  - BUGFIX: micro:bit name is now always generated, regardless of BLE services.
  - BUGFIX: Scroll Period data length.
2015-10-18 14:46:42 +01:00
Joe Finney
6764c732ea microbit: BUGFIX to MicroBtDFU Service
- Updates to UI handling to avoid starving out the processor.
  - Clears screen before entering DFU bootloader
2015-10-09 01:14:36 +01:00
Joe Finney
ce2cc57bf1 microbit: Optimisation of internal Message Bus listeners
All message bus listeners with the micro:bit runtie are non blocking, and safe to be called
in an interrupt context. As such, these have now all been declared MESSAGE_BUS_LISTENER_IMMEDIATE
which should mitigate all unbounded event queueing effects.
2015-10-08 23:49:14 +01:00
Joe Finney
1d76def8fa microbit: BLE service bugfixes
Updates to BLE interface to match specification following testing by Bluetooth SIG.

Accelerometer Period: now supports READ and WRITE
Magnetometer Period: now supports READ and WRITE
LED Matrix State: now supports READ and WRITE.

UUIDs of Temperature Service characteristic corrected.
2015-10-08 23:23:00 +01:00
Joe Finney
18236810a3 microbit: BLE Profile Beta 1
First functionally complete BLE profile, matching BLE speicfication v1.6.
More specifically, the following services are now functional:

  - AccelerometerService
  - MeganetometerService
  - EventService
  - TemperatureServide
  - IOPinService
  - DFUService
  - ButtonService
  - LEDService

Also, updates to underlying device drivers to enable greater configurability:

  - MicroBitCompass now supports variable sample rates and temperature sensing
  - MicroBitAccelerometer now supports variable sample rates and ranges
  - MicroBitThermometer introduced
  - MicroBitMessageBus adapted to permit enumeration and block removal of listeners

Finally, MicroBit DFU Service has been changed to the new UUIDs specificed in v1.6 of BLE spec.
2015-09-28 21:40:44 +01:00
Joe Finney
4314b68643 microbit: First implementation of Temperature Service 2015-09-23 22:15:44 +01:00
Joe Finney
eb5ed28f74 microbit: First cut at MicroBitButtonService and microBitIOPinService
Strictly still development - untested code.
2015-09-22 16:13:08 +01:00
Joe Finney
ef613e9d86 microbit: Added BLE Magnetometer service compilation, initialization and configuration options 2015-09-19 22:19:57 +01:00
Joe Finney
1e71169550 microbit: First draft of Magnetometer BLE service 2015-09-19 21:03:36 +01:00
Joe Finney
ae0e5611c3 microbit: First draft of reconfigurable frequencies of MicroBitCompass 2015-09-19 21:00:38 +01:00
Joe Finney
058f73ede1 microbit: Moved MicroBitDFUService UUIDs to match BLE profile specification 2015-09-18 18:48:27 +01:00
Joe Finney
037ef999eb microbit: Merge branch 'master' into ble-profile
Pulled in changes from MessageBusExtensions to support development of ble profiles.
2015-09-15 15:17:21 +01:00
Joe Finney
ccd351a4ed microbit: Added explicit notify() operation to MicroBitDFUService 2015-09-15 14:34:25 +01:00
Joe Finney
609cb6f2d8 microbit: Added first draft of BLE Accelerometer service
n.b. this code is as yet untested.
2015-09-09 15:16:11 +01:00
Joe Finney
380b999440 microbit: BUGFIX: read callbacks on working
Changes to MicroBitLEDService class to ensure matrixCharacteristic remains
persistent. Needed to allow mbed read callbacks.
2015-09-08 13:55:15 +01:00
Joe Finney
574b408cd1 microbit: Code Structure Cleanup
Create subdirectories for assembler code and BLE specific functionality
2015-09-07 10:26:48 +01:00