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

    AtomS3, UIFlow2 and BLE

    Atom
    4
    19
    10.6k
    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.
    • M
      mtylerjr @ajb2k3
      last edited by

      @ajb2k3 I was able to get it working - the problem was the default bluetooth scanner in my old phone. Using a proper BLE scanning app from google play, I was able to write text and raw data from UIFLOW2 and see it in the phone app.

      Its good enough for proof of concept :D Thanks for the help guys

      M 1 Reply Last reply Reply Quote 1
      • M
        mtylerjr @mtylerjr
        last edited by

        Next steps!

        I know that several independent methods have been developed by various people over the past few years to add the ability to stream generic data over the BLE/GATT connection (which wasnt designed for it, really)

        Is there an existing implementation/library around that can be used with the BLE devices like the CoreS3? I know it wont be in UIFLOW2 for the foreseeable future, but is there a library out there to handle serial data over BLE/GATT (I think using notifications to send small packets)

        Ive found old posts discussing ideas:
        https://stackoverflow.com/questions/37151579/schemes-for-streaming-data-with-ble-gatt-characteristics

        1 Reply Last reply Reply Quote 0
        • S
          syrinebh @felmue
          last edited by

          @felmue you can give me the steps to scan and connect nearby devices via bluetooth with core S3 please

          1 Reply Last reply Reply Quote 0
          • ajb2k3A
            ajb2k3
            last edited by

            Hello and sorry for the delay as been busy with other functions. I will start picking away at UIFlows2x’s BT UART this week and hopefully get the documents up by Sunday.

            UIFlow, so easy an adult can learn it!
            If I don't know it, be patient!
            I've ether not learned it or am too drunk to remember it!
            Author of the WIP UIFlow Handbook!
            M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

            ajb2k3A 1 Reply Last reply Reply Quote 1
            • ajb2k3A
              ajb2k3 @ajb2k3
              last edited by

              @ajb2k3 Alas, its not looking good, UIFlow was update to Alpha21 but on any device other than the CoreS3 I get a reset when trying to use BLE functions.

              UIFlow, so easy an adult can learn it!
              If I don't know it, be patient!
              I've ether not learned it or am too drunk to remember it!
              Author of the WIP UIFlow Handbook!
              M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

              S 1 Reply Last reply Reply Quote 0
              • S
                syrinebh @ajb2k3
                last edited by

                @ajb2k3 you arrived to implement ble functions on core S3 ?

                ajb2k3A 1 Reply Last reply Reply Quote 0
                • ajb2k3A
                  ajb2k3 @syrinebh
                  last edited by

                  @syrinebh Not sure they work and no computer or phone seas a BT devices and cant get an ATOM S3 devices to run the code without resetting.

                  UIFlow, so easy an adult can learn it!
                  If I don't know it, be patient!
                  I've ether not learned it or am too drunk to remember it!
                  Author of the WIP UIFlow Handbook!
                  M5Black, Go, Stick, Core2, and so much more it cant be fit in here!

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    mtylerjr @ajb2k3
                    last edited by

                    I was able to get the S3 devices to advertise as a BLE server, and write some values out via GATT transactions, and then scan/detect/connect/read those values from a BLE scanner app on my phone - just to prove that it worked.

                    Its BLE (bluetooth low energy) , not standard bluetooth BR/EDR.

                    I only determined how to send short (under 20 bytes) GATT messages. I dont think there is a layer to "stream" data using BLE in UIFlOW, just to setup as a BLE server, advertise, and do GATT transactions. BLE is really only meant for a low duty cycle (very short messages occasionally, not a constant connection and streaming data) but even so, that should be okay for sensors and short data packets.

                    You can read about GATT and BLE here https://learn.adafruit.com/introduction-to-bluetooth-low-energy/gatt

                    There are more mature arduino libraries for using BLE on ESP32 (ArduinoBLE@1.2.0 for example) if you want to go that route but I think UIFLOW2 is currently limited to the barest of implementations. But it seems to be slowly but surely filling out with more things added each week, and I think it is going to be awesome when it is more complete.

                    S 1 Reply Last reply Reply Quote 1
                    • S
                      syrinebh
                      last edited by

                      This post is deleted!
                      1 Reply Last reply Reply Quote 0
                      • S
                        syrinebh @mtylerjr
                        last edited by

                        @mtylerjr is it possible to scan devices with Core S3 ?

                        M 1 Reply Last reply Reply Quote 0
                        • M
                          mtylerjr @syrinebh
                          last edited by

                          @syrinebh I really dont know. I got it working only responding to scan requests. I had problems trying to get it to work in the other direction, doing the scanning.

                          Sorry not much help.

                          S 1 Reply Last reply Reply Quote 0
                          • S
                            syrinebh @mtylerjr
                            last edited by

                            @mtylerjr you mean that you were able to scan S3 devices with your phone and in the other direction (scanning devices with s3 devices) you were not able to find a solution ?

                            M 1 Reply Last reply Reply Quote 0
                            • M
                              mtylerjr @syrinebh
                              last edited by mtylerjr

                              @syrinebh Yes. But I only spent maybe 2 hours total, experimenting, and that was with UIFlow2 version alpha 17 (maybe?)

                              Havent tried with the latest (alpha 21?)

                              S 1 Reply Last reply Reply Quote 0
                              • S
                                syrinebh @mtylerjr
                                last edited by

                                @mtylerjr I'm already working with alpha 21

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