Skip to content

Command 17 Bolus extra

Sebastian Holmqvist edited this page Apr 20, 2018 · 32 revisions

The 0x17 command is a follow-on command for the Command 0x1A Table 2 case to deliver either a normal and/or an extended bolus. This command always immediately follows the 0x1A command with Table 2 (bolus case) in the same message.

The generic format of the 0x17 bolus follow-on command for a command 1A Table 2 bolus is:

17 LL SS NNNN XXXXXXXX YYYY ZZZZZZZZ [YYYY ZZZZZZZZ]
  • 17 (1 byte): Mtype value of $17 is the follow-on command for a 1A command Table 2 (bolus).
  • LL (1 byte): Length of the following bytes for this command, minimum value of $0d.
  • SS (1 byte): Always observed to be either $3c or $7c.
  • NNNN (2 bytes): # of 0.05U pulses x 10.
  • XXXXXXXX (4 bytes): delay in 100 kHZ to start of delivery, minimum value of $30D40 = 200,000 = 2 seconds.
  • YYYY (2 bytes): # of 0.05U pulses x 10 to deliver for extended bolus interval
  • ZZZZZZZZ (4 bytes): delay interval in 100 kHz between pulses for extended bolus interval

NNNN will be 0 if there is no immediate bolus. YYYY and ZZZZZZZZ will be 0 if there is no extended bolus.

Potentially there could be multiple instances of YYYY and ZZZZZZZZ when using an extended bolus, but need a full packet capture for a $17 command having a length > $0d along with details to correctly document.

Immediate Bolus of 0.05U Now

1a LL NNNNNNNN 02 CCCC HH SSSS 0ppp 0ppp
1a 0e bb947ef5 02 0013 01 0010 0001 0001

17 LL SS NNNN XXXXXXXX YYYY ZZZZZZZZ
17 0d 7c 000a 00030d40 0000 00000000

The NNNN value of 000a says that 10/10 = a single 0.05U pulse is to be delivered. The minimum XXXXXXXX value of 00030d40 = 200,000 indicates that there is a 200,000/100,000 = 2 second delay before the single 0.05U pulse is delivered. The zero YYYY & ZZZZZZZZ values indicate that there is no extended bolus.

Immediate Bolus of 0.10U Now

1a LL NNNNNNNN 02 CCCC HH SSSS 0ppp 0ppp
1a 0e d7525e1d 02 0025 01 0020 0002 0002

17 LL SS NNNN XXXXXXXX YYYY ZZZZZZZZ
17 0d 7c 0014 00030d40 0000 00000000

The NNNN value of 00014 indicates that 20/10 = two 0.05U pulses are to be delivered. The minimum XXXXXXXX value of 00030d40 = 200,000 indicates that there is a 200,000/100,000 = 2 second delay before the two 0.05U pulses are delivered. The zero YYYY & ZZZZZZZZ values indicate that there is no extended bolus.

6.0U Combination Bolus with 2.0 Units Now and 4.0 Units Extended Over 3 Hours

1A LL NNNNNNNN 02 CCCC HH SSSS 0ppp 0ppp napp napp napp napp
1a 16 01e475cb 02 0129 07 0280 0028 0028 100d 000e 100d 000e

17 LL SS NNNN XXXXXXXX YYYY ZZZZZZZZ
17 0d 3c 0190 00030d40 0320 00cdfe60
  • 1a Mtype value of 1A is for Insulin Schedule Command
  • 16 Length of bytes for this $1A command
  • 01e475cb Nonce
  • 02 TableNum = 2, Bolus type
  • 0129 Checksum, byte sum of next 3 fields and the resulting insulin schedule table of [$28 $d $d $e $d $d $e]
  • 07 # of entries in the resulting insulin schedule table (1 for immediate bolus plus 6 for 3-hour extended bolus)
  • 0280 Field A, First InsulinScheduleElement value of 0028 << 4
  • 0028 Pulses, First InsulinScheduleElement value of 0028 (# of ticks to deliver immediately)
  • 0028 InsulinScheduleElement resulting in 1 entry of [40] * 0.05U = 2.0U immediate bolus
  • 100d N=1+1 = 2 entries (1 hour) of [13 13] = 1.3U
  • 000e N=0+1 = 1 entry (0.5 hour) of [14] = 0.7U
  • 100d N=1+1 = 2 entries (1 hour) of [13 13] = 1.3U
  • 000e N=0+1 = 1 entry (0.5 hour) of [14] = 0.7U
  • 17 Mtype value of $17 is the follow-on command for a bolus
  • 0d Length of the following bytes for this $17 subcommand, minimum length
  • 3c Always $3c or $7c
  • 190 Number of 0.05U pulses to deliver now x 10 ($190 = 400x0.05 = 20/10 = 2.0U)
  • 00030d40 Delay in 100 kHZ to next pulse (=200,000 or 2 seconds), minimum value
  • 0320 Number of 0.05U pulses to deliver x 10 ($320 = 800/10 = 80x0.05 = 4.0U)
  • 00cdfe60 Delay in 100 kHz between pulses (=13,500,000/100,000 = 135 secs/pulse) and 135 sec/pulse * 80 pulses = 10,800 secs or 3.0 hours

1.0U Bolus with Only Extended Delivery for 1 Hour

1A LL NNNNNNNN 02 CCCC HH SSSS 0ppp 0ppp napp  17 LL SS NNNN XXXXXXXX YYYY ZZZZZZZZ      
1a 10 0375a602 02 0017 03 0000 0000 0000 100a  17 0d 7c 0000 00030d40 00c8 0112a880

This $1A bolus command (TableNum == 2) example has a length of $10 and thus has 2 InsulinScheduleElements. The first InsulinScheduleElement of 0000 specifies no immediate bolus amount to deliver (which also means that previous two fields are also going to be 0000). The second InsulinScheduleElement of 100a delivers 10 * 0,05U = 0,5U for two half hours which is the extended bolus of 1,0U over 1 hour. The $17 command has an NNNN value of 0000 to indicate that no immediate bolus is to be delivered. The XXXXXXXXX value of 00030d40 indicates that the delay before the first insulin is delivered is $30d40 = 200,000/100,000 = 2.0 seconds. The YYYY value of 00c8 = 200 indicates that 200/10 = 20 x 0.05U pulses 1.0U total are to be delivered. The ZZZZZZZZ value of 0112a880 = 18,000,000/100,000 = 180 seconds or 3 minutes between pulses and 20 pulses x 3 min/pulse = 60 minutes.

Raw Packet Data

0.05U Normal Bolus

`2017-09-17T16:29:46.495888 ID1:1f0d3143 PTYPE:PDM SEQ:21 ID2:1f0d3143 B9:34 BLEN:3 BODY:0e0100816d CRC:a4`
`2017-09-17T16:29:46.565920 ID1:1f0d3143 PTYPE:POD SEQ:22 ID2:1f0d3143 B9:38 BLEN:10 BODY:1d18001bc800000047ff00c6 CRC:1e`
`2017-09-17T16:29:46.942256 ID1:1f0d3143 PTYPE:PDM SEQ:24 ID2:1f0d3143 B9:3c BLEN:31 BODY:1a0ebb947ef502001301001000010001170d7c000a00030d40 CRC:d8`
`2017-09-17T16:29:47.274872 ID1:1f0d3143 PTYPE:PDM SEQ:24 ID2:1f0d3143 B9:3c BLEN:31 BODY:1a0ebb947ef502001301001000010001170d7c000a00030d40 CRC:d8`
`2017-09-17T16:29:47.343074 ID1:1f0d3143 PTYPE:ACK SEQ:25 ID2:1f0d3143 CRC:cc`
`2017-09-17T16:29:47.513505 ID1:1f0d3143 PTYPE:CON SEQ:26 CON:00000000000002ab CRC:e1`
`2017-09-17T16:29:47.586227 ID1:1f0d3143 PTYPE:POD SEQ:27 ID2:1f0d3143 B9:00 BLEN:10 BODY:1d58001bf801000047ff0034 CRC:0b`
`2017-09-17T16:29:47.705362 ID1:1f0d3143 PTYPE:POD SEQ:27 ID2:1f0d3143 B9:00 BLEN:10 BODY:1d58001bf801000047ff0034 CRC:0b`
`2017-09-17T16:29:47.710789 ID1:1f0d3143 PTYPE:ACK SEQ:28 ID2:1f0d3143 CRC:21`
`2017-09-17T16:29:52.446727 ID1:1f0d3143 PTYPE:PDM SEQ:29 ID2:1f0d3143 B9:04 BLEN:3 BODY:0e010001d7 CRC:a9`
`2017-09-17T16:29:52.776506 ID1:1f0d3143 PTYPE:PDM SEQ:29 ID2:1f0d3143 B9:04 BLEN:3 BODY:0e010001d7 CRC:a9`
`2017-09-17T16:29:52.845873 ID1:1f0d3143 PTYPE:POD SEQ:30 ID2:1f0d3143 B9:08 BLEN:10 BODY:1d18001c7800000047ff02d3 CRC:fd`
`2017-09-17T16:29:52.846188 ID1:1f0d3143 PTYPE:ACK SEQ:31 ID2:1f0d3143 CRC:87`

0.10U Normal Bolus

`2017-09-17T16:32:18.997700 ID1:1f0d3143 PTYPE:PDM SEQ:11 ID2:1f0d3143 B9:24 BLEN:3 BODY:0e01000245 CRC:c2`
`2017-09-17T16:32:19.175943 ID1:1f0d3143 PTYPE:POD SEQ:12 ID2:1f0d3143 B9:28 BLEN:10 BODY:1d18001ca80000004fff02fa CRC:da`
`2017-09-17T16:32:19.176472 ID1:1f0d3143 PTYPE:ACK SEQ:13 ID2:1f0d3143 CRC:71`
`2017-09-17T16:32:38.415427 ID1:1f0d3143 PTYPE:PDM SEQ:14 ID2:1f0d3143 B9:2c BLEN:3 BODY:0e0100014b CRC:13`
`2017-09-17T16:32:38.700571 ID1:1f0d3143 PTYPE:PDM SEQ:14 ID2:1f0d3143 B9:2c BLEN:3 BODY:0e0100014b CRC:13`
`2017-09-17T16:32:38.771531 ID1:1f0d3143 PTYPE:POD SEQ:15 ID2:1f0d3143 B9:30 BLEN:10 BODY:1d18001ca800000053ff814e CRC:e3`
`2017-09-17T16:32:38.771918 ID1:1f0d3143 PTYPE:ACK SEQ:16 ID2:1f0d3143 CRC:b7`
`2017-09-17T16:32:39.155285 ID1:1f0d3143 PTYPE:PDM SEQ:17 ID2:1f0d3143 B9:34 BLEN:31 BODY:1a0ed7525e1d02002501002000020002170d7c001400030d40 CRC:f0`
`2017-09-17T16:32:39.427349 ID1:1f0d3143 PTYPE:PDM SEQ:17 ID2:1f0d3143 B9:34 BLEN:31 BODY:1a0ed7525e1d02002501002000020002170d7c001400030d40 CRC:f0`
`2017-09-17T16:32:39.500567 ID1:1f0d3143 PTYPE:ACK SEQ:18 ID2:1f0d3143 CRC:73`
`2017-09-17T16:32:39.674454 ID1:1f0d3143 PTYPE:CON SEQ:19 CON:000000000000032e CRC:de`
`2017-09-17T16:32:39.753967 ID1:1f0d3143 PTYPE:POD SEQ:20 ID2:1f0d3143 B9:38 BLEN:10 BODY:1d58001ce802000053ff0009 CRC:83`
`2017-09-17T16:32:39.880046 ID1:1f0d3143 PTYPE:POD SEQ:20 ID2:1f0d3143 B9:38 BLEN:10 BODY:1d58001ce802000053ff0009 CRC:83`
`2017-09-17T16:32:39.900160 ID1:1f0d3143 PTYPE:ACK SEQ:21 ID2:1f0d3143 CRC:5a`
`2017-09-17T16:32:46.748814 ID1:1f0d3143 PTYPE:PDM SEQ:22 ID2:1f0d3143 B9:3c BLEN:3 BODY:0e01008263 CRC:bc`
`2017-09-17T16:32:47.078841 ID1:1f0d3143 PTYPE:PDM SEQ:22 ID2:1f0d3143 B9:3c BLEN:3 BODY:0e01008263 CRC:bc`
`2017-09-17T16:32:47.150881 ID1:1f0d3143 PTYPE:POD SEQ:23 ID2:1f0d3143 B9:00 BLEN:10 BODY:1d18001de800000053ff0223 CRC:a4`
`2017-09-17T16:32:47.151125 ID1:1f0d3143 PTYPE:ACK SEQ:24 ID2:1f0d3143 CRC:ae`

6.0U Combination Bolus: 2.0U Now and 4.0U Extended Over 3 Hours

"2017-12-27T22:50:48.279311 ID1:1f05e708 PTYPE:PDM SEQ:19 ID2:1f05e708 B9:18 BLEN:3 BODY:0e0100814d CRC:62",
"2017-12-27T22:50:48.405218 ID1:1f05e708 PTYPE:POD SEQ:20 ID2:1f05e708 B9:1c BLEN:10 BODY:1d18040b1075003053ff80fc CRC:15",
"2017-12-27T22:50:48.409955 ID1:1f05e708 PTYPE:ACK SEQ:21 ID2:00000000 CRC:56",
"2017-12-27T22:50:48.800266 ID1:1f05e708 PTYPE:PDM SEQ:22 ID2:1f05e708 B9:20 BLEN:39 BODY:1a1601e475cb02012907028000280028100d000e100d000e17 CRC:89",
"2017-12-27T22:50:49.330686 ID1:1f05e708 PTYPE:CON SEQ:24 CON:0d3c019000030d40032000cdfe6002be CRC:df",
"2017-12-27T22:50:49.401773 ID1:1f05e708 PTYPE:POD SEQ:25 ID2:1f05e708 B9:24 BLEN:10 BODY:1d58040b4078003053ff0065 CRC:8d",  
"2017-12-27T22:50:49.781228 ID1:1f05e708 PTYPE:ACK SEQ:26 ID2:00000000 CRC:66"

1.0U Bolus with Only Extended Delivery for 1 Hour

2018-04-20T15:02:35.209 ID1:1f0ddcd8 PTYPE:PDM SEQ:24 ID2:1f0ddcd8 B9:2c BLEN:33 BODY:1a100375a60202001703000000000000100a170d7c00000003 CRC:b0
2018-04-20T15:02:35.512 ID1:1f0ddcd8 PTYPE:PDM SEQ:24 ID2:1f0ddcd8 B9:2c BLEN:33 BODY:1a100375a60202001703000000000000100a170d7c00000003 CRC:b0
2018-04-20T15:02:35.518 ID1:1f0ddcd8 PTYPE:ACK SEQ:25 ID2:1f0ddcd8 CRC:c6
2018-04-20T15:02:35.714 ID1:1f0ddcd8 PTYPE:CON SEQ:26 CON:0d4000c8 0112a880 014a CRC:1a
2018-04-20T15:02:35.815 ID1:1f0ddcd8 PTYPE:POD SEQ:27 ID2:1f0ddcd8 B9:30 BLEN:10 BODY:1d980031581400016bff0132 CRC:d8
2018-04-20T15:02:35.919 ID1:1f0ddcd8 PTYPE:POD SEQ:27 ID2:1f0ddcd8 B9:30 BLEN:10 BODY:1d980031581400016bff0132 CRC:d8
2018-04-20T15:02:35.921 ID1:1f0ddcd8 PTYPE:ACK SEQ:28 ID2:1f0ddcd8 CRC:2b

1.0U Bolus with Only Extended Delivery for 1.5 Hours

2018-04-20T15:46:35.861 ID1:1f0ddcd8 PTYPE:PDM SEQ:13 ID2:1f0ddcd8 B9:34 BLEN:35 BODY:1a124b3ed63f0200180400000000000018060007170d7c0000 CRC:bc
2018-04-20T15:46:36.253 ID1:1f0ddcd8 PTYPE:PDM SEQ:13 ID2:1f0ddcd8 B9:34 BLEN:35 BODY:1a124b3ed63f0200180400000000000018060007170d7c0000 CRC:bc
2018-04-20T15:46:36.260 ID1:1f0ddcd8 PTYPE:ACK SEQ:14 ID2:1f0ddcd8 CRC:dd
2018-04-20T15:46:36.456 ID1:1f0ddcd8 PTYPE:CON SEQ:15 CON:00030d4000c8019bfcc002e5 CRC:a1
2018-04-20T15:46:36.557 ID1:1f0ddcd8 PTYPE:POD SEQ:16 ID2:1f0ddcd8 B9:38 BLEN:10 BODY:1d980048681400021bff00c4 CRC:04
2018-04-20T15:46:36.661 ID1:1f0ddcd8 PTYPE:POD SEQ:16 ID2:1f0ddcd8 B9:38 BLEN:10 BODY:1d980048681400021bff00c4 CRC:04
2018-04-20T15:46:36.663 ID1:1f0ddcd8 PTYPE:ACK SEQ:17 ID2:1f0ddcd8 CRC:df
Clone this wiki locally