Hi,
I have RF-V48 watch that is sending data using watch protocol.
I have 2 topics to discuss: Position Decoder and Health Information
1- Position Decoder
The server received this data:
[3G*9705141740*00C2*UD_LTE,260723,082224,V,00.000000,,00.0000000,,0.00,0.0,0.0,0,60,99,0,0,00000000,2,0,605,1,10012,42500,-2,10012,49670,-6,3,,44:d7:91:fd:2b:54,-78,,00:31:92:a1:b7:e0,-84,,94:27:90:30:fb:92,-98,0.0]
But it couldn't decode it. The problem was with the PATTERN_POSITION
private static final Pattern PATTERN_POSITION = new PatternBuilder()
.number("(dd)(dd)(dd),") // date (ddmmyy)
.number("(dd)(dd)(dd),") // time (hhmmss)
.expression("([AV]),") // validity
.number(" *(-?d+.d+),") // latitude
.expression("([NS]),")
.number(" *(-?d+.d+),") // longitude
.expression("([EW])?,")
.number("(d+.?d*),") // speed
.number("(d+.?d*),") // course
.number("(-?d+.?d*),") // altitude
.number("(d+),") // satellites
.number("(d+),") // rssi
.number("(d+),") // battery
.number("(d+),") // steps
.number("d+,") // tumbles
.number("(x+),") // status
.expression("(.*)") // cell and wifi
.compile();
This line:
.expression("([NS]),")
should be updated like this:
.expression("([NS])?,")
2- Health Information
The device sends this data about heart rate, blood pressure, and blood oxygen:
[3G*9705141740*0013*bphrt,122,75,73,,,,][3G*9705141740*000B*oxygen,0,98]
The server can handle the heart rate and blood pressure message:
[3G*9705141740*0013*bphrt,122,75,73,,,,]
but it can't handle the blood oxygen message:
[3G*9705141740*000B*oxygen,0,98]
Maybe if you add something like this:
if (type.equalsIgnoreCase("oxygen") {
...
position.set("bloodOxygen", 98);
}
Thank you.
Hi,
I have RF-V48 watch that is sending data using watch protocol.
I have 2 topics to discuss: Position Decoder and Health Information
1- Position Decoder
The server received this data:
But it couldn't decode it. The problem was with the PATTERN_POSITION
This line:
should be updated like this:
2- Health Information
The device sends this data about heart rate, blood pressure, and blood oxygen:
The server can handle the heart rate and blood pressure message:
but it can't handle the blood oxygen message:
Maybe if you add something like this:
Thank you.