🤖Have you ever tried Chat.M5Stack.com before asking??😎
    M5Stack Community
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Register
    • Login

    Bluetooth over Core2

    UIFlow
    2
    4
    6.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • W
      Wolli01
      last edited by

      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?

      1 Reply Last reply Reply Quote 0
      • W
        Wolli01
        last edited by

        Doesn't anyone have a simple BLE example where I can just scan the ad data from Bluetooth?

        1 Reply Last reply Reply Quote 0
        • I
          inasawa
          last edited by

          Official MicroPython examples may help you.
          https://github.com/micropython/micropython/blob/master/examples/bluetooth/ble_temperature_central.py
          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, __name__ is not "__main__" but "flow.m5cloud"
          remove if __name__ == "__main__": and just call demo()

          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.

          1 Reply Last reply Reply Quote 0
          • W
            Wolli01
            last edited by

            Thank You

            1 Reply Last reply Reply Quote 0
            • First post
              Last post