22 #ifndef GAP_ADVERTISER_H 23 #define GAP_ADVERTISER_H 52 #define GAPADV_PARAMS_LEGACY_SCANN_CONN { \ 54 .eventProps = GAP_ADV_PROP_CONNECTABLE | GAP_ADV_PROP_SCANNABLE | \ 55 GAP_ADV_PROP_LEGACY, \ 58 .primChanMap = GAP_ADV_CHAN_ALL, \ 59 .peerAddrType = PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID, \ 60 .peerAddr = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa }, \ 61 .filterPolicy = GAP_ADV_WL_POLICY_ANY_REQ, \ 62 .txPower = GAP_ADV_TX_POWER_NO_PREFERENCE, \ 63 .primPhy = GAP_ADV_PRIM_PHY_1_MBPS, \ 64 .secPhy = GAP_ADV_SEC_PHY_1_MBPS, \ 69 #define GAPADV_PARAMS_AE_LONG_RANGE_CONN { \ 70 .eventProps = GAP_ADV_PROP_CONNECTABLE, \ 73 .primChanMap = GAP_ADV_CHAN_ALL, \ 74 .peerAddrType = PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID, \ 75 .peerAddr = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa }, \ 76 .filterPolicy = GAP_ADV_WL_POLICY_ANY_REQ, \ 77 .txPower = GAP_ADV_TX_POWER_NO_PREFERENCE, \ 78 .primPhy = GAP_ADV_PRIM_PHY_CODED_S2, \ 79 .secPhy = GAP_ADV_SEC_PHY_CODED_S2, \ 84 #define GAPADV_PARAMS_AE_NC_NS { \ 88 .primChanMap = GAP_ADV_CHAN_ALL, \ 89 .peerAddrType = PEER_ADDRTYPE_PUBLIC_OR_PUBLIC_ID, \ 90 .peerAddr = { 0xaa, 0xaa, 0xaa, 0xaa, 0xaa, 0xaa }, \ 91 .filterPolicy = GAP_ADV_WL_POLICY_ANY_REQ, \ 92 .txPower = GAP_ADV_TX_POWER_NO_PREFERENCE, \ 93 .primPhy = GAP_ADV_PRIM_PHY_1_MBPS, \ 94 .secPhy = GAP_ADV_SEC_PHY_1_MBPS, \ 319 #define GAP_ADV_INVALID_HANDLE 0xFF 410 #define GAP_ADV_TX_POWER_NO_PREFERENCE 127 475 GAP_ADV_EVT_MASK_RESERVED = BV(15)
483 #define GAPADV_PERIODIC_ADV_INTERVAL_MIN 0x0006 485 #define GAPADV_PERIODIC_ADV_INTERVAL_MAX 0xFFFF 487 #define GAPADV_PERIODIC_ADV_ENABLE_TX_POWER 0x0040 489 #define GAPADV_PERIODIC_ADV_DISABLE_TX_POWER 0x0000 491 #define GAPADV_PERIODIC_ADV_DATA_INTERMIDIATE_FRAG 0x00 493 #define GAPADV_PERIODIC_ADV_DATA_FIRST_FRAG 0x01 495 #define GAPADV_PERIODIC_ADV_DATA_LAST_FRAG 0x02 497 #define GAPADV_PERIODIC_ADV_DATA_COMPLETE 0x03 499 #define GAPADV_PERIODIC_ADV_MAX_DATA_LEN 252 594 } GapAdv_periodicAdvEvt_t;
602 } GapAdv_dataUpdateEvent_t;
608 } GapAv_setAdvStatusDoneEvent_t;
667 GapAdv_freeBufferOptions_t freeOptions);
704 GapAdv_enableOptions_t enableOptions,
705 uint16 durationOrMaxEvents);
785 void *pValue, uint8_t *pLen);
805 uint16 *pLen, uint8 **ppBuf);
866 GapAdv_freeBufferOptions_t freeOptions);
913 uint16 len, uint8 *pBuf);
988 bStatus_t GapAdv_loadByBuffer_hook(uint16 len, uint8 *pBuf);
uint16 periodicAdvIntervalMin
Minimum periodic advertising interval; Range: 0x0006 to 0xFFFF Time = N * 1.25 ms Time Range: 7...
Definition: gap_advertiser.h:570
Omit advertiser's address from PDU's.
Definition: gap_advertiser.h:330
uint32_t primIntMax
GAP_ADV_PARAM_PRIMARY_INTERVAL_MAX
Definition: gap_advertiser.h:525
uint8 dataLength
The number of bytes in the Advertising Data parameter.
Definition: gap_advertiser.h:585
This API allows the software components in the Z-Stack to be written independently of the specifics o...
All Channels.
Definition: gap_advertiser.h:380
GAP_Peer_Addr_Types_t
Address types used for specifying peer address type.
Definition: gap.h:727
coded-s2
Definition: gap_advertiser.h:417
uint8_t GapAdv_SetPeriodicAdvParams(uint8 advHandle, GapAdv_periodicAdvParams_t *periodicAdvParams)
Channels 37 & 39.
Definition: gap_advertiser.h:376
bStatus_t GapAdv_SetPeriodicAdvData(uint8 advHandle, GapAdv_periodicAdvData_t *periodicAdvData)
bStatus_t GapAdv_setParam(uint8 handle, GapAdv_ParamId_t paramID, void *pValue)
bStatus_t GapAdv_getParam(uint8 handle, GapAdv_ParamId_t paramID, void *pValue, uint8_t *pLen)
Definition: gap_advertiser.h:289
uint32_t primIntMin
GAP_ADV_PARAM_PRIMARY_INTERVAL_MIN
Definition: gap_advertiser.h:524
bStatus_t GapAdv_prepareLoadByHandle(uint8 handle, GapAdv_freeBufferOptions_t freeOptions)
uint8 * pData
Periodic advertising data.
Definition: gap_advertiser.h:586
GapAdv_freeBufferOptions_t
Possible free options for Gap Advertiser API's.
Definition: gap_advertiser.h:343
Definition: gap_advertiser.h:465
1 mbps
Definition: gap_advertiser.h:415
Definition: gap_advertiser.h:221
bStatus_t GapAdv_loadByHandle(uint8 handle, GapAdv_dataTypes_t dataType, uint16 len, uint8 *pBuf)
Definition: gap_advertiser.h:331
Directed advertising.
Definition: gap_advertiser.h:327
bStatus_t GapAdv_abortLoad(void)
bStatus_t GapAdv_setVirtualAdvAddr(uint8 advHandle, uint8 *bdAddr)
Definition: gap_advertiser.h:453
bStatus_t GapAdv_enable(uint8 handle, GapAdv_enableOptions_t enableOptions, uint16 durationOrMaxEvents)
Data type returned with GAP_EVT_ADV_DATA_TRUNCATED event.
Definition: gap_advertiser.h:557
int8 rssi
RSSI of the scan req.
Definition: gap_advertiser.h:553
Scannable advertising.
Definition: gap_advertiser.h:326
uint16_t eventProps
GAP_ADV_PARAM_PROPS
Definition: gap_advertiser.h:523
Free the scan response data.
Definition: gap_advertiser.h:347
uint8 channel
Channel when the scan req was received.
Definition: gap_advertiser.h:552
GapAdv_enableOptions_t
Enable options for GapAdv_enable.
Definition: gap_advertiser.h:351
Definition: gap_advertiser.h:441
GapAdv_ParamId_t
Definition: gap_advertiser.h:157
Definition: gap_advertiser.h:392
1 mbps
Definition: gap_advertiser.h:423
uint8 handle
Advertising handle.
Definition: gap_advertiser.h:540
Definition: gap_advertiser.h:306
Don't free anything.
Definition: gap_advertiser.h:345
Definition: gap_advertiser.h:275
Channels 38 & 39.
Definition: gap_advertiser.h:378
uint16 periodicAdvIntervalMax
Maximum periodic advertising interval; Range: 0x0006 to 0xFFFF Time = N * 1.25 ms Time Range: 7...
Definition: gap_advertiser.h:571
bStatus_t GapAdv_disable(uint8 handle)
Disable an active advertising set.
void(* pfnGapCB_t)(uint32_t event, void *pBuf, uintptr_t arg)
Definition: gap.h:1343
uint8 handle
Advertising handle.
Definition: gap_advertiser.h:559
Definition: gap_advertiser.h:230
GapAdv_secondaryPHY_t secPhy
GAP_ADV_PARAM_SECONDARY_PHY
Definition: gap_advertiser.h:532
2 mbps
Definition: gap_advertiser.h:424
Scan response data.
Definition: gap_advertiser.h:339
bStatus_t GapAdv_setEventMask(uint8 handle, GapAdv_eventMaskFlags_t mask)
bStatus_t GapAdv_SetPeriodicAdvEnable(uint8 enable, uint8 advHandle)
uint16 periodicAdvProp
Periodic advertising properties - set bit 6 for include TxPower in the advertising PDU...
Definition: gap_advertiser.h:572
GapAdv_secondaryPHY_t
Gap Advertiser Options for advertising on the secondary PHY.
Definition: gap_advertiser.h:421
bStatus_t GapAdv_create(pfnGapCB_t *cb, GapAdv_params_t *advParam, uint8 *advHandle)
Definition: gap_advertiser.h:461
Definition: gap_advertiser.h:251
GapAdv_advChannels_t
GAP Advertiser Defines for Advertiser Channels.
Definition: gap_advertiser.h:369
Definition: gap_advertiser.h:191
Channels 37 & 38.
Definition: gap_advertiser.h:374
GAP_Peer_Addr_Types_t peerAddrType
GAP_ADV_PARAM_PEER_ADDRESS_TYPE
Definition: gap_advertiser.h:527
GapAdv_eventMaskFlags_t
Definition: gap_advertiser.h:436
Advertising data.
Definition: gap_advertiser.h:338
GapAdv_primaryPHY_t
Gap Advertiser Options for advertising on the primary PHY.
Definition: gap_advertiser.h:413
Definition: gap_advertiser.h:365
Type definitions and macros for BLE stack.
Channel 37.
Definition: gap_advertiser.h:371
Definition: gap_advertiser.h:177
Connectable advertising.
Definition: gap_advertiser.h:325
Free the advertising data.
Definition: gap_advertiser.h:346
Definition: gap_advertiser.h:361
bStatus_t GapAdv_getBuffer(uint8 handle, GapAdv_dataTypes_t dataType, uint16 *pLen, uint8 **ppBuf)
coded-s2
Definition: gap_advertiser.h:426
Definition: gap_advertiser.h:263
Definition: gap_advertiser.h:402
Definition: gap_advertiser.h:449
uint16 connHandle
Connection handle that ended advertising.
Definition: gap_advertiser.h:542
OSAL Event Header.
Definition: osal.h:92
Definition: gap_advertiser.h:445
coded-s8
Definition: gap_advertiser.h:425
GapAdv_filterPolicy_t filterPolicy
GAP_ADV_PARAM_FILTER_POLICY
Definition: gap_advertiser.h:529
GapAdv_advChannels_t primChanMap
GAP_ADV_PARAM_PRIMARY_CHANNEL_MAP
Definition: gap_advertiser.h:526
Periodic advertising parameters structure.
Definition: gap_advertiser.h:568
Use legacy advertising PDU's.
Definition: gap_advertiser.h:329
GapAdv_dataTypes_t
Gap Advertising Data Types.
Definition: gap_advertiser.h:336
Definition: gap_advertiser.h:357
uint8 scanAddrType
Address type of scanning device.
Definition: gap_advertiser.h:550
uint16 advDataLen
Definition: gap_advertiser.h:564
int8_t txPower
NOT CURRENTLY IMPLEMENTED.
Definition: gap_advertiser.h:530
Data type returned with GAP_EVT_ADV_SET_TERMINATED event.
Definition: gap_advertiser.h:538
#define B_ADDR_LEN
Default Public and Random Address Length.
Definition: bcomdef.h:108
Definition: gap_advertiser.h:166
Definition: gap_advertiser.h:521
Definition: gap_advertiser.h:457
High Duty Cycle Directed Advertising.
Definition: gap_advertiser.h:328
Definition: gap_advertiser.h:397
Status_t bStatus_t
BLE Generic Status return.
Definition: bcomdef.h:251
Definition: gap_advertiser.h:406
Definition: gap_advertiser.h:212
GapAdv_filterPolicy_t
GAP Advertiser White List Policy.
Definition: gap_advertiser.h:386
bStatus_t GapAdv_prepareLoadByBuffer(uint8 *pBuf, bool freeOldData)
bStatus_t GapAdv_loadByBuffer(uint16 len, uint8 *pBuf)
Channel 39.
Definition: gap_advertiser.h:373
bStatus_t GapAdv_destroy(uint8 handle, GapAdv_freeBufferOptions_t freeOptions)
Periodic advertising data structure.
Definition: gap_advertiser.h:576
uint8 handle
Advertising handle.
Definition: gap_advertiser.h:549
GapAdv_eventProps_t
GAP Advertising Event Param Properties.
Definition: gap_advertiser.h:323
coded-s8
Definition: gap_advertiser.h:416
Data type returned with GAP_EVT_SCAN_REQ_RECEIVED event.
Definition: gap_advertiser.h:547
Channel 38.
Definition: gap_advertiser.h:372
GapAdv_primaryPHY_t primPhy
GAP_ADV_PARAM_PRIMARY_PHY
Definition: gap_advertiser.h:531
uint8_t sid
GAP_ADV_PARAM_SID
Definition: gap_advertiser.h:533
uint8 status
TODO.
Definition: gap_advertiser.h:541
uint8 numCompAdvEvts
Number of completed advertising events.
Definition: gap_advertiser.h:543
uint8 operation
Definition: gap_advertiser.h:584
Definition: gap_advertiser.h:203
uint8 availAdvDataLen
How many bytes of the advertising data were sent.
Definition: gap_advertiser.h:560