we are using nRF52-dk SDK examples
we are using nRF52-dk SDK examples
You can decode using Chapter 3.2 in the LNS spec, and this.
When you enable the notifications you will receive the initial values for the characteristic (examine initial_lns_location_speed in the code).
In nRF Connect you will receive:
Attribute value changed, handle: 15, value (0x): 07-02-0C-00-34-09-00-2C-76-DA-F9-22-1D-D6-23
The first 16 bits are the flag field. The first 6 bits tells you what fields that are present.
0x07 = 0b00000111 -> Instantanours Speed, Total Distance, Location present
0x02 = 0b00000010 -> Speed and Distance format is 3D
The next 16 bits is the instantaneous speed (0x000C)
The next 24 bits is the total distance (0x000934)
The next 32 bits is the location - latitude (0xF9DA762C)
The next 32 bits is the location - longitude (0x23D61D22)
You can decode using Chapter 3.2 in the LNS spec, and this.
When you enable the notifications you will receive the initial values for the characteristic (examine initial_lns_location_speed in the code).
In nRF Connect you will receive:
Attribute value changed, handle: 15, value (0x): 07-02-0C-00-34-09-00-2C-76-DA-F9-22-1D-D6-23
The first 16 bits are the flag field. The first 6 bits tells you what fields that are present.
0x07 = 0b00000111 -> Instantanours Speed, Total Distance, Location present
0x02 = 0b00000010 -> Speed and Distance format is 3D
The next 16 bits is the instantaneous speed (0x000C)
The next 24 bits is the total distance (0x000934)
The next 32 bits is the location - latitude (0xF9DA762C)
The next 32 bits is the location - longitude (0x23D61D22)