Skip to content

Priming and Deploying New Pod (jweismann)

jweismann edited this page Nov 18, 2018 · 3 revisions

Numbers taken from physical POD on the backside

LOT: TID:

1. Initial pairing

2018-11-17T10:00:56.604 ID1:ffffffff PTYPE:PDM SEQ:00 ID2:ffffffff B9:00 BLEN:6 BODY:07041f17321700fa CRC:93
2018-11-17T10:00:56.707 ID1:ffffffff PTYPE:POD SEQ:01 ID2:ffffffff B9:04 BLEN:23 BODY:011502070002070002020000aaa1000139d48e1f17321780bb CRC:bd
2018-11-17T10:00:56.712 ID1:ffffffff PTYPE:ACK SEQ:02 ID2:1f173217 CRC:84

Breakdown of the PDM 07 request: 07041f17321700fa
07 04 1f173217 00fa
07 04 IIIIIIII

07       (1byte) : mtype - Assign ID command
04       (1byte) : mlen (static==4 in this case)
1f173217 (4bytes): new serialised POD ID (FIXME: can we reproduce how this is computed ???)
00fa     (2bytes): checksum, cf. computation below 

msg = "ffffffff000607041f173217".decode("hex")
crc = crc16.calc(msg)
print(crc)
print "{0:x}".format(crc)

Pod 01 Response:
2018-11-17T10:00:56.707 ID1:ffffffff PTYPE:POD SEQ:01 ID2:ffffffff B9:04 BLEN:23 BODY:011502070002070002020000aaa1000139d48e1f17321780bb CRC:bd


Breakdown of the POD 01 response command: 1502070002070002020000aaa1000139d48e1f17321780bb
01 15 MXMYMZ IXIYZI 02 0J LLLLLLLL TTTTTTTT GS IIIIIIII
01 15 020700 020700 02 02 0000aaa1 000139d4 8e 1f173217 80bb
01       (1byte) : mtype
15       (1byte) : mlen
020700   (2bytes): PM version 2.7.0
020700   (2bytes): PI version 2.7.0
02       (1byte) : Unknown meaning FIXME
02       (1byte) : Pod progress (2 = tank fill completed)
0000aaa1 (4bytes): (LOT), hex2dec(0000aaa1)  = 43681
000139d4 (4bytes): (TID), hex2dec(000139d4)  = 80340
8e       (1byte) : (8e= 10 001110), 2 bit gain = 10 = 2, 6-bit rss = 001110 = 0e
1f173217 (4bytes): the new serialised ID
80bb     (2bytes): checksum, cf. below 

???
msg = "ffffffff0423011502070002070002020000aaa1000139d48e1f173217".decode("hex")
crc = crc16.calc(msg)
print(crc)
print "{0:x}".format(crc)
gives 82d4 and not 80bb - to be investigated. FIXME

FIXME - what happens if PDM and POD is moved apart after the first two packages but before the ACK from the PDM, i.e. the ACK doesn't reach the POD within reasonable time ? How does the POD response to that ? Starts to beep and request a deactivation or?

2. Setup Pod (5 packages)

2018-11-17T10:00:57.208 ID1:ffffffff PTYPE:PDM SEQ:03 ID2:ffffffff B9:00 BLEN:21 BODY:03131f17321714040b1112093b0000aaa1000139d4009d CRC:d7
2018-11-17T10:00:57.511 ID1:ffffffff PTYPE:PDM SEQ:03 ID2:ffffffff B9:00 BLEN:21 BODY:03131f17321714040b1112093b0000aaa1000139d4009d CRC:d7
2018-11-17T10:00:57.536 ID1:ffffffff PTYPE:POD SEQ:04 ID2:ffffffff B9:04 BLEN:29 BODY:011b13881008340a5002070002070002030000aaa1000139d4 CRC:f2
2018-11-17T10:00:57.607 ID1:ffffffff PTYPE:ACK SEQ:05 ID2:1f173217 CRC:ad
2018-11-17T10:00:57.711 ID1:ffffffff PTYPE:POD SEQ:04 ID2:ffffffff B9:04 BLEN:29 BODY:011b13881008340a5002070002070002030000aaa1000139d4 CRC:f2
2018-11-17T10:00:57.718 ID1:ffffffff PTYPE:ACK SEQ:05 ID2:1f173217 CRC:ad
2018-11-17T10:00:57.821 ID1:ffffffff PTYPE:POD SEQ:04 ID2:ffffffff B9:04 BLEN:29 BODY:011b13881008340a5002070002070002030000aaa1000139d4 CRC:f2
2018-11-17T10:00:57.828 ID1:ffffffff PTYPE:ACK SEQ:05 ID2:1f173217 CRC:ad
2018-11-17T10:00:57.931 ID1:ffffffff PTYPE:POD SEQ:04 ID2:ffffffff B9:04 BLEN:29 BODY:011b13881008340a5002070002070002030000aaa1000139d4 CRC:f2
2018-11-17T10:00:57.938 ID1:ffffffff PTYPE:ACK SEQ:05 ID2:1f173217 CRC:ad
2018-11-17T10:00:58.037 ID1:ffffffff PTYPE:CON SEQ:06 CON:1f17321781e6 CRC:47
2018-11-17T10:00:58.108 ID1:ffffffff PTYPE:ACK SEQ:07 ID2:1f173217 CRC:69
2018-11-17T10:00:58.210 ID1:ffffffff PTYPE:CON SEQ:06 CON:1f17321781e6 CRC:47
2018-11-17T10:00:58.219 ID1:ffffffff PTYPE:ACK SEQ:07 ID2:1f173217 CRC:69

Breakdown of the 03 command: 03131f17321714040b1112093b0000aaa1000139d4009d

03 13 1f173217 14 04 0b1112 093b  0000aaa1 000139d4 009d
03 LL IIIIIIII NU TO MMDDYY HHMM [LLLLLLLL TTTTTTTT]

03       (1byte) : mtype
13       (1byte) : mlen
1f173217 (4bytes): POD ID
14       (1byte) : Not Used ???? Are we sure about this ???
04       (1byte) : TimeOut (FIXME where can we set this in the PDM, what happens if TimeOut is reached)
0b1112   (3bytes): MMDDYY, 11-17-18
093b     (2bytes): HHMM,   09:59
0000aaa1 (4bytes): LLLLLLLL, hex2dec(0000aaa1)  = 43681 (LOT)
000139d4 (4bytes): TTTTTTTT, hex2dec(000139d4)  = 80340 (TID)
009d     (2bytes): 16-bit message Checksum (FIXME can we reproduce this computation?)

3. Priming (11 packages)

2018-11-17T10:00:58.429 ID1:1f173217 PTYPE:PDM SEQ:08 ID2:1f173217 B9:08 BLEN:12 BODY:190a3dc84efa4c00006401028054 CRC:2c
2018-11-17T10:00:58.733 ID1:1f173217 PTYPE:PDM SEQ:08 ID2:1f173217 B9:08 BLEN:12 BODY:190a3dc84efa4c00006401028054 CRC:2c
2018-11-17T10:00:58.824 ID1:1f173217 PTYPE:POD SEQ:09 ID2:1f173217 B9:0c BLEN:10 BODY:1d0300001000000003ff8254 CRC:f2
2018-11-17T10:00:58.832 ID1:1f173217 PTYPE:ACK SEQ:10 ID2:1f173217 CRC:4a
2018-11-17T10:00:59.150 ID1:1f173217 PTYPE:PDM SEQ:11 ID2:1f173217 B9:10 BLEN:12 BODY:190a0cbfed02783700050802822c CRC:ef
2018-11-17T10:00:59.452 ID1:1f173217 PTYPE:PDM SEQ:11 ID2:1f173217 B9:10 BLEN:12 BODY:190a0cbfed02783700050802822c CRC:ef
2018-11-17T10:00:59.546 ID1:1f173217 PTYPE:POD SEQ:12 ID2:1f173217 B9:14 BLEN:10 BODY:1d0300002000000003ff83c5 CRC:80
2018-11-17T10:00:59.552 ID1:1f173217 PTYPE:ACK SEQ:13 ID2:1f173217 CRC:63
2018-11-17T10:00:59.938 ID1:1f173217 PTYPE:PDM SEQ:14 ID2:1f173217 B9:18 BLEN:31 BODY:1a0e9a9ea72202010a0101a000340034170d000208000186a0 CRC:b0
2018-11-17T10:01:00.243 ID1:1f173217 PTYPE:PDM SEQ:14 ID2:1f173217 B9:18 BLEN:31 BODY:1a0e9a9ea72202010a0101a000340034170d000208000186a0 CRC:b0
2018-11-17T10:01:00.329 ID1:1f173217 PTYPE:ACK SEQ:15 ID2:1f173217 CRC:a7
2018-11-17T10:01:00.450 ID1:1f173217 PTYPE:CON SEQ:16 CON:000000000000016b CRC:66
2018-11-17T10:01:00.551 ID1:1f173217 PTYPE:POD SEQ:17 ID2:1f173217 B9:1c BLEN:10 BODY:1d4400003034000003ff00cc CRC:d5
2018-11-17T10:01:00.660 ID1:1f173217 PTYPE:POD SEQ:17 ID2:1f173217 B9:1c BLEN:10 BODY:1d4400003034000003ff00cc CRC:d5
2018-11-17T10:01:00.731 ID1:1f173217 PTYPE:ACK SEQ:18 ID2:1f173217 CRC:61

Breakdown of the 1a command: 1a0e9a9ea72202010a0101a000340034170d000208000186a0
1a LL NNNNNNNN 02 CCCC HH SSSS PPPP 0ppp [napp...]  17...
1a 0e 9a9ea722 02 010a 01 01a0 0034 0034            17 0d000208000186a0
1a       (1byte) : Mtype 0x1A Command: Insulin Schedules for Basal Patterns, Temp Basals and Boluses
0e       (1byte) : Length, == $0e for normal bolus
9a9ea722 (4bytes): nonce, the 32-bit validator, cf. below.
02       (1byte) : TableNum, 02=bolus
010a     (2bytes): CheckSum byte sum of the remaining 7 bytes
01       (1byte) : Number of resulting Half Hour insulin table entries, 1 for normal bolus and > 1 for extended bolus
01a0     (2bytes): PPPP times $10 (for a standard two seconds between pulse immediate bolus) or times 8 (for an one second between pulse bolus during Pod startup)
0034     (2bytes): Pulses, same as the first InsulinScheduleElement value, # of pulses to deliver immediately
0034     (2bytes): The first InsulinScheduleElement describes the insulin to be delivered immediately in a single entry (i.e., just the # of 0.05U pulses), here hex2dec(34)x0.05=52.05=2.6 iu
17       (1byte) : Bolus
0d       (1byte) : length
00                 ?????
0208     (2bytes): unknown
000186a0 (4bytes): unknown

The nonce number can be reproduced with nonce.py (proper hardcoding of LOT,TID):
The program generates 15 nonce numbers and the one used is the third (FIXME how do we know its the third one?) :

python2 ./nonce.py |grep 9a9ea722
Number 3 Nonce: 9a9ea722

4. Ready to Insert status (3 packages)

2018-11-17T10:01:55.185 ID1:1f173217 PTYPE:PDM SEQ:19 ID2:1f173217 B9:20 BLEN:12 BODY:190ae1acabb6380010a403028389 CRC:08
2018-11-17T10:01:55.280 ID1:1f173217 PTYPE:POD SEQ:20 ID2:1f173217 B9:24 BLEN:10 BODY:1d050016c000000007ff0022 CRC:5e
2018-11-17T10:01:55.288 ID1:1f173217 PTYPE:ACK SEQ:21 ID2:1f173217 CRC:48

5. Setting basal schedule (11 packages)

Basal schedules:
00:00-05:00 0.30
05:00-07:30 0.50
07:30-13:00 0.25
13:00-20:00 0.30
20:00-24:00 0.45

2018-11-17T10:10:12.656 ID1:1f173217 PTYPE:PDM SEQ:22 ID2:1f173217 B9:a8 BLEN:66 BODY:1a184cf0134d000124142748000190034005b802c003000568 CRC:ff
2018-11-17T10:10:12.960 ID1:1f173217 PTYPE:PDM SEQ:22 ID2:1f173217 B9:a8 BLEN:66 BODY:1a184cf0134d000124142748000190034005b802c003000568 CRC:ff
2018-11-17T10:10:13.059 ID1:1f173217 PTYPE:ACK SEQ:23 ID2:1f173217 CRC:8c
2018-11-17T10:10:13.380 ID1:1f173217 PTYPE:PDM SEQ:24 ID2:1f173217 B9:a8 BLEN:66 BODY:1a184cf0134d000124142748000190034005b802c003000568 CRC:c7
2018-11-17T10:10:13.683 ID1:1f173217 PTYPE:PDM SEQ:24 ID2:1f173217 B9:a8 BLEN:66 BODY:1a184cf0134d000124142748000190034005b802c003000568 CRC:c7
2018-11-17T10:10:13.781 ID1:1f173217 PTYPE:ACK SEQ:25 ID2:1f173217 CRC:de
2018-11-17T10:10:13.969 ID1:1f173217 PTYPE:CON SEQ:26 CON:0413264002008f01f78a40012c0393870000fa022551000113044aa20001a4 CRC:47
2018-11-17T10:10:14.064 ID1:1f173217 PTYPE:ACK SEQ:27 ID2:1f173217 CRC:1a
2018-11-17T10:10:14.186 ID1:1f173217 PTYPE:CON SEQ:28 CON:03938700016802625a0003ae CRC:cd
2018-11-17T10:10:14.286 ID1:1f173217 PTYPE:POD SEQ:29 ID2:1f173217 B9:2c BLEN:10 BODY:1d160016d000400027ff809a CRC:d9
2018-11-17T10:10:14.392 ID1:ad5d5d5d PTYPE:ACK SEQ:25 ID2:e0f8b990 CRC:d6
2018-11-17T10:10:14.564 ID1:1f173217 PTYPE:PDM SEQ:31 ID2:1f17b990 CRC:17
2018-11-17T10:10:14.678 ID1:1f173217 PTYPE:POD SEQ:29 ID2:1f173217 B9:2c BLEN:10 BODY:1d160016d000400027ff809a CRC:d9
2018-11-17T10:10:14.778 ID1:1f173217 PTYPE:POD SEQ:29 ID2:1f173217 B9:2c BLEN:10 BODY:1d160016d000400027ff809a CRC:d9
2018-11-17T10:10:14.780 ID1:1f173217 PTYPE:PDM SEQ:31 ID2:1f173217 B9:b0 BLEN:24 BODY:19160aeed2c179a410d705022800127b0602020f0000020280 CRC:78
2018-11-17T10:10:14.895 ID1:1f173217 PTYPE:ACK SEQ:00 ID2:1f173217 CRC:97
2018-11-17T10:10:15.079 ID1:1f173217 PTYPE:CON SEQ:01 CON:4a CRC:76
2018-11-17T10:10:15.181 ID1:1f173217 PTYPE:POD SEQ:02 ID2:1f173217 B9:34 BLEN:10 BODY:1d160016e000000027ff02a1 CRC:41
2018-11-17T10:10:15.291 ID1:1f173217 PTYPE:POD SEQ:02 ID2:1f173217 B9:34 BLEN:10 BODY:1d160016e000000027ff02a1 CRC:41
2018-11-17T10:10:15.399 ID1:1f173217 PTYPE:POD SEQ:02 ID2:1f173217 B9:34 BLEN:10 BODY:1d160016e000000027ff02a1 CRC:41

1a 18 4cf0134d 00 0124 14 2748 0001 9003 4005 b802 c003 0005 6804 13 26 40 02 008f 01f78a40 012c 03938700 00fa 02255100 0113 044aa200 01a4 03938700 0168 02625a00 03ae

Breakdown of the 1a command (wrapped in 3 packages):
1a       (1byte) : Mtype 0x1A Command: Insulin Schedules for Basal Patterns, Temp Basals and Boluses
18       (1byte) : hex2dec(18)=24 # of bytes following LL : FIXME why 24 and not 23 => implicit continuation or?
4cf0134d (4bytes): Nonce, the 32-bit validator - FIXME, can we reproduce the computation of this number
00       (1byte) : TableNum, 0 = Basal, 1 = Temp Basal, 2 = Bolus
0124     (2bytes): CheckSum, byte sum of the following 3 fields and the bytes in the generated insulin schedule table
14       (1byte) : Field9, TableNum specific data, # of Half Hours
2748     (2bytes): FieldA, TableNum specific data
0001     (2bytes): FieldC (Pulses), initial # pulses to deliver, max $384 (=900 decimal)
9003     (2bytes): InsulinScheduleElement1
4005     (2bytes): InsulinScheduleElement2
b802     (2bytes): InsulinScheduleElement3
c003     (2bytes): InsulinScheduleElement4
0005     (2bytes): InsulinScheduleElement5
6804     (2bytes): InsulinScheduleElement6 (stop her since (24-12)/2=6
13       (1byte) : NC, Next Command (either $13, $16 or $17) followed by length and data, 13=basal
26       (1byte) : hex2dec(26)=38 Len
40       (1byte) :
02       (1byte) :
008f     (2bytes):
01f78a40 (4bytes):
012c     (2bytes):
03938700 (4bytes):

Where did SEQ:03 go ???

6. Insert needle (5 packages)

2018-11-17T10:10:15.471 ID1:1f173217 PTYPE:PDM SEQ:04 ID2:1f173217 B9:38 BLEN:31 BODY:1a0e6451eb6e020065010050000a000a170d000064000186a0 CRC:93
2018-11-17T10:10:15.572 ID1:1f173217 PTYPE:ACK SEQ:05 ID2:1f173217 CRC:7a
2018-11-17T10:10:15.693 ID1:1f173217 PTYPE:CON SEQ:06 CON:00000000000000bf CRC:c5
2018-11-17T10:10:15.794 ID1:1f173217 PTYPE:POD SEQ:07 ID2:1f173217 B9:3c BLEN:10 BODY:1d570016f00a000027ff83c7 CRC:c3
2018-11-17T10:10:15.902 ID1:1f173217 PTYPE:POD SEQ:07 ID2:1f173217 B9:3c BLEN:10 BODY:1d570016f00a000027ff83c7 CRC:c3
2018-11-17T10:10:15.973 ID1:1f173217 PTYPE:ACK SEQ:08 ID2:1f173217 CRC:8e

7. Acknowledge correct insertion (3 packages)

2018-11-17T10:10:30.796 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:31.105 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:31.406 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:31.707 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:32.009 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:32.310 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:32.611 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:32.913 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:32.931 ID1:3e0f9732 PTYPE:UNKOWN SEQ:23 ID2:ea1f3217 CRC:1f
2018-11-17T10:10:33.214 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:33.327 ID1:1f173217 PTYPE:POD SEQ:10 ID2:1f173217 B9:04 BLEN:10 BODY:1d18001bf000000027ff8189 CRC:ea
2018-11-17T10:10:33.515 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:33.546 ID1:1f173217 PTYPE:POD SEQ:10 ID2:1f173217 B9:04 BLEN:10 BODY:1d18001bf000000027ff8189 CRC:ea
2018-11-17T10:10:33.750 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:33.830 ID1:1f173217 PTYPE:POD SEQ:10 ID2:1f173217 B9:04 BLEN:10 BODY:1d18001bf000000027ff8189 CRC:ea
2018-11-17T10:10:33.940 ID1:1f173217 PTYPE:POD SEQ:10 ID2:1f173217 B9:04 BLEN:10 BODY:1d18001bf000000027ff8189 CRC:ea
2018-11-17T10:10:34.051 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:34.222 ID1:1f173217 PTYPE:POD SEQ:10 ID2:1f173217 B9:04 BLEN:10 BODY:1d18001bf000000027ff8189 CRC:ea
2018-11-17T10:10:34.353 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:34.442 ID1:1f173217 PTYPE:POD SEQ:10 ID2:1f173217 B9:04 BLEN:10 BODY:1d18001bf000000027ff8189 CRC:ea
2018-11-17T10:10:34.656 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:34.659 ID1:1f173217 PTYPE:POD SEQ:10 ID2:1f173217 B9:04 BLEN:10 BODY:1d18001bf000000027ff8189 CRC:ea
2018-11-17T10:10:34.834 ID1:1f173217 PTYPE:POD SEQ:10 ID2:1f173217 B9:04 BLEN:10 BODY:1d18001bf000000027ff8189 CRC:ea
2018-11-17T10:10:34.957 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:35.056 ID1:1f173217 PTYPE:POD SEQ:10 ID2:1f155d5d B9:5d BLEN:93 BODY:5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d5d CRC:5d
2018-11-17T10:10:35.162 ID1:1f173217 PTYPE:PDM SEQ:09 ID2:1f173217 B9:00 BLEN:3 BODY:0e01008054 CRC:2d
2018-11-17T10:10:35.337 ID1:1f173217 PTYPE:POD SEQ:10 ID2:1f173217 B9:04 BLEN:10 BODY:1d18001bf000000027ff8189 CRC:ea
2018-11-17T10:10:35.345 ID1:1f173217 PTYPE:ACK SEQ:11 ID2:1f173217 CRC:28
Clone this wiki locally