Commit Graph

717 Commits (602153e9199c28c08fd2561ce7b43bf64e9e7394)

Author SHA1 Message Date
Benjamin Cabé 5ba5ccb712 fix for issue #252: bug in MicroBitUARTService#read when buffer contains NULL character
Signed-off-by: Benjamin Cabé <>
2016-12-19 17:18:27 +01:00
James Devine 12bf127ae2 microbit-dal: moved to v2.0.0-rc7 2016-11-30 11:27:56 +00:00
James Devine 10ce2b9f7a microbit-dal: removed ManagedString APIs for Eddystone Uid
ManagedString should only be used for string based data.
The APIs removed by this commit presumed that this was not the case.
ManagedString implicitly contains error checking, which makes it
unsuitable for sequences of bytes that may contain null termination
characters (0x00).

Removing these APIs for now was the best option until a future time
when ManagedBuffer can be used within the runtime.
2016-11-30 11:22:54 +00:00
James Devine 95346586ab microbit-dal: Revisions to MicroBitEddystone.
This commit includes the addition of comments,
some validation and corrections to C++ definitions.

Also, a minor API revision for the Eddystone class, which
simple removes Eddystone from member functions, as it
it implicit that you will be setting a URL using Eddystone
in the MicroBitEddystone class.
2016-11-30 10:43:53 +00:00
James Devine b251a59b9d microbit-dal: moved to v2.0.0-rc6 2016-11-29 18:35:18 +00:00
Joe Finney 614083f5cf Merge pull request #231 from bluetooth-mdw/master
Refactored Eddystone support, added UID frame type
2016-10-31 21:23:30 +00:00
Martin Woolley 05c333172f Even prettier? 2016-10-28 14:17:23 +01:00
Martin Woolley 4857c83446 source code pretty formatted 2016-10-28 12:15:54 +01:00
Martin Woolley 15db7558f5 Refactored Eddystone support, introducing a new Eddystone class which separates the Eddystone message format from the more general responsibilities of the MicroBitBLEManager class. Hopefully the pattern paves the way for other beacon formats (e.g. iBeacon, AltBeacon) to be introduced via their own classes.
Added support for the Eddystone UID frame type.

Example use:

char UID_NAMESPACE[] = {0x0E,0x67,0x47,0x04,0x42,0xD0,0x14,0x06,0xD5,0x83}; // sha-1 hash of "com.bittysoftware"
char UID_INSTANCE[]  = {0x00 , 0x00, 0x00, 0x00, 0x00, 0x01};

uint8_t advertising = 0;
uint8_t tx_power_level = 6;

