Skip to content

Instantly share code, notes, and snippets.

@ianjorgensen
Created August 7, 2014 21:58
Show Gist options
  • Select an option

  • Save ianjorgensen/fbecdf5022a5aeba1690 to your computer and use it in GitHub Desktop.

Select an option

Save ianjorgensen/fbecdf5022a5aeba1690 to your computer and use it in GitHub Desktop.
bolus
ian@ubuntu:~/decoding-carelink$ sudo ./bin/mm-bolus.py --port /dev/ttyUSB0 --serial 913995 --init --515 --units 10
## do stuff with an insulin pump over RF
using ` Namespace(dryrun=False, init=True, no_postlude=False, no_prelude=False, no_rf_prelude=False, port='/dev/ttyUSB0', serial='913995', strokes_per_unit=10, units=10.0, verbose=None) `
```
```
```
```
```
```
```
```
```javascript
{'radio': {'errors.crc': 0,
'errors.naks': 0,
'errors.sequence': 0,
'errors.timeouts': 9,
'packets.received': 41L,
'packets.transmit': 50L},
'usb': {'errors.crc': 0,
'errors.naks': 5,
'errors.sequence': 0,
'errors.timeouts': 0,
'packets.received': 146L,
'packets.transmit': 151L}}
```
```
PowerControl SERIAL 913995
```
### PUMP MODEL: `ReadPumpModel:size[64]:data:'554'`
Namespace(dryrun=False, init=True, no_postlude=False, no_prelude=False, no_rf_prelude=False, port='/dev/ttyUSB0', serial='913995', strokes_per_unit=10, units=10.0, verbose=None)
CRITICAL:decocare.session:this seems like a problem
response: Bolus:size[64]:data:bytearray(b'\t')
#### decoded:
```python
bytearray(b'\t')
```
### end stats
```
```
```javascript
{'radio': {'errors.crc': 0,
'errors.naks': 0,
'errors.sequence': 0,
'errors.timeouts': 9,
'packets.received': 48L,
'packets.transmit': 57L},
'usb': {'errors.crc': 0,
'errors.naks': 5,
'errors.sequence': 0,
'errors.timeouts': 0,
'packets.received': 160L,
'packets.transmit': 165L}}
```
@bewest
Copy link

bewest commented Aug 7, 2014

Amazing. What happened on the pump? Did it bolus, and how much?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment