Hi. Yeah, good idea with putting it in the fridge to force battery voltage down. I guess you could also heat it.
I think it's more likely that reading would be battery than say temp, although of all the packets I've seen captured, they all seem to be about D8, so maybe it's temp? I wonder if there's a temp-based correction, since the enzyme reaction is very temp-sensitive, but you'd think the human body would be doing an awesome job at temp regulation, esp sub-dermal.
Hi all, Hjoke, those Frequencies work in the US also, I tried out your code yesterday. I'd really like to see the source, I need that to communicate with my rfduino without the USB involvement. As to interpreting the data, you need to create a standard curve with a range of values, then you can use y=mx+b to extrapolate your current glucose from the raw counts which is what you're seeing. The 12 hour calibrations allow the software to "shift" the curve to account for decreasing counts over time, as the sensor ages.
Hi hjoke. There are a couple of checksum algorithms built into the CC2511 that are able to be used by applications running in them. TI have details on them. I tried to do some matching but didn't get anywhere with them either (and they generate a 16 bit crc).
We just changed my son's sensor, so I collected some readings immediately (well a couple minutes) after disconnection.
these are consecutive readings. It looks like the numbers wind down and take a while to get to zero after disconnection. This makes me think maybe there is some averaging window being applied to the data.
Hi Adrien, I believe the checksum routine is the most secret in these messages because it is the only way to check if the message is real.
The transmitter also has more than one reed switch because it started to send different messages when I have removed it from package and then put it back. There is some averaging because it needs several samples to change the state.
I have still also some problems with the upper bits. If we combine bytes 13 and 15 as below:
K = (B13 & 15) * 16 + (B15 & 15) we can get some values like: DE 9E D9 99 EE EA 9A FD FB DB DD BD
We could make some table for at get these upper bits.
IF (K = 234) OR (K = 238) THEN D = 1 IF (K = 153) OR (K = 154) OR (K = 158) OR (K = 219) THEN D = 2
IF (K = 217) OR (K = 221) OR (K = 222) THEN D = 3
IF (K = 251) OR (K = 253) THEN D = 0
IF (K = 219) OR (K = 221) THEN D = ?
IF (K = 189) THEN D = 3
Value is 256 * D + byte as earlier There are some possibilities but some are still missing. Do you have better info?
I am now working with the software for my insulin pump and next monday I should go to eye surgery.
Hi Adrien, thanks for info but I can't get from it much sense. I have my logs over 2000 messages and when I try 14 or 13 bits then there is something that looks nice but there are still big problems with the msbs. I can get values from 1000h to 1ffff or 3fffh but only 8 lsbs could be right. I have tried both pairs (1,2 and 3,4).
p.s. I don't know if the checksum is really that interesting.
the FCS done by the hardware tells you if the packet is corrupted. If it's not corrupted, and it's from your transmitter, and the correct port etc, then do you really need to verify the checksum as well? the data seems to be plaintext. Possibly can just ignore the checksum.
I'm more interested in the meaning off all the other bits that don't seem to match the records in the receiver.
in the receiver, data is organised in tables. There's a table (3) that stores decoded radio packets, and table 4 contains the calibrated BGL:direction records.
The decoded radio packets contain 2 DWORDS and a SHORT (all records of all types start with 2 dates - internal and display date so this is after that).
The 2 DWORDS are normally very close together. We thought it might be signal and noise values, but if you subtract, the result doesn't correlate to BGL. However the average of the 2 (or either one) does correlate well to the BGL. It's a bit of a slight curve. I think the calibration readings alter the calibration curve.
Hi Adrien, Below are some messages. The 8th number is my result.
The next are 14 bits in reverse order from 2 bytes.
The 9th is 14 bits from bytes 1 and 2 in hexadecimal.
The 10th is 14 bits from bytes 3 and 4 in hexadecimal.
The 11th is 9th in decimal.
The 12th is 10th in decimal.
Thanks, this is awesome. By Checksum/CRC all I want is to throw out packets that were interfered with. I don't believe that was working in the above code. If you use the CRC check from the sniffer example: putchar((pkt[len + 2] & 0x80) ? '+' : '-'); and I also think radio_registers.c change PKTCTRL0 = 0x05; Now when there's a bad Byte, it gets flagged. Ex. 12 FF FF FF FF CA 58 61 00 3F 03 C6 1E 8D 20 49 D8 00 3C + 12 FF FF FF FF CA 58 61 00 3F 03 C7 1E 8D 20 49 D8 00 3C + 12 FF FF FF FF CA 58 61 00 3F 03 C8 1E 8D 20 49 D8 00 3C + 12 FF FF FF FF CA 58 61 00 3F 03 C9 1E 8F 20 49 D8 00 3C - Bad packet
As soon as you get a packet with a good CRC, you're done, no need to read the others and compare etc.
Also, memset all those packets each iteration, Ex. memset(&packet0, 0, sizeof(packet0));
I've also been reading the TI application notes. There are some really good ones that would help to design a system to maximise battery life. E.g.
a) by putting the system to sleep as long as possible b) choice of power supply (may need to use SMPS / DC-DC converter instead of linear regulator)
c) minimising amount of time the receiver is in RX state.
So if you get a good packet, you should turn off the receiver. If it's bad, then swap to next frequency etc until you do get a good one.
Hi DonB, I am sorry but there is not CRC in use. I am sure about that. First when I tried to receive packets, my first result is got using continuous receive mode and I have triggered memory scope and captured the data to the screen. I have got the trigger signal by using an antenna with rf-detector near the transmitter. Later I have tried to send same looking message and I was lucky only when it was sent without CRC. Then the message length was very same in both cases. They don't need the CRC because they are using their secret checksum method.
when we use the TI CC2511 EMK USB dongle and the SmartRF PAcket Sniffer to capture from the dexcom transmitter, it has a FCS field which it marks as OK or ERR depending on the radio frame checksum.
So from our tests with that environment, it looks like there is a FCS checksum in use by the transmitter.
Hi Adrien, here are few logs that I have self decoded from scope screen when I have used continuous receive mode:
AA AA D3 91 D3 91 12 FF FF FF FF B0 CD 61 00 3F 03 E1 85 8D DE 49 D8 00 33 DD 33 AA AA D3 91 D3 91 12 FF FF FF FF B0 CD 61 00 3F 03 F0 E7 F9 66 09 D8 00 7C EB 8A
AA AA D3 91 D3 91 12 FF FF FF FF B0 CD 61 00 3F 03 3F 3B 59 D2 3E D8 00 0A F6 C6
I tried to find the CRC from last 2 bytes but I didn't. The last byte came out from demodulator after the end of rf transmission. Rf transmission ended a little before the end of the 2nd last byte. When I have not found any CRC then I have supposed the last byte is only from noise because the shapes were not full synchronized. But the 2nd last can be real. However there is inbuild CRC16 calculation and we have only one byte. It can be some kind of checksum.
Hi, that's very interesting. From the TI documentation on simplicIT, it has a preamble, then synch word, then packet (to addr, from addr, etc), then 2 byte CRC.
I wonder if one of the bytes we're seeing in payload is actually the first byte of the radio CRC, and we should be ignoring it? E.g. maybe really only a 6 byte payload? The TI application notes go into detail on the checksum in various notes: