Skip to content

Command catalogue

Bench hardware only. Everything here can start or change insulin delivery. Use it only with pump hardware that is not connected to any living subject. See bench testing.

9. Command catalogue

Requests are opcode + payload; responses are opcode + 0x80. The State column uses the legend at the top of this document (βœ… Verified / 🟑 Partial / πŸ§ͺ Identified / β›” TBD); "verified" means accepted by the pump on the bench with the expected response, "identified" means the opcode and payload shape are known but the command has not yet been accepted on the bench. The full name table lives in protocol/ProtocolStatus.OPCODES.

Session / reads

Opcode Name Family Verified
0x0310 getPumpIdentification Simple yes (returns serial)
0x0502 getLogRecord Simple yes
0x0505 acknowledgeLogsReset Simple
0x0200 / 0x8304 / 0x8705 status broadcasts pump β†’ app decode yes

Alerts / notices

Opcode Name State Notes
0x0400 clearPumpAlert βœ… Verified therapy number + u16 alert bit mask; clears alerts, not alarms. TwiistOff: Clear on an alert banner, Pump tools, POST /pump/clear-alert?mask=
0x0402 clearPumpNotice βœ… Verified therapy number + u16 notice bit mask. TwiistOff: Clear on a notice banner, Pump tools, POST /pump/clear-notice?mask=
0x0700 silenceAlarms πŸ§ͺ Identified payload = therapy number only (no other field, so no duration); an empty payload is refused 0x1403. TwiistOff sends it with the therapy number (Silence the alarm in the alarm wizard, Pump tools, POST /pump/silence), but it has not yet been sent on the bench, so its effect is β›” TBD; read it from status byte 91 (alarm audio bit 0x04)
0x0D00 alarmReset βœ… Verified therapy number only; accepted only while status byte 90 = 1; restarts the pump (Setup and recovery Β§6.2). TwiistOff: the alarm wizard, Pump tools, POST /pump/alarm-reset, gated on byte 90
0x0E00–0x0E02 acknowledge pump / CGM / loop notification audio unsupported the pump refuses them as invalid commands (0x0E00 β†’ 0x13FB on the bench). TwiistOff never sends them: its command paths refuse these opcodes before sealing a frame. Silence an alarm with 0x0700; clear alerts and notices with 0x0400 / 0x0402

Settings

Settings values follow the therapy number; layouts and units confirmed on the bench 2026-12-02 unless marked. The full configure write list (order, value lengths, what the verify record carries) is in Setup and recovery Β§6.0.

Opcode Name Notes
0x8000 setPumpIdleAlertDuration verified; u16 LE minutes (15, 30 and 60 accepted; no known "off" value). The pump raised pumpIdle 15:00 after delivery stopped with 15 min set
0x8002 adjustStartingCassetteVolume verified; u16 LE 0.01 U (0.01–300.00 U). Sets the attached cassette's starting (fill) volume, not what is left: reservoir = starting volume βˆ’ 10 U βˆ’ delivered since the fill, and byte 40 (insulin %) follows. Accepted while basal runs, outside the cassette-change flow, with no restart; cassette age and the verify answer are unchanged. Use it after a battery change that keeps the cassette; sending the remaining amount would subtract the delivered insulin twice. TwiistOff: Correct volume (Pump Menu, battery-change wizard), POST /pump/cassette-volume; the value entered is sent as the starting volume
0x8003 setStartingCassetteVolume verified; 300 U = 0x7530; the pump shows 10 U less than declared
0x8004 setLowInsulinAlert verified; u16 LE units Γ— 100, 0 = off, up to 100.00 U (101 U and above refused 0x13EE). verifyTherapySettings does not compare it (nor the walk-away timeout); TwiistOff keeps its record equal to the pump anyway
0x8005 / 0x8006 setMaxBasalRate / setMaxBolus therapy number + u16 (0.01 U/h, 0.01 U) β†’ 0x8085 / 0x8086. Each writes one of the two delivery limits that 0x800A writes and verifyTherapySettings checks: a different value turns the verify to 00 until it is restored. Accepted with basal stopped. TwiistOff writes both limits with 0x800A
0x8007 setWalkawayTimeout verified; u8 minutes, 0 = off (5, 10 and 15 accepted). An on-pump alert: when the phone has been out of contact this long the pump raises alert bit 4 noRemoteInterface (409-0004) and keeps delivering; clear it with clearPumpAlert 0x0400 mask 0x0010
0x8008 setOneButtonBolus verified; u8 0/1
0x8009 setClosedLoop verified; u8 0/1. With the loop on, the pump doses by itself (below)
0x800A setDeliveryLimits verified; u16 max basal (0.01 U/h), u16 max bolus (0.01 U). Refused 0x13ED while basal runs, even with unchanged values (the pump keeps its limits and verify still answers 01); every other settings write is accepted while delivering. Accepted once basal is stopped (verify 01): stopBasal β†’ 0x800A β†’ verify β†’ startBasal. TwiistOff never sends it while basal runs: a configure or rewrite leaves unchanged limits alone (reported as unchanged, verify 01) and refuses a change with nothing sent; the Change delivery limits wizard stops basal, writes, verifies and starts basal
0x800B setTime verified; Therapy value = u32 LE pump UTC seconds (2008 epoch) + i16 LE timezone offset minutes, so the frame payload is 8 bytes with the therapy prefix
0x800C setInsulinModel verified; u8: 1 = rapid-acting adult curve, 0 = child curve (the only two presets)
0x800D setGlucoseTargetPattern verified; 196 bytes: two blocks (low, then high) of 48 Γ— mg/dL Γ— 100, each followed by its CRC16
0x800F verifyTherapySettings Simple; 42-byte record; answers 01 (match) or 00 (differ); verified
0x8010 setPumpQuietMode identified (TwiistOff sets quiet mode through 0x8016)
0x8011–0x8014 CGM signal-loss / low / high alerts, glucose display range verified as part of a configure; feed the verification-record tail
0x8016 setPumpAudioSettings verified; u8 quietMode, u8 level (level 1/2/3 = low/medium/high). The pump log echoes it as records 0x00E9 + 0x00E4
0x8017 setCassetteChangeReminder verified as part of a configure; u8 enabled, u8 hours (hours 48–72). A pump notice, not a forced change
0x8020 setCheckGlucoseReminder verified; therapy number + u16 minutes, 15 to 240 (14 and 241 refused 0x13EE, the NACK echoing the value). When it runs out the pump raises notice bit 13 Timer Expired once (no sound flag, no repeat); clear it with 0x0402 mask 0x2000. A new set takes effect over a pending one. TwiistOff sends it only on RIS messages 13.70 or later (Firmware gates)
0x8019 setBasalPattern verified; 48 Γ— U/h Γ— 100, then the max basal rate, then the CRC16
0x801B setInsulinSensitivityPattern verified; 48 Γ— mg/dL per U Γ— 100, then the CRC16
0x801D setCarbRatioPattern verified; 48 Γ— g per U Γ— 10, then the CRC16, then the max basal rate
0x801F setCGMSleepSettings verified as part of a configure; 9 bytes: u16 start minute, u16 end minute, u16 low, u16 high (mg/dL Γ— 100), u8 on
0x8310 setCgmInfo verified as part of a configure; 52 bytes, all zero when no CGM is used
0x8700 / 0x8701 loopSetConfig / loopGetConfig set verified (10 bytes: safety limit, pre-meal low / high, workout low / high, mg/dL Γ— 100); get identified (TwiistOff: Read loop config from the pump)

Delivery / cassette

