c# - 脉搏血氧仪服务 (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
解决方案
推荐阅读
- nginx - 如何通过更改路径重定向 URL,但在 Nginx 上维护参数?
- c++ - c++:头文件中的配置变量
- amazon-web-services - AWS VPC 的大小是多少
- javascript - 将 class= 属性添加到
- ios - 来自 Apple App Store Review 的 Symbolcate 崩溃报告
- azure - 如何将 docker hub 映像推送到现有的 Azure Web 应用程序?
- javascript - Javascript找到有条件的最大子数组
- javascript - 如何使反应选择不允许选项中的空间?
- apache-spark-sql - 有没有办法知道 S3 表中写入的最后一个分区是什么,用于 AWS Glue 作业中的下推谓词?
- javascript - 不能再从本地主机上传图片到 imgur