This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

unable to get the scan response data using pc_ble_driver_py

Hello,

I am trying to capture the advertisements of the surrounding BLE devices with NRF52840 Dongle using pc_ble_driver_py python library. I am successful in capturing the adv_data (Advertising data), but I am not able to capture the scan_rsp data (Scan Response data) from the BLE devices.

# the following code snippet is used for scanning

scan_duration = 120
params = BLEGapScanParams(interval_ms=200, window_ms=150, timeout_s=scan_duration)

self.adapter.driver.ble_gap_scan_start(scan_params=params)

# the following code snippet is used for printing the scanned packets

def on_gap_evt_adv_report(self, ble_driver, conn_handle, peer_addr, rssi, adv_type, adv_data):


   if BLEAdvData.Types.complete_local_name in adv_data.records:
        print(str(adv_data.records))

   elif BLEAdvData.Types.short_local_name in adv_data.records:
        print(str(adv_data.records))

   else:
        return

Kindly suggest suitable changes for getting the scan_rsp data.

Parents Reply Children
No Data
Related