1

I'm working on creating a PHG(personal health gateway) using PRi that written with Python to detect PHD(personal home device) such as Pulse Oximeter, Blood pleasure etc.

For Pulse Oximeter I've read about IEEE standard IEEE 11073-10404 and GATT definition. I've found a data contained into characteristics at 2A5F and dig into service number at 1822 then I've got data 1fc0f34f 00c0f34f 00c0f350 00000100 0100a2e4

Definition document https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.characteristic.plx_continuous_measurement.xml inside the link it define where the data containing on a stream

I've searched in stack-overflow a bit, I found some question about SFLOAT but I don't understand why there are don't have build-in function to convert it. I'm not sure if python has method to convert SFLOAT or instead, I must implement it

Another question, the data I've got it can be use for transcode into SPO2 value? or I must mapping into x72 (Bluetooth classic attribute) then transcode into SPO2 value

Avatar
  • 11
  • 1
  • 6
  • You have to write your own method in python to translate the binary into a float. Here's a similar question with some details on SFLOAT: https://stackoverflow.com/questions/11564270/how-to-convert-ieee-11073-16-bit-sfloat-to-simple-float-in-java – Tim Tisdall Aug 28 '18 at 19:53
  • @TimTisdall Thank you, I don't understand about why they use hex with bit operator a lot such as 0x0F, 0x0800 . Can you explain ? – Avatar Aug 30 '18 at 03:34
  • I don't think many languages have a binary notation so they use hex. `value & 0x08` means doing a bit-wise `AND` and are trying to look at the 4th least significant bit while ignoring the rest. `value & 0x08` will be a non-zero value if and only if the 4th bit is 1. – Tim Tisdall Aug 31 '18 at 14:43

0 Answers0