# ble_scan_v0a.py

from ubluetooth import BLE

def bt_irq_handler(event, data):
  if event == 5: # Advertiser-Datenpaket erhalten
    print('Data:', data) # Ausgabe der Daten
  elif event == 6: # Scan beendet
    print('-----------------------------------------------------------')
    print('scan complete')

bt = BLE()
bt.active(True)
bt.irq(bt_irq_handler)
bt.gap_scan(5000, 100000, 25000)

