BLE fota Robot Demo

Dependencies:   mbed-rtos mbed mbed_fota_fan_control

Fork of mbed_fota_lamp_control by KIM HyoengJun

Committer:
dudnwjs
Date:
Mon Aug 24 02:29:16 2015 +0000
Revision:
9:fcf91f563147
Parent:
5:e11b23f9aacc
Child:
10:18044afe4364
Add comment for form doxygen;

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dudnwjs 3:1e70387e1337 1 #ifndef GAPM_TASK_H
dudnwjs 3:1e70387e1337 2 #define GAPM_TASK_H
dudnwjs 3:1e70387e1337 3
dudnwjs 4:60be78a172c2 4 #include "dialog_fota_config.h"
dudnwjs 5:e11b23f9aacc 5 #include "gap.h"
dudnwjs 4:60be78a172c2 6
dudnwjs 9:fcf91f563147 7 /**
dudnwjs 9:fcf91f563147 8 ****************************************************************************************
dudnwjs 9:fcf91f563147 9 * @addtogroup dialog_fota module
dudnwjs 9:fcf91f563147 10 * @brief Generic Access Profile Manager Task Header.
dudnwjs 9:fcf91f563147 11 *
dudnwjs 9:fcf91f563147 12 * @{
dudnwjs 9:fcf91f563147 13 ****************************************************************************************
dudnwjs 9:fcf91f563147 14 */
dudnwjs 3:1e70387e1337 15 namespace sevencore_fota{
dudnwjs 3:1e70387e1337 16
dudnwjs 4:60be78a172c2 17 /// Advertising or scanning report information event
dudnwjs 4:60be78a172c2 18 struct gapm_adv_report_ind
dudnwjs 4:60be78a172c2 19 {
dudnwjs 4:60be78a172c2 20 /// Advertising report structure
dudnwjs 4:60be78a172c2 21 struct adv_report report;
dudnwjs 4:60be78a172c2 22 };
dudnwjs 4:60be78a172c2 23
dudnwjs 3:1e70387e1337 24 /// Reset link layer and the host command
dudnwjs 3:1e70387e1337 25 struct gapm_reset_cmd
dudnwjs 3:1e70387e1337 26 {
dudnwjs 3:1e70387e1337 27 /// GAPM requested operation:
dudnwjs 3:1e70387e1337 28 /// - GAPM_RESET: Reset BLE subsystem: LL and HL.
dudnwjs 3:1e70387e1337 29 uint8_t operation;
dudnwjs 3:1e70387e1337 30 };
dudnwjs 4:60be78a172c2 31 /// Command complete event data structure
dudnwjs 4:60be78a172c2 32 struct gapm_cmp_evt
dudnwjs 4:60be78a172c2 33 {
dudnwjs 4:60be78a172c2 34 /// GAP requested operation
dudnwjs 4:60be78a172c2 35 uint8_t operation;
dudnwjs 4:60be78a172c2 36 /// Status of the request
dudnwjs 4:60be78a172c2 37 uint8_t status;
dudnwjs 4:60be78a172c2 38 };
dudnwjs 4:60be78a172c2 39
dudnwjs 4:60be78a172c2 40 /// Air operation default parameters
dudnwjs 4:60be78a172c2 41 struct gapm_air_operation
dudnwjs 4:60be78a172c2 42 {
dudnwjs 4:60be78a172c2 43 /// Operation code.
dudnwjs 4:60be78a172c2 44 uint8_t code;
dudnwjs 4:60be78a172c2 45
dudnwjs 4:60be78a172c2 46
dudnwjs 4:60be78a172c2 47 /** Own BD address source of the device:
dudnwjs 4:60be78a172c2 48 * - GAPM_PUBLIC_ADDR: Public Address
dudnwjs 4:60be78a172c2 49 * - GAPM_PROVIDED_RND_ADDR: Provided random address
dudnwjs 4:60be78a172c2 50 * - GAPM_GEN_STATIC_RND_ADDR: Generated static random address
dudnwjs 4:60be78a172c2 51 * - GAPM_GEN_RSLV_ADDR: Generated resolvable private random address
dudnwjs 4:60be78a172c2 52 * - GAPM_GEN_NON_RSLV_ADDR: Generated non-resolvable private random address
dudnwjs 4:60be78a172c2 53 * - GAPM_PROVIDED_RECON_ADDR: Provided Reconnection address (only for GAPM_ADV_DIRECT)
dudnwjs 4:60be78a172c2 54 */
dudnwjs 4:60be78a172c2 55 uint8_t addr_src;
dudnwjs 4:60be78a172c2 56
dudnwjs 4:60be78a172c2 57 /// Dummy data use to retrieve internal operation state (should be set to 0).
dudnwjs 4:60be78a172c2 58 uint16_t state;
dudnwjs 4:60be78a172c2 59
dudnwjs 4:60be78a172c2 60 /// Duration of resolvable address before regenerate it.
dudnwjs 4:60be78a172c2 61 uint16_t renew_dur;
dudnwjs 4:60be78a172c2 62
dudnwjs 4:60be78a172c2 63 /// Provided own static private random address (addr_src = 1 or 5)
dudnwjs 4:60be78a172c2 64 struct bd_addr addr;
dudnwjs 4:60be78a172c2 65 };
dudnwjs 4:60be78a172c2 66
dudnwjs 4:60be78a172c2 67 /// Advertising data that contains information set by host.
dudnwjs 4:60be78a172c2 68 struct gapm_adv_host
dudnwjs 4:60be78a172c2 69 {
dudnwjs 4:60be78a172c2 70 /// Advertising mode :
dudnwjs 4:60be78a172c2 71 /// - GAP_NON_DISCOVERABLE: Non discoverable mode
dudnwjs 4:60be78a172c2 72 /// - GAP_GEN_DISCOVERABLE: General discoverable mode
dudnwjs 4:60be78a172c2 73 /// - GAP_LIM_DISCOVERABLE: Limited discoverable mode
dudnwjs 4:60be78a172c2 74 /// - GAP_BROADCASTER_MODE: Broadcaster mode
dudnwjs 4:60be78a172c2 75 uint8_t mode;
dudnwjs 4:60be78a172c2 76
dudnwjs 4:60be78a172c2 77 /// Advertising filter policy:
dudnwjs 4:60be78a172c2 78 /// - ADV_ALLOW_SCAN_ANY_CON_ANY: Allow both scan and connection requests from anyone
dudnwjs 4:60be78a172c2 79 /// - ADV_ALLOW_SCAN_WLST_CON_ANY: Allow both scan req from White List devices only and
dudnwjs 4:60be78a172c2 80 /// connection req from anyone
dudnwjs 4:60be78a172c2 81 /// - ADV_ALLOW_SCAN_ANY_CON_WLST: Allow both scan req from anyone and connection req
dudnwjs 4:60be78a172c2 82 /// from White List devices only
dudnwjs 4:60be78a172c2 83 /// - ADV_ALLOW_SCAN_WLST_CON_WLST: Allow scan and connection requests from White List
dudnwjs 4:60be78a172c2 84 /// devices only
dudnwjs 4:60be78a172c2 85 uint8_t adv_filt_policy;
dudnwjs 4:60be78a172c2 86
dudnwjs 4:60be78a172c2 87 /// Advertising data length - maximum 28 bytes, 3 bytes are reserved to set
dudnwjs 4:60be78a172c2 88 /// Advertising AD type flags, shall not be set in advertising data
dudnwjs 4:60be78a172c2 89 uint8_t adv_data_len;
dudnwjs 4:60be78a172c2 90 /// Advertising data
dudnwjs 4:60be78a172c2 91 uint8_t adv_data[ADV_DATA_LEN-3];
dudnwjs 4:60be78a172c2 92 /// Scan response data length- maximum 31 bytes
dudnwjs 4:60be78a172c2 93 uint8_t scan_rsp_data_len;
dudnwjs 4:60be78a172c2 94 /// Scan response data
dudnwjs 4:60be78a172c2 95 uint8_t scan_rsp_data[SCAN_RSP_DATA_LEN];
dudnwjs 4:60be78a172c2 96 };
dudnwjs 4:60be78a172c2 97
dudnwjs 4:60be78a172c2 98 /// Set advertising mode Command
dudnwjs 4:60be78a172c2 99 struct gapm_start_advertise_cmd
dudnwjs 4:60be78a172c2 100 {
dudnwjs 4:60be78a172c2 101 /// GAPM requested operation:
dudnwjs 4:60be78a172c2 102 /// - GAPM_ADV_NON_CONN: Start non connectable advertising
dudnwjs 4:60be78a172c2 103 /// - GAPM_ADV_UNDIRECT: Start undirected connectable advertising
dudnwjs 4:60be78a172c2 104 /// - GAPM_ADV_DIRECT: Start directed connectable advertising
dudnwjs 4:60be78a172c2 105 struct gapm_air_operation op;
dudnwjs 4:60be78a172c2 106
dudnwjs 4:60be78a172c2 107 /// Minimum interval for advertising
dudnwjs 4:60be78a172c2 108 uint16_t intv_min;
dudnwjs 4:60be78a172c2 109 /// Maximum interval for advertising
dudnwjs 4:60be78a172c2 110 uint16_t intv_max;
dudnwjs 4:60be78a172c2 111
dudnwjs 4:60be78a172c2 112 ///Advertising channel map
dudnwjs 4:60be78a172c2 113 uint8_t channel_map;
dudnwjs 4:60be78a172c2 114
dudnwjs 4:60be78a172c2 115 /// Advertising information
dudnwjs 4:60be78a172c2 116 union gapm_adv_info
dudnwjs 4:60be78a172c2 117 {
dudnwjs 4:60be78a172c2 118 /// Host information advertising data (GAPM_ADV_NON_CONN and GAPM_ADV_UNDIRECT)
dudnwjs 4:60be78a172c2 119 struct gapm_adv_host host;
dudnwjs 4:60be78a172c2 120 /// Direct address information (GAPM_ADV_DIRECT)
dudnwjs 4:60be78a172c2 121 /// (used only if reconnection address isn't set or privacy disabled)
dudnwjs 4:60be78a172c2 122 struct gap_bdaddr direct;
dudnwjs 4:60be78a172c2 123 } info;
dudnwjs 4:60be78a172c2 124 };
dudnwjs 4:60be78a172c2 125
dudnwjs 4:60be78a172c2 126 /// Set device configuration command
dudnwjs 4:60be78a172c2 127 struct gapm_set_dev_config_cmd
dudnwjs 4:60be78a172c2 128 {
dudnwjs 4:60be78a172c2 129 /// GAPM requested operation:
dudnwjs 4:60be78a172c2 130 /// - GAPM_SET_DEV_CONFIG: Set device configuration
dudnwjs 4:60be78a172c2 131 uint8_t operation;
dudnwjs 4:60be78a172c2 132 /// Device Role: Central, Peripheral, Observer or Broadcaster
dudnwjs 4:60be78a172c2 133 uint8_t role;
dudnwjs 4:60be78a172c2 134 /// Device IRK used for resolvable random BD address generation (LSB first)
dudnwjs 4:60be78a172c2 135 struct gap_sec_key irk;
dudnwjs 4:60be78a172c2 136
dudnwjs 4:60be78a172c2 137 /// Device Appearance (0x0000 - Unknown appearance)
dudnwjs 4:60be78a172c2 138 uint16_t appearance;
dudnwjs 4:60be78a172c2 139 /// Device Appearance write permission requirements for peer device (@see gapm_write_att_perm)
dudnwjs 4:60be78a172c2 140 uint8_t appearance_write_perm;
dudnwjs 4:60be78a172c2 141 /// Device Name write permission requirements for peer device (@see gapm_write_att_perm)
dudnwjs 4:60be78a172c2 142 uint8_t name_write_perm;
dudnwjs 4:60be78a172c2 143
dudnwjs 4:60be78a172c2 144 /// Maximal MTU
dudnwjs 4:60be78a172c2 145 uint16_t max_mtu;
dudnwjs 4:60be78a172c2 146
dudnwjs 4:60be78a172c2 147 /// Peripheral only: *****************************************************************
dudnwjs 4:60be78a172c2 148 /// Slave preferred Minimum of connection interval
dudnwjs 4:60be78a172c2 149 uint16_t con_intv_min;
dudnwjs 4:60be78a172c2 150 /// Slave preferred Maximum of connection interval
dudnwjs 4:60be78a172c2 151 uint16_t con_intv_max;
dudnwjs 4:60be78a172c2 152 /// Slave preferred Connection latency
dudnwjs 4:60be78a172c2 153 uint16_t con_latency;
dudnwjs 4:60be78a172c2 154 /// Slave preferred Link supervision timeout
dudnwjs 4:60be78a172c2 155 uint16_t superv_to;
dudnwjs 4:60be78a172c2 156
dudnwjs 4:60be78a172c2 157 /// Privacy settings bit field (0b1 = enabled, 0b0 = disabled)
dudnwjs 4:60be78a172c2 158 /// - [bit 0]: Privacy Support
dudnwjs 4:60be78a172c2 159 /// - [bit 1]: Multiple Bond Support (Peripheral only); If enabled, privacy flag is
dudnwjs 4:60be78a172c2 160 /// read only.
dudnwjs 4:60be78a172c2 161 /// - [bit 2]: Reconnection address visible.
dudnwjs 4:60be78a172c2 162 uint8_t flags;
dudnwjs 4:60be78a172c2 163 };
dudnwjs 4:60be78a172c2 164
dudnwjs 3:1e70387e1337 165 /// GAP Manager Message Interface
dudnwjs 3:1e70387e1337 166 enum gapm_msg_id
dudnwjs 3:1e70387e1337 167 {
dudnwjs 3:1e70387e1337 168 /* Default event */
dudnwjs 3:1e70387e1337 169 /// Command Complete event
dudnwjs 3:1e70387e1337 170 GAPM_CMP_EVT = 13312,
dudnwjs 3:1e70387e1337 171 /// Event triggered to inform that lower layers are ready
dudnwjs 3:1e70387e1337 172 GAPM_DEVICE_READY_IND,
dudnwjs 3:1e70387e1337 173
dudnwjs 3:1e70387e1337 174 /* Default commands */
dudnwjs 3:1e70387e1337 175 /// Reset link layer and the host command
dudnwjs 3:1e70387e1337 176 GAPM_RESET_CMD,
dudnwjs 3:1e70387e1337 177 /// Cancel ongoing operation
dudnwjs 3:1e70387e1337 178 GAPM_CANCEL_CMD,
dudnwjs 3:1e70387e1337 179
dudnwjs 3:1e70387e1337 180 /* Device Configuration */
dudnwjs 3:1e70387e1337 181 /// Set device configuration command
dudnwjs 3:1e70387e1337 182 GAPM_SET_DEV_CONFIG_CMD,
dudnwjs 3:1e70387e1337 183 /// Set device name command
dudnwjs 3:1e70387e1337 184 GAPM_SET_DEV_NAME_CMD,
dudnwjs 3:1e70387e1337 185 /// Set device channel map
dudnwjs 3:1e70387e1337 186 GAPM_SET_CHANNEL_MAP_CMD,
dudnwjs 3:1e70387e1337 187
dudnwjs 3:1e70387e1337 188 /* Local device information */
dudnwjs 3:1e70387e1337 189 /// Get local device info command
dudnwjs 3:1e70387e1337 190 GAPM_GET_DEV_INFO_CMD,
dudnwjs 3:1e70387e1337 191 /// Local device name indication event
dudnwjs 3:1e70387e1337 192 GAPM_DEV_NAME_IND,
dudnwjs 3:1e70387e1337 193 /// Local device appearance indication event
dudnwjs 3:1e70387e1337 194 GAPM_APPEARANCE_IND,
dudnwjs 3:1e70387e1337 195 /// Local device version indication event
dudnwjs 3:1e70387e1337 196 GAPM_DEV_VERSION_IND,
dudnwjs 3:1e70387e1337 197 /// Local device BD Address indication event
dudnwjs 3:1e70387e1337 198 GAPM_DEV_BDADDR_IND,
dudnwjs 3:1e70387e1337 199
dudnwjs 3:1e70387e1337 200 /* White List */
dudnwjs 3:1e70387e1337 201 /// White List Management Command
dudnwjs 3:1e70387e1337 202 GAPM_WHITE_LIST_MGT_CMD,
dudnwjs 3:1e70387e1337 203 /// White List Size indication event
dudnwjs 3:1e70387e1337 204 GAPM_WHITE_LIST_SIZE_IND,
dudnwjs 3:1e70387e1337 205
dudnwjs 3:1e70387e1337 206 /* Air Operations */
dudnwjs 3:1e70387e1337 207 /// Set advertising mode Command
dudnwjs 3:1e70387e1337 208 GAPM_START_ADVERTISE_CMD,
dudnwjs 3:1e70387e1337 209
dudnwjs 3:1e70387e1337 210 /// Set Scan mode Command
dudnwjs 3:1e70387e1337 211 GAPM_START_SCAN_CMD,
dudnwjs 3:1e70387e1337 212 /// Advertising or scanning report information event
dudnwjs 3:1e70387e1337 213 GAPM_ADV_REPORT_IND,
dudnwjs 3:1e70387e1337 214
dudnwjs 3:1e70387e1337 215 /// Set connection initialization Command
dudnwjs 3:1e70387e1337 216 GAPM_START_CONNECTION_CMD,
dudnwjs 3:1e70387e1337 217 /// Name of peer device indication
dudnwjs 3:1e70387e1337 218 GAPM_PEER_NAME_IND,
dudnwjs 3:1e70387e1337 219 /// Confirm connection to a specific device (Connection Operation in Selective mode)
dudnwjs 3:1e70387e1337 220 GAPM_CONNECTION_CFM,
dudnwjs 3:1e70387e1337 221
dudnwjs 3:1e70387e1337 222 /* Privacy update events */
dudnwjs 3:1e70387e1337 223 /// Privacy flag value has been updated
dudnwjs 3:1e70387e1337 224 GAPM_UPDATED_PRIVACY_IND,
dudnwjs 3:1e70387e1337 225 /// Reconnection address has been updated
dudnwjs 3:1e70387e1337 226 GAPM_UPDATED_RECON_ADDR_IND,
dudnwjs 3:1e70387e1337 227
dudnwjs 3:1e70387e1337 228 /* Security / Encryption Toolbox */
dudnwjs 3:1e70387e1337 229 /// Resolve address command
dudnwjs 3:1e70387e1337 230 GAPM_RESOLV_ADDR_CMD,
dudnwjs 3:1e70387e1337 231 /// Indicate that resolvable random address has been solved
dudnwjs 3:1e70387e1337 232 GAPM_ADDR_SOLVED_IND,
dudnwjs 3:1e70387e1337 233 /// Generate a random address.
dudnwjs 3:1e70387e1337 234 GAPM_GEN_RAND_ADDR_CMD,
dudnwjs 3:1e70387e1337 235 /// Use the AES-128 block in the controller
dudnwjs 3:1e70387e1337 236 GAPM_USE_ENC_BLOCK_CMD,
dudnwjs 3:1e70387e1337 237 /// AES-128 block result indication
dudnwjs 3:1e70387e1337 238 GAPM_USE_ENC_BLOCK_IND,
dudnwjs 3:1e70387e1337 239 /// Generate a 8-byte random number
dudnwjs 3:1e70387e1337 240 GAPM_GEN_RAND_NB_CMD,
dudnwjs 3:1e70387e1337 241 /// Random Number Indication
dudnwjs 3:1e70387e1337 242 GAPM_GEN_RAND_NB_IND,
dudnwjs 3:1e70387e1337 243
dudnwjs 3:1e70387e1337 244 /* Debug */
dudnwjs 3:1e70387e1337 245 /// Indication containing information about memory usage.
dudnwjs 3:1e70387e1337 246 GAPM_DBG_MEM_INFO_IND,
dudnwjs 3:1e70387e1337 247
dudnwjs 3:1e70387e1337 248 /* Local device information -cont */
dudnwjs 3:1e70387e1337 249 /// Advertising channel Tx power level
dudnwjs 3:1e70387e1337 250 GAPM_DEV_ADV_TX_POWER_IND,
dudnwjs 3:1e70387e1337 251
dudnwjs 3:1e70387e1337 252 /* Internal messages for timer events, not part of API*/
dudnwjs 3:1e70387e1337 253 /// Limited discoverable timeout indication
dudnwjs 3:1e70387e1337 254 GAPM_LIM_DISC_TO_IND,
dudnwjs 3:1e70387e1337 255 /// Scan timeout indication
dudnwjs 3:1e70387e1337 256 GAPM_SCAN_TO_IND,
dudnwjs 3:1e70387e1337 257 /// Address renewal timeout indication
dudnwjs 3:1e70387e1337 258 GAPM_ADDR_RENEW_TO_IND,
dudnwjs 3:1e70387e1337 259 };
dudnwjs 3:1e70387e1337 260
dudnwjs 3:1e70387e1337 261 /// GAP Manager operation type - application interface
dudnwjs 3:1e70387e1337 262 enum gapm_operation
dudnwjs 3:1e70387e1337 263 {
dudnwjs 3:1e70387e1337 264 /* No Operation (if nothing has been requested) */
dudnwjs 3:1e70387e1337 265 /* ************************************************ */
dudnwjs 3:1e70387e1337 266 /// No operation.
dudnwjs 3:1e70387e1337 267 GAPM_NO_OP = 0x00,
dudnwjs 3:1e70387e1337 268
dudnwjs 3:1e70387e1337 269 /* Default operations */
dudnwjs 3:1e70387e1337 270 /* ************************************************ */
dudnwjs 3:1e70387e1337 271 /// Reset BLE subsystem: LL and HL.
dudnwjs 3:1e70387e1337 272 GAPM_RESET,
dudnwjs 3:1e70387e1337 273 /// Cancel currently executed operation.
dudnwjs 3:1e70387e1337 274 GAPM_CANCEL,
dudnwjs 3:1e70387e1337 275
dudnwjs 3:1e70387e1337 276 /* Configuration operations */
dudnwjs 3:1e70387e1337 277 /* ************************************************ */
dudnwjs 3:1e70387e1337 278 /// Set device configuration
dudnwjs 3:1e70387e1337 279 GAPM_SET_DEV_CONFIG,
dudnwjs 3:1e70387e1337 280 /// Set device name
dudnwjs 3:1e70387e1337 281 GAPM_SET_DEV_NAME,
dudnwjs 3:1e70387e1337 282 /// Set device channel map
dudnwjs 3:1e70387e1337 283 GAPM_SET_CHANNEL_MAP,
dudnwjs 3:1e70387e1337 284
dudnwjs 3:1e70387e1337 285 /* Retrieve device information */
dudnwjs 3:1e70387e1337 286 /* ************************************************ */
dudnwjs 3:1e70387e1337 287 /// Get Local device name
dudnwjs 3:1e70387e1337 288 GAPM_GET_DEV_NAME,
dudnwjs 3:1e70387e1337 289 /// Get Local device version
dudnwjs 3:1e70387e1337 290 GAPM_GET_DEV_VERSION,
dudnwjs 3:1e70387e1337 291 /// Get Local device BD Address
dudnwjs 3:1e70387e1337 292 GAPM_GET_DEV_BDADDR,
dudnwjs 3:1e70387e1337 293
dudnwjs 3:1e70387e1337 294 /* Operation on White list */
dudnwjs 3:1e70387e1337 295 /* ************************************************ */
dudnwjs 3:1e70387e1337 296 /// Get White List Size.
dudnwjs 3:1e70387e1337 297 GAPM_GET_WLIST_SIZE,
dudnwjs 3:1e70387e1337 298 /// Add devices in white list.
dudnwjs 3:1e70387e1337 299 GAPM_ADD_DEV_IN_WLIST,
dudnwjs 3:1e70387e1337 300 /// Remove devices form white list.
dudnwjs 3:1e70387e1337 301 GAPM_RMV_DEV_FRM_WLIST,
dudnwjs 3:1e70387e1337 302 /// Clear all devices from white list.
dudnwjs 3:1e70387e1337 303 GAPM_CLEAR_WLIST,
dudnwjs 3:1e70387e1337 304
dudnwjs 3:1e70387e1337 305 /* Advertise mode operations */
dudnwjs 3:1e70387e1337 306 /* ************************************************ */
dudnwjs 3:1e70387e1337 307 /// Start non connectable advertising
dudnwjs 3:1e70387e1337 308 GAPM_ADV_NON_CONN,
dudnwjs 3:1e70387e1337 309 /// Start undirected connectable advertising
dudnwjs 3:1e70387e1337 310 GAPM_ADV_UNDIRECT,
dudnwjs 3:1e70387e1337 311 /// Start directed connectable advertising
dudnwjs 3:1e70387e1337 312 GAPM_ADV_DIRECT,
dudnwjs 3:1e70387e1337 313
dudnwjs 3:1e70387e1337 314 /* Scan mode operations */
dudnwjs 3:1e70387e1337 315 /* ************************************************ */
dudnwjs 3:1e70387e1337 316 /// Start active scan operation
dudnwjs 3:1e70387e1337 317 GAPM_SCAN_ACTIVE,
dudnwjs 3:1e70387e1337 318 /// Start passive scan operation
dudnwjs 3:1e70387e1337 319 GAPM_SCAN_PASSIVE,
dudnwjs 3:1e70387e1337 320
dudnwjs 3:1e70387e1337 321 /* Connection mode operations */
dudnwjs 3:1e70387e1337 322 /* ************************************************ */
dudnwjs 3:1e70387e1337 323 /// Direct connection operation
dudnwjs 3:1e70387e1337 324 GAPM_CONNECTION_DIRECT,
dudnwjs 3:1e70387e1337 325 /// Automatic connection operation
dudnwjs 3:1e70387e1337 326 GAPM_CONNECTION_AUTO,
dudnwjs 3:1e70387e1337 327 /// Selective connection operation
dudnwjs 3:1e70387e1337 328 GAPM_CONNECTION_SELECTIVE,
dudnwjs 3:1e70387e1337 329 /// Name Request operation (requires to start a direct connection)
dudnwjs 3:1e70387e1337 330 GAPM_CONNECTION_NAME_REQUEST,
dudnwjs 3:1e70387e1337 331
dudnwjs 3:1e70387e1337 332 /* Security / Encryption Toolbox */
dudnwjs 3:1e70387e1337 333 /* ************************************************ */
dudnwjs 3:1e70387e1337 334 /// Resolve device address
dudnwjs 3:1e70387e1337 335 GAPM_RESOLV_ADDR,
dudnwjs 3:1e70387e1337 336 /// Generate a random address
dudnwjs 3:1e70387e1337 337 GAPM_GEN_RAND_ADDR,
dudnwjs 3:1e70387e1337 338 /// Use the controller's AES-128 block
dudnwjs 3:1e70387e1337 339 GAPM_USE_ENC_BLOCK,
dudnwjs 3:1e70387e1337 340 /// Generate a 8-byte random number
dudnwjs 3:1e70387e1337 341 GAPM_GEN_RAND_NB,
dudnwjs 3:1e70387e1337 342
dudnwjs 3:1e70387e1337 343 /* DEBUG */
dudnwjs 3:1e70387e1337 344 /* ************************************************ */
dudnwjs 3:1e70387e1337 345 /// Get memory usage
dudnwjs 3:1e70387e1337 346 GAPM_DBG_GET_MEM_INFO,
dudnwjs 3:1e70387e1337 347 /// Perform a platform reset
dudnwjs 3:1e70387e1337 348 GAPM_PLF_RESET,
dudnwjs 3:1e70387e1337 349
dudnwjs 3:1e70387e1337 350 /* Retrieve device information - cont */
dudnwjs 3:1e70387e1337 351 /* ************************************************ */
dudnwjs 3:1e70387e1337 352 /// Get device advertising power level
dudnwjs 3:1e70387e1337 353 GAPM_GET_DEV_ADV_TX_POWER,
dudnwjs 3:1e70387e1337 354
dudnwjs 3:1e70387e1337 355 /// Last GAPM operation flag
dudnwjs 3:1e70387e1337 356 GAPM_LAST
dudnwjs 3:1e70387e1337 357 };
dudnwjs 3:1e70387e1337 358
dudnwjs 4:60be78a172c2 359 /// Own BD address source of the device
dudnwjs 4:60be78a172c2 360 enum gapm_own_addr_src
dudnwjs 4:60be78a172c2 361 {
dudnwjs 4:60be78a172c2 362 /// Public Address
dudnwjs 4:60be78a172c2 363 GAPM_PUBLIC_ADDR,
dudnwjs 4:60be78a172c2 364 /// Provided random address
dudnwjs 4:60be78a172c2 365 GAPM_PROVIDED_RND_ADDR,
dudnwjs 4:60be78a172c2 366 /// Provided static random address
dudnwjs 4:60be78a172c2 367 GAPM_GEN_STATIC_RND_ADDR,
dudnwjs 4:60be78a172c2 368 /// Generated resolvable private random address
dudnwjs 4:60be78a172c2 369 GAPM_GEN_RSLV_ADDR,
dudnwjs 4:60be78a172c2 370 /// Generated non-resolvable private random address
dudnwjs 4:60be78a172c2 371 GAPM_GEN_NON_RSLV_ADDR,
dudnwjs 4:60be78a172c2 372 /// Provided Reconnection address
dudnwjs 4:60be78a172c2 373 GAPM_PROVIDED_RECON_ADDR,
dudnwjs 4:60be78a172c2 374 };
dudnwjs 4:60be78a172c2 375
dudnwjs 4:60be78a172c2 376 /// Device Attribute write permission requirement
dudnwjs 4:60be78a172c2 377 enum gapm_write_att_perm
dudnwjs 4:60be78a172c2 378 {
dudnwjs 4:60be78a172c2 379 /// Disable write access
dudnwjs 4:60be78a172c2 380 GAPM_WRITE_DISABLE = 0,
dudnwjs 4:60be78a172c2 381 /// Enable write access
dudnwjs 4:60be78a172c2 382 GAPM_WRITE_ENABLE = 8,
dudnwjs 4:60be78a172c2 383 /// Write access requires unauthenticated link
dudnwjs 4:60be78a172c2 384 GAPM_WRITE_UNAUTH = 16,
dudnwjs 4:60be78a172c2 385 /// Write access requires authenticated link
dudnwjs 4:60be78a172c2 386 GAPM_WRITE_AUTH = 24,
dudnwjs 4:60be78a172c2 387 };
dudnwjs 4:60be78a172c2 388
dudnwjs 3:1e70387e1337 389 }//namespace
dudnwjs 3:1e70387e1337 390
dudnwjs 9:fcf91f563147 391 /// @} dialog_fota module
dudnwjs 9:fcf91f563147 392
dudnwjs 3:1e70387e1337 393 #endif//GAPM_TASK_H