Other Parts Discussed in Thread: SYSCONFIG
Tool/software:
static void Gap_ScanInit(){
uint8_t temp8;
uint16_t temp16;
bStatus_t status = FAILURE;
// Register callback to process Scanner events
status = GapScan_registerCb(Gap_ScanCallback, NULL);
// Set Scanner Event Mask
status = GapScan_setEventMask(GAP_EVT_SCAN_ENABLED | GAP_EVT_SCAN_DISABLED |
GAP_EVT_ADV_REPORT);
// Set Scan PHY parameters
status = GapScan_setPhyParams(DEFAULT_SCAN_PHY, DEFAULT_SCAN_TYPE,
DEFAULT_SCAN_INTERVAL, DEFAULT_SCAN_WINDOW);
// Set Advertising report fields to keep
temp16 = ADV_RPT_FIELDS;
status = GapScan_setParam(SCAN_PARAM_RPT_FIELDS, &temp16);
// Set Scanning Primary PHY
temp8 = DEFAULT_SCAN_PHY;
status = GapScan_setParam(SCAN_PARAM_PRIM_PHYS, &temp8);
// Set LL Duplicate Filter
temp8 = SCANNER_DUPLICATE_FILTER;
status = GapScan_setParam(SCAN_PARAM_FLT_DUP, &temp8);
/* get the advertisements that are only non Connectable and extended advertising
with Complete pdu rather than no breaks in the data of Extended advertising.*/
temp16 = SCAN_FLT_PDU_NONCONNECTABLE_ONLY | SCAN_FLT_PDU_EXTENDED_ONLY |SCAN_FLT_PDU_COMPLETE_ONLY;
status = GapScan_setParam(SCAN_PARAM_FLT_PDU_TYPE, &temp16);
status = GapScan_enable((1300/1280),DEFAULT_SCAN_DURATION,0);
volatile int a= 0;
a++;
}
the above the gapScanInit function were i set the Scanning parameters as
Where Every GapScan function return the bleNoResource Error I don't know why Even i limited connection to 1,
and also when i set gapsScan_enable with period 1300 i get continuous scan enable and disable events And Scanning also working fine
but when i set it to 1000 i'm not able to get any enable or disable events and scanning not working
sdk 6.10