Release 0.2.1

=============

Features
~~~~~~~~

- Add the 'packet' characteristic to the DFUService. This helps mimic the
  layout of the actual DFU service in the dfu-bootloader. Without this, some
  FOTA clients might get confused as service definitions change after handing
  control over to the bootloader.

- Initialize DFUService's controlPoint characteristic to have the value
  0xFFFF. This helps distinguish an application from the dfu-bootloader; since
  both provide the DFU-Service.

Bugfixes
~~~~~~~~

None.

Compatibility
~~~~~~~~~~~~~

No APIs have changed between 0.2.0 and this release. Applications need not be
This commit is contained in:
Rohit Grover 2014-09-26 16:42:50 +01:00
parent d70b360ab9
commit 3f87e06d99

View file

@ -43,6 +43,7 @@ public:
DFUService(BLEDevice &_ble, ResetPrepare_t _handoverCallback = NULL) :
ble(_ble),
controlBytes(),
packetBytes(),
controlPoint(DFUServiceControlCharacteristicUUID, controlBytes, SIZEOF_CONTROL_BYTES, SIZEOF_CONTROL_BYTES,
GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_WRITE | GattCharacteristic::BLE_GATT_CHAR_PROPERTIES_NOTIFY),
packet(DFUServicePacketCharacteristicUUID, packetBytes, SIZEOF_PACKET_BYTES, SIZEOF_PACKET_BYTES,
@ -52,6 +53,11 @@ public:
return;
}
/* Set an initial value for control bytes so that the application's DFUService can
* be distinguished from the real DFU service provided by the bootloader. */
controlBytes[0] = 0xFF;
controlBytes[1] = 0xFF;
GattCharacteristic *dfuChars[] = {&controlPoint, &packet};
GattService dfuService(DFUServiceUUID, dfuChars, sizeof(dfuChars) / sizeof(GattCharacteristic *));
@ -86,7 +92,7 @@ private:
static const unsigned SIZEOF_CONTROL_BYTES = 2;
static const unsigned SIZEOF_PACKET_BYTES = 20;
static ResetPrepare_t handoverCallback; /**< application specific handover callback. */
static ResetPrepare_t handoverCallback; /**< application specific handover callback. */
private:
BLEDevice &ble;