BLE Scan Request Rx Callback on Advertising Mode

cancel
Showing results for 
Search instead for 
Did you mean: 

BLE Scan Request Rx Callback on Advertising Mode

Jump to solution
500 Views
dileep_d
Contributor II

We are working on QN9090 SDK2.6.5.  Our device is in BLE advertisement mode. Actually, the device needs to verify the RSSI value before it connects to any central device.  As of my knowledge, After every advertisement packet, the device will receive a scan request packet from central devices around it.

In the firmware, Where do we check for the received scan request packet?

Labels (2)
Tags (3)
0 Kudos
1 Solution
458 Views
EduardoZamora
NXP Employee
NXP Employee

Hi,

The QN9090 is Bluetooth LE 5 compliant and covers the mandatory features, but some features such as the extended advertisement, long range or coded PHY are optional features that QN9090 does not support. Our available MCU that supports the complete Bluetooth LE 5 spec is the KW38.

Also, it is only possible to generate the Scan Request event and PDU under Extended Advertising as per the Bluetooth Core specification.

I apologize for any inconvenience this may cause you.

Regards,
Eduardo.

View solution in original post

0 Kudos
4 Replies
475 Views
EduardoZamora
NXP Employee
NXP Employee

Hello Dileep,

If you need to know the RSSI value, it is possible from the scanner device side. If your central device (Scanner) is a QN9090 board, Advertising device information can be found in gapScanningEvent_t.eventData.scannedDevice on gDeviceScanned_c event; this event is received when an advertising device has been scanned.

Regarding to the Scan Request packet, it is possible to add the gExtScanNotification_c event as a case in the BleApp_AdvertisingCallback function. This event indicates that a SCAN_REQ PDU has been received by an extended advertiser. Also, it is important to consider that the Scan Type must be set as Active Scanning, so the scanner device can send Scan Requests to the advertiser.

Once the event occurs, you can get this information in gapAdvertisingEvent_t.eventData.scanNotification:

EduardoZamora_0-1660248686957.png

 

0 Kudos
466 Views
dileep_d
Contributor II

Thanks @EduardoZamora for the response,

Here we need to take action on the peripheral side. That is why we selected this option. 

We tried to enable the extended advertisement on QN9090 SDK(2.6.5). But the Gap_SetExtAdvertisingData() API is return error as gBleFeatureNotSupported_c (4).

bleResult_t ret_code = Gap_SetExtAdvertisingData(gAppExtAdvParams.handle, &gAppAdvertisingData, NULL);
if (ret_code != gBleSuccess_c) {
    PRINTF("<app> errr : %10d : Gap_SetExtAdvertisingData failed ret: %x\n\r",                                                                              TICKS_TO_pdMS(xTaskGetTickCount()), ret_code);
}

Does QN9090 support BLE5.0 errata?

Does it not possible to read the scan request packets in the normal BLE advertisement??

Tags (2)
0 Kudos
459 Views
EduardoZamora
NXP Employee
NXP Employee

Hi,

The QN9090 is Bluetooth LE 5 compliant and covers the mandatory features, but some features such as the extended advertisement, long range or coded PHY are optional features that QN9090 does not support. Our available MCU that supports the complete Bluetooth LE 5 spec is the KW38.

Also, it is only possible to generate the Scan Request event and PDU under Extended Advertising as per the Bluetooth Core specification.

I apologize for any inconvenience this may cause you.

Regards,
Eduardo.

0 Kudos
445 Views
dileep_d
Contributor II

@EduardoZamora Thank you so much for the clarification