Bluetooth Low Energy based Firmware Over The Air with Mbed. Mbed part is a external processor of the IoT devices and communicate with a Bluetooth module. The Bluetooth module have to support BLE and implement BLE FOTA profile designed by ours. BLE FOTA profile specification is available from our GIT hub wiki(https://github.com/sevencore/BLEFOTA).
Dependencies: mbed
Fork of mbed_fota by
Bluetooth Low Energy based Firmware Over The Air with Mbed. Mbed part is a external processor of the IoT devices and communicate with a Bluetooth module. The Bluetooth module have to support BLE and implement BLE FOTA profile designed by ours. BLE FOTA profile specification is available from our GIT hub wiki.
Diff: dialog_fota/app.h
- Revision:
- 4:60be78a172c2
- Parent:
- 3:1e70387e1337
- Child:
- 5:e11b23f9aacc
diff -r 1e70387e1337 -r 60be78a172c2 dialog_fota/app.h --- a/dialog_fota/app.h Tue Jun 23 06:32:40 2015 +0000 +++ b/dialog_fota/app.h Wed Jun 24 08:50:07 2015 +0000 @@ -2,11 +2,50 @@ #define APP_H #include "BleMsgHandler.h" +#include "app_sw_version.h" +#include "diss_task.h" +#include "dialog_fota_config.h" namespace sevencore_fota{ +/* + * DISS DEFINITIONS + **************************************************************************************** + */ +/// Manufacturer Name (up to 18 chars) +#define APP_DIS_MANUFACTURER_NAME ("Dialog Semi") +#define APP_DIS_MANUFACTURER_NAME_LEN (11) +/// Model Number String (up to 18 chars) +#define APP_DIS_MODEL_NB_STR ("DA14580") +#define APP_DIS_MODEL_NB_STR_LEN (7) +/// System ID - LSB -> MSB (FIXME) +#define APP_DIS_SYSTEM_ID ("\x12\x34\x56\xFF\xFE\x9A\xBC\xDE") +#define APP_DIS_SYSTEM_ID_LEN (8) + +#define APP_DIS_SW_REV DA14583_REFDES_SW_VERSION +#define APP_DIS_FIRM_REV DA14583_SW_VERSION +#define APP_DIS_FEATURES (DIS_MANUFACTURER_NAME_CHAR_SUP | DIS_MODEL_NB_STR_CHAR_SUP | DIS_SYSTEM_ID_CHAR_SUP | DIS_SW_REV_STR_CHAR_SUP | DIS_FIRM_REV_STR_CHAR_SUP | DIS_PNP_ID_CHAR_SUP) +/// Advertising minimum interval +#define APP_ADV_INT_MIN 0x800 +/// Advertising maximum interval +#define APP_ADV_INT_MAX 0x800 +/// Advertising channel map +#define APP_ADV_CHMAP 0x07 +/// Advertising data maximal length +#define APP_ADV_DATA_MAX_SIZE (ADV_DATA_LEN - 3) +/// Scan Response data maximal length +#define APP_SCAN_RESP_DATA_MAX_SIZE (SCAN_RSP_DATA_LEN) +#define APP_DFLT_ADV_DATA "\x09\x03\x03\x18\x02\x18\x04\x18\xF5\xFE" +#define APP_DFLT_ADV_DATA_LEN (8+2) +#define APP_SCNRSP_DATA "\x09\xFF\x00\x60\x52\x57\x2D\x42\x4C\x45" +#define APP_SCNRSP_DATA_LENGTH (10) +#define APP_DFLT_DEVICE_NAME ("EXT_FOTA") + void app_rst_gap(BleMsgHandler *BMH); +void app_diss_db_create(BleMsgHandler* BMH); +void app_adv_start(BleMsgHandler* BMH); +void app_set_mode(BleMsgHandler* BMH);