Pummpcomm v2.1.0 API Reference

Modules

This module provides binary page decoding for Medtronic pump cgm pages. The main entrypoint is decode(page) which handles the crc check and parsing out event opcodes and translating those into event records

Encodes and decodes data using 4x6 conversion. 4 bit nibbles are encoded into 6 bit sequences on the way out and decoded from 6 bit sequences into nibbles on the way back

This module models the serial communications with a chip running the subg_rfspy firmware (https://github.com/ps2/subg_rfspy) capable of talking to a wireless insulin pump. It takes packet commands destined for the insulin pump, converts them to 4x6, and wraps them in a command that the subg_rfspy firmware knows how to process. The lower level serial communication is handled by a serial driver such as Pummpcomm.Driver.SubgRfspy.UART

This GenServer provides the most basic read and write operations to communicate with a wireless chip running subg_rfspy firmware (https://github.com/ps2/subg_rfspy) over a UART. It is a thin wrapper around Nerves.UART to isolate the Pummpcomm.Driver.SubgRfspy module from UART specific details and serial device IO

This module decodes a page of history from the pump into events and provides crc checking on the page

This module provides high-level continuous glucose monitor functions, such as the ability to retrieve a specific number of historical minutes of cgm data. It manages the process of pulling the right number of cgm pages from the insulin pump, along with handling Medtronic cgm-specific details like writing reference timestamps for accurate cgm decoding

This module provides high-level access to the pump history information. It fetches history data to the specified minutes back, fetching multiple pages of history if necessary until the desired timeframe has been decoded

This GenServer represents a logical pump session and wraps the commands and responses needed in order to communicate with a pump so that execution happens as effortlessly as possible (including listening for silence, waking the pump, and retries). The serial number of the pump is all that is needed to initialize the GenServer, and it will query and store the model number upon the first interaction with the insulin pump

This module provides basic pump command execution. Pump communication happens in packets, and there is often a short prelude packet that the pump acks, followed by a full command packet containing the command parameters. This module is where logical pump packet management happens

This module is responsible for scanning the known US or WW pump frequencies and searching for the best one for a given pump. It samples 5 times in each of the 25 frequency steps within the range and measures the average rssi. The frequency which results in 5 successful responses and has the highest (closest to 0) rssi wins