I prefer to create separate thread, as (hopefully) here we can discuss bluetooth protocol of 121GW.
It looks like quite trivial to integrate to various software.
As far as i see specification is not published, and honestly github C# sources are not clear(no comments whatsoever, but i am usual OSS/Linux fanboy,
and C# is something i just dont like)
So till now what i reached, i am subscribing over BLE, to indication, over handle 0x9
This is what i get:
n@n:~$ gatttool -b 88:6B:0F:41:0A:8F --char-write-req -a 0x0009 -n 0300 --listen
Characteristic value was written successfully
Indication handle = 0x0008 value: f2 31 37 30 38 30 30 30 30 30 30 32 30 30 30 32 45 34 30 36
Indication handle = 0x0008 value: 31 32 30 30 30 30 30 30 30 30 31 36 34 30 30 30 30 36 31 32
Indication handle = 0x0008 value: 30 30 30 30 30 30 30 30 30 30 30 30 42 32 0d 0a f2 31 37 30
Indication handle = 0x0008 value: 38 30 30 30 0a f2 31 37 30 38 30 30 30 30 30 30 32 30 30 30
Indication handle = 0x0008 value: 32 31 43 30 0a f2 31 37 30 38 30 30 30 30 30 30 32 30 30 30
Indication handle = 0x0008 value: 32 31 43 30 0a f2 31 37 30 38 30 30 30 30 30 30 32 30 30 30
Indication handle = 0x0008 value: 32 31 43 30 36 31 32 30 30 30 30 30 30 30 30 31 36 34 30 30
As i suspect, BLE indication is limited to 20 bytes, and probably real data needs more, so it come over several BLE indication packets.
Or as ASCII something like that (over simple python script):
A notification was received: ?1708000000000000064
A notification was received: 0100B30B000240000000
A notification was received: 0000000000009F
?170
A notification was received: 8000
?17080000000000
A notification was received: 0006
?17080000000000
A notification was received: 000640100B30B0002400
A notification was received: 0000
?17080000000000
A notification was received: 000640100B30B0002400
Probably 0xF2 signaling start of data? (very likely according C# code)
So string to decode is "17080000000000000640100B30B0002400000000000000000009F"
I will try first:
17,08,00000,0,00,
Then according to source, first 2 bytes should be year:
public int Year => DecimalNibbleToValue(0, 2) + 2000;
I have 2018 set correctly, but it seems showing 2017?
Next is month 2 - 08? august?
Serial 00000 - well, no idea why zeroes, maybe not implemented yet.
00 Voltage Low Z - which is correct
I switched to voltage:
17,08,00000,02,0001B8061200000000164000061
And 02 is correct, "Voltage AC (V)", thats what i see on screen.
So what you think should be done next? Maybe, i can do some easy to hack python script based on bluepy library.
This will open bunch of opportunities to hook multimeter to raspberry, use it for triggering some specific events (like voltage threshold reached, and something should be done)
Suggestions?