InPlay API
in_ble_gap_evt.h
1 
13 #ifndef IN_BLE_GAP_EVENT_H
14 #define IN_BLE_GAP_EVENT_H
15 
16 #include "./ble/in_ble_evt.h"
17 
27 /*
28  * Enumerations
29  ****************************************************************************************
30  */
31 
33 enum ble_gap_evt{
34 
36  GAP_EVT_PEER_NAME_IND = GAP_EVT_CODE + 1,
37 
39  GAP_EVT_SYNC_ESTABLISHED,
40 
42  GAP_EVT_RX_SCAN_REQ,
43 
45  GAP_EVT_ADV_REPORT,
46 
48  GAP_EVT_ACTIVITY_STOP,
49 
51  GAP_EVT_DEV_RND_ADDR_INFO,
52 
54  GAP_EVT_KEYPRESS_IND,
55 
57  GAP_EVT_GET_DEV_INFO_REQ,
58 
60  GAP_EVT_SET_DEV_INFO_REQ,
61 
63  GAP_EVT_DISCONNECT,
64 
66  GAP_EVT_CONN_REQ,
67 
69  GAP_EVT_PING_TO_IND,
70 
72  GAP_EVT_SIGNED_COUNTER_UPD,
73 
75  GAP_EVT_SECURITY_IND,
76 
78  GAP_EVT_ENCRYPT_REQ,
79 
81  GAP_EVT_ENCRYPT_IND,
82 
84  GAP_EVT_BOND_REQ,
85 
87  GAP_EVT_BOND_IND,
88 
90  GAP_EVT_CONN_PARAM_UPD_REQ,
91 
93  GAP_EVT_CONN_PARAM_UPD,
94 
96  GAP_EVT_CONN_PHY_UPD,
97 
99  GAP_EVT_LE_PKT_SIZE_IND,
100  };
101 
103 typedef struct
104 {
108  uint8_t addr_type;
110  uint8_t name_len;
112  uint8_t name[];
114 
116 typedef struct
117 {
119  uint8_t actv_idx;
121  uint8_t phy;
123  uint16_t intv;
125  uint8_t adv_sid;
127  uint8_t clk_acc;
131 
132 
134 typedef struct
135 {
137  uint8_t actv_idx;
138 
141 
143 
145 typedef struct
146 {
148  uint8_t actv_idx;
149 
151  uint8_t info;
152 
155 
158 
160  int8_t tx_pwr;
161 
163  int8_t rssi;
164 
166  int8_t adv_chn;
167 
169  uint8_t phy_prim;
170 
172  uint8_t phy_second;
173 
176  uint8_t adv_sid;
177 
180  uint16_t period_adv_intv;
181 
183  uint16_t length;
184 
186  uint8_t data[];
188 
189 
191 typedef struct
192 {
194  uint8_t actv_idx;
195 
197  uint8_t actv_type;
198 
200  uint8_t reason;
201 
203  uint8_t per_adv_stop;
204 
206 
207 
209 typedef struct
210 {
213 
215  uint8_t actv_idx;
216 
218 
219 
221 typedef struct
222 {
224  uint8_t conidx;
225 
228 
230 
231 
233 typedef struct
234 {
236  uint8_t conidx;
237 
242  uint8_t req;
243 
245 
246 
248 typedef union
249 {
253  uint16_t appearance;
255 
257 typedef struct
258 {
260  uint8_t conidx;
261 
265  uint8_t req;
266 
270 
271 
273 typedef struct
274 {
276  uint8_t conidx;
277 
279  uint8_t reason;
280 
282 
283 
285 typedef struct
286 {
288  uint8_t conidx;
289 
291  uint16_t conhdl;
292 
294  uint16_t con_interval;
295 
297  uint16_t con_latency;
298 
300  uint16_t sup_to;
301 
303  uint8_t clk_accuracy;
304 
306  uint8_t peer_addr_type;
307 
310 
312 
313 
315 typedef struct
316 {
318  uint8_t conidx;
319 
321 
322 
324 typedef struct
325 {
327  uint8_t conidx;
328 
331 
334 
336 
337 
339 typedef struct
340 {
342  uint8_t conidx;
343 
345  uint8_t auth;
346 
348 
349 
351 typedef struct
352 {
354  uint8_t conidx;
355 
357  uint16_t ediv;
358 
361 
363 
365 typedef struct
366 {
368  uint8_t conidx;
369 
371  uint8_t auth;
372 
374 
375 
378 {
380  uint8_t auth_req;
382  uint8_t key_size;
387  uint8_t tk_type;
388 
391 
394 };
395 
397 typedef struct
398 {
400  uint8_t conidx;
401 
403  uint8_t request;
404 
406  union ble_bond_req_data data;
408 
411 {
416  uint8_t reason;
423 };
424 
426 typedef struct
427 {
429  uint8_t conidx;
430 
432  uint8_t info;
433 
435  union ble_bond_data data;
436 
438 
439 
441 typedef struct
442 {
444  uint8_t conidx;
446  uint16_t intv_min;
448  uint16_t intv_max;
450  uint16_t latency;
452  uint16_t time_out;
454 
455 
457 typedef struct
458 {
460  uint8_t conidx;
462  uint16_t con_interval;
464  uint16_t con_latency;
466  uint16_t sup_to;
468 
470 typedef struct
471 {
473  uint8_t conidx;
477 
479 typedef struct
480 {
482  uint8_t conidx;
484  uint16_t max_tx_octets;
486  uint16_t max_tx_time;
488  uint16_t max_rx_octets;
490  uint16_t max_rx_time;
492 
494 
495 #endif /* IN_BLE_GAP_EVENT_H */
496 
Random number structure.
Definition: in_ble_gap.h:1025
uint8_t adv_sid
Definition: in_ble_gap_evt.h:176
uint16_t sup_to
Link supervision timeout.
Definition: in_ble_gap_evt.h:300
Bonding requested by peer device indication message.
Definition: in_ble_gap_evt.h:397
int8_t rssi
RSSI (between -127 and +20 dBm)
Definition: in_ble_gap_evt.h:163
device information data
Definition: in_ble_gap_evt.h:248
uint8_t req
Definition: in_ble_gap_evt.h:242
int8_t tx_pwr
TX power (in dBm)
Definition: in_ble_gap_evt.h:160
uint8_t per_adv_stop
In case of periodic advertising, indicate if periodic advertising has been stopped.
Definition: in_ble_gap_evt.h:203
uint8_t peer_addr_type
Peer address type.
Definition: in_ble_gap_evt.h:306
uint16_t con_interval
Connection interval.
Definition: in_ble_gap_evt.h:294
Indicate that synchronization has been established with a periodic advertiser.
Definition: in_ble_gap_evt.h:116
uint8_t notification_type
notification type,
Definition: in_ble_gap_evt.h:227
uint8_t actv_idx
Activity index.
Definition: in_ble_gap_evt.h:215
Numeric comparison value */.
Definition: in_ble_gap.h:1120
Out of band data.
Definition: in_ble_gap.h:1111
ble_phy_ind_t phy
Updated PHY.
Definition: in_ble_gap_evt.h:475
uint16_t max_tx_time
The maximum time that the local Controller will take to TX.
Definition: in_ble_gap_evt.h:486
Authentication information.
Definition: in_ble_gap.h:1101
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:318
Security indication message.
Definition: in_ble_gap_evt.h:339
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:327
ble_addr_t addr
peer device bd address
Definition: in_ble_gap_evt.h:106
uint16_t max_tx_octets
The maximum number of payload octets in TX.
Definition: in_ble_gap_evt.h:484
uint32_t peer_sign_counter
Peer SignCounter value.
Definition: in_ble_gap_evt.h:333
uint8_t req
Definition: in_ble_gap_evt.h:265
Encrypt indication message.
Definition: in_ble_gap_evt.h:365
uint8_t auth_req
Authentication level,.
Definition: in_ble_gap_evt.h:380
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:276
uint8_t reason
Reason of disconnection.
Definition: in_ble_gap_evt.h:279
int8_t adv_chn
Advertising channel number.
Definition: in_ble_gap_evt.h:166
BD Address structure.
Definition: in_ble_gap.h:1010
ble_bdaddr_t trans_addr
Transmitter device address.
Definition: in_ble_gap_evt.h:140
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:400
uint8_t clk_acc
Advertiser clock accuracy,.
Definition: in_ble_gap_evt.h:127
set_dev_info_t info
device information data
Definition: in_ble_gap_evt.h:268
Connection establish request message.
Definition: in_ble_gap_evt.h:285
uint16_t length
Report length.
Definition: in_ble_gap_evt.h:183
Indicate the PHY used for transmission and reception.
Definition: in_ble_gap.h:1146
Event GAP_EVT_CONN_PHY_UPD params.
Definition: in_ble_gap_evt.h:470
uint8_t key_size
LTK Key Size (if request = LTK_EXCH)
Definition: in_ble_gap_evt.h:382
Identity Resolving Key information.
Definition: in_ble_gap.h:1092
ble_bond_auth_t auth
Definition: in_ble_gap_evt.h:414
ble_rnd_nb_t rand_nb
Random Number.
Definition: in_ble_gap_evt.h:360
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:444
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:260
Generic Security key structure.
Definition: in_ble_gap.h:1072
uint16_t con_latency
Connection latency value.
Definition: in_ble_gap_evt.h:464
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:473
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:460
uint16_t max_rx_time
The maximum time that the local Controller will take to RX.
Definition: in_ble_gap_evt.h:490
uint8_t info
Bit field providing information about the received report,.
Definition: in_ble_gap_evt.h:151
ble_bdaddr_t trans_addr
Transmitter device address.
Definition: in_ble_gap_evt.h:154
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:482
uint8_t request
Bond request type,.
Definition: in_ble_gap_evt.h:403
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:429
uint8_t addr_type
peer device address type
Definition: in_ble_gap_evt.h:108
uint8_t info
Bond information type,.
Definition: in_ble_gap_evt.h:432
uint8_t phy
PHY on which synchronization has been established,.
Definition: in_ble_gap_evt.h:121
ble_addr_t peer_addr
Peer BT address.
Definition: in_ble_gap_evt.h:309
Ping timeout update indication.
Definition: in_ble_gap_evt.h:315
uint8_t actv_idx
Activity identifier.
Definition: in_ble_gap_evt.h:119
Signed counter update indication.
Definition: in_ble_gap_evt.h:324
uint16_t intv_min
Connection interval minimum.
Definition: in_ble_gap_evt.h:446
uint16_t ediv
Encryption Diversifier.
Definition: in_ble_gap_evt.h:357
ble_bdaddr_t addr
Local device address information.
Definition: in_ble_gap_evt.h:212
Advertising report indication.
Definition: in_ble_gap_evt.h:145
uint8_t actv_idx
Activity identifier.
Definition: in_ble_gap_evt.h:137
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:236
uint8_t auth
Authentication level,.
Definition: in_ble_gap_evt.h:371
Encrypt request indication message.
Definition: in_ble_gap_evt.h:351
Event GAP_EVT_LE_PKT_SIZE_IND params.
Definition: in_ble_gap_evt.h:479
Peer request local device information.
Definition: in_ble_gap_evt.h:233
ble_oob_t oob_data
Addition OOB Data for the OOB Conf and Rand values.
Definition: in_ble_gap_evt.h:390
uint16_t time_out
Supervision timeout.
Definition: in_ble_gap_evt.h:452
uint8_t reason
Pairing failed reason (if info = PAIRING_FAILED)
Definition: in_ble_gap_evt.h:416
uint8_t clk_accuracy
Clock accuracy.
Definition: in_ble_gap_evt.h:303
uint8_t tk_type
Definition: in_ble_gap_evt.h:387
Name of peer device indication.
Definition: in_ble_gap_evt.h:103
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:368
uint16_t appearance
Appearance Icon.
Definition: in_ble_gap_evt.h:253
Event GAP_EVT_BOND_IND params.
Definition: in_ble_gap_evt.h:426
ble_irk_t irk
Identity Resolving Key information (if info = IRK_EXCH)
Definition: in_ble_gap_evt.h:420
Bond procedure information data.
Definition: in_ble_gap_evt.h:410
Activity stop indication.
Definition: in_ble_gap_evt.h:191
Random address indication.
Definition: in_ble_gap_evt.h:209
Peer device request to modify local device info such as name or appearance.
Definition: in_ble_gap_evt.h:257
uint8_t auth
Authentication level,.
Definition: in_ble_gap_evt.h:345
Event GAP_EVT_CONN_PARAM_UPD_REQ params.
Definition: in_ble_gap_evt.h:441
Address information about a device address.
Definition: in_ble_gap.h:1041
uint16_t con_latency
Connection latency.
Definition: in_ble_gap_evt.h:297
uint8_t phy_second
Secondary PHY on which advertising report has been received,.
Definition: in_ble_gap_evt.h:172
uint16_t intv_max
Connection interval maximum.
Definition: in_ble_gap_evt.h:448
uint32_t local_sign_counter
Local SignCounter value.
Definition: in_ble_gap_evt.h:330
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:224
uint8_t actv_idx
Activity identifier.
Definition: in_ble_gap_evt.h:148
GAP event code start with 0x0000.
Definition: in_ble_evt.h:29
uint16_t sup_to
Supervision timeout.
Definition: in_ble_gap_evt.h:466
ble_bdaddr_t target_addr
Target address (in case of a directed advertising report)
Definition: in_ble_gap_evt.h:157
uint8_t reason
Activity stop reason,.
Definition: in_ble_gap_evt.h:200
Long Term Key information.
Definition: in_ble_gap.h:1079
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:342
uint16_t intv
Periodic advertising interval (in unit of 1.25ms, min is 7.5ms)
Definition: in_ble_gap_evt.h:123
Device name.
Definition: in_ble_gap.h:922
ble_bdaddr_t addr
Advertiser address.
Definition: in_ble_gap_evt.h:129
uint16_t con_interval
Connection interval value.
Definition: in_ble_gap_evt.h:462
ble_dev_name_t name
Device name.
Definition: in_ble_gap_evt.h:251
uint8_t adv_sid
Advertising SID.
Definition: in_ble_gap_evt.h:125
uint16_t conhdl
Connection handle.
Definition: in_ble_gap_evt.h:291
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:288
Disconnect by peer indication message.
Definition: in_ble_gap_evt.h:273
uint8_t actv_idx
Activity identifier.
Definition: in_ble_gap_evt.h:194
Received Scan request information.
Definition: in_ble_gap_evt.h:134
ble_ltk_t ltk
Long Term Key information (if info = LTK_EXCH)
Definition: in_ble_gap_evt.h:418
uint8_t name_len
peer device name length
Definition: in_ble_gap_evt.h:110
uint8_t phy_prim
Primary PHY on which advertising report has been received,.
Definition: in_ble_gap_evt.h:169
Event GAP_EVT_CONN_PARAM_UPD params.
Definition: in_ble_gap_evt.h:457
uint16_t period_adv_intv
Definition: in_ble_gap_evt.h:180
ble_nc_t nc_data
Numeric Comparison Data.
Definition: in_ble_gap_evt.h:393
Peer keypress indication.
Definition: in_ble_gap_evt.h:221
ble_sec_key_t csrk
Connection Signature Resolving Key information (if info = CSRK_EXCH)
Definition: in_ble_gap_evt.h:422
uint8_t conidx
Connection index.
Definition: in_ble_gap_evt.h:354
uint8_t actv_type
Activity type,.
Definition: in_ble_gap_evt.h:197
uint16_t max_rx_octets
The maximum number of payload octets in RX.
Definition: in_ble_gap_evt.h:488
uint16_t latency
Latency.
Definition: in_ble_gap_evt.h:450
Bond procedure requested information data.
Definition: in_ble_gap_evt.h:377