android解析A& D UC-351PBT-Ci蓝牙数据

时间:2016-01-07 12:52:54

标签: bluetooth bluetooth-lowenergy android-bluetooth medical

我能够连接到A& D体重秤(UC-351PBT-Ci)并从中获取(从蓝牙)原始数据,但无法解析它以从中获取测量的重量。请找到我从体重秤获得的数据,并帮助我解析它以获得测量值。  e2000032800000000001002a50790026800000008000800000000000000000800000000800091ffffe80b50140000001010000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

这是第二个数据 e7000026002410000101001e0000ffffffff0d1e0014f00000000001000c0065000100060a4c00020001000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

这是第三个数据 e70000c000be0024020300b80000000a00b20a5a000800010004100f00010928001c000c412644204d65646963616c00000c55432d3335315042542d43690984000a000800091ffffe80b5010a4400024000092d00280002002400010000000a3531343033303031303200050000000e332e362e38207461672d3939364d0987000820160107180528000a4b00160002001202010008010500010002400f0202000200000a450010c0101f00ffffffff0064000000000000095500024000099c000200640000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

这是第四个 e60000020002000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000

1 个答案:

答案 0 :(得分:0)

您需要将数据转换为十六进制,例如使用http://codebeautify.org/hex-string-converter

将“第三个数据”输出为

çÀ¾$¸ ² Z (A&D MedicalUC-351PBT-Ci ÿþµ D@ -($ 51403001023.6.8 tag-996M ( K@ EÀÿÿÿÿd U@ d

所以你可以看到这可能是随数据传递的品牌和型号。

您只需要将每个byte细分为字符串表示

StringBuffer result = new StringBuffer(); for (byte b : bytes) { result.append(String.format("%02X", b)); } return result.toString();

然后会有锻炼文件,哪个字节代表什么位数据,所以假设有一个测量日期,重量和重量单位等。