171 #define SCAN_RSSI_MAX 127 172 #define SCAN_RSSI_MIN -128 179 #define SCAN_FLT_RSSI_ALL SCAN_RSSI_MIN 180 #define SCAN_FLT_RSSI_NONE SCAN_RSSI_MAX 187 #define SCAN_PARAM_DFLT_INTERVAL 800 189 #define SCAN_PARAM_DFLT_WINDOW 800 191 #define SCAN_PARAM_DFLT_TYPE SCAN_TYPE_PASSIVE 193 #define SCAN_PARAM_DFLT_RPT_FIELDS (SCAN_ADVRPT_FLD_EVENTTYPE|\ 195 SCAN_ADVRPT_FLD_ADDRTYPE |\ 196 SCAN_ADVRPT_FLD_ADDRESS |\ 197 SCAN_ADVRPT_FLD_ADVSID |\ 198 SCAN_ADVRPT_FLD_RSSI) 199 #define SCAN_PARAM_DFLT_PHYS SCAN_PRIM_PHY_1M 201 #define SCAN_PARAM_DFLT_FLT_POLICY SCAN_FLT_POLICY_ALL 203 #define SCAN_PARAM_DFLT_FLT_PDU SCAN_FLT_PDU_COMPLETE_ONLY 205 #define SCAN_PARAM_DFLT_FLT_RSSI SCAN_FLT_RSSI_ALL 207 #define SCAN_PARAM_DFLT_FLT_DISC SCAN_FLT_DISC_DISABLE 209 #define SCAN_PARAM_DFLT_FLT_DUP SCAN_FLT_DUP_ENABLE 211 #define SCAN_PARAM_DFLT_NUM_ADV_RPT 0 219 #define SCAN_PERIODIC_SKIP_MAX 0x01F3 221 #define SCAN_PERIODIC_TIMEOUT_MIN 0x000A 223 #define SCAN_PERIODIC_TIMEOUT_MAX 0x4000 225 #define SCAN_PERIODIC_CTE_TYPE_ALL 0 227 #define SCAN_PERIODIC_DO_NOT_SYNC_AOA_CTE 1 229 #define SCAN_PERIODIC_DO_NOT_SYNC_AOD_CTE_1US 2 231 #define SCAN_PERIODIC_DO_NOT_SYNC_AOD_CTE_2US 4 233 #define SCAN_PERIODIC_SYNC_ONLY_WITH_CTE 16 235 #define SCAN_PERIODIC_MAX_ADV_SID 0x0F 237 #define SCAN_PERIODIC_SYNC_OPTIONS_MAX 0x03 239 #define SCAN_PERIODIC_DO_NOT_USE_PERIODIC_ADV_LIST (0 << 0) 241 #define SCAN_PERIODIC_USE_PERIODIC_ADV_LIST (1 << 0) 243 #define SCAN_PERIODIC_REPORTING_INITIALLY_ENABLED (0 << 1) 245 #define SCAN_PERIODIC_REPORTING_INITIALLY_DISABLED (1 << 1) 660 uint16_t interval, uint16_t window);
678 uint16_t* pInterval, uint16_t* pWindow);
706 status_t
GapScan_getParam(GapScan_ParamId_t paramId,
void* pValue, uint8_t *pLen);
745 uint8_t maxNumReport);
uint8 opcode
GAP type of command.
Definition: gap_scanner.h:609
Definition: gap_scanner.h:463
address field
Definition: gap_scanner.h:149
GAP_Addr_Types_t
Address types used for identifying peer address type.
Definition: gap.h:713
status_t GapScan_discardAdvReportList(void)
Definition: gap_scanner.h:355
uint8 advAddrType
Advertiser address type - 0x00 - public ; 0x01 - random.
Definition: gap_scanner.h:552
Limited discoverable mode.
Definition: gap_scanner.h:485
txPower field
Definition: gap_scanner.h:153
This API allows the software components in the Z-Stack to be written independently of the specifics o...
No PHY is used.
Definition: gap_scanner.h:439
Definition: gap_scanner.h:317
General discoverable mode.
Definition: gap_scanner.h:484
GapScan_FilterDiscMode_t
Choices for GAP Scanner Discoverable Mode Filter.
Definition: gap_scanner.h:482
Truncated.
Definition: gap_scanner.h:106
Read Advertisers list command complete structure.
Definition: gap_scanner.h:574
Scan Response only. Mutually exclusive with SCAN_FLT_PDU_ADV_ONLY.
Definition: gap_scanner.h:134
int8_t txPower
-127 dBm <= TX power <= 126 dBm
Definition: gap_scanner.h:522
Directed only. Mutually exclusive with SCAN_FLT_PDU_UNDIRECTED_ONLY.
Definition: gap_scanner.h:130
Disable discoverable mode filter.
Definition: gap_scanner.h:487
GapScan_EndReason_t
Reason for GapScan_Evt_End_t.
Definition: gap_scanner.h:162
uint16 periodicAdvInt
Periodic advertising interval Range: 0x0006 to 0xFFFF. Time = N * 1.25 ms (Time Range: 7...
Definition: gap_scanner.h:617
uint8 dataLen
Length of the Data field (Range: 0 to 247)
Definition: gap_scanner.h:601
Scannable.
Definition: gap_scanner.h:94
status_t GapScan_enable(uint16_t period, uint16_t duration, uint8_t maxNumReport)
Definition: gap_scanner.h:401
GapScan_ScannedPhy_t
Scanned PHY.
Definition: gap_scanner.h:437
uint8 status
Periodic advertising sync HCI status.
Definition: gap_scanner.h:611
GapScan_ScannedPhy_t secPhy
PHY of the secondary advertising channel.
Definition: gap_scanner.h:518
status_t GapScan_getAdvReport(uint8_t rptIdx, GapScan_Evt_AdvRpt_t *pAdvRpt)
bStatus_t GapScan_AddDeviceToPeriodicAdvList(uint8 advAddrType, uint8 advAddress[6], uint8 advSID)
status_t GapScan_registerCb(pfnGapCB_t cb, uintptr_t arg)
uint8_t * pData
Pointer to advertising or scan response data.
Definition: gap_scanner.h:534
GapScan_AdvRptField_t
Fields of Adv Report.
Definition: gap_scanner.h:146
uint8_t status
Event status.
Definition: gap_scanner.h:578
GapScan_ParamId_t
Definition: gap_scanner.h:265
uint16 syncHandle
Handle identifying the periodic advertising train.
Definition: gap_scanner.h:596
Undirected only. Mutually exclusive with SCAN_FLT_PDU_DIRECTIED_ONLY.
Definition: gap_scanner.h:128
Periodic advertising sync establish event structure.
Definition: gap_scanner.h:606
Definition: gap_scanner.h:470
Non-discoverable mode.
Definition: gap_scanner.h:483
uint8 dataStatus
0x00 - Data complete 0x01 - Data incomplete, more data to come 0x02 - Data incomplete, data truncated, no more to come
Definition: gap_scanner.h:600
dataLen field
Definition: gap_scanner.h:158
Directed.
Definition: gap_scanner.h:96
Periodic advertising create sync parameters structure.
Definition: gap_scanner.h:541
Truncated only. Mutually exclusive with SCAN_FLT_PDU_COMPLETE_ONLY.
Definition: gap_scanner.h:140
Legacy.
Definition: gap_scanner.h:100
uint8 advPhy
Advertiser PHY: 0x01 - LE 1M 0x02 - LE 2M 0x03 - LE Coded.
Definition: gap_scanner.h:616
uint8_t listSize
Periodic advertisers list size.
Definition: gap_scanner.h:579
GapScan_ScanType_t
GAP Scanner Scan Type.
Definition: gap_scanner.h:446
void GapScan_setEventMask(GapScan_EventMask_t eventMask)
Scanned on the 2M PHY.
Definition: gap_scanner.h:441
osal_event_hdr_t hdr
OSAL Event Header.
Definition: gap_scanner.h:568
Non-scannable only. Mutually exclusive with SCAN_FLT_PDU_SCANNABLE_ONLY.
Definition: gap_scanner.h:124
bStatus_t GapScan_SetPeriodicAdvReceiveEnable(uint16 syncHandle, uint8 enable)
bStatus_t GapScan_PeriodicAdvCreateSyncCancel(void)
bStatus_t GapScan_ClearPeriodicAdvList(void)
uint8_t reason
End reason - GapScan_EndReason_t.
Definition: gap_scanner.h:500
Definition: gap_scanner.h:493
Extended only. Mutually exclusive with SCAN_FLT_PDU_LEGACY_ONLY.
Definition: gap_scanner.h:136
GapScan_FilterPolicy_t
GAP Scanner Filter Policy.
Definition: gap_scanner.h:452
GapScan_AdvRptTypeNStatus_t
Advertising report event types.
Definition: gap_scanner.h:90
uint8_t advSid
SID (0x00-0x0f) of the advertising PDU. 0xFF means no ADI field in the PDU.
Definition: gap_scanner.h:520
Definition: gap_scanner.h:418
status_t GapScan_setPhyParams(uint8_t primPhys, GapScan_ScanType_t type, uint16_t interval, uint16_t window)
status_t GapScan_disable(void)
addrType field
Definition: gap_scanner.h:148
Scanned on the 1M PHY.
Definition: gap_scanner.h:440
uint8 BLEEventCode
BLE Event Code.
Definition: gap_scanner.h:610
void(* pfnGapCB_t)(uint32_t event, void *pBuf, uintptr_t arg)
Definition: gap.h:1326
status_t GapScan_setParam(GapScan_ParamId_t paramId, void *pValue)
uint8 advClockAccuracy
Accuracy of the periodic advertiser's clock: 0x00 - 500 ppm 0x01 - 250 ppm 0x02 - 150 ppm 0x03 - ...
Definition: gap_scanner.h:618
Complete.
Definition: gap_scanner.h:102
Definition: gap_scanner.h:383
More Data To Come.
Definition: gap_scanner.h:104
Scanned on the Coded PHY.
Definition: gap_scanner.h:442
advSid field
Definition: gap_scanner.h:152
status_t GapScan_getParam(GapScan_ParamId_t paramId, void *pValue, uint8_t *pLen)
uint8_t opcode
GAP type of command.
Definition: gap_scanner.h:569
GapScan_ScannedPhy_t primPhy
PHY of the primary advertising channel.
Definition: gap_scanner.h:516
Scan on the 1M PHY.
Definition: gap_scanner.h:113
Scanning ended by user request.
Definition: gap_scanner.h:163
uint8_t opcode
GAP type of command.
Definition: gap_scanner.h:586
Scan on the Coded PHY.
Definition: gap_scanner.h:114
General or Limited discoverable mode.
Definition: gap_scanner.h:486
Scannable only. Mutually exclusive with SCAN_FLT_PDU_NONSCANNABLE_ONLY.
Definition: gap_scanner.h:126
Event for advertising report.
Definition: gap_scanner.h:505
uint8 advSid
Value of the Advertising SID subfield in the ADI field of the PDU.
Definition: gap_scanner.h:613
uint8 syncCteType
Definition: gap_scanner.h:562
status_t GapScan_getPhyParams(uint8_t primPhy, GapScan_ScanType_t *pType, uint16_t *pInterval, uint16_t *pWindow)
uint8_t opcode
GAP type of command.
Definition: gap_scanner.h:577
prdAdvInterval field
Definition: gap_scanner.h:157
Type definitions and macros for BLE stack.
Periodic advertising report event structure.
Definition: gap_scanner.h:591
eventType field
Definition: gap_scanner.h:147
uint16 syncTimeout
Synchronization timeout for the periodic advertising train. Range: 0x000A to 0x4000 Time = N*10 ms Ti...
Definition: gap_scanner.h:555
Scan for scannable advertisements.
Definition: gap_scanner.h:448
GAP_Addr_Types_t directAddrType
Type of TargetA address in the directed advertising PDU.
Definition: gap_scanner.h:526
int8 txPower
Tx Power information (Range: -127 to +20 dBm)
Definition: gap_scanner.h:597
uint16_t syncHandle
Handle identifying the periodic advertising train.
Definition: gap_scanner.h:587
bStatus_t GapScan_RemoveDeviceFromPeriodicAdvList(uint8 advAddrType, uint8 advAddress[6], uint8 advSID)
GapScan_FilterDuplicate_t
Choices for GAP Scanner Duplicate Filter.
Definition: gap_scanner.h:491
uint8 * pData
Data received from a Periodic Advertising packet.
Definition: gap_scanner.h:602
osal_event_hdr_t hdr
OSAL Event Header.
Definition: gap_scanner.h:576
Definition: gap_scanner.h:457
Definition: gap_scanner.h:282
OSAL Event Header.
Definition: osal.h:92
Event for scanning end.
Definition: gap_scanner.h:499
Connectable only. Mutually exclusive with SCAN_FLT_PDU_NONCONNECTABLE_ONLY.
Definition: gap_scanner.h:122
uint16_t periodicAdvInt
Periodic advertising interval. 0 means no periodic advertising.
Definition: gap_scanner.h:530
primPhy field
Definition: gap_scanner.h:150
Definition: gap_scanner.h:300
uint16 skip
The maximum number of periodic advertising events that can be skipped after a successful receive (Ran...
Definition: gap_scanner.h:554
uint32_t GapScan_EventMask_t
Event Mask.
Definition: gap_scanner.h:538
Legacy only. Mutually exclusive with SCAN_FLT_PDU_EXTENDED_ONLY.
Definition: gap_scanner.h:138
osal_event_hdr_t hdr
OSAL Event Header.
Definition: gap_scanner.h:585
uint8 cteType
0x00 AoA CTE 0x01 - AoD CTE with 1us slots 0x02 - AoD CTE with 2us slots 0xFF - No CTE ...
Definition: gap_scanner.h:599
hciStatus_t GapScan_ReadPeriodicAdvListSize(void)
Reserved for Future Use.
Definition: gap_scanner.h:108
uint8_t GapScan_PeriodicAdvCreateSync(uint8 advSID, GapScan_PeriodicAdvCreateSyncParams_t *createSyncParams)
Duplicate filtering enabled, reset for each scan period.
Definition: gap_scanner.h:495
#define B_ADDR_LEN
Default Public and Random Address Length.
Definition: bcomdef.h:108
osal_event_hdr_t hdr
OSAL Event Header.
Definition: gap_scanner.h:608
Complete only. Mutually exclusive with SCAN_FLT_PDU_TRUNCATED_ONLY.
Definition: gap_scanner.h:142
GapScan_PrimPhy_t
GAP Scanner Primary PHY.
Definition: gap_scanner.h:112
uint8_t evtType
Definition: gap_scanner.h:510
uint16 syncHandle
Handle identifying the periodic advertising train.
Definition: gap_scanner.h:612
Advertisement only. Mutually exclusive with SCAN_FLT_PDU_SCANRSP_ONLY.
Definition: gap_scanner.h:132
GapScan_FilterPduType_t
PDU Types for PDU Type Filter.
Definition: gap_scanner.h:118
secPhy field
Definition: gap_scanner.h:151
uint8 BLEEventCode
BLE Event Code.
Definition: gap_scanner.h:595
RSSI field.
Definition: gap_scanner.h:154
dirAddress field
Definition: gap_scanner.h:156
uint16_t dataLen
Length of the data.
Definition: gap_scanner.h:532
Status_t bStatus_t
BLE Generic Status return.
Definition: bcomdef.h:251
int8_t rssi
-127 dBm <= RSSI <= 20 dBm
Definition: gap_scanner.h:524
int8 rssi
RSSI value for the received packet (Range: -127 to +20 dBm); If the packet contains CTE...
Definition: gap_scanner.h:598
uint8 advAddrType
Advertiser address type: 0x00 - Public 0x01 - Random 0x02 - Public Identity Address 0x03 - Random...
Definition: gap_scanner.h:614
Definition: gap_scanner.h:478
uint8 options
Definition: gap_scanner.h:551
Non-connectable only. Mutually exclusive with SCAN_FLT_PDU_CONNECTABLE_ONLY.
Definition: gap_scanner.h:120
Connectable.
Definition: gap_scanner.h:92
dirAddrType field
Definition: gap_scanner.h:155
Duplicate filtering disabled.
Definition: gap_scanner.h:492
uint8_t status
Event status.
Definition: gap_scanner.h:570
bStatus_t GapScan_PeriodicAdvTerminateSync(uint16 syncHandle)
Sync Lost event struct.
Definition: gap_scanner.h:583
Scan Response.
Definition: gap_scanner.h:98
Scanning ended by duration expiration.
Definition: gap_scanner.h:164
GAP_Addr_Types_t addrType
Public, random, public ID, random ID, or anonymous.
Definition: gap_scanner.h:512
Definition: gap_scanner.h:369
osal_event_hdr_t hdr
OSAL Event Header.
Definition: gap_scanner.h:593
uint8 opcode
GAP type of command.
Definition: gap_scanner.h:594
uint8_t numReport
Number of recorded advertising reports.
Definition: gap_scanner.h:501
Scan for non-scannable advertisements.
Definition: gap_scanner.h:447
Command status and command complete event structure.
Definition: gap_scanner.h:566