首页 > 解决方案 > 脉搏血氧仪服务 (0x1822) 能否显示在“nRF Connect for Mobile”上

问题描述

我正在使用 arduino 通过 BLE 向移动设备发送消息,该移动设备使用“nRF Connect for Mobile”来扫描 arduino。

我能够获取血压 (0x1810) 和健康温度计 (0x1809) 的信息,但脉搏血氧计服务 (0x1822) 失败

它只显示

Value: (0x) 00-63-00-50-00

我期望的是

00 = flags

63-00 = SLOAT of the SpO2 value, i.e. 99%

50-00 = SLOAT of the pulse rate, i.e. 80

由于它没有像“无效数据语法”这样的症状,我想知道这个服务是否是由这个应用程序定义的。

// For Blood Pressure service (0x1810): Blood Pressure Measurement (0x2A35)
byte flags1 = 0b00000000;
byte SYS = 100;
byte DIA = 160;
byte MAP = 120;
byte BP[8] = {flags1, SYS, 0, DIA, 0, MAP, 0};

pChara1_1->setValue(BP, 8);
pChara1_1->indicate();
// The mobile app (nRF Connect) display the systolic pressure: 100 mmHg successfully (also the diastolic and mean pressure)

// For Pulse Oximeter Service (0x1822): PLX Spot-check Measurement (0x2A5E)
byte flags3 = 0b00000000;
byte Sp = 99;
byte PR = 80;
byte SPO2[5] = {flags3, Sp, 0, PR, 0};

pChara3_1->setValue(SPO2, 5);
pChara3_1->indicate();

// For Pulse Oximeter Service (0x1822): PLX Features (0x2A60)
byte flags4[2] = {0b00000000,0b00000000};

pChara3_3->setValue(flags4, 2);

// It turns out "Value: (0x) 00-63-00-50-00"

预期成绩

SpO2: 99%
Pulse rate: 80

实际结果

Value: (0x) 00-63-00-50-00

标签: c#bluetoothbluetooth-lowenergy

解决方案


确实,nRF 应用程序本身不支持解析此特征和其他少数特征。你没有做错什么。

我在 nRF 存储库上创建了一个问题,维护人员说他将尝试实现我提到的一个特征解析。

链接到问题


推荐阅读