-
Notifications
You must be signed in to change notification settings - Fork 46
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.
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.
Each command message (which can be composed of one or more sub-command messages) received by the Pod will generate a single response. Once a Pod has successfully paired, the 0x1D
Pod Status is the normal non-error Response for every Command except for a 0x0E
Get Status Command with a type other than 7 (DASH only) or 0. An 0x06
Error Response can be returned at any time for a non-fatal Command error (with an important special case is the bad nonce error type 0x14
on Eros). An 0x02
, Type 2 (AKA the fault or detailed status response), Pod Information Response will be returned for all commands normally receiving a 0x1D
Pod Status if a fatal Pod fault has occurred either prior to or during the execution of the command.
Links are provided to the main
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.
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 |
80 |
Response for 0x0E Get Status Command, Type 80 |
PodInfoPulseLog.swift |
0x02 Type 81, Pod Information |
81 |
Response for 0x0E Get Status Command, Type 81 |
PodInfoPulseLog.swift |
0x06 Error |
0x14 |
Response for any command with an out of sync nonce (Eros) |
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 a type other than 7 (DASH only) or 0 |
StatusResponse.swift |