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

    Bluetooth over Core2

    Scheduled Pinned Locked Moved UIFlow
    4 Posts 2 Posters 8.0k Views 1 Watching
    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 Offline
      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 Offline
        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 Offline
          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 Offline
            Wolli01
            last edited by

            Thank You

            1 Reply Last reply Reply Quote 0

            Hello! It looks like you're interested in this conversation, but you don't have an account yet.

            Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

            With your input, this post could be even better 💗

            Register Login
            • First post
              Last post