StephenBlackWasAlreadyTaken / wixel-xDrip

Allow a wixel to function as Dexcom Reciever
Other
47 stars 117 forks source link

Dexcom transmission #45

Open danpowell88 opened 8 years ago

danpowell88 commented 8 years ago

How is the dexcom transmitter sending its values over the air, ant/bluetooth etc? Is there any guidance on frequencies etc

ijustlovemath commented 8 years ago

It's written as a serial packet over the Wixel's UART bus: https://github.com/StephenBlackWasAlreadyTaken/wixel-xDrip/blob/master/apps/dexdrip/dexdrip.c#L253-L263

You can hook up the Wixel to a computer via USB and listen for the incoming packets using any basic serial terminal. The frequencies/radio scanning are all handled by the Wixel's microcontroller in this function: https://github.com/StephenBlackWasAlreadyTaken/wixel-xDrip/blob/master/apps/dexdrip/dexdrip.c#L421

Specifically, the call to the Wixel's API is made here: https://github.com/StephenBlackWasAlreadyTaken/wixel-xDrip/blob/master/apps/dexdrip/dexdrip.c#L440

After this, the packet is formatted into the struct defined near the top and printed over UART.

If you're wondering how it scans for the packet, that's done in the get_packet() function: https://github.com/StephenBlackWasAlreadyTaken/wixel-xDrip/blob/master/apps/dexdrip/dexdrip.c#L476-L496

danpowell88 commented 8 years ago

Cheers!