Bluetooth over Core2
Hello friends of the M5Stack.
Who has Bluetooth over UIFlow running in the Core2.
I need it to scan Bluetooth sensors.
Does anyone have a sample code for me?
Doesn't anyone have a simple BLE example where I can just scan the ad data from Bluetooth?
inasawa last edited by
Official MicroPython examples may help you.
Need to change a little
from ble_advertising import decode_services, decode_name
from ble.ble_advertising import decode_services, decode_name
and if you run from UIFlow,
if __name__ == "__main__":and just call
if event == _IRQ_SCAN_RESULT:is where receive advertisement data
Another thing to note is the current UIFlow (v1.7.1) MicroPython cannot perform active scan. On some devices, the advertisement data does not contain the required data (name, etc.) but is included in the scan data which require active scan.