AtomS3, UIFlow2 and BLE
-
(sounds of crickets......)
-
Hello @mtylerjr
after starting the BLE server with
Init BLE Uart Server
you can use a BLE scanner on your phone and you should find the MAC address of your M5Stack S3 device listed. Connect to it and you should see its characteristics likeNordic UART Service
with TX and RX etc.Note: I used the Nordic nRF Connect app. You should find it in the Google Play Store.
Note: I tried with M5CoreS3. (Edit: M5AtomS3 works for me too.)
Thanks
Felix -
I haven't got as far as exploring it as still documenting GUI functions. Once they are finished I will be exploring and documenting those functions.
-
This post is deleted! -
@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
-
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 -
@felmue you can give me the steps to scan and connect nearby devices via bluetooth with core S3 please
-
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.
-
@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.
-
@ajb2k3 you arrived to implement ble functions on core S3 ?
-
@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.
-
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.
-
This post is deleted! -
@mtylerjr is it possible to scan devices with Core S3 ?
-
@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.
-
@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 ?
-
@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?)
-
@mtylerjr I'm already working with alpha 21