Question

I'm integrating with a bluetooth blood pressure monitor, and I've come across one of the most bizarre data formats I've ever seen.

The systolic, diastolic and pulse rate (all ints, should all be below 200) are transmitted like this:

  1. the int value is converted to hex
  2. the last two characters of the hex value are taken and transmitted in adjacent bytes

For example, a pulse rate of 80 is transformed to 0x50, the character '5' is transmitted in byte 1, and '0' is transmitted in byte 2.

What could be the reason for this format? Is there a name for it?

I realise this could elicit mostly opinion based answers, but I'm hoping this is a well known method in some circles, with a name that I can use for further research.

Was it helpful?

Solution

It is possible the data format was originally developed for a serial port. A reason to use characters instead of binary is to avoid the the control characters that have special meanings to serial drivers such as control-s and control-q, EOF, etc... A reason to use hex is for 2 byte values instead of 3 byte values, which you would need for base 10.

Licensed under: CC-BY-SA with attribution
scroll top