Some info about Dexcom G4 messages. One message looks like this:
FF FF FF FF B0 CD 61 00 3F 03 1F 07 3E 32 7A D8 00 DD
This info is received from transmitter with code 63KDG
Messages are sent every 5th minute using 4 channels so that 1st message uses channel 2425 MHz, the next after 0.5 seconds 2450 MHz, the next after 0.5 seconds 2474.737 MHz and the last after 0.5 seconds 2477.237 MHz.
CRC value is not used in transmission and therefore there must be some other checksum, maybe the last byte.
All measured values are using the very same calibration
Bytes 1-10 and bytes 16-17 are always same except bytes 11 and 16. Byte 16 can be also D9. I have used all 4 channels and they are mostly the same except byte 11. It is packet number and can have values from 1 to 255. Every packet has different packet number for every channel.
Decoding:
I have converted data to level from bytes 13 and 15 using algorithm as below:
R = result 10 bits
R.0 = B15.7
R.1 = B15.6
R.2 = B15.5
R.3 = B15.4
R.4 = B13.7
R.5 = B13.6
R.6 = B13.5
R.7 = B13.4
R.8 = B13.2 XOR B13.1
R.9 = B15.2 XOR B15.0
It is possible that the result should have more bits but I have not yet found any values outside these 10 bits.
The 22th byte is some kind of checksum but I don't know how it is calculated.
Some messages:
The last value on the line is calculated level. The first number after the message is count. 4 means that all 4 messages are ok. Next is the blood sugar.
FF FF FF FF B0 CD 61 00 3F 03 37 79 AD 5A 29 D8 00 9B 4 10.1 852
FF FF FF FF B0 CD 61 00 3F 03 3B D7 AD 84 A9 D8 00 38 4 10.6 853
FF FF FF FF B0 CD 61 00 3F 03 3F BB AD 9D A9 D8 00 F5 4 11.0 853
FF FF FF FF B0 CD 61 00 3F 03 43 6D CD C3 A9 D8 00 4B 4 11.0 821
FF FF FF FF B0 CD 61 00 3F 03 47 40 AD 72 A9 D8 00 71 4 10.7 853
FF FF FF FF B0 CD 61 00 3F 03 4B E2 2D B5 29 D8 00 81 4 10.3 836
FF FF FF FF B0 CD 61 00 3F 03 4F 3D CD 0C 29 D8 00 1F 4 10.0 820
FF FF FF FF B0 CD 61 00 3F 03 57 DE CD 85 C9 D8 00 B1 4 9.6 819
FF FF FF FF B0 CD 61 00 3F 03 5B 85 0D C8 C9 D8 00 91 4 9.3 771
FF FF FF FF B0 CD 61 00 3F 03 5F A3 8D 0A 49 D8 00 5B 4 8.8 786
FF FF FF FF B0 CD 61 00 3F 03 63 78 8D A9 89 D8 00 2C 4 8.3 785
FF FF FF FF B0 CD 61 00 3F 03 67 00 8D C8 89 D8 00 1B 4 785
FF FF FF FF B0 CD 61 00 3F 03 6B 40 8D AF 09 D8 00 8A 4 7.9 784
FF FF FF FF B0 CD 61 00 3F 03 6F F1 8D D0 89 D8 00 1F 4 7.9 785
FF FF FF FF B0 CD 61 00 3F 03 73 F2 8D AC 89 D8 00 3F 4 8.1 785
FF FF FF FF B0 CD 61 00 3F 03 77 50 4D 76 89 D9 00 8C 4 8.2 801
FF FF FF FF B0 CD 61 00 3F 03 7B 79 4D 83 89 D8 00 D5 2 8.9 801
FF FF FF FF B0 CD 61 00 3F 03 7F 60 CD 8C 49 D8 00 FB 3 9.2 818
FF FF FF FF B0 CD 61 00 3F 03 83 75 CD 03 49 D8 00 83 4 9.7 818
FF FF FF FF B0 CD 61 00 3F 03 87 C8 2D 2A C9 D9 00 92 4 9.9 835
FF FF FF FF B0 CD 61 00 3F 03 8B 23 CD 63 C9 D8 00 6C 4 9.7 819
FF FF FF FF B0 CD 61 00 3F 03 8F 47 CD BF C9 D8 00 56 4 9.8 819
FF FF FF FF B0 CD 61 00 3F 03 93 AA CD B7 C9 D8 00 76 4 819
FF FF FF FF B0 CD 61 00 3F 03 97 C8 CD A5 C9 D8 00 59 4 9.3 819
FF FF FF FF B0 CD 61 00 3F 03 9B B2 4D 5C C9 D8 00 60 2 803
FF FF FF FF B0 CD 61 00 3F 03 9F 5E 8D D5 49 D9 00 7B 4 8.2 786
FF FF FF FF B0 CD 61 00 3F 03 A3 91 0D AF 89 D8 00 AD 4 7.6 769
FF FF FF FF B0 CD 61 00 3F 03 A7 B9 F9 B8 89 D8 00 47 4 7.2 753
FF FF FF FF B0 CD 61 00 3F 03 AB C8 79 DC 09 D8 00 02 4 6.7 736
FF FF FF FF B0 CD 61 00 3F 03 AF 11 39 B3 7E D9 00 4E 4 6.2 718
FF FF FF FF B0 CD 61 00 3F 03 B3 3A D9 F2 BE D8 00 F0 4 5.8 701
FF FF FF FF B0 CD 61 00 3F 03 B7 E8 59 EF DE D9 00 63 4 5.4 683
FF FF FF FF B0 CD 61 00 3F 03 BB 87 19 6D 5E D8 00 1F 4 5.1 650
FF FF FF FF B0 CD 61 00 3F 03 BF 4D E9 C1 9E D8 00 D5 4 4.7 633
FF FF FF FF B0 CD 61 00 3F 03 C3 A3 69 5A 1E D8 00 A9 4 4.4 616
FF FF FF FF B0 CD 61 00 3F 03 C7 C8 69 D2 EE D8 00 D6 4 4.2 615
FF FF FF FF B0 CD 61 00 3F 03 CC 44 A9 7A 6E D8 00 C9 3 3.9 598
FF FF FF FF B0 CD 61 00 3F 03 CF 56 29 09 AE D9 00 D0 4 3.7 581
FF FF FF FF B0 CD 61 00 3F 03 D7 71 C9 34 2E D8 00 C2 4 3.5 564
FF FF FF FF B0 CD 61 00 3F 03 DB 6B 49 F9 CE D8 00 8C 4 547
FF FF FF FF B0 CD 61 00 3F 03 DF 88 C9 6C CE D8 00 1C 4 3.3 563
FF FF FF FF B0 CD 61 00 3F 03 E7 FF 49 57 4E D9 00 A7 4 3.3 546
FF FF FF FF B0 CD 61 00 3F 03 EB 2C C9 DF 4E D8 00 F6 4 3.4 562
FF FF FF FF B0 CD 61 00 3F 03 EF 5B C9 94 CE D9 00 0A 4 3.6 563
FF FF FF FF B0 CD 61 00 3F 03 F3 9D C9 D6 CE D9 00 28 4 563
FF FF FF FF B0 CD 61 00 3F 03 04 10 29 84 2E D9 00 32 2 580
FF FF FF FF B0 CD 61 00 3F 03 08 B5 C9 70 2E D8 00 87 4 564
FF FF FF FF B0 CD 61 00 3F 03 18 5B 89 84 4E D8 00 4D 4 3.0 530
Because Dexcom sensor is in body fluid but not in blood, the results are processed in the receiver in some strange way. If I look at my results then sometimes I get many very same values but the receiver shows to vary the value from sample to next. Or I can see the results are changing but the receiver shows the same old value.
I have programmed a Wixel Pololu USB board for at get these results using Putty in my PC. Next I think to add a button to the board for calibration. Normally Dexcom receiver is calibrated every 12 hours by measuring the real blood sugar with normal meter and giving that value to receiver. I think to use a button so that I press this button when the sugar level is near 5.0 and then my Wixel uses this level as a reference. Then my Wixel sends the difference compared to reference level to my insulin pump. Then my pump can control the basal level in small steps up or down depending how big the difference is. Maybe I can then stop the alarms every night when the blood sugar is going to low.