Hello everyone! I am completely new to App Inventor (this is my first project with it) and I am working on my thesis which to cut a long story short, is to develop a system using an Arduino with a LoRaWAN chip from TheThingsNetwork which will connect to bluetooth devices (rather have the BT devices connect to it), read data from them, do basic processing, and then based on the results of the processing send that data to the cloud using the LoRa protocol.
The app I'm developing is not strictly part of my thesis but I need it to properly test my system as I dont have the ability to buy the actual devices that are intended to connect to my system.
I've built my circuit:
schematic_rev_2.pdf (49.8 KB)
and managed to connect with my app to the HM-10 module. However, I would like my app to dynamically determine the UUIDs of the service and characteristic it must connect to so that if in theory (and of course correct me if my thinking is wrong on this point) a different BT module is used with different UUIDs it will still work.
I need to be able to send and receive data from the HM-10, so I assume I need the characteristic which has Read/Write properties. I have downloaded a separate app just to be able to see what is going on (BLE Scanner) and I can see the following screen when connecting to my HM-10 module:
So my question is ultimately this: How can I programmatically from the App Inventor get the right service and characteristic UUIDs to be able to set them in as variables for later use, based on their read/write properties?
Here is my .aia file. I am trying to determine this in the function get_services which is called whenever the BluetoothLE1 detects a valid connection.
ThesisSimulationApp.aia (211.6 KB)
Many thanks in advance! If you need any more information please let me know and I will provide it!