void startAdvertising() {
    uBit.bleManager.advertiseEddystoneUid(UID_NAMESPACE, UID_INSTANCE, tx_power_level, false);
    advertising = 1;
2016-10-27 11:01:04 +01:00
Martin Woolley 75b26f8339 Made MicroBitBLEManager more singleton-like. Made class instance variable public static.
Refactored Eddystone support, moving frame content code to new MicroBitEddystone class in anticipation of adding other frame formats.
2016-10-26 14:58:09 +01:00
Martin Woolley 5d32e70367 Made MicroBitBLEManager more singleton-like
Refatcored Eddystone support, moving frame content code to new MicroBitEddystone class.
2016-10-26 14:15:56 +01:00
Joe Finney be56fff183 microbit: Add more detail to RSSI method documentation 2016-10-25 17:42:48 +01:00
Joe Finney 16522a6887 microbit: Update Radio RSSI value to be -dbm
Normalisation of RSSI value from the inverted dbm value return by the nrf51822
hardware into a true, signed RSSI value measured in -dbm.
2016-10-25 17:35:26 +01:00
Joe Finney 017fe73f9c Merge pull request #230 from bluetooth-mdw/master
Guarded against redefinition of MICROBIT_BLE_SECURITY_LEVEL which cou…
2016-10-25 15:16:27 +01:00
Martin Woolley 0e3bed7004 Guarded against redefinition of MICROBIT_BLE_SECURITY_LEVEL which could occur if the bluetooth open config.json flag was set 2016-10-25 14:44:13 +01:00
Joe Finney 0c5c1168be Bump version to v2.0.0-rc5 2016-10-18 16:39:34 +01:00
Joe Finney d1fd610d4c Merge pull request #223 from bluetooth-mdw/master
Exposed MICROBIT_BLE_SECURITY_LEVEL through config.json
2016-10-18 15:17:40 +01:00
Martin Woolley 4ce50dea21 Exposed MICROBIT_BLE_SECURITY_LEVEL through config.json as new security_level json property 2016-10-11 09:14:29 +01:00
Joe Finney 4569369a95 Merge pull request #219 from lancaster-university/microbit-mbfs
Microbit mbfs
2016-10-10 22:34:44 +01:00
James Devine 3aa45435df microbit-dal: removed open from MicroBitFile
After recent additions such as "flush" to the file API,
an open call no longer makes sense. This commit removes
2016-10-10 12:35:40 +01:00
Joe Finney 2c01c1646e microbit: Add flush() operation to MicroBitFile
Add flush() wrapper of MicroBitFile class.
2016-10-08 14:10:30 +01:00
Joe Finney cf5cb234f2 microbit: Add ARMCC compatibility to MicroBitFileSystem
- Generalised linker symbol definition to permit ARMCC linker symbols in
addition to gcc linker symbols

- Improved MicroBitFileSystem FLASH area calculation. Some sections were
  erroneously used in the calculation of the previous version, and page aligned
calculations resulted in artificial over allocation.

- moved variable initialisation code from MicroBitFileSystems class
  declaration into init() funciton to support ARMCC compiler.

- Remove redundant simulator test code
2016-10-08 13:53:06 +01:00
Joe Finney bfe452593f microbit: Clarify failure case handling on MicroBitFile abstraction.
MicroBitFile now contains an explicit isValid() funciton, which can be used to
determine if the given file object is a valid file on the file system.

Default file open mode also updated to allow the user to override whether or
not the file is created on open.
2016-10-07 14:48:29 +01:00
Joe Finney 7563934897 microbit: Additional filename validation checks for MicroBitFileSystem 2016-10-07 14:32:31 +01:00
Joe Finney 58cb7b9650 microbit: Add explicit flush() function to MicroBitFileSystem
Explicit call added that writes back all cached state to FLASH. the behaviour
of this call is semantically equivalent to calling close() then open().
2016-10-07 13:04:39 +01:00
Joe Finney 21def371ae microbit: Fix typos 2016-10-04 21:59:45 +01:00
Joe Finney 36a0ee383e microbit: Remove MicroBitFile overload operations 2016-10-04 00:26:15 +01:00
Joe Finney bba7b543ae microbit: Clean up formatting and remove debug code. 2016-10-03 23:30:52 +01:00
Joe Finney 5ee1db1cdf microbit: Add default settings for MicroBitFileSystem 2016-09-30 10:18:17 +01:00
Joe Finney f1ea49e778 Merge pull request #216 from bluetooth-mdw/master
Support for Just Works pairing
2016-09-30 09:37:12 +01:00
Martin Woolley 4ad61def37 Support for Just Works pairing 2016-09-28 13:44:37 +01:00
Joe Finney 6e755d0b2c Merge pull request #215 from showio/master
Added connectable flag to advertise eddystoneurl func
2016-09-28 11:25:14 +01:00
Thomas Beverley c95c8e32ae Added connectable flag to advertise eddystoneurl func 2016-09-28 10:07:48 +00:00
Joe Finney 73093aa2f5 Merge pull request #214 from showio/master
Added physical web transmission
2016-09-28 10:15:53 +01:00
Thomas Beverley 05f60d018c Renamed physical web to be eddystone url 2016-09-27 13:01:49 +00:00
Thomas Beverley 93f22b33a1 Fixed internval typo 2016-09-27 10:33:58 +00:00
Thomas Beverley 145d8c3d7a Optionally include physical web code depending on microbit-dal.bluetooth.physical_web from the config.json file 2016-09-27 10:27:59 +00:00
Thomas Beverley 93917402e6 Changed uint8_t to be int8_t for calibration and added transmission interval as optional parameter to physical web transmission 2016-09-27 10:01:54 +00:00
Thomas Beverley 95dc970024 Fixed typo in callibratedPower -> calibratedPower 2016-09-27 08:13:44 +00:00
Thomas Beverley 5617cc600d Added ManagedString variant to advertisePhysicalWebUrl. Renamed stopAdvertise to stopAdvertising. Improved the docs around these two methods 2016-09-27 08:05:30 +00:00
Thomas Beverley 2f0db1ed2c Added physical web transmission 2016-09-26 12:26:13 +00:00
Joe Finney 9c79ef729b microbit: Added MicroBitFile Object Oriented API 2016-09-16 17:31:20 +01:00
Joe Finney 89987a265a microbit: Remove redundant code 2016-09-16 16:48:27 +01:00
Joe Finney 1484fce941 microbit: Minor improvmeents to reduce uneccessary erasures of FLASH pages 2016-09-16 16:28:01 +01:00
Joe Finney 052b6d206f microbit: correct initialisation of root directory 2016-09-15 20:19:33 +01:00
Joe Finney 2237c764d8 microbit: First clean compile for micro:bit 2016-09-15 08:52:01 +01:00
Joe Finney b71d1e37a1 microbit: Initial merge of file fystem codebase 2016-09-15 07:19:09 +01:00
James Devine 5fa55812c7 Merge pull request #207 from lancaster-university/emptystring
Make sure there is only one empty string
2016-09-14 21:05:05 -07:00
Martin Woolley 3cf56b8f44 Merge pull request #209 from bluetooth-mdw/master
PWM Control characteristic added to IO Pin Service
2016-09-01 06:08:48 +01:00
Martin Woolley b73be32eeb removed serial debug output 2016-09-01 06:04:01 +01:00