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
gap.h
00001 /** 00002 * @file gap.h 00003 * @brief Generic Access Profile. 00004 * Copyright 2015 SEVENCORE Co., Ltd. 00005 * 00006 * @author HyeongJun Kim 00007 * @version 1.0.0 00008 * @date 2015-08-20 00009 */ 00010 #ifndef GAP_H 00011 #define GAP_H 00012 #include "dialog_fota_config.h" 00013 00014 /** 00015 **************************************************************************************** 00016 * @addtogroup dialog_fota module 00017 * @brief Generic Access Profile. 00018 * 00019 * @{ 00020 **************************************************************************************** 00021 */ 00022 00023 namespace sevencore_fota{ 00024 00025 #define KEY_LEN 0x10 00026 00027 00028 /// Generic Security key structure 00029 struct gap_sec_key 00030 { 00031 /// Key value MSB -> LSB 00032 uint8_t key[KEY_LEN]; 00033 }; 00034 00035 /// Address information about a device address 00036 struct gap_bdaddr 00037 { 00038 /// BD Address of device 00039 struct bd_addr addr; 00040 /// Address type of the device 0=public/1=private random 00041 uint8_t addr_type; 00042 }; 00043 00044 /// Advertising mode 00045 enum gap_adv_mode 00046 { 00047 /// Mode in non-discoverable 00048 GAP_NON_DISCOVERABLE, 00049 /// Mode in general discoverable 00050 GAP_GEN_DISCOVERABLE, 00051 /// Mode in limited discoverable 00052 GAP_LIM_DISCOVERABLE, 00053 /// Broadcaster mode which is a non discoverable and non connectable mode. 00054 GAP_BROADCASTER_MODE, 00055 }; 00056 00057 /// Role GAP 00058 enum gap_role 00059 { 00060 /// No role set yet 00061 GAP_NO_ROLE = 0x00, 00062 00063 /// Observer role 00064 GAP_OBSERVER_SCA = 0x01, 00065 00066 /// Broadcaster role 00067 GAP_BROADCASTER_ADV = 0x02, 00068 00069 /// Master/Central role 00070 GAP_CENTRAL_MST = (0x04 | GAP_OBSERVER_SCA), 00071 00072 /// Peripheral/Slave role 00073 GAP_PERIPHERAL_SLV = (0x08 | GAP_BROADCASTER_ADV), 00074 }; 00075 /// Authentication mask 00076 enum gap_auth_mask 00077 { 00078 /// No Flag set 00079 GAP_AUTH_NONE = 0, 00080 /// Bond authentication 00081 GAP_AUTH_BOND = (1 << 0), 00082 /// Man In the middle protection 00083 GAP_AUTH_MITM = (1 << 2), 00084 }; 00085 00086 00087 /// Authentication Requirements 00088 enum gap_auth 00089 { 00090 /// No MITM No Bonding 00091 GAP_AUTH_REQ_NO_MITM_NO_BOND = (GAP_AUTH_NONE), 00092 /// No MITM Bonding 00093 GAP_AUTH_REQ_NO_MITM_BOND = (GAP_AUTH_BOND), 00094 /// MITM No Bonding 00095 GAP_AUTH_REQ_MITM_NO_BOND = (GAP_AUTH_MITM), 00096 /// MITM and Bonding 00097 GAP_AUTH_REQ_MITM_BOND = (GAP_AUTH_MITM | GAP_AUTH_BOND), 00098 GAP_AUTH_REQ_LAST 00099 }; 00100 00101 /// Authorization setting 00102 enum gap_authz 00103 { 00104 /// Authorization not set, application informed when authorization requested 00105 GAP_AUTHZ_NOT_SET = 0x00, 00106 /// Authorization request automatically accepted 00107 GAP_AUTHZ_ACCEPT = 0x01, 00108 /// Authorization request automatically rejected 00109 GAP_AUTHZ_REJECT = 0x02, 00110 }; 00111 00112 }//namespace 00113 00114 /// @} dialog_fota module 00115 00116 #endif//GAP_H
Generated on Tue Jul 12 2022 16:20:47 by 1.7.2