Opcode Name State Notes
0x8100 startBasal βœ… Verified Therapy
0x8101 temporaryModifyBasal βœ… Verified percent temp basal: 0–200 % of the basal pattern accepted, 201 % and above refused 0x13EE; 0 % is a zero temp basal (Delivery)
0x8102 temporaryOverrideBasal βœ… Verified absolute U/h temp basal; verified live 2026-11-30 (the driver primitive)
0x8103 stopBasal βœ… Verified
0x8104 stopTempBasal βœ… Verified verified live 2026-11-30
0x8200 stopNormalBolus βœ… Verified
0x8201 stopExtendedBolus βœ… Verified therapy number only β†’ 0x8281; stops the extended part of a bolus started by 0x8401 with extended fields (status 66 remaining β†’ 0; basal keeps running)
0x8202 stopCannulaFillBolus βœ… Verified therapy number only β†’ 0x8282; stops a running cannula fill (log 0x0060 = delivered, requested, id); a no-op when nothing runs
0x820A startCannulaFill βœ… Verified therapy number + u16 volume (0.01 U) + u8 reason (0 normal, 1 site replacement; both accepted) β†’ 0x828A. Refused 0x13ED with basal stopped. Maximum 0.70 U: 0.71 U and above refused 0x13EE. Logged 0x005F at the start and 0x0061 at the end; stop it with 0x8202. TwiistOff: POST /setup/cannula-fill
0x8400 performSimpleCorrectionBolusCalculator βœ… Verified delivery
0x8401 performSimpleMealCalculator βœ… Verified therapy number + 23 B: BG mg/dLΓ—100, carbs (whole g), recommended, normal (delivered), extended, extended minutes, active insulin, target low, target high, calc time u32, override u8 β†’ 0x8481 consumed, next, bolus id, meal id (the event id of the 0x007E meal record), 0000
0x8402–0x8403 closed-loop calculator variants β›” TBD shapes known, behaviour unverified
0x8803 deleteMeal πŸ§ͺ Identified therapy number + u32 meal id (the meal's log event id, also returned by 0x8401); refused 0x13ED for a meal already bolused, with basal running or stopped, so its use is not known
0x8804 cassetteChange βœ… Verified therapy number only; sets cassette-change mode (left only by a restart), clears prime-done / therapy-ready. TwiistOff refuses it while basal runs (stop basal first): Change cassette… on the cassette set-up page, Pump tools, POST /pump/cassette-change
0x8805 batteryChange 🟑 Partial therapy number only; accepted once (reset the self-test). It is sent before a battery swap that keeps the cassette (Setup and recovery Β§6.2); the full pump-side effect is β›” TBD. TwiistOff sends it only on RIS messages 13.54 or later; below that it refuses the battery change and sends nothing in its place (Firmware gates). Refused while basal runs. TwiistOff: the battery-change wizard, Pump tools, POST /pump/battery-change
0x8900–0x8903 prime start / stop / complete / reset βœ… Verified therapy number only each; primeComplete 0x8902 is accepted only at priming state 3 (minimum volume met); resetPrime 0x8903 clears prime-done
0x8904 primeTubingStart βœ… Verified therapy number only β†’ 0x8984; re-primes the tubing with basal stopped. primingStatus 5 while it runs; stopPrime β†’ 4, primeComplete β†’ 0. Moves insulin in 0.88 U steps: stopped after about 3 s it still moved 0.88 U. TwiistOff does not send it yet. Firmware gate: RIS messages 13.72 or later (Firmware gates)

Firmware gates

TwiistOff is tested on one pump firmware only, RIS messages 13.76 / events 14.32 (Tested firmware). For some commands it also holds a minimum RIS messages version and does not send the command below it. Those minimums are untested: no pump below them has been run. The pump announces its versions on e5332001 as five u16 LE values: messages major, messages minor, events major, events minor, operating mode (0 = bootloader, 1 = full application); see Status fields. Versions compare as major Γ— 1000 + minor (13.76 β†’ 13076). TwiistOff reads the block right after every arm and on every e5332001 indication (pump/RisGate.kt). A command below its minimum is not sent, and nothing is sent in its place: a settings write is skipped and reported (skipped: 0x8017 is not tested on pump firmware 13.50; TwiistOff sends it only on 13.68 or later), and a battery change is refused. While the version is unknown nothing is gated.

Opcode Command TwiistOff sends it from RIS messages
0x8805 batteryChange 13.54
0x8308 clearCgmNotice 13.56
0x8000 setPumpIdleAlertDuration 13.56
0x8015 (setting) 13.58
0x8017 setCassetteChangeReminder 13.68
0x8016 setPumpAudioSettings 13.69
0x8018 playPumpAudioLevel 13.70
0x8020 setCheckGlucoseReminder 13.70
0x801F setCGMSleepSettings 13.71
0x8904 primeTubingStart 13.72

The bench unit reports 13.76, so nothing is gated on it.

Pump-local features worth knowing

  • One-button bolus (0x8008): the physical button can deliver a bolus without the phone (1 U per press, capped at max bolus or 10 U). A third-party client should leave it off or history-sync those boluses so they are not invisible. TwiistOff's bench default turns it on; the bench replay preset turns it off.
  • Closed loop on the pump: with the loop on, the pump doses by itself, even with no CGM attached, and can set a high basal rate from calculator BG and carbs alone. A client must check the closed-loop flag before commanding; if a previous app left the loop enabled, the pump keeps making its own decisions. TwiistOff keeps the loop setting off in its stored settings, writes it with every configure, and blocks every delivery start while the status says the loop is on (the Monitor page shows the loop state; the Adjust and Therapy settings pages switch it through the stored setting, with a confirmation to turn it on). The status-side flag (byte 44) is described in Status fields.
  • Basal check from the button: ~3-second hold β†’ three ascending tones = delivering, single beep = not delivering. Do not confuse with the 5-second hold that opens pairing mode.