Short question - how do I send data as GATT characteristics from a peripheral BLE device (Android UNO + HM-10) to a central device (i.e. an android smartphone?)
I'm working on a BLE peripheral as a learning project right now - I'm using an Arduino Uno and an HM-10. It's going well so far - sensors are working and I can send this data from the Arduino Uno to Android using an HM-10 BLE module (actually a CC2541 clone) on the standard service and characteristic for this device:
- Service UUID: 0000ffe0-0000-1000-8000-00805f9b34fb
- Characteristic: UUID: 0000ffe1-0000-1000-8000-00805f9b34fb
Working in this way the HM-10 emulates a traditional bluetooth serial connection. All good so far!
What I would now like to do is send the data using accepted GATT services and characteristics. For example lets say I would like to use the Running Speed and Cadence service to send my data in a way that can be viewed by any compatible app. I would need to change the service to 0x1814 and the characteristics to:
- Cadence: 0x27A8
- Velocity: 0x27A6
- Gradient: 0x2763
I believe I could do this by using the AT commands:
- AT+UUID0x1814
- AT+CHAR0x2763
I think I'm OK with all of this so far, but what I cannot find guidance on is how to define multiple characteristics, and how to send my sensor data to my central device as GATT characteristics.
For example my speed is 10kmh-1 and my cadence is 80 - how do I specify the GATT characteristics for this and notify the central device when they change? Also bonus question - can I include an additional characteristic for gradient?
I've thoroughly searched but cannot find anything on this. Thanks!