docs: def run(self):
          """Continously scan for BLE advertisements."""
          self.socket = self.bluez.hci_open_dev(self.bt_device_id)
  
          filtr = self.bluez.hci_filter_new()
          self.bluez.hci_filter_all_events(filtr)
          self.bluez.hci_filter_set_ptype(filtr, self.bluez.HCI_EVENT_PKT)
          self.socket.setsockopt(self.bluez.SOL_HCI, self.bluez.HCI_FILTER, filtr)
  
          self.set_scan_parameters()
          self.toggle_scan(True)
  
          while self.keep_going:
              pkt = self.socket.recv(255)
              event = to_int(pkt[1])
              subevent = to_int(pkt[3])
              if event == LE_META_EVENT and subevent == EVT_LE_ADVERTISING_REPORT:
                  # we have an BLE advertisement
                  self.process_packet(pkt)
          self.socket.close()