Hello guys,
I've got an issue on writing values in Target resistance level into my Tacx Flux 2, via Bloetooth.
Like the documentation of GATT server says, we need to follow next steps:
- The server provide some Services with addresses like UUID
our service is FTMS - Fitness Machine Service witch UUID is 0x1826 - Those services contains some Characteristics also addressed by UUID
our characteristic is Fitness Machine Control Point witch UUID is 0x2AD9 (chapter 4.16) - This FTMS control point FMCP have security permissions to WRITE and NOTIFY
like his name tells us FMCP provide many gates to write to with some values.
Each gate is defined by another address, called OPCODE - operation code
The scenario is to write consecutive values to 0x2AD9 characteristic, for each action, like this:
a. Request control permission (chapter 4.16.2.1)- write value of 0x00 or simply integer 0 - zero [0];
b. Start a training session - write value of 0x07 or simply integer 7 - seven [7];
c. Set Target resistance level (chapter 4.16.2.5), write 0x04 followed by a float like 0.21 (with range from 0 to 100, with a resolution of 0.1 units) representing resistance level, an array or list of values like [0x04,0.21], where first param is OPCODE and second resistance level.
The control point will return the result through OPCODE of 0x80, a standard one, witch will notify with value of 0x01 for success or 0x03 for invalid parameter(chapter 4.16.2.22, table 4.24).
I'm using NRF connect by Nordic to test all Characteristics properties permissions and workflows, and all are done, only that characteristics with float values to write are NOT OK.
My questions are:
1. Why can not be written integer values to FMCP - control point?
2. Can you provide me a solution to test this action to write, even in manual mode, some values to this control point?
3. Can you provide me a programing code to write Resistance level values to this FMCP ? (any programing language is allowed, I will convert myself)
Thank you in advanced!