Hi, I'm working on an app to interface to a set of Bluetooth Cadence/Speed (cycling) sensors. Using your (Erel) BLE - Heartrate Monitor, I've successfully connected to the sensors and can read data via log. My issue is actually getting readable data out.
The sensor are using the standard format CSC MEASUREMENT format from BLE spec which states:
https://www.bluetooth.com/specifica....bluetooth.characteristic.csc_measurement.xml
Basically if I have the characteristics, how do I do bit manipulations to pull say "UINT32" or "UINT16"?
Basically I'm trying to pull the "Cumulative Wheel Revolutions", "Last Wheel Event Time" and "Cumulative Crank Revolutions" of the spec from my pulled data
Here is the pertinent sub:
The sensor are using the standard format CSC MEASUREMENT format from BLE spec which states:
https://www.bluetooth.com/specifica....bluetooth.characteristic.csc_measurement.xml
Basically if I have the characteristics, how do I do bit manipulations to pull say "UINT32" or "UINT16"?
Basically I'm trying to pull the "Cumulative Wheel Revolutions", "Last Wheel Event Time" and "Cumulative Crank Revolutions" of the spec from my pulled data
Here is the pertinent sub:
B4X:
Private Sub Manager_DataAvailable (ServiceId As String, Characteristics As Map)
If firstRead Then
firstRead = False
manager.SetNotify(SC_SERVICE, CSC_MEASUREMENT, True)
Return
End If
'this is where to get data and convert to readable info
Dim b2() As Byte = Characteristics.Get(CSC_MEASUREMENT)
Log("Data: " & b2)
End Sub
Last edited: