Skip to content
Joe Moran edited this page Jun 22, 2021 · 158 revisions

Message Types

Messages sent to the Pod are typically referred to as Commands while messages returned from the Pod are typically returned to as Responses. All messages start with a single byte indicating the Command/Response type followed by a length byte except for the 0x1D Pod Status Response which is the only message with no length byte.

Pod Commands

All Pod communication originates from the the controlling software (i.e., a PDM or Loop). The Pod receives a command and then sends back a synchronous response. The 0x1A Insulin Schedule Command is the only message with an additional sub-message/sub-command immediately following it which is often referred to as the Extra Command.

Pod Responses

Each command received from the Pod will generate a response. Once a Pod is successfully paired, the 0x1D Pod Status is the normal non-error Response for every Command except for a 0x0E Get Status Command with a non-zero type. An 0x06 Error Response can be returned at any time for a non-fatal Command error (with an important special case of a bad nonce error type 0x14). An 0x02, Type 2, Pod Information Response can also be returned at any time for a fatal Pod fault occurring either prior to or during the execution of the command.

OmniKit Implementation

Links are provided to the dev branch source files for various commands, responses and support routines in the OmniKit implementation of Loop as a reference and to aid developers for other platforms. Development of earlier code like commands.py or rtlomni were never completed and links for selected portions are no longer being provided in the table below until someone steps up to finish these efforts.

Commands

Command # Type Normal Response OmniKit Implementation
0x03 Setup Pod 0x01 Version Response, longer format SetupPodCommand.swift
0x07 Assign ID 0x01 Version Response, shorter format AssignAddressCommand.swift
0x08 Configure Delivery Flags 0x1D Pod Status Response FaultConfigCommand.swift
0x0E Get Status 0 0x1D Pod Status Response GetStatusCommand.swift
0x0E Get Status 1 0x02 Pod Information, Type 1 GetStatusCommand.swift
0x0E Get Status 2 0x02 Pod Information, Type 2 GetStatusCommand.swift
0x0E Get Status 3 0x02 Pod Information, Type 3 GetStatusCommand.swift
0x0E Get Status 5 0x02 Pod Information, Type 5 GetStatusCommand.swift
0x0E Get Status 0x50 0x02 Pod Information, Type 80 GetStatusCommand.swift
0x0E Get Status 0x51 0x02 Pod Information, Type 81 GetStatusCommand.swift
0x11 Acknowledge Alerts 0x1D Pod Status Response AcknowledgeAlertCommand.swift, AlertSlot.swift
0x19 Configure Alerts 0x1D Pod Status Response ConfigureAlertsCommand.swift, AlertSlot.swift
0x1A Insulin Schedule Base The Extra Command Response SetInsulinScheduleCommand.swift
0x1A Basal Schedule 0 Response from 0x13 Basal Extra BasalSchedule.swift BasalDeliveryTable.swift
0x13 Basal Extra 0x1D Pod Status Response BasalScheduleExtraCommand.swift
0x1A Temp Basal 1 Response from 0x16 Temp Basal Extra BasalDeliveryTable.swift
0x16 Temp Basal Extra 0x1D Pod Status Response TempBasalExtraCommand.swift
0x1A Bolus 2 Response from 0x17 Bolus Extra SetInsulinScheduleCommand.swift
0x17 Bolus Extra 0x1D Pod Status Response BolusExtraCommand.swift
0x1C Deactivate Pod 0x1D Pod Status Response DeactivatePodCommand.swift
0x1E Set Beep Options 0x1D Pod Status Response BeepConfigCommand.swift
0x1F Cancel Delivery 0x1D Pod Status Response CancelDeliveryCommand.swift, AlertSlot.swift

Responses

Response # Type Notes OmniKit Implementation
0x01 Version len == 0x1B len == 0x15 Longer 0x1B Response for the 0x03 Setup Pod Command or Shorter 0x15 Response for the 0x07 Assign ID Command VersionResponse.swift
0x02 Pod Information Base Response for 0x0E Get Status Command, Type !0 PodInfo.swift
0x02 Type 1, Pod Information 1 Response for 0x0E Get Status Command, Type 1 PodInfoConfiguredAlerts.swift
0x02 Type 2, Pod Information 2 Response for 0x0E Get Status Command, Type 2 or if the Pod has faulted, the error response to any command normally returning a $1D Pod Status Response DetailedStatus.swift FaultEventCode.swift
0x02 Type 3, Pod Information 3 Response for 0x0E Get Status Command, Type 3 PodInfoPulseLogPlus.swift
0x02 Type 5, Pod Information 5 Response for 0x0E Get Status Command, Type 5 PodInfoActivationTime.swift
0x02 Type 80, Pod Information 0x50 Response for 0x0E Get Status Command, Type 80 PodInfoPulseLog.swift
0x02 Type 81, Pod Information 0x51 Response for 0x0E Get Status Command, Type 81 PodInfoPulseLog.swift
0x06 Error 0x14 Response for any command with a bad nonce ErrorResponse.swift
0x06 Error !0x14 Response for any a rejected message for any other reason ErrorResponse.swift
0x1D Pod Status No type or length Default non-error Response for all Commands except 0x03, 0x07 & 0x0E Get Status Command with any non-zero type StatusResponse.swift
Clone this wiki locally