Git Product home page Git Product logo

decoding-carelink's Introduction

MOVED

This repository has moved:

This repository is pinned to the development branch of 0.0.30-dev, just before it was released. 0.0.30 was released, while ongoing releases and further development work happen in the community area:



Decoding carelink

For an intro, see insulaudit. We are hoping to help diabetics independently reproduce therapeutic audits of their Medtronic insulin pumps. This experimental software will download pump settings, and the entire log of historical data.

Spot something incorrect or not working? Want a feature/tool to do something? Please file an issue!

overview

Status

We can decode many of the opcodes that store configuration settings. We can also download all pages of history from the ReadHistoryData command, which contains the log of all actions the pump has taken on your behalf:

  • glucose readings
  • all bolus dosings, all usage of bolus wizard
  • unabsorbed insulin
  • alarms, etc...
  • current settings
  • query pump status: normal, suspended, bolusing ./bin/mm-set-suspend.py
  • set/edit/query temporary basal rates ./bin/mm-temp-basals.py
  • press any button on the keypad, using ./bin/mm-press-key.py
  • Investigate how any command works, make new commands, download any command ./bin/mm-send-comm.py
  • Bolus ./bin/mm-bolus.py

Install first run

This only needs to be done once:

From pypi

$ easy_install decocare
# or
$ pip install decocare

From source

git clone https://github.com/bewest/decoding-carelink.git
cd decoding-carelink
sudo python ez_setup.py # only if you rarely use python
sudo python setup.py develop

Contribute your logs

Fork the repo, create a new branch, send the results back to your branch. There will be a green "create pull request button." Putting your logs back on github will allow more people to assist in decoding results.

git checkout -b myname/init # replace <myname> with your name
# all done

Find/Create serial device in the OS

Congratulations, now you are ready for the demo: Plug in the carelink usb stick, and run this:

dmesg | grep ttyUSB # notice the new ttyUSB$x
sudo ./insert.sh

You are all done with setup. Here's how to test just the usb stick, then we'll run the full suite of experiments.

  • on MAC the PORT is called /dev/tty.serial or something.
  • on windows the PORT is called COM1 or something
  • on Linux the PORT is called /dev/ttyUSBx or something

Get your logs

python decocare/stick.py /dev/ttyUSB0 # on windows this is called COM1
# should get a bunch of output, notably some counters called INTERFACE STATS

export SERIAL=208850
# Turn RF POWER ON for 10 minutes
# You have ten minutes to talk with the pump.
# should say hello, and print serial number
mm-send-comm.py --init sleep 0
# print serial number
mm-send-comm.py sleep 0
# get logs
mm-latest.py 

Fantastic. Send me your results! The following process uses git to store your recent results. You can email me a bundle, or simply push your branch back to your fork on github.

Do this every time, after you run some experiments:

git commit -avm 'for @bewest, these are @<my-name> results'

Set up for sending me results.

# email me your results like this:
git bundle create myname-expr.bundle master..myname/init
# you can send me myname-expr.bundle in an email

Even better, fork the repo and setup to for easy.

# add your fork like this:
git remote rename origin author
git remote add origin [email protected]:<my-user-name>/decoding-carelink.git
git push -u origin myname/init

Now you can do this easily:

./status-quo.sh /dev/ttyUSB0 <pump-serial> # use your pump's serial number
git commit -avm 'for @bewest, these are @<my-name> results'
git push -u origin myname/init

Repeat. The easiest way to see what happened is to look at explain.log, and use git diff and git show. Pushing to github as shown above will allow everyone to discuss our analysis together.

There are several log files created for each experiment.

Demo

If you don't want to use your own equipment, I've made some of my test equipment available. Talk to my test insulin pump over the internet.

Requires socat and python 2.7. The script ./bin/socat_run_app.sh will connect to my server, bewest.io:8080 where my test insulin pump, serial 208850 is waiting to talk to you.

Here's an example using my scripts:

$ git checkout -b tester # create a new branch with just your stuff, please
$ . ./bin/common # import some handy run_* functions
$ ./bin/socat_run_app.sh & # get my test insulin pump from bewest.io:8080
$ ls carelink.ttyUSB0  # creates this thing
carelink.ttyUSB0
$ ./status-quo.sh ./carelink.ttyUSB0
[...]
$ PORT=./carelink.ttyUSB0 SERIAL=208850 run_download 
[...]

Try figuring out the dosing commands. Is it possible to rewind the pump? Is it possible to enter new profiles and schedules?

Future work

Once we can decode historical logs, we'll clean up and merge back into insulaudit

Help needed

Documentation of protocol, decoders, etc...

# fork the repo on github
# clone the repo
$ git clone [email protected]/<yourname>/decoding-carelink.git
$ cd decoding-carelink
$ git checkout -b <yourname>
$ ./insert.sh # will ask for sudo to configure usbserial for the stick
# ./status-quo.sh [[<path>|/dev/ttyUSB0>] [<serial>|208850]] eg:
$ ./status-quo.sh /dev/ttyUSB0 208850
$ git commit -avm "here is my data <yourname>"
$ git push -u origin <yourname>

Thanks! If you can include CSV export from carelink, it would be helpful.

Decoding

We know how to decode time and as a result we can find and parse most records now.

And lining this up with the Carelink CSV exports reveals the nature of the contents for further analysis.

Once we can decode all records, it should be useful for diabetics, to get basic reports, more or less on par with the vendor's solution. We'll use it to collect diabetes data (https://github.com/bewest/decoding-carelink/tree/rewriting/analysis/pages) over the internet, allowing anyone to independently audit their therapy, and then send the data to their preferred auditing software.

Tools

./bin/mm-bolus.py

+ ./bin/mm-bolus.py --help
usage: mm-bolus.py [-h] [--serial SERIAL] [--port PORT] [--no-op]
                   [--skip-prelude] [--no-rf-prelude] [--skip-postlude] [-v]
                   [--init] (--515 | --strokes STROKES_PER_UNIT)
                   units

mm-bolus.py - Send bolus command to a pump.

positional arguments:
  units                 Amount of insulin to bolus.

optional arguments:
  -h, --help            show this help message and exit
  --serial SERIAL       serial number of pump [default: ]
  --port PORT           Path to device [default: ]
  --no-op               Dry run, don't do main function
  --skip-prelude        Don't do the normal prelude.
  --no-rf-prelude       Do the prelude, but don't query the pump.
  --skip-postlude       Don't do the normal postlude.
  -v, --verbose         Verbosity
  --init                Send power ctrl to initialize RF session.
  --515
  --strokes STROKES_PER_UNIT

XXX: Be careful please! Units might be wrong. Keep disconnected from pump
until you trust it by observing the right amount first.
+ ./bin/mm-bolus.py
usage: mm-bolus.py [-h] [--serial SERIAL] [--port PORT] [--no-op]
                   [--skip-prelude] [--no-rf-prelude] [--skip-postlude] [-v]
                   [--init] (--515 | --strokes STROKES_PER_UNIT)
                   units
mm-bolus.py: error: too few arguments


+ ./bin/mm-bolus.py --515
usage: mm-bolus.py [-h] [--serial SERIAL] [--port PORT] [--no-op]
                   [--skip-prelude] [--no-rf-prelude] [--skip-postlude] [-v]
                   [--init] (--515 | --strokes STROKES_PER_UNIT)
                   units
mm-bolus.py: error: too few arguments


+ ./bin/mm-bolus.py --strokes 10
usage: mm-bolus.py [-h] [--serial SERIAL] [--port PORT] [--no-op]
                   [--skip-prelude] [--no-rf-prelude] [--skip-postlude] [-v]
                   [--init] (--515 | --strokes STROKES_PER_UNIT)
                   units
mm-bolus.py: error: too few arguments

./bin/mm-send-comm.py

mm-send-comm.py -h
+ mm-send-comm.py -h
usage: mm-send-comm.py [-h] [--serial SERIAL] [--port PORT] [--no-op]
                       [--skip-prelude] [--no-rf-prelude] [--skip-postlude]
                       [-v] [--init] [--prefix-path PREFIX_PATH] [--saveall]
                       [--prefix
                       {BaseCommand, KeypadPush, PowerControl, PowerControlOff,
                       PumpCommand, PumpResume, PumpSuspend, ReadBasalTemp,
                       ReadBatteryStatus, ReadContrast, ReadCurPageNumber,
                       ReadErrorStatus, ReadFirmwareVersion,
                       ReadGlucoseHistory, ReadHistoryData, ReadPumpID,
                       ReadPumpModel, ReadPumpState, ReadPumpStatus, ReadRTC,
                       ReadRadioCtrlACL, ReadRemainingInsulin, ReadSettings,
                       ReadTotalsToday, SetSuspend, PushEASY, PushUP, PushDOWN,
                       PushACT, PushESC, TempBasal, ManualCommand,
                       ReadCurGlucosePageNumber, ReadErrorStatus508,
                       ReadBolusHistory, ReadDailyTotals, ReadPrimeBoluses,
                       ReadAlarms, ReadProfileSets, ReadUserEvents,
                       ReadRemoteControlID, Read128KMem, Read256KMem,
                       ReadBasalTemp508, ReadTodayTotals508,
                       ReadSensorSettings, ReadSensorHistoryData,
                       ReadISIGHistory, FilterHistory, FilterGlucoseHistory,
                       FilterISIGHistory, ReadProfiles511_STD,
                       ReadProfiles511_A, ReadProfiles511_B,
                       Model511_ExperimentOP125, Model511_ExperimentOP126,
                       ReadSettings511, ReadPumpTrace, ReadDetailTrace,
                       Model511_Experiment_OP165, ReadNewTraceAlarm,
                       ReadOldTraceAlarm, WriteGlucoseHistoryTimestamp,
                       ReadLanguage, ReadBolusWizardSetupStatus, ReadCarbUnits,
                       ReadBGUnits, ReadCarbRatios, ReadInsulinSensitivities,
                       ReadBGTargets, ReadBGAlarmCLocks, ReadReservoirWarning,
                       ReadBGReminderEnable, ReadSettings512,
                       ReadProfile_STD512, ReadProfile_A512, ReadProfile_B512,
                       ReadLogicLinkIDS, Model512Experiment_OP150,
                       ReadBGAlarmEnable, GuardianSensorSettings,
                       GuardianSensorSettings, GuardianSensorDemoGraphTimeout,
                       GuardianSensorAlarmSilence,
                       GuardianSensorRateChangeAlerts, ReadSavedSettingsDate,
                       ReadBolusReminderEnable, ReadBolusReminders,
                       ReadFactoryParameters, ReadCalibrationFactor,
                       ReadVCNTRHistory, ReadOtherDevicesIDS, PumpTraceSelect,
                       PumpEnableDetailTrace, PumpDisableDetailTrace,
                       Experiment_OP161, Experiment_OP162,
                       Model511_Experiment_OP119, Model511_Experiment_OP120,
                       Model511_Experiment_OP121, Model511_Experiment_OP122,
                       Model511_Experiment_OP123, Model511_Experiment_OP124,
                       Model511_Experiment_OP125, Model511_Experiment_OP126,
                       Model511_Experiment_OP127, Model511_Experiment_OP128,
                       Model511_Experiment_OP129, Model511_Experiment_OP130,
                       SelectBasalProfile, SelectBasalProfileSTD,
                       SelectBasalProfileA, SelectBasalProfileB,
                       PumpExperiment_OP69, PumpExperiment_OP70,
                       PumpExperiment_OP71, PumpExperiment_OP72,
                       PumpExperiment_OP73, PumpExperiment_OP75}]
                       [--postfix {BaseCommand, KeypadPush, PowerControl,
                       PowerControlOff, PumpCommand, PumpResume, PumpSuspend,
                       ReadBasalTemp, ReadBatteryStatus, ReadContrast,
                       ReadCurPageNumber, ReadErrorStatus, ReadFirmwareVersion,
                       ReadGlucoseHistory, ReadHistoryData, ReadPumpID,
                       ReadPumpModel, ReadPumpState, ReadPumpStatus, ReadRTC,
                       ReadRadioCtrlACL, ReadRemainingInsulin, ReadSettings,
                       ReadTotalsToday, SetSuspend, PushEASY, PushUP, PushDOWN,
                       PushACT, PushESC, TempBasal, ManualCommand,
                       ReadCurGlucosePageNumber, ReadErrorStatus508,
                       ReadBolusHistory, ReadDailyTotals, ReadPrimeBoluses,
                       ReadAlarms, ReadProfileSets, ReadUserEvents,
                       ReadRemoteControlID, Read128KMem, Read256KMem,
                       ReadBasalTemp508, ReadTodayTotals508,
                       ReadSensorSettings, ReadSensorHistoryData,
                       ReadISIGHistory, FilterHistory, FilterGlucoseHistory,
                       FilterISIGHistory, ReadProfiles511_STD,
                       ReadProfiles511_A, ReadProfiles511_B,
                       Model511_ExperimentOP125, Model511_ExperimentOP126,
                       ReadSettings511, ReadPumpTrace, ReadDetailTrace,
                       Model511_Experiment_OP165, ReadNewTraceAlarm,
                       ReadOldTraceAlarm, WriteGlucoseHistoryTimestamp,
                       ReadLanguage, ReadBolusWizardSetupStatus, ReadCarbUnits,
                       ReadBGUnits, ReadCarbRatios, ReadInsulinSensitivities,
                       ReadBGTargets, ReadBGAlarmCLocks, ReadReservoirWarning,
                       ReadBGReminderEnable, ReadSettings512,
                       ReadProfile_STD512, ReadProfile_A512, ReadProfile_B512,
                       ReadLogicLinkIDS, Model512Experiment_OP150,
                       ReadBGAlarmEnable, GuardianSensorSettings,
                       GuardianSensorSettings, GuardianSensorDemoGraphTimeout,
                       GuardianSensorAlarmSilence,
                       GuardianSensorRateChangeAlerts, ReadSavedSettingsDate,
                       ReadBolusReminderEnable, ReadBolusReminders,
                       ReadFactoryParameters, ReadCalibrationFactor,
                       ReadVCNTRHistory, ReadOtherDevicesIDS, PumpTraceSelect,
                       PumpEnableDetailTrace, PumpDisableDetailTrace,
                       Experiment_OP161, Experiment_OP162,
                       Model511_Experiment_OP119, Model511_Experiment_OP120,
                       Model511_Experiment_OP121, Model511_Experiment_OP122,
                       Model511_Experiment_OP123, Model511_Experiment_OP124,
                       Model511_Experiment_OP125, Model511_Experiment_OP126,
                       Model511_Experiment_OP127, Model511_Experiment_OP128,
                       Model511_Experiment_OP129, Model511_Experiment_OP130,
                       SelectBasalProfile, SelectBasalProfileSTD,
                       SelectBasalProfileA, SelectBasalProfileB,
                       PumpExperiment_OP69, PumpExperiment_OP70,
                       PumpExperiment_OP71, PumpExperiment_OP72,
                       PumpExperiment_OP73, PumpExperiment_OP75}]
                       {sleep,tweak,ManualCommand} ...

mm-send-comm.py - send messages to a compatible MM insulin pump

positional arguments:
  {sleep,tweak,ManualCommand}
                        Main thing to do between --prefix and--postfix
    sleep               Just sleep between command sets
    tweak               Tweak a builtin command
    ManualCommand       Customize a command

optional arguments:
  -h, --help            show this help message and exit
  --serial SERIAL       serial number of pump [default: ]
  --port PORT           Path to device [default: ]
  --no-op               Dry run, don't do main function
  --skip-prelude        Don't do the normal prelude.
  --no-rf-prelude       Do the prelude, but don't query the pump.
  --skip-postlude       Don't do the normal postlude.
  -v, --verbose         Verbosity
  --init                Send power ctrl to initialize RF session.
  --prefix-path PREFIX_PATH
                        Prefix to store saved files when using --save or
                        --saveall.
  --saveall             Whether or not to save all responses.
  --prefix {BaseCommand, KeypadPush, PowerControl, PowerControlOff,
  PumpCommand, PumpResume, PumpSuspend, ReadBasalTemp, ReadBatteryStatus,
  ReadContrast, ReadCurPageNumber, ReadErrorStatus, ReadFirmwareVersion,
  ReadGlucoseHistory, ReadHistoryData, ReadPumpID, ReadPumpModel,
  ReadPumpState, ReadPumpStatus, ReadRTC, ReadRadioCtrlACL,
  ReadRemainingInsulin, ReadSettings, ReadTotalsToday, SetSuspend, PushEASY,
  PushUP, PushDOWN, PushACT, PushESC, TempBasal, ManualCommand,
  ReadCurGlucosePageNumber, ReadErrorStatus508, ReadBolusHistory,
  ReadDailyTotals, ReadPrimeBoluses, ReadAlarms, ReadProfileSets,
  ReadUserEvents, ReadRemoteControlID, Read128KMem, Read256KMem,
  ReadBasalTemp508, ReadTodayTotals508, ReadSensorSettings,
  ReadSensorHistoryData, ReadISIGHistory, FilterHistory, FilterGlucoseHistory,
  FilterISIGHistory, ReadProfiles511_STD, ReadProfiles511_A, ReadProfiles511_B,
  Model511_ExperimentOP125, Model511_ExperimentOP126, ReadSettings511,
  ReadPumpTrace, ReadDetailTrace, Model511_Experiment_OP165, ReadNewTraceAlarm,
  ReadOldTraceAlarm, WriteGlucoseHistoryTimestamp, ReadLanguage,
  ReadBolusWizardSetupStatus, ReadCarbUnits, ReadBGUnits, ReadCarbRatios,
  ReadInsulinSensitivities, ReadBGTargets, ReadBGAlarmCLocks,
  ReadReservoirWarning, ReadBGReminderEnable, ReadSettings512,
  ReadProfile_STD512, ReadProfile_A512, ReadProfile_B512, ReadLogicLinkIDS,
  Model512Experiment_OP150, ReadBGAlarmEnable, GuardianSensorSettings,
  GuardianSensorSettings, GuardianSensorDemoGraphTimeout,
  GuardianSensorAlarmSilence, GuardianSensorRateChangeAlerts,
  ReadSavedSettingsDate, ReadBolusReminderEnable, ReadBolusReminders,
  ReadFactoryParameters, ReadCalibrationFactor, ReadVCNTRHistory,
  ReadOtherDevicesIDS, PumpTraceSelect, PumpEnableDetailTrace,
  PumpDisableDetailTrace, Experiment_OP161, Experiment_OP162,
  Model511_Experiment_OP119, Model511_Experiment_OP120,
  Model511_Experiment_OP121, Model511_Experiment_OP122,
  Model511_Experiment_OP123, Model511_Experiment_OP124,
  Model511_Experiment_OP125, Model511_Experiment_OP126,
  Model511_Experiment_OP127, Model511_Experiment_OP128,
  Model511_Experiment_OP129, Model511_Experiment_OP130, SelectBasalProfile,
  SelectBasalProfileSTD, SelectBasalProfileA, SelectBasalProfileB,
  PumpExperiment_OP69, PumpExperiment_OP70, PumpExperiment_OP71,
  PumpExperiment_OP72, PumpExperiment_OP73, PumpExperiment_OP75}
                        Built-in commands to run before the main one.
  --postfix {BaseCommand, KeypadPush, PowerControl, PowerControlOff,
  PumpCommand, PumpResume, PumpSuspend, ReadBasalTemp, ReadBatteryStatus,
  ReadContrast, ReadCurPageNumber, ReadErrorStatus, ReadFirmwareVersion,
  ReadGlucoseHistory, ReadHistoryData, ReadPumpID, ReadPumpModel,
  ReadPumpState, ReadPumpStatus, ReadRTC, ReadRadioCtrlACL,
  ReadRemainingInsulin, ReadSettings, ReadTotalsToday, SetSuspend, PushEASY,
  PushUP, PushDOWN, PushACT, PushESC, TempBasal, ManualCommand,
  ReadCurGlucosePageNumber, ReadErrorStatus508, ReadBolusHistory,
  ReadDailyTotals, ReadPrimeBoluses, ReadAlarms, ReadProfileSets,
  ReadUserEvents, ReadRemoteControlID, Read128KMem, Read256KMem,
  ReadBasalTemp508, ReadTodayTotals508, ReadSensorSettings,
  ReadSensorHistoryData, ReadISIGHistory, FilterHistory, FilterGlucoseHistory,
  FilterISIGHistory, ReadProfiles511_STD, ReadProfiles511_A, ReadProfiles511_B,
  Model511_ExperimentOP125, Model511_ExperimentOP126, ReadSettings511,
  ReadPumpTrace, ReadDetailTrace, Model511_Experiment_OP165, ReadNewTraceAlarm,
  ReadOldTraceAlarm, WriteGlucoseHistoryTimestamp, ReadLanguage,
  ReadBolusWizardSetupStatus, ReadCarbUnits, ReadBGUnits, ReadCarbRatios,
  ReadInsulinSensitivities, ReadBGTargets, ReadBGAlarmCLocks,
  ReadReservoirWarning, ReadBGReminderEnable, ReadSettings512,
  ReadProfile_STD512, ReadProfile_A512, ReadProfile_B512, ReadLogicLinkIDS,
  Model512Experiment_OP150, ReadBGAlarmEnable, GuardianSensorSettings,
  GuardianSensorSettings, GuardianSensorDemoGraphTimeout,
  GuardianSensorAlarmSilence, GuardianSensorRateChangeAlerts,
  ReadSavedSettingsDate, ReadBolusReminderEnable, ReadBolusReminders,
  ReadFactoryParameters, ReadCalibrationFactor, ReadVCNTRHistory,
  ReadOtherDevicesIDS, PumpTraceSelect, PumpEnableDetailTrace,
  PumpDisableDetailTrace, Experiment_OP161, Experiment_OP162,
  Model511_Experiment_OP119, Model511_Experiment_OP120,
  Model511_Experiment_OP121, Model511_Experiment_OP122,
  Model511_Experiment_OP123, Model511_Experiment_OP124,
  Model511_Experiment_OP125, Model511_Experiment_OP126,
  Model511_Experiment_OP127, Model511_Experiment_OP128,
  Model511_Experiment_OP129, Model511_Experiment_OP130, SelectBasalProfile,
  SelectBasalProfileSTD, SelectBasalProfileA, SelectBasalProfileB,
  PumpExperiment_OP69, PumpExperiment_OP70, PumpExperiment_OP71,
  PumpExperiment_OP72, PumpExperiment_OP73, PumpExperiment_OP75}
                        Built-in commands to run after the main one.

This tool is intended to help discover protocol behavior. Under no
circumstance is it intended to deliver therapy.
mm-send-comm.py ManualCommand -h
+ mm-send-comm.py ManualCommand -h
usage: mm-send-comm.py ManualCommand [-h] [--params PARAMS] [--descr DESCR]
                                     [--name NAME] [--save]
                                     [--effectTime EFFECTTIME]
                                     [--maxRecords MAXRECORDS]
                                     [--bytesPerRecord BYTESPERRECORD]
                                     code

positional arguments:
  code                  The opcode to send to the pump.

optional arguments:
  -h, --help            show this help message and exit
  --params PARAMS       parameters to format into sent message
  --descr DESCR         Description of command
  --name NAME           Proposed name of command
  --save                Save response in a file.
  --effectTime EFFECTTIME
                        time to sleep before responding to message, float in
                        seconds
  --maxRecords MAXRECORDS
                        number of frames in a packet composing payload
                        response
  --bytesPerRecord BYTESPERRECORD
                        bytes per frame

mm-send-comm.py sleep -h


+ mm-send-comm.py sleep -h
usage: mm-send-comm.py sleep [-h] timeout

positional arguments:
  timeout     Sleep in between running --prefix and --postfix

optional arguments:
  -h, --help  show this help message and exit

mm-send-comm.py tweak -h

+ mm-send-comm.py tweak -h
usage: mm-send-comm.py tweak [-h] [--params PARAMS] [--descr DESCR]
                             [--name NAME] [--save] [--effectTime EFFECTTIME]
                             [--maxRecords MAXRECORDS]
                             [--bytesPerRecord BYTESPERRECORD] [--page PAGE]
                             [--begin BEGIN] [--end END]
                             
                             {BaseCommand, KeypadPush, PowerControl,
                             PowerControlOff, PumpCommand, PumpResume,
                             PumpSuspend, ReadBasalTemp, ReadBatteryStatus,
                             ReadContrast, ReadCurPageNumber, ReadErrorStatus,
                             ReadFirmwareVersion, ReadGlucoseHistory,
                             ReadHistoryData, ReadPumpID, ReadPumpModel,
                             ReadPumpState, ReadPumpStatus, ReadRTC,
                             ReadRadioCtrlACL, ReadRemainingInsulin,
                             ReadSettings, ReadTotalsToday, SetSuspend,
                             PushEASY, PushUP, PushDOWN, PushACT, PushESC,
                             TempBasal, ManualCommand,
                             ReadCurGlucosePageNumber, ReadErrorStatus508,
                             ReadBolusHistory, ReadDailyTotals,
                             ReadPrimeBoluses, ReadAlarms, ReadProfileSets,
                             ReadUserEvents, ReadRemoteControlID, Read128KMem,
                             Read256KMem, ReadBasalTemp508, ReadTodayTotals508,
                             ReadSensorSettings, ReadSensorHistoryData,
                             ReadISIGHistory, FilterHistory,
                             FilterGlucoseHistory, FilterISIGHistory,
                             ReadProfiles511_STD, ReadProfiles511_A,
                             ReadProfiles511_B, Model511_ExperimentOP125,
                             Model511_ExperimentOP126, ReadSettings511,
                             ReadPumpTrace, ReadDetailTrace,
                             Model511_Experiment_OP165, ReadNewTraceAlarm,
                             ReadOldTraceAlarm, WriteGlucoseHistoryTimestamp,
                             ReadLanguage, ReadBolusWizardSetupStatus,
                             ReadCarbUnits, ReadBGUnits, ReadCarbRatios,
                             ReadInsulinSensitivities, ReadBGTargets,
                             ReadBGAlarmCLocks, ReadReservoirWarning,
                             ReadBGReminderEnable, ReadSettings512,
                             ReadProfile_STD512, ReadProfile_A512,
                             ReadProfile_B512, ReadLogicLinkIDS,
                             Model512Experiment_OP150, ReadBGAlarmEnable,
                             GuardianSensorSettings, GuardianSensorSettings,
                             GuardianSensorDemoGraphTimeout,
                             GuardianSensorAlarmSilence,
                             GuardianSensorRateChangeAlerts,
                             ReadSavedSettingsDate, ReadBolusReminderEnable,
                             ReadBolusReminders, ReadFactoryParameters,
                             ReadCalibrationFactor, ReadVCNTRHistory,
                             ReadOtherDevicesIDS, PumpTraceSelect,
                             PumpEnableDetailTrace, PumpDisableDetailTrace,
                             Experiment_OP161, Experiment_OP162,
                             Model511_Experiment_OP119,
                             Model511_Experiment_OP120,
                             Model511_Experiment_OP121,
                             Model511_Experiment_OP122,
                             Model511_Experiment_OP123,
                             Model511_Experiment_OP124,
                             Model511_Experiment_OP125,
                             Model511_Experiment_OP126,
                             Model511_Experiment_OP127,
                             Model511_Experiment_OP128,
                             Model511_Experiment_OP129,
                             Model511_Experiment_OP130, SelectBasalProfile,
                             SelectBasalProfileSTD, SelectBasalProfileA,
                             SelectBasalProfileB, PumpExperiment_OP69,
                             PumpExperiment_OP70, PumpExperiment_OP71,
                             PumpExperiment_OP72, PumpExperiment_OP73,
                             PumpExperiment_OP75}

positional arguments:
  {BaseCommand, KeypadPush, PowerControl, PowerControlOff, PumpCommand,
  PumpResume, PumpSuspend, ReadBasalTemp, ReadBatteryStatus, ReadContrast,
  ReadCurPageNumber, ReadErrorStatus, ReadFirmwareVersion, ReadGlucoseHistory,
  ReadHistoryData, ReadPumpID, ReadPumpModel, ReadPumpState, ReadPumpStatus,
  ReadRTC, ReadRadioCtrlACL, ReadRemainingInsulin, ReadSettings,
  ReadTotalsToday, SetSuspend, PushEASY, PushUP, PushDOWN, PushACT, PushESC,
  TempBasal, ManualCommand, ReadCurGlucosePageNumber, ReadErrorStatus508,
  ReadBolusHistory, ReadDailyTotals, ReadPrimeBoluses, ReadAlarms,
  ReadProfileSets, ReadUserEvents, ReadRemoteControlID, Read128KMem,
  Read256KMem, ReadBasalTemp508, ReadTodayTotals508, ReadSensorSettings,
  ReadSensorHistoryData, ReadISIGHistory, FilterHistory, FilterGlucoseHistory,
  FilterISIGHistory, ReadProfiles511_STD, ReadProfiles511_A, ReadProfiles511_B,
  Model511_ExperimentOP125, Model511_ExperimentOP126, ReadSettings511,
  ReadPumpTrace, ReadDetailTrace, Model511_Experiment_OP165, ReadNewTraceAlarm,
  ReadOldTraceAlarm, WriteGlucoseHistoryTimestamp, ReadLanguage,
  ReadBolusWizardSetupStatus, ReadCarbUnits, ReadBGUnits, ReadCarbRatios,
  ReadInsulinSensitivities, ReadBGTargets, ReadBGAlarmCLocks,
  ReadReservoirWarning, ReadBGReminderEnable, ReadSettings512,
  ReadProfile_STD512, ReadProfile_A512, ReadProfile_B512, ReadLogicLinkIDS,
  Model512Experiment_OP150, ReadBGAlarmEnable, GuardianSensorSettings,
  GuardianSensorSettings, GuardianSensorDemoGraphTimeout,
  GuardianSensorAlarmSilence, GuardianSensorRateChangeAlerts,
  ReadSavedSettingsDate, ReadBolusReminderEnable, ReadBolusReminders,
  ReadFactoryParameters, ReadCalibrationFactor, ReadVCNTRHistory,
  ReadOtherDevicesIDS, PumpTraceSelect, PumpEnableDetailTrace,
  PumpDisableDetailTrace, Experiment_OP161, Experiment_OP162,
  Model511_Experiment_OP119, Model511_Experiment_OP120,
  Model511_Experiment_OP121, Model511_Experiment_OP122,
  Model511_Experiment_OP123, Model511_Experiment_OP124,
  Model511_Experiment_OP125, Model511_Experiment_OP126,
  Model511_Experiment_OP127, Model511_Experiment_OP128,
  Model511_Experiment_OP129, Model511_Experiment_OP130, SelectBasalProfile,
  SelectBasalProfileSTD, SelectBasalProfileA, SelectBasalProfileB,
  PumpExperiment_OP69, PumpExperiment_OP70, PumpExperiment_OP71,
  PumpExperiment_OP72, PumpExperiment_OP73, PumpExperiment_OP75}
                        Command to tweak.

optional arguments:
  -h, --help            show this help message and exit
  --params PARAMS       parameters to format into sent message
  --descr DESCR         Description of command
  --name NAME           Proposed name of command
  --save                Save response in a file.
  --effectTime EFFECTTIME
                        time to sleep before responding to message, float in
                        seconds
  --maxRecords MAXRECORDS
                        number of frames in a packet composing payload
                        response
  --bytesPerRecord BYTESPERRECORD
                        bytes per frame
  --page PAGE           Page to fetch (for ReadHistoryData)
  --begin BEGIN         begin date for FilterHistory
  --end END             end date for FilterHistory
mm-latest.py -h
usage: mm-latest.py [-h] [--serial SERIAL] [--port PORT] [--no-op]
                    [--skip-prelude] [--no-rf-prelude] [--skip-postlude] [-v]
                    [--init] [--no-clock] [--no-basal] [--no-temp]
                    [--no-reservoir] [--no-status]
                    [minutes]

mm-latest.py - Grab latest activity

positional arguments:
  minutes          [default: 30)]

optional arguments:
  -h, --help       show this help message and exit
  --serial SERIAL  serial number of pump [default: ]
  --port PORT      Path to device [default: ]
  --no-op          Dry run, don't do main function
  --skip-prelude   Don't do the normal prelude.
  --no-rf-prelude  Do the prelude, but don't query the pump.
  --skip-postlude  Don't do the normal postlude.
  -v, --verbose    Verbosity
  --init           Send power ctrl to initialize RF session.
  --no-clock       Also report current time on pump.
  --no-basal       Also report basal rates.
  --no-temp        Also report temp basal rates.
  --no-reservoir   Also report remaining insulin in reservoir.
  --no-status      Also report current suspend/bolus status.

Query pump for latest activity.

./bin/mm-press-key.py

usage: mm-press-key.py [-h] [--serial SERIAL] [--port PORT] [--no-op] [-v]
                       [--init]
                       {act,esc,up,down,easy} [{act,esc,up,down,easy} ...]

positional arguments:
  {act,esc,up,down,easy}
                        buttons to press [default: act)]

optional arguments:
  -h, --help            show this help message and exit
  --serial SERIAL       serial number of pump [default: ]
  --port PORT           Path to device [default: ]
  --no-op               Dry run, don't do main function
  -v, --verbose         Verbosity
  --init                Send power ctrl to initialize RF session.

status-quo.sh

status-quo.sh </dev/ttyUSB0> <SERIAL> runs several experiments, described below. Each experiment is saved in the ./logs directory, which is tracked by git.

. bin/common

Source a bunch of helper functions, notably:

run_stick_

Runs python decocare/stick.py /dev/ttyUSB0 and saves results in logs/stick.log. When run by status-quo.sh, it creates ./logs/baseline.stick.log before continuing. At end of experiments, it records ./logs/postmortem.stick.log

run_session_

Runs python decocare/session.py /dev/ttyUSB0 <SERIAL> and saves results in logs/session.log.

run_commands_

Runs python decocare/commands.py /dev/ttyUSB0 <SERIAL> and saves results in logs/commands.log.

run_download_

Runs python decocare/download.py /dev/ttyUSB0 <SERIAL> and saves results in logs/download.log.

The download script is configured to save each page of historical data as a raw binary blob in the ./logs/ subdirectory like this: ./logs/ReadHistoryData-page-$x.data.

This script can take several minutes to run; it attempts to download all pages of data available.

quick overview:

status-quo.sh also tries to summarize what happened, saving a quick explanation of what happened in logs/explain.log. The entire output is saved in ./status-quo.log.

run_regress

After . bin/common, export SERIAL=511888 with your serial number.

Runs python list_history.py on each binary file found in logs/, saves results in ./analysis/<SERIAL>/....

This is what I use to render the markdown files in analysis. Often, the diffs between runs help test theories.

list_history.py

list_history.py [--larger] ./logs/ReadHistory....page-0.data List/decode a page of history as markdown.

list_opcodes.py

list_opcodes.py List records found in binary data by looking for opcodes, and a regular data structure associated with that length. Includes at least one variable stop length strength.

list_dates.py

List records found in binary data by looking for dates.

usblyzer_filter.sh

# usblyzer_filter.sh was used to filter the raw usblyzer csv export into
# something a bit more manageable.
$ history
  553  ./usblyzer_filter.sh  first_run.csv  
  554  ls
  555  git mv first_run.csv pcaps/first_run/
  556  ./usblyzer_filter.sh  pcaps/first_run/first_run.csv  
  557  ./usblyzer_filter.sh  pcaps/first_run/first_run.csv   > pcaps/first_run/pcap.csv
  558  git mv second_run.csv pcaps/second_run/
  559  ./usblyzer_filter.sh pcaps/second_run/second_run.csv 
  560  ./usblyzer_filter.sh pcaps/second_run/second_run.csv  > pcaps/second_run/pcap.csv
  561  git mv third_run.csv pcaps/third_run/
  562  ./usblyzer_filter.sh  pcaps/third_run/third_run.csv 
  563  ./usblyzer_filter.sh  pcaps/third_run/third_run.csv  > pcaps/third_run/pcap.csv
bewest@paragon:~/src/decoding-carelink$ 

Thanks, -contributors

decoding-carelink's People

Contributors

bewest avatar channemann avatar ecc1 avatar erobinson avatar fokko avatar gazhay avatar ianjorgensen avatar kenstack avatar loudnate avatar oskarpearson avatar ps2 avatar tghoward avatar trhodeos avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

decoding-carelink's Issues

Give up after 10 attempts

If one of the scripts gets stuck doing this:

WARNING:decocare.stick:Stick transmit[TransmitPacket:PowerControl:data:unknown] reader[ReadRadio:size:14] download_i[29] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[False] command[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)]:download(attempts[29],expect[0],results[0]:data[0]):BAD AILING

There's not much point in continuing to try, because it never works until you start over. Better to just give up after 10 attempts.

Add type and datestamp to mm-temp-basal.py --out

Looks like to use your mm-temp-basal.py --out feature (3717f3e), I'm going to need it to write a couple more things besides just rate and duration (or hack together a wrapper script to do so). It should look something like this:
{
"_type": "CurrentTempBasal",
"date": 1418610158000,
"duration": 30,
"rate": 0.0
}

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7015567-add-type-and-datestamp-to-mm-temp-basal-py-out?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github).

status-quo.sh fails on raspbian

Something in default raspbian setup causes the shell script to blow up and fail to actually run the commands:

bin/common: line 36: time: command not found
bin/common: line 46: time: command not found
bin/common: line 51: time: command not found
bin/common: line 41: time: command not found
bin/common: line 57: time: command not found

debugging temp basal commands on 722 vs 723

based on Ben's earlier suggestions I have given both a 722 and 723 a temp basal - results of list_history.py for the same temp basal for both units are given below. The command structures look identical to me. The relevant records are 9,10 for the 722 and 24,25 for the 723. Please look at this and see what I am missing if anything. I have a bad feeling they are simply forbidding direct commands since all the query commands work the same but button presses and temp basal do not.

I included the entirety of page 0 for completeness sorry for the length. One final point - I had to use the larger option on the 723 and the no larger option on the 722 or the 722 was garbage. There is little history in the 722 since it hasnt been used in a while I am assuming thats why?

The only difference I see is the addition of HOUR BITS line. But could that be from --larger vs. --no-larger?

722 DATA *******************************

START ReadHistoryData-page-0.data

STOPPING DOUBLE NULLS @ 208, found 814 nulls

reading more to debug 0x00
0000 0x00 0x00 ..
0 0

DEBUG HEX
0000   0x86 0xa3                                  ..
DEBUG DECIMAL
        134  163

RECORD 0 Model522ResultTotals 2014-12-07T00:00:00 head[1], body[41] op[0x6d]

op hex (1)
0000   0x6d                                       m
decimal
        109
datetime (2014-12-07T00:00:00)
0000   0xc6 0x0e                                  ..
body (41)
hex
0000   0x05 0x0c 0x00 0xe8 0x00 0x00 0x00 0x00    ........
0008   0x05 0x8a 0x05 0x8a 0x64 0x00 0x00 0x00    ....d...
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x0c 0x00 0xe8 0x00 0x00    ........
0028   0x00                                       .
decimal
          5   12    0  232    0    0    0    0
          5  138    5  138  100    0    0    0
          0    0    0    0    0    0    0    0
          0    0    0    0    0    0    0    0
          0    0    0   12    0  232    0    0
          0

RECORD 1 MResultTotals 2014-12-08T00:00:00 head[5], body[0] op[0x07]

op hex (5)
0000   0x07 0x00 0x00 0x05 0x8a                   .....
decimal
          7    0    0    5  138
datetime (2014-12-08T00:00:00)
0000   0xc7 0x0e                                  ..
body (0)

RECORD 2 Model522ResultTotals 2014-12-08T00:00:00 head[1], body[41] op[0x6d]

op hex (1)
0000   0x6d                                       m
decimal
        109
datetime (2014-12-08T00:00:00)
0000   0xc7 0x0e                                  ..
body (41)
hex
0000   0x05 0x0c 0x00 0xe8 0x00 0x00 0x00 0x00    ........
0008   0x05 0x8a 0x05 0x8a 0x64 0x00 0x00 0x00    ....d...
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x0c 0x00 0xe8 0x00 0x00    ........
0028   0x00                                       .
decimal
          5   12    0  232    0    0    0    0
          5  138    5  138  100    0    0    0
          0    0    0    0    0    0    0    0
          0    0    0    0    0    0    0    0
          0    0    0   12    0  232    0    0
          0

RECORD 3 MResultTotals 2014-12-09T00:00:00 head[5], body[0] op[0x07]

op hex (5)
0000   0x07 0x00 0x00 0x05 0x8a                   .....
decimal
          7    0    0    5  138
datetime (2014-12-09T00:00:00)
0000   0xc8 0x0e                                  ..
body (0)

RECORD 4 Model522ResultTotals 2014-12-09T00:00:00 head[1], body[41] op[0x6d]

op hex (1)
0000   0x6d                                       m
decimal
        109
datetime (2014-12-09T00:00:00)
0000   0xc8 0x0e                                  ..
body (41)
hex
0000   0x05 0x0c 0x00 0xe8 0x00 0x00 0x00 0x00    ........
0008   0x05 0x8a 0x05 0x8a 0x64 0x00 0x00 0x00    ....d...
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x0c 0x00 0xe8 0x00 0x00    ........
0028   0x00                                       .
decimal
          5   12    0  232    0    0    0    0
          5  138    5  138  100    0    0    0
          0    0    0    0    0    0    0    0
          0    0    0    0    0    0    0    0
          0    0    0   12    0  232    0    0
          0

RECORD 5 TempBasal 2014-12-09T21:34:10 head[2], body[1] op[0x33]

DECODED
{'rate': 0.25}
op hex (2)
0000   0x33 0x0a                                  3.
decimal
         51   10
datetime (2014-12-09T21:34:10)
0000   0xca 0x22 0x15 0x09 0x0e                   ."...
body (1)
hex
0000   0x00                                       .
decimal
          0
HOUR BITS: [0, 0, 1]

RECORD 6 TempBasalDuration 2014-12-09T21:34:10 head[2], body[0] op[0x16]

DECODED
{'duration (min)': 60}
op hex (2)
0000   0x16 0x02                                  ..
decimal
         22    2
datetime (2014-12-09T21:34:10)
0000   0xca 0x22 0x15 0x09 0x0e                   ."...
body (0)
HOUR BITS: [0, 0, 1]

RECORD 7 TempBasal 2014-12-09T21:42:42 head[2], body[1] op[0x33]

DECODED
{'rate': 0.0}
op hex (2)
0000   0x33 0x00                                  3.
decimal
         51    0
datetime (2014-12-09T21:42:42)
0000   0xea 0x2a 0x15 0x09 0x0e                   .*...
body (1)
hex
0000   0x00                                       .
decimal
          0
HOUR BITS: [0, 0, 1]

RECORD 8 TempBasalDuration 2014-12-09T21:42:42 head[2], body[0] op[0x16]

DECODED
{'duration (min)': 0}
op hex (2)
0000   0x16 0x00                                  ..
decimal
         22    0
datetime (2014-12-09T21:42:42)
0000   0xea 0x2a 0x15 0x09 0x0e                   .*...
body (0)
HOUR BITS: [0, 0, 1]

RECORD 9 TempBasal 2014-12-09T21:58:02 head[2], body[1] op[0x33]

DECODED
{'rate': 0.5}
op hex (2)
0000   0x33 0x14                                  3.
decimal
         51   20
datetime (2014-12-09T21:58:02)
0000   0xc2 0x3a 0x15 0x09 0x0e                   .:...
body (1)
hex
0000   0x00                                       .
decimal
          0
HOUR BITS: [0, 0, 1]

RECORD 10 TempBasalDuration 2014-12-09T21:58:02 head[2], body[0] op[0x16]

DECODED
{'duration (min)': 30}
op hex (2)
0000   0x16 0x01                                  ..
decimal
         22    1
datetime (2014-12-09T21:58:02)
0000   0xc2 0x3a 0x15 0x09 0x0e                   .:...
body (0)
HOUR BITS: [0, 0, 1]

RECORD 11 TempBasal 2014-12-09T21:58:08 head[2], body[1] op[0x33]

DECODED
{'rate': 0.0}
op hex (2)
0000   0x33 0x00                                  3.
decimal
         51    0
datetime (2014-12-09T21:58:08)
0000   0xc8 0x3a 0x15 0x09 0x0e                   .:...
body (1)
hex
0000   0x00                                       .
decimal
          0
HOUR BITS: [0, 0, 1]

RECORD 12 TempBasalDuration 2014-12-09T21:58:08 head[2], body[0] op[0x16]

DECODED
{'duration (min)': 0}
op hex (2)
0000   0x16 0x00                                  ..
decimal
         22    0
datetime (2014-12-09T21:58:08)
0000   0xc8 0x3a 0x15 0x09 0x0e                   .:...
body (0)
HOUR BITS: [0, 0, 1]

end ReadHistoryData-page-0.data: 13 records

723 DATA********************

START ReadHistoryData-page-0.data

STOPPING DOUBLE NULLS @ 304, found 718 nulls

reading more to debug 0x00
0000 0x00 0x00 ..
0 0

DEBUG HEX
0000   0x19 0xed                                  ..
DEBUG DECIMAL
         25  237

RECORD 0 BolusWizard 2014-12-09T19:23:09 head[2], body[15] op[0x5b]

DECODED
{'bg': 0,
 'bg_target_high': 87,
 'bg_target_low': 110,
 'bolus_estimate': 0.0,
 'carb_input': 0,
 'carb_ratio': 11.0,
 'correction_estimate': 0.0,
 'food_estimate': 0.0,
 'sensitivity': 53,
 'unabsorbed_insulin_total': 0.0}
op hex (2)
0000   0x5b 0x00                                  [.
decimal
         91    0
datetime (2014-12-09T19:23:09)
0000   0xc9 0x17 0x13 0x09 0x0e                   .....
body (15)
hex
0000   0x00 0x50 0x00 0x57 0x35 0x6e 0x00 0x00    .P.W5n..
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x6e         ......n
decimal
          0   80    0   87   53  110    0    0
          0    0    0    0    0    0  110

RECORD 1 UnabsorbedInsulinBolus unknown head[8], body[0] op[0x5c]

DECODED
[{'age': 169, 'amount': 2.9, 'curve': 5},
 {'age': 133, 'amount': 6.3, 'curve': 21}]
op hex (8)
0000   0x5c 0x08 0x74 0xa9 0x05 0xfc 0x85 0x15    \.t.....
decimal
         92    8  116  169    5  252  133   21
datetime (unknown)

body (0)

RECORD 2 Bolus 2014-12-09T19:23:09 head[8], body[0] op[0x01]

DECODED
{'amount': 0.4,
 'duration': 0,
 'programmed': 0.4,
 'type': 'normal',
 'unabsorbed': 2.0}
op hex (8)
0000   0x01 0x00 0x10 0x00 0x10 0x00 0x50 0x00    ......P.
decimal
          1    0   16    0   16    0   80    0
datetime (2014-12-09T19:23:09)
0000   0xc9 0x17 0x33 0x09 0x0e                   ..3..
body (0)

RECORD 3 BolusWizard 2014-12-09T19:23:50 head[2], body[15] op[0x5b]

DECODED
{'bg': 0,
 'bg_target_high': 87,
 'bg_target_low': 110,
 'bolus_estimate': 0.0,
 'carb_input': 0,
 'carb_ratio': 11.0,
 'correction_estimate': 0.0,
 'food_estimate': 0.0,
 'sensitivity': 53,
 'unabsorbed_insulin_total': 0.0}
op hex (2)
0000   0x5b 0x00                                  [.
decimal
         91    0
datetime (2014-12-09T19:23:50)
0000   0xf2 0x17 0x13 0x09 0x0e                   .....
body (15)
hex
0000   0x00 0x50 0x00 0x57 0x35 0x6e 0x00 0x00    .P.W5n..
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x6e         ......n
decimal
          0   80    0   87   53  110    0    0
          0    0    0    0    0    0  110

RECORD 4 UnabsorbedInsulinBolus unknown head[11], body[0] op[0x5c]

DECODED
[{'age': 9, 'amount': 0.4, 'curve': 4},
 {'age': 169, 'amount': 2.9, 'curve': 5},
 {'age': 133, 'amount': 6.3, 'curve': 21}]
op hex (11)
0000   0x5c 0x0b 0x10 0x09 0x04 0x74 0xa9 0x05    \....t..
0008   0xfc 0x85 0x15                             ...
decimal
         92   11   16    9    4  116  169    5
        252  133   21
datetime (unknown)

body (0)

RECORD 5 Bolus 2014-12-09T19:23:50 head[8], body[0] op[0x01]

DECODED
{'amount': 0.3,
 'duration': 0,
 'programmed': 0.3,
 'type': 'normal',
 'unabsorbed': 2.4}
op hex (8)
0000   0x01 0x00 0x0c 0x00 0x0c 0x00 0x60 0x00    ......`.
decimal
          1    0   12    0   12    0   96    0
datetime (2014-12-09T19:23:50)
0000   0xf2 0x17 0x33 0x09 0x0e                   ..3..
body (0)

RECORD 6 BasalProfileStart 2014-12-09T20:30:00 head[2], body[3] op[0x7b]

DECODED
{'offset': 73800000, 'rate': 1.35}
op hex (2)
0000   0x7b 0x09                                  {.
decimal
        123    9
datetime (2014-12-09T20:30:00)
0000   0xc0 0x1e 0x14 0x09 0x0e                   .....
body (3)
hex
0000   0x29 0x36 0x00                             )6.
decimal
         41   54    0

RECORD 7 CalBGForPH 2014-12-09T20:56:16 head[2], body[0] op[0x0a]

DECODED
{'amount': 182}
op hex (2)
0000   0x0a 0xb6                                  ..
decimal
         10  182
datetime (2014-12-09T20:56:16)
0000   0xd0 0x38 0x34 0x09 0x0e                   .84..
body (0)
HOUR BITS: [0, 0, 1]

RECORD 8 BolusWizard 2014-12-09T20:56:29 head[2], body[15] op[0x5b]

DECODED
{'bg': 182,
 'bg_target_high': 87,
 'bg_target_low': 110,
 'bolus_estimate': 0.8,
 'carb_input': 0,
 'carb_ratio': 11.0,
 'correction_estimate': 1.3,
 'food_estimate': 0.0,
 'sensitivity': 53,
 'unabsorbed_insulin_total': 0.5}
op hex (2)
0000   0x5b 0xb6                                  [.
decimal
         91  182
datetime (2014-12-09T20:56:29)
0000   0xdd 0x38 0x14 0x09 0x0e                   .8...
body (15)
hex
0000   0x00 0x50 0x00 0x57 0x35 0x6e 0x34 0x00    .P.W5n4.
0008   0x00 0x00 0x00 0x14 0x00 0x20 0x6e         ..... n
decimal
          0   80    0   87   53  110   52    0
          0    0    0   20    0   32  110
HOUR BITS: [0, 0, 1]

RECORD 9 UnabsorbedInsulinBolus unknown head[11], body[0] op[0x5c]

DECODED
[{'age': 92, 'amount': 0.175, 'curve': 4},
 {'age': 102, 'amount': 0.525, 'curve': 4},
 {'age': 6, 'amount': 2.9, 'curve': 21}]
op hex (11)
0000   0x5c 0x0b 0x07 0x5c 0x04 0x15 0x66 0x04    \..\..f.
0008   0x74 0x06 0x15                             t..
decimal
         92   11    7   92    4   21  102    4
        116    6   21
datetime (unknown)

body (0)

RECORD 10 Bolus 2014-12-09T20:56:29 head[8], body[0] op[0x01]

DECODED
{'amount': 1.0,
 'duration': 0,
 'programmed': 1.0,
 'type': 'normal',
 'unabsorbed': 0.5}
op hex (8)
0000   0x01 0x00 0x28 0x00 0x28 0x00 0x14 0x00    ..(.(...
decimal
          1    0   40    0   40    0   20    0
datetime (2014-12-09T20:56:29)
0000   0xdd 0x38 0x34 0x09 0x0e                   .84..
body (0)
HOUR BITS: [0, 0, 1]

RECORD 11 Bolus 2014-12-09T21:26:20 head[8], body[0] op[0x01]

DECODED
{'amount': 0.3,
 'duration': 0,
 'programmed': 0.3,
 'type': 'normal',
 'unabsorbed': 1.3}
op hex (8)
0000   0x01 0x00 0x0c 0x00 0x0c 0x00 0x34 0x00    ......4.
decimal
          1    0   12    0   12    0   52    0
datetime (2014-12-09T21:26:20)
0000   0xd4 0x1a 0x35 0x69 0x0e                   ..5i.
body (0)
DAY BITS: [0, 1, 1]

RECORD 12 Base (2014, 12, 9, 21, 28, 29) head[2], body[0] op[0x62]

op hex (2)
0000   0x62 0x00                                  b.
decimal
         98    0
datetime ((2014, 12, 9, 21, 28, 29))
0000   0xdd 0x1c 0x15 0x09 0x0e                   .....
body (0)

RECORD 13 TempBasal 2014-12-09T21:32:04 head[2], body[1] op[0x33]

DECODED
{'rate': 0.325}
op hex (2)
0000   0x33 0x0d                                  3.
decimal
         51   13
datetime (2014-12-09T21:32:04)
0000   0xc4 0x20 0x15 0x49 0x0e                   . .I.
body (1)
hex
0000   0x00                                       .
decimal
          0
HOUR BITS: [0, 0, 1] DAY BITS: [0, 1, 0]

RECORD 14 TempBasalDuration 2014-12-09T21:32:04 head[2], body[0] op[0x16]

DECODED
{'duration (min)': 30}
op hex (2)
0000   0x16 0x01                                  ..
decimal
         22    1
datetime (2014-12-09T21:32:04)
0000   0xc4 0x20 0x15 0x49 0x0e                   . .I.
body (0)
HOUR BITS: [0, 0, 1] DAY BITS: [0, 1, 0]

RECORD 15 TempBasal 2014-12-09T21:32:24 head[2], body[1] op[0x33]

DECODED
{'rate': 0.0}
op hex (2)
0000   0x33 0x00                                  3.
decimal
         51    0
datetime (2014-12-09T21:32:24)
0000   0xd8 0x20 0x15 0x09 0x0e                   . ...
body (1)
hex
0000   0x00                                       .
decimal
          0
HOUR BITS: [0, 0, 1]

RECORD 16 TempBasalDuration 2014-12-09T21:32:24 head[2], body[0] op[0x16]

DECODED
{'duration (min)': 0}
op hex (2)
0000   0x16 0x00                                  ..
decimal
         22    0
datetime (2014-12-09T21:32:24)
0000   0xd8 0x20 0x15 0x09 0x0e                   . ...
body (0)
HOUR BITS: [0, 0, 1]

RECORD 17 BasalProfileStart 2014-12-09T21:32:24 head[2], body[3] op[0x7b]

DECODED
{'offset': 73800000, 'rate': 1.35}
op hex (2)
0000   0x7b 0x09                                  {.
decimal
        123    9
datetime (2014-12-09T21:32:24)
0000   0xd8 0x20 0x15 0x09 0x0e                   . ...
body (3)
hex
0000   0x29 0x36 0x00                             )6.
decimal
         41   54    0
HOUR BITS: [0, 0, 1]

RECORD 18 TempBasal 2014-12-09T21:33:55 head[2], body[1] op[0x33]

DECODED
{'rate': 0.25}
op hex (2)
0000   0x33 0x0a                                  3.
decimal
         51   10
datetime (2014-12-09T21:33:55)
0000   0xf7 0x21 0x15 0x09 0x0e                   .!...
body (1)
hex
0000   0x00                                       .
decimal
          0
HOUR BITS: [0, 0, 1]

RECORD 19 TempBasalDuration 2014-12-09T21:33:55 head[2], body[0] op[0x16]

DECODED
{'duration (min)': 60}
op hex (2)
0000   0x16 0x02                                  ..
decimal
         22    2
datetime (2014-12-09T21:33:55)
0000   0xf7 0x21 0x15 0x09 0x0e                   .!...
body (0)
HOUR BITS: [0, 0, 1]

RECORD 20 TempBasal 2014-12-09T21:36:18 head[2], body[1] op[0x33]

DECODED
{'rate': 0.0}
op hex (2)
0000   0x33 0x00                                  3.
decimal
         51    0
datetime (2014-12-09T21:36:18)
0000   0xd2 0x24 0x15 0x09 0x0e                   .$...
body (1)
hex
0000   0x00                                       .
decimal
          0
HOUR BITS: [0, 0, 1]

RECORD 21 TempBasalDuration 2014-12-09T21:36:18 head[2], body[0] op[0x16]

DECODED
{'duration (min)': 0}
op hex (2)
0000   0x16 0x00                                  ..
decimal
         22    0
datetime (2014-12-09T21:36:18)
0000   0xd2 0x24 0x15 0x09 0x0e                   .$...
body (0)
HOUR BITS: [0, 0, 1]

RECORD 22 BasalProfileStart 2014-12-09T21:36:18 head[2], body[3] op[0x7b]

DECODED
{'offset': 73800000, 'rate': 1.35}
op hex (2)
0000   0x7b 0x09                                  {.
decimal
        123    9
datetime (2014-12-09T21:36:18)
0000   0xd2 0x24 0x15 0x09 0x0e                   .$...
body (3)
hex
0000   0x29 0x36 0x00                             )6.
decimal
         41   54    0
HOUR BITS: [0, 0, 1]

RECORD 23 BasalProfileStart 2014-12-09T22:00:00 head[2], body[3] op[0x7b]

DECODED
{'offset': 79200000, 'rate': 1.4000000000000001}
op hex (2)
0000   0x7b 0x0a                                  {.
decimal
        123   10
datetime (2014-12-09T22:00:00)
0000   0xc0 0x00 0x16 0x09 0x0e                   .....
body (3)
hex
0000   0x2c 0x38 0x00                             ,8.
decimal
         44   56    0

RECORD 24 TempBasal 2014-12-09T22:01:23 head[2], body[1] op[0x33]

DECODED
{'rate': 0.5}
op hex (2)
0000   0x33 0x14                                  3.
decimal
         51   20
datetime (2014-12-09T22:01:23)
0000   0xd7 0x01 0x16 0x09 0x0e                   .....
body (1)
hex
0000   0x00                                       .
decimal
          0

RECORD 25 TempBasalDuration 2014-12-09T22:01:23 head[2], body[0] op[0x16]

DECODED
{'duration (min)': 30}
op hex (2)
0000   0x16 0x01                                  ..
decimal
         22    1
datetime (2014-12-09T22:01:23)
0000   0xd7 0x01 0x16 0x09 0x0e                   .....
body (0)

RECORD 26 TempBasal 2014-12-09T22:01:32 head[2], body[1] op[0x33]

DECODED
{'rate': 0.0}
op hex (2)
0000   0x33 0x00                                  3.
decimal
         51    0
datetime (2014-12-09T22:01:32)
0000   0xe0 0x01 0x16 0x09 0x0e                   .....
body (1)
hex
0000   0x00                                       .
decimal
          0

RECORD 27 TempBasalDuration 2014-12-09T22:01:32 head[2], body[0] op[0x16]

DECODED
{'duration (min)': 0}
op hex (2)
0000   0x16 0x00                                  ..
decimal
         22    0
datetime (2014-12-09T22:01:32)
0000   0xe0 0x01 0x16 0x09 0x0e                   .....
body (0)

RECORD 28 BasalProfileStart 2014-12-09T22:01:32 head[2], body[3] op[0x7b]

DECODED
{'offset': 79200000, 'rate': 1.4000000000000001}
op hex (2)
0000   0x7b 0x0a                                  {.
decimal
        123   10
datetime (2014-12-09T22:01:32)
0000   0xe0 0x01 0x16 0x09 0x0e                   .....
body (3)
hex
0000   0x2c 0x38 0x00                             ,8.
decimal
         44   56    0

end ReadHistoryData-page-0.data: 29 records

Calling mm-latest.py as a module

This is mostly just python ignorance, but is it possible for me to somehow include mm-latest.py as a module, so I can call all the functions in it from my own script?

Battery change corrupts data log.

I think this is related with the Flipping page data corruption issue.

When the pump ( 754 ) goes out of battery and asks to change it, once you do it, and there is a "SensorSync", you get:

@@@ 19
{'raw': '0a00c3160f08'}
{'date': ''}
{'body': '0f08'}
[
{
"op": 10,
"name": "Could Not Decode",
"packet_size": 0
},
{
"body": "",
"raw": "00-c4-16-0f",
"name": "SensorSync",
"date": "2015-03-22T00:04:00",
"date_type": "minSpecific",
"packet_size": 4,
"op": "0x0d"
}
]

This is the list_cgm.py script on a ReadGlucoseHistory data file.

Interfacing with decoding-carelink

From a separate python program what would be the best way to interface with decoding-carelink? Currently I can use the CLI from the other program via os.system(), but I was wondering if there was a better way, such as importing a module and then calling commands.

Thanks.

what does PumpExperiment_OP69 do?

PumpExperiment_OP69

What does it do?

$ mm-send-comm.py    --serial 208850 tweak PumpExperiment_OP69 

...

PUMP MODEL: ReadPumpModel:size[64]:data:'515'

<class 'decocare.commands.PumpExperiment_OP69'> {}
CRITICAL:decocare.session:this seems like a problem
response: PumpExperiment_OP69:size[64]:data:bytearray(b'\x00')
hexdump:

0000   0x00                                       .

decoded:

bytearray(b'\x00')

Then, with depending on params, different responses come back, a common one is:

<class 'decocare.commands.PumpExperiment_OP69'> {'params': [20]}
CRITICAL:decocare.session:this seems like a problem
response: PumpExperiment_OP69:size[64]:data:bytearray(b'\t')
hexdump:

0000   0x09                                       .

decoded:

bytearray(b'\t')

Normally when commands are not supported/don't exist, there is some kind of error response every time... This behavior indicates that it probably does something interesting, but I have no idea what it might do, or how to influence the behavior through the parameters.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

CRITICAL error on successful mm-bolus.py

Bolus is successful, but it doesn't seem to know how to parse "response: Bolus:size[64]:data:bytearray(b'\x0c')" and gives a scary CRITICAL error:

pi@raspberrypi ~/decoding-carelink $ mm-bolus.py --515 .3 --init

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='<removed>', strokes_per_unit=10, units=0.3, verbose=None)

{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 6,
           'packets.received': 140L,
           'packets.transmit': 151L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 407L,
         'packets.transmit': 407L}}
PowerControl SERIAL <removed>

PUMP MODEL: ReadPumpModel:size[64]:data:'522'

Namespace(dryrun=False, init=True, no_postlude=False, no_prelude=False, no_rf_prelude=False, port='/dev/ttyUSB0', serial='', strokes_per_unit=10, units=0.3, verbose=None)
CRITICAL:decocare.session:this seems like a problem
response: Bolus:size[64]:data:bytearray(b'\x0c')

decoded:

bytearray(b'\x0c')

end stats

{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 6,
           'packets.received': 147L,
           'packets.transmit': 158L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 421L,
         'packets.transmit': 421L}}

command to do issue bolus

This is a feature request from a friend who has expertise in control systems and needs some tools.

I've stubbed out a bunch of experimental commands, and it's possible to construct and send any command using the tools.

I tried iterating through a bunch of combinations of varying parameters and commands. To my surprise, I was able to discover SelectBasalPattern. The Bolus command is probably in the partially implemented set, I just have no idea how to format the correct parameters.

This seems like a reasonable discussion place for how to format those parameters and keeping people updated on experiments related to that.

Some Bolus History Data Not Correct From mm-latest.py

In reading the data from a 722 pump, I m getting 90%+ of the bolus history correct from mm-latest.py, but a couple of data points are well off. Here is an example.

Here, the bolus amount should be 11 units, and the carb ratio should be 9. I attached a jpg of the pump bolus history itself below. Again, most of the bolus data points are perfect.

I am trying to get bolus history to do on board insulin calculations hence my need for the data.

Newer pumps like the 723 do have this as a parameter and that may be easier to get, but I am not sure where to start in terms of figuring out a new command. Im guessing its in there somewhere.

Thanks for any help / insights into either why the bolus history is wrong or how to grab the onboard insulin number.

{
"_type": "BolusWizard",
"bg": 0,
"bg_target_high": 90,
"_description": "BolusWizard 2014-11-08T10:11:57 head[2], body[15] op[0x5b]",
"timestamp": "2014-11-08T10:11:57",
"sensitivity": 65,
"bg_target_low": 110,
"carb_ratio": 12.0,
"food_estimate": 4.7,
"unabsorbed_insulin_total": 0.0,
"correction_estimate": 0.0,
"carb_input": 100,
"bolus_estimate": 4.7
},
{
"_type": "Bolus",
"_description": "Bolus 2014-11-08T10:11:57 head[8], body[0] op[0x01]",
"timestamp": "2014-11-08T10:11:57",
"programmed": 4.7,
"amount": 4.7,
"unabsorbed": 0.0,
"duration": 0,
"type": "normal"

img_9637

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/5867634-some-bolus-history-data-not-correct-from-mm-latest-py?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github).

command to set temp basal by percent

The current implementations do not work when the pump is in "Units/hour" mode.
When the temporary basal type is "percent" the set temp basal rate command has no effect.

There are a few possibilities:

  • a different command is used to issue temp basal rate by percent
  • the parameters are formatted differently

I've tried sending a variety of different parameters, but no joy. Hopefully others can help discover how to correctly format parameters for temporary rates by percentage.

KeypadPush:data:unknown

When running the commands for the mm-press-key.py I get the same result.

The command is entered like this:
python mm-press-key.py --serial 123456 --port /dev/ttyUSB0 act
python mm-press-key.py --serial 123456 --port /dev/ttyUSB0 up
python mm-press-key.py --serial 123456 --port /dev/ttyUSB0 down
etc

And the result is always:

do stuff with an insulin pump over RF

using Namespace(commands=['act'], dryrun=False, init=False, no_postlude=False, no_prelude=False, no_rf_prelude=False, port='/dev/ttyUSB0', serial='123456', verbose=None)

{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 17,
           'packets.received': 35L,
           'packets.transmit': 59L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 295L,
         'packets.transmit': 295L}}

PUMP MODEL: ReadPumpModel:size[64]:data:'754'

act

response: KeypadPush:data:unknown
hexdump:

decoded:

bytearray(b'')

end stats

{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 17,
           'packets.received': 36L,
           'packets.transmit': 61L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 301L,
         'packets.transmit': 301L}}

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/6610251-keypadpush-data-unknown?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github).

Parsing history fails (mm-latest)

python mm-latest.py --port /dev/ttyUSB0 --serial 639191 --init

do stuff with an insulin pump over RF

using Namespace(basal=True, clock=True, dryrun=False, init=True, minutes=30, no_postlude=False, no_prelude=False, no_rf_prelude=False, parsed_data=<open file '<stdout>', mode 'w' at 0xb6d2f078>, port='/dev/ttyUSB0', reservoir=True, serial='639191', status=True, temp=True, verbose=None)

{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 274L,
           'packets.transmit': 282L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 1,
         'packets.received': 675L,
         'packets.transmit': 675L}}
PowerControl SERIAL 639191

PUMP MODEL: ReadPumpModel:size[64]:data:'715'

response: ReadSettings:size[64]:data:{'low_reservoir_warn_point': 48, 'keypad_lock_status': 1, 'maxBasal': 1, 'temp_basal': {'percent': 100, 'type': 'Units/hour'}, 'paradigm_enabled': 0, 'insulinConcentration': 100, 'audio_bolus_enable': False, 'variable_bolus_enable': True, 'alarm': {'volume': 1, 'mode': 2}, 'rf_enable': False, 'block_enable': False, 'timeformat': 1, 'auto_off_duration_hrs': 0, 'audio_bolus_size': 0, 'selected_pattern': 0, 'patterns_enabled': False, 'insulin_action_type': 2, 'maxBolus': 2.0, 'low_reservoir_warn_type': 1}
hexdump:

0000   0x00 0x01 0x00 0x01 0x01 0x14 0x00 0x28    .......(
0008   0x01 0x00 0x00 0x00 0x00 0x00 0x00 0x64    .......d
0010   0x00 0x02 0x01 0x30 0x01 0x00 0x00 0x00    ...0....
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........

decoded:

{'low_reservoir_warn_point': 48, 'keypad_lock_status': 1, 'maxBasal': 1, 'temp_basal': {'percent': 100, 'type': 'Units/hour'}, 'paradigm_enabled': 0, 'insulinConcentration': 100, 'audio_bolus_enable': False, 'variable_bolus_enable': True, 'alarm': {'volume': 1, 'mode': 2}, 'rf_enable': False, 'block_enable': False, 'timeformat': 1, 'auto_off_duration_hrs': 0, 'audio_bolus_size': 0, 'selected_pattern': 0, 'patterns_enabled': False, 'insulin_action_type': 2, 'maxBolus': 2.0, 'low_reservoir_warn_type': 1}

response: ReadRTC:size[64]:data:'2014-12-7T5:32:55'
hexdump:

0000   0x05 0x20 0x37 0x07 0xde 0x0c 0x07 0x00    . 7.....
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........

decoded:

'2014-12-7T5:32:55'

response: ReadPumpStatus:size[64]:data:{'status': 'normal', 'bolusing': False, 'suspended': False}
hexdump:

0000   0x03 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........

decoded:

{'status': 'normal', 'bolusing': False, 'suspended': False}

response: ReadBasalTemp:size[64]:data:{'duration': 94, 'rate': 0.0}
hexdump:

0000   0x00 0x00 0x00 0x00 0x00 0x5e 0x00 0x00    .....^..
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........

decoded:

{'duration': 94, 'rate': 0.0}

response: ReadProfile_STD512:size[64]:data:[{'start': '00:00:00', 'rate': 0.30000000000000004}, {'start': '02:00:00', 'rate': 0.15000000000000002}, {'start': '08:00:00', 'rate': 0.15000000000000002}, {'start': '09:00:00', 'rate': 0.25}, {'start': '10:00:00', 'rate': 0.2}, {'start': '11:00:00', 'rate': 0.15000000000000002}, {'start': '13:00:00', 'rate': 0.15000000000000002}, {'start': '14:00:00', 'rate': 0.25}, {'start': '15:00:00', 'rate': 0.25}, {'start': '16:00:00', 'rate': 0.30000000000000004}, {'start': '17:00:00', 'rate': 0.30000000000000004}, {'start': '20:00:00', 'rate': 0.2}, {'start': '22:00:00', 'rate': 0.30000000000000004}, {'start': '23:00:00', 'rate': 1.0}]
hexdump:

0000   0x0c 0x00 0x00 0x06 0x00 0x04 0x06 0x00    ........
0008   0x10 0x0a 0x00 0x12 0x08 0x00 0x14 0x06    ........
0010   0x00 0x16 0x06 0x00 0x1a 0x0a 0x00 0x1c    ........
0018   0x0a 0x00 0x1e 0x0c 0x00 0x20 0x0c 0x00    ..... ..
0020   0x22 0x08 0x00 0x28 0x0c 0x00 0x2c 0x28    "..(..,(
0028   0x00 0x2e 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........

decoded:

[{'start': '00:00:00', 'rate': 0.30000000000000004}, {'start': '02:00:00', 'rate': 0.15000000000000002}, {'start': '08:00:00', 'rate': 0.15000000000000002}, {'start': '09:00:00', 'rate': 0.25}, {'start': '10:00:00', 'rate': 0.2}, {'start': '11:00:00', 'rate': 0.15000000000000002}, {'start': '13:00:00', 'rate': 0.15000000000000002}, {'start': '14:00:00', 'rate': 0.25}, {'start': '15:00:00', 'rate': 0.25}, {'start': '16:00:00', 'rate': 0.30000000000000004}, {'start': '17:00:00', 'rate': 0.30000000000000004}, {'start': '20:00:00', 'rate': 0.2}, {'start': '22:00:00', 'rate': 0.30000000000000004}, {'start': '23:00:00', 'rate': 1.0}]

response: ReadRemainingInsulin:size[64]:data:37.0
hexdump:

0000   0x01 0x72 0x00 0x00 0x00 0x00 0x00 0x00    .r......
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........

decoded:

37.0

find records since 2014-12-07T05:02:55
WARNING:decocare.stick:bad zero CRC?
WARNING:decocare.stick:bad zero CRC?
WARNING:decocare.stick:bad zero CRC?
response: ReadHistoryData:size[1024]:[page][0]:data[1024]:
hexdump:

0000   0x08 0x0e 0xd1 0x05 0x16 0x06 0x0e 0x00    ........
0008   0x0c 0x00 0x04 0x06 0x00 0x10 0x06 0x00    ........
0010   0x12 0x0c 0x00 0x14 0x0a 0x00 0x16 0x06    ........
0018   0x00 0x1a 0x06 0x00 0x1c 0x0c 0x00 0x1e    ........
0020   0x0c 0x00 0x20 0x0e 0x00 0x22 0x0e 0x00    .. .."..
0028   0x28 0x0a 0x00 0x2c 0x0c 0x00 0x2e 0x28    (..,...(
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0040   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0048   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0050   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0058   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0060   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0068   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0070   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0078   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0080   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0088   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0090   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0098   0x09 0x0e 0xd1 0x05 0x16 0x06 0x0e 0x00    ........
00A0   0x0c 0x00 0x04 0x06 0x00 0x10 0x06 0x00    ........
00A8   0x12 0x0a 0x00 0x14 0x08 0x00 0x16 0x06    ........
00B0   0x00 0x1a 0x06 0x00 0x1c 0x0a 0x00 0x1e    ........
00B8   0x0a 0x00 0x20 0x0c 0x00 0x22 0x0c 0x00    .. .."..
00C0   0x28 0x08 0x00 0x2c 0x0c 0x00 0x2e 0x28    (..,...(
00C8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
00D0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
00D8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
00E0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
00E8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
00F0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
00F8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0100   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0108   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0110   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0118   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0120   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0128   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0130   0x5b 0x00 0xf3 0x0d 0x16 0x06 0x0e 0x19    [.......
0138   0x90 0x23 0x96 0x38 0x00 0x07 0x00 0x00    .#.8....
0140   0x00 0x00 0x07 0x42 0x5c 0x08 0x14 0xb2    ...B\...
0148   0x80 0x14 0x7a 0x90 0x01 0x07 0x07 0x00    ..z.....
0150   0xf3 0x0d 0x56 0x06 0x0e 0x33 0x04 0xe6    ..V..3..
0158   0x08 0x17 0x06 0x0e 0x00 0x16 0x02 0xe6    ........
0160   0x08 0x17 0x06 0x0e 0x1e 0x00 0xca 0x2c    .......,
0168   0x17 0x06 0x0e 0x07 0x00 0x00 0x01 0x3a    .......:
0170   0xc6 0x0e 0x6c 0xc6 0x0e 0x06 0x00 0x32    ..l....2
0178   0x32 0x32 0x01 0x00 0x00 0x01 0x3a 0x00    22....:.
0180   0xae 0x37 0x00 0x8c 0x2d 0x00 0x73 0x00    .7..-.s.
0188   0x8c 0x2d 0x00 0x74 0x53 0x00 0x00 0x00    .-.tS...
0190   0x00 0x18 0x11 0x06 0x04 0x00 0x00 0x02    ........
0198   0x1f 0x00 0xe9 0x07 0x00 0x07 0x0e 0x33    .......3
01A0   0x00 0xf9 0x07 0x00 0x07 0x0e 0x00 0x16    ........
01A8   0x00 0xf9 0x07 0x00 0x07 0x0e 0x01 0x03    ........
01B0   0x03 0x00 0xc9 0x1a 0x42 0x07 0x0e 0x33    ....B..3
01B8   0x00 0xf3 0x05 0x05 0x07 0x0e 0x00 0x16    ........
01C0   0x04 0xf3 0x05 0x05 0x07 0x0e 0x00 0x00    ........
01C8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
01D0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
01D8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
01E0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
01E8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
01F0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
01F8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0200   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0208   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0210   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0218   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0220   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0228   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0230   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0238   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0240   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0248   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0250   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0258   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0260   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0268   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0270   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0278   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0280   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0288   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0290   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0298   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
02A0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
02A8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
02B0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
02B8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
02C0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
02C8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
02D0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
02D8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
02E0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
02E8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
02F0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
02F8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0300   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0308   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0310   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0318   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0320   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0328   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0330   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0338   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0340   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0348   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0350   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0358   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0360   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0368   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0370   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0378   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0380   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0388   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0390   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0398   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
03A0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
03A8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
03B0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
03B8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
03C0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
03C8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
03D0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
03D8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
03E0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
03E8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
03F0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
03F8   0x00 0x00 0x00 0x00 0x00 0x00 0x8e 0x9d    ........

decoded:

'0000   0x08 0x0e 0xd1 0x05 0x16 0x06 0x0e 0x00    ........\n0008   0x0c 0x00 0x04 0x06 0x00 0x10 0x06 0x00    ........\n0010   0x12 0x0c 0x00 0x14 0x0a 0x00 0x16 0x06    ........\n0018   0x00 0x1a 0x06 0x00 0x1c 0x0c 0x00 0x1e    ........\n0020   0x0c 0x00 0x20 0x0e 0x00 0x22 0x0e 0x00    .. .."..\n0028   0x28 0x0a 0x00 0x2c 0x0c 0x00 0x2e 0x28    (..,...(\n0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0040   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0048   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0050   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0058   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0060   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0068   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0070   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0078   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0080   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0088   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0090   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0098   0x09 0x0e 0xd1 0x05 0x16 0x06 0x0e 0x00    ........\n00A0   0x0c 0x00 0x04 0x06 0x00 0x10 0x06 0x00    ........\n00A8   0x12 0x0a 0x00 0x14 0x08 0x00 0x16 0x06    ........\n00B0   0x00 0x1a 0x06 0x00 0x1c 0x0a 0x00 0x1e    ........\n00B8   0x0a 0x00 0x20 0x0c 0x00 0x22 0x0c 0x00    .. .."..\n00C0   0x28 0x08 0x00 0x2c 0x0c 0x00 0x2e 0x28    (..,...(\n00C8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n00D0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n00D8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n00E0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n00E8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n00F0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n00F8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0100   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0108   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0110   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0118   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0120   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0128   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0130   0x5b 0x00 0xf3 0x0d 0x16 0x06 0x0e 0x19    [.......\n0138   0x90 0x23 0x96 0x38 0x00 0x07 0x00 0x00    .#.8....\n0140   0x00 0x00 0x07 0x42 0x5c 0x08 0x14 0xb2    ...B\\...\n0148   0x80 0x14 0x7a 0x90 0x01 0x07 0x07 0x00    ..z.....\n0150   0xf3 0x0d 0x56 0x06 0x0e 0x33 0x04 0xe6    ..V..3..\n0158   0x08 0x17 0x06 0x0e 0x00 0x16 0x02 0xe6    ........\n0160   0x08 0x17 0x06 0x0e 0x1e 0x00 0xca 0x2c    .......,\n0168   0x17 0x06 0x0e 0x07 0x00 0x00 0x01 0x3a    .......:\n0170   0xc6 0x0e 0x6c 0xc6 0x0e 0x06 0x00 0x32    ..l....2\n0178   0x32 0x32 0x01 0x00 0x00 0x01 0x3a 0x00    22....:.\n0180   0xae 0x37 0x00 0x8c 0x2d 0x00 0x73 0x00    .7..-.s.\n0188   0x8c 0x2d 0x00 0x74 0x53 0x00 0x00 0x00    .-.tS...\n0190   0x00 0x18 0x11 0x06 0x04 0x00 0x00 0x02    ........\n0198   0x1f 0x00 0xe9 0x07 0x00 0x07 0x0e 0x33    .......3\n01A0   0x00 0xf9 0x07 0x00 0x07 0x0e 0x00 0x16    ........\n01A8   0x00 0xf9 0x07 0x00 0x07 0x0e 0x01 0x03    ........\n01B0   0x03 0x00 0xc9 0x1a 0x42 0x07 0x0e 0x33    ....B..3\n01B8   0x00 0xf3 0x05 0x05 0x07 0x0e 0x00 0x16    ........\n01C0   0x04 0xf3 0x05 0x05 0x07 0x0e 0x00 0x00    ........\n01C8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n01D0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n01D8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n01E0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n01E8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n01F0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n01F8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0200   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0208   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0210   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0218   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0220   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0228   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0230   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0238   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0240   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0248   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0250   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0258   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0260   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0268   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0270   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0278   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0280   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0288   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0290   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0298   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n02A0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n02A8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n02B0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n02B8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n02C0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n02C8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n02D0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n02D8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n02E0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n02E8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n02F0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n02F8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0300   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0308   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0310   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0318   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0320   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0328   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0330   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0338   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0340   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0348   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0350   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0358   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0360   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0368   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0370   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0378   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0380   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0388   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0390   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n0398   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n03A0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n03A8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n03B0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n03B8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n03C0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n03C8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n03D0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n03D8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n03E0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n03E8   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n03F0   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........\n03F8   0x00 0x00 0x00 0x00 0x00 0x00 0x8e 0x9d    ........'

SINCE 2014-12-07T05:02:55

Traceback (most recent call last):
File "mm-latest.py", line 162, in
app.run(None)
File "/home/pi/decoding-carelink/decocare/helpers/cli.py", line 104, in run
self.main(args)
File "mm-latest.py", line 158, in main
self.download_history(args)
File "mm-latest.py", line 129, in download_history
remainder = self.find_records(history.data)
File "mm-latest.py", line 111, in find_records
record = parse_record( stream, B, larger=larger )
File "/home/pi/decoding-carelink/decocare/history.py", line 357, in parse_record
record.parse( head + date + body )
File "/home/pi/decoding-carelink/decocare/records/base.py", line 64, in parse
return self.decode( )
File "/home/pi/decoding-carelink/decocare/history.py", line 96, in decode
(offset, rate, q) = self.body[start:end]
ValueError: need more than 2 values to unpack

error with setting temp basal

I am able to interrogate, bolus, and use the key press commands perfectly across both a 515 and a 722. However, when I try to set a temp basal, nothing happens. My script to run the commands mimics the command_control script - I first do an init, then a temp basal, then press esc. I noticed the the following error below (CRITICAL decocaresession .... although I did notice that the bolus command generated a similar error and worked perfectly). Is there a different command to use or have I screwed something up? Many thanks for any help.

(I have x'd out the serial number)

the command I use to set the temp basal after the init is
+sudo ./bin/mm-temp-basals.py set --rate 1.0 --duration 90 --port /dev/ttyUSB0 --serial XXXXXX

I get back

do stuff with an insulin pump over RF

using Namespace(command='set', dryrun=False, duration=90, init=False, no_postlude=False, no_prelude=False, no_rf_prelude=False, port='/dev/ttyUSB0', rate=1.0, serial='XXXXXX', verbose=None)

{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 15,
           'packets.received': 339L,
           'packets.transmit': 361L},
 'usb': {'errors.crc': 3,
         'errors.naks': 5,
         'errors.sequence': 0,
         'errors.timeouts': 1,
         'packets.received': 1191L,
         'packets.transmit': 1199L}}

PUMP MODEL: ReadPumpModel:size[64]:data:'515'

response: ReadBasalTemp:size[64]:data:{'duration': 0, 'rate': 0.0}

decoded:

{'duration': 0, 'rate': 0.0}

CRITICAL:decocare.session:this seems like a problem
response: TempBasal:size[64]:data:bytearray(b'\x08')
hexdump:

0000   0x08                                       .

decoded:

bytearray(b'\x08')

response: ReadBasalTemp:size[64]:data:{'duration': 0, 'rate': 0.0}

decoded:

{'duration': 0, 'rate': 0.0}

end stats

{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 15,
           'packets.received': 344L,
           'packets.transmit': 366L},
 'usb': {'errors.crc': 3,
         'errors.naks': 5,
         'errors.sequence': 0,
         'errors.timeouts': 1,
         'packets.received': 1205L,
         'packets.transmit': 1213L}}

battery status and reservoir started

As I am working through what data would be useful for someone to see on a regular basis as part of a push notification, alarm, or a query, I was thinking that battery status and reservoir started date would be of a lot of interest. I think we have the primary interest data which is bolus history (and can subsequently calculate insulin on board), insulin remaining in the reservoir, etc., but as we move forward those pieces of information would be useful. I am happy to help figure that out but Ill need some guidance.

Also, the newer pumps like the 723 actually have insulin on board in the summary now when you hit escape. Does this mean that info would be available to query as well potentially? I am writing an IOB calculator right now from bolus history but if the newer pumps have it is even easier.

Any insights would be great - thanks!


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

I changed to Beaglebone, but still with problems...

Hello,

I changed to Beaglebone to start experimenting with the code and it seems the USB stick runs are ok, but not the pump.

Here is the output:

root@beaglebone:~/decoding-carelink# ./status-quo.sh /dev/ttyUSB0

run all ./status-quo.sh /dev/ttyUSB0

./status-quo.sh

!/bin/bash

make an example of an interesting log worth sharing

CMD="$*"
NAME=$0
export PORT=${1-'/dev/ttyUSB0'}
export SERIAL=${2-'208850'}

. bin/common

run_all 2>&1 | tee status-quo.log

echo "OUT" | tee logs/explain.log
. ./explain-brief.sh | tee -a logs/explain.log
explain_markdown

EOF

Sun Oct 12 16:27:39 UTC 2014

INFO:__main__:howdy! I'm going to take a look at your carelink usb stick.
INFO:link:Link opened serial port: Serial<id=0x1d3770, open=True>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=0.5, xonxoff=False, rtscts=False, dsrdtr=False)
INFO:__main__:PROCESS:OPEN:0.334
INFO:__main__:PROCESS:START:2.615:ProductInfo:0x04
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:__main__:PROCESS:END:32.008:ProductInfo:0x04
INFO:__main__:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:__main__:PROCESS:START:36.679:ProductInfo:0x04
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:__main__:PROCESS:END:63.188:ProductInfo:0x04
INFO:__main__:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:__main__:get signal strength of Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>]
INFO:__main__:PROCESS:START:70.467:SignalStrength:0x06 0x00
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] processing SignalStrength:0x06 0x00)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] sending SignalStrength:0x06 0x00)
INFO:root:usb.write.len: 3
0000   0x06 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0xbf 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:<SignalStrength:0x06 0x00:size(64)>:readSignalStrength:191
INFO:__main__:finished processing SignalStrength:0x06 0x00, 191
INFO:__main__:PROCESS:END:98.401:SignalStrength:0x06 0x00
INFO:__main__:we seem to have found a nice signal strength of: 191
INFO:__main__:test fetching product info Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>]
INFO:__main__:PROCESS:START:105.34:ProductInfo:0x04
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:__main__:PROCESS:END:131.567:ProductInfo:0x04
INFO:__main__:{'description': 'ComLink II',
 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')],
 'product.version': '0.0',
 'rf.freq': '916.5Mhz',
 'serial': '091c00',
 'software.version': '1.16'}
INFO:__main__:get signal strength of Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>]
INFO:__main__:PROCESS:START:144.249:SignalStrength:0x06 0x00
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] processing SignalStrength:0x06 0x00)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] sending SignalStrength:0x06 0x00)
INFO:root:usb.write.len: 3
0000   0x06 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0xbc 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:<SignalStrength:0x06 0x00:size(64)>:readSignalStrength:188
INFO:__main__:finished processing SignalStrength:0x06 0x00, 188
INFO:__main__:PROCESS:END:172.289:SignalStrength:0x06 0x00
INFO:__main__:we seem to have found a nice signal strength of: 188
INFO:__main__:at this point, we could issue remote commands to a medical
    device, let's inspect the interfaces
INFO:__main__:PROCESS:START:178.625:UsbStats:0x05 0x01
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000   0x05 0x01 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x01 0x0d 0x00 0x00 0x01 0x0d 0x01    ........
0010   0x0e 0x01 0x12 0x01 0x0d 0x04 0x00 0x00    ........
0018   0x05 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 269L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 269L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:204.508:UsbStats:0x05 0x01
INFO:__main__:PROCESS:START:207.01:RadioStats:0x05 0x00
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000   0x05 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:233.348:RadioStats:0x05 0x00
INFO:__main__:{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 0L,
           'packets.transmit': 0L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 269L,
         'packets.transmit': 269L}}
INFO:__main__:CLEAR BUFFERS
INFO:__main__:PROCESS:START:249.385:UsbStats:0x05 0x01
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000   0x05 0x01 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x01 0x0f 0x00 0x00 0x01 0x0f 0x01    ........
0010   0x10 0x01 0x14 0x01 0x0f 0x04 0x00 0x00    ........
0018   0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 271L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 271L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:275.126:UsbStats:0x05 0x01
INFO:__main__:PROCESS:START:277.68:RadioStats:0x05 0x00
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000   0x05 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:303.382:RadioStats:0x05 0x00
DEBUG:__main__:INTERFACE STATS:
{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 0L,
           'packets.transmit': 0L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 271L,
         'packets.transmit': 271L}}
INFO:__main__:XXX:clear_buffer[attempt][0]:segments[0],total_segments[0]:raw[0]:BEGIN :first poll
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>]>:STARTING POLL PHASE:attempt:0
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[None] poll_size[0] poll_i[0] command[<RadioStats:0x05 0x00:size(64)>]>:poll:attempt:0
INFO:__main__:PROCESS:START:324.413:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[0] poll_i[0] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[0] poll_i[0] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:353.149:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[1] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]>:poll:attempt:1
INFO:__main__:PROCESS:START:460.746:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[1] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[1] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:489.67:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[2] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]>:poll:attempt:2
INFO:__main__:PROCESS:START:597.287:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[2] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[2] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:626.309:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[3] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]>:poll:attempt:3
INFO:__main__:PROCESS:START:738.711:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[3] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[3] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:807.156:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[4] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]>:poll:attempt:4
INFO:__main__:PROCESS:START:925.494:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[4] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[4] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:995.046:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[5] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]>:poll:attempt:5
INFO:__main__:PROCESS:START:1113.113:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[5] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[5] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:1182.0:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[6] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]>:poll:attempt:6
INFO:__main__:PROCESS:START:1299.822:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[6] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[6] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:1368.778:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
INFO:__main__:Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[6] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]:STOP POLL after 7 attempts:size:0
INFO:__main__:XXX:clear_buffer[attempt][0]:segments[0],total_segments[0]:raw[0]:END first poll 0:SHOULD DOWNLOAD :False
INFO:__main__:PROCESS:START:1491.526:UsbStats:0x05 0x01
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000   0x05 0x01 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x01 0x18 0x00 0x00 0x01 0x18 0x01    ........
0010   0x19 0x01 0x1d 0x01 0x18 0x04 0x00 0x00    ........
0018   0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 280L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 280L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:1569.961:UsbStats:0x05 0x01
INFO:__main__:PROCESS:START:1575.737:RadioStats:0x05 0x00
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000   0x05 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:1646.939:RadioStats:0x05 0x00
INFO:__main__:XXX:clear_buffer[attempt][0]:END:no data:INTERFACE STATS
{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 0L,
           'packets.transmit': 0L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 280L,
         'packets.transmit': 280L}}
INFO:__main__:NO PENDING BUFFER
INFO:__main__:DONE CLEARING BUFFERS
INFO:__main__:PROCESS:START:1697.825:UsbStats:0x05 0x01
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000   0x05 0x01 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x01 0x1a 0x00 0x00 0x01 0x1a 0x01    ........
0010   0x1b 0x01 0x1f 0x01 0x1a 0x04 0x00 0x00    ........
0018   0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 282L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 282L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:1760.676:UsbStats:0x05 0x01
INFO:__main__:PROCESS:START:1766.407:RadioStats:0x05 0x00
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000   0x05 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:1829.546:RadioStats:0x05 0x00
INFO:__main__:INTERFACE STATS:
{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 0L,
           'packets.transmit': 0L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 282L,
         'packets.transmit': 282L}}
INFO:__main__:howdy! all done looking at the stick
real    0m 3.18s
user    0m 1.73s
sys 0m 0.21s
INFO:__main__:howdy! I'm going to take a look at your pump.
INFO:link:Link opened serial port: Serial<id=0xb68fa0d0, open=True>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=0.20000000000000001, xonxoff=False, rtscts=False, dsrdtr=False)
INFO:stick:PROCESS:OPEN:0.177
INFO:stick:PROCESS:START:2.52:ProductInfo:0x04
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:PROCESS:END:34.047:ProductInfo:0x04
INFO:stick:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:PROCESS:START:38.683:ProductInfo:0x04
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:PROCESS:END:65.19:ProductInfo:0x04
INFO:stick:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:get signal strength of Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>]
INFO:stick:PROCESS:START:72.233:SignalStrength:0x06 0x00
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] processing SignalStrength:0x06 0x00)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] sending SignalStrength:0x06 0x00)
INFO:root:usb.write.len: 3
0000   0x06 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0xc0 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:<SignalStrength:0x06 0x00:size(64)>:readSignalStrength:192
INFO:stick:finished processing SignalStrength:0x06 0x00, 192
INFO:stick:PROCESS:END:100.229:SignalStrength:0x06 0x00
INFO:stick:we seem to have found a nice signal strength of: 192
INFO:__main__:setting up to talk with <SERIAL>
INFO:stick:PROCESS:START:106.581:UsbStats:0x05 0x01
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000   0x05 0x01 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x01 0x1f 0x00 0x00 0x01 0x1f 0x01    ........
0010   0x20 0x01 0x24 0x01 0x1f 0x04 0x00 0x00     .$.....
0018   0x05 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 287L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 287L, 'errors.crc': 0}
INFO:stick:PROCESS:END:132.349:UsbStats:0x05 0x01
INFO:stick:PROCESS:START:134.817:RadioStats:0x05 0x00
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000   0x05 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:stick:PROCESS:END:160.955:RadioStats:0x05 0x00
INFO:__main__:{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 0L,
           'packets.transmit': 0L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 287L,
         'packets.transmit': 287L}}
INFO:__main__:BEGIN POWER CONTROL
PowerControl SERIAL <SERIAL>
INFO:__main__:execute attempt: 1
INFO:__main__:session transferring packet
INFO:stick:transmit_packet:write:<TransmitPacket:PowerControl:data:unknown>
INFO:stick:PROCESS:START:183.433:TransmitPacket:PowerControl:data:unknown
INFO:stick:link Stick transmit[TransmitPacket:PowerControl:data:unknown] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:PowerControl:data:unknown>] processing TransmitPacket:PowerControl:data:unknown)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[TransmitPacket:PowerControl:data:unknown] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:PowerControl:data:unknown>] sending TransmitPacket:PowerControl:data:unknown)
Traceback (most recent call last):
  File "decocare/session.py", line 126, in <module>
    session.power_control( )
  File "decocare/session.py", line 80, in power_control
    response = self.query(commands.PowerControl)
  File "decocare/session.py", line 103, in query
    self.execute(command)
  File "decocare/session.py", line 100, in execute
    return super(type(self), self).execute(command)
  File "decocare/session.py", line 34, in execute
    self.transfer( )
  File "decocare/session.py", line 69, in transfer
    return self.stick.transmit_packet(self.command)
  File "/home/root/decoding-carelink/decocare/stick.py", line 844, in transmit_packet
    result = self.process( )
  File "/home/root/decoding-carelink/decocare/stick.py", line 483, in process
    raw = self.send_force_read( )
  File "/home/root/decoding-carelink/decocare/stick.py", line 599, in send_force_read
    self.link.write(reader.format( ))
  File "/home/root/decoding-carelink/decocare/stick.py", line 370, in format
    serial = list(bytearray(self.serial.decode('hex')))
  File "/usr/lib/python2.7/encodings/hex_codec.py", line 42, in hex_decode
    output = binascii.a2b_hex(input)
TypeError: Non-hexadecimal digit found
Command exited with non-zero status 1
real    0m 1.13s
user    0m 0.91s
sys 0m 0.09s
**********************************************************************
File "decocare/commands.py", line 852, in __main__.ReadProfile_STD512
Failed example:
    print json.dumps(schedule[0])
Expected:
    {"start": "00:00:00", "rate": 0.8}
Got:
    {"start": "00:00:00", "rate": 0.80000000000000004}
**********************************************************************
File "decocare/commands.py", line 854, in __main__.ReadProfile_STD512
Failed example:
    print json.dumps(schedule[1])
Expected:
    {"start": "06:30:00", "rate": 0.9500000000000001}
Got:
    {"start": "06:30:00", "rate": 0.95000000000000007}
**********************************************************************
File "decocare/commands.py", line 856, in __main__.ReadProfile_STD512
Failed example:
    print json.dumps(schedule[2])
Expected:
    {"start": "09:30:00", "rate": 1.1}
Got:
    {"start": "09:30:00", "rate": 1.1000000000000001}
**********************************************************************
File "decocare/commands.py", line 858, in __main__.ReadProfile_STD512
Failed example:
    print json.dumps(schedule[3])
Expected:
    {"start": "14:00:00", "rate": 0.9500000000000001}
Got:
    {"start": "14:00:00", "rate": 0.95000000000000007}
**********************************************************************
1 items had failures:
   4 of   7 in __main__.ReadProfile_STD512
***Test Failed*** 4 failures.
INFO:__main__:howdy! I'm going to take a look at your pump and grab lots of info.
INFO:link:Link opened serial port: Serial<id=0x316db0, open=True>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=0.40000000000000002, xonxoff=False, rtscts=False, dsrdtr=False)
INFO:stick:PROCESS:OPEN:0.181
INFO:stick:PROCESS:START:2.516:ProductInfo:0x04
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:PROCESS:END:29.179:ProductInfo:0x04
INFO:stick:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:PROCESS:START:34.4:ProductInfo:0x04
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:PROCESS:END:60.757:ProductInfo:0x04
INFO:stick:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:get signal strength of Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>]
INFO:stick:PROCESS:START:67.853:SignalStrength:0x06 0x00
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] processing SignalStrength:0x06 0x00)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] sending SignalStrength:0x06 0x00)
INFO:root:usb.write.len: 3
0000   0x06 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0xbe 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:<SignalStrength:0x06 0x00:size(64)>:readSignalStrength:190
INFO:stick:finished processing SignalStrength:0x06 0x00, 190
INFO:stick:PROCESS:END:95.937:SignalStrength:0x06 0x00
INFO:stick:we seem to have found a nice signal strength of: 190
INFO:session:setting up to talk with <SERIAL>
INFO:stick:PROCESS:START:102.43:UsbStats:0x05 0x01
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000   0x05 0x01 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x01 0x24 0x00 0x00 0x01 0x24 0x01    ..$...$.
0010   0x25 0x01 0x29 0x01 0x24 0x04 0x00 0x00    %.).$...
0018   0x05 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 292L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 292L, 'errors.crc': 0}
INFO:stick:PROCESS:END:128.573:UsbStats:0x05 0x01
INFO:stick:PROCESS:START:131.191:RadioStats:0x05 0x00
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000   0x05 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:stick:PROCESS:END:157.453:RadioStats:0x05 0x00
INFO:__main__:{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 0L,
           'packets.transmit': 0L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 292L,
         'packets.transmit': 292L}}
INFO:session:execute attempt: 1
INFO:session:session transferring packet
INFO:stick:transmit_packet:write:<TransmitPacket:ReadPumpModel:data:unknown>
INFO:stick:PROCESS:START:179.271:TransmitPacket:ReadPumpModel:data:unknown
INFO:stick:link Stick transmit[TransmitPacket:ReadPumpModel:data:unknown] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:ReadPumpModel:data:unknown>] processing TransmitPacket:ReadPumpModel:data:unknown)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[TransmitPacket:ReadPumpModel:data:unknown] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:ReadPumpModel:data:unknown>] sending TransmitPacket:ReadPumpModel:data:unknown)
Traceback (most recent call last):
  File "decocare/commands.py", line 1485, in <module>
    log.info('PUMP MODEL: %s' % session.read_model( ))
  File "/home/root/decoding-carelink/decocare/session.py", line 88, in read_model
    model = self.query(commands.ReadPumpModel)
  File "/home/root/decoding-carelink/decocare/session.py", line 103, in query
    self.execute(command)
  File "/home/root/decoding-carelink/decocare/session.py", line 100, in execute
    return super(type(self), self).execute(command)
  File "/home/root/decoding-carelink/decocare/session.py", line 34, in execute
    self.transfer( )
  File "/home/root/decoding-carelink/decocare/session.py", line 69, in transfer
    return self.stick.transmit_packet(self.command)
  File "/home/root/decoding-carelink/decocare/stick.py", line 844, in transmit_packet
    result = self.process( )
  File "/home/root/decoding-carelink/decocare/stick.py", line 483, in process
    raw = self.send_force_read( )
  File "/home/root/decoding-carelink/decocare/stick.py", line 599, in send_force_read
    self.link.write(reader.format( ))
  File "/home/root/decoding-carelink/decocare/stick.py", line 370, in format
    serial = list(bytearray(self.serial.decode('hex')))
  File "/usr/lib/python2.7/encodings/hex_codec.py", line 42, in hex_decode
    output = binascii.a2b_hex(input)
TypeError: Non-hexadecimal digit found
Command exited with non-zero status 1
real    0m 2.80s
user    0m 2.53s
sys 0m 0.13s

Was there an ACK ERROR?

DIAGNOSE CRC

INFO:__main__:howdy! I'm going to take a look at your carelink usb stick.
INFO:link:Link opened serial port: Serial<id=0x1d3770, open=True>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=0.5, xonxoff=False, rtscts=False, dsrdtr=False)
INFO:__main__:PROCESS:OPEN:0.175
INFO:__main__:PROCESS:START:2.48:ProductInfo:0x04
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:__main__:PROCESS:END:31.629:ProductInfo:0x04
INFO:__main__:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:__main__:PROCESS:START:36.492:ProductInfo:0x04
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:__main__:PROCESS:END:62.829:ProductInfo:0x04
INFO:__main__:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:__main__:get signal strength of Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>]
INFO:__main__:PROCESS:START:69.969:SignalStrength:0x06 0x00
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] processing SignalStrength:0x06 0x00)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] sending SignalStrength:0x06 0x00)
INFO:root:usb.write.len: 3
0000   0x06 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0xbe 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:<SignalStrength:0x06 0x00:size(64)>:readSignalStrength:190
INFO:__main__:finished processing SignalStrength:0x06 0x00, 190
INFO:__main__:PROCESS:END:98.158:SignalStrength:0x06 0x00
INFO:__main__:we seem to have found a nice signal strength of: 190
INFO:__main__:test fetching product info Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>]
INFO:__main__:PROCESS:START:105.15:ProductInfo:0x04
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:__main__:PROCESS:END:131.23:ProductInfo:0x04
INFO:__main__:{'description': 'ComLink II',
 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')],
 'product.version': '0.0',
 'rf.freq': '916.5Mhz',
 'serial': '091c00',
 'software.version': '1.16'}
INFO:__main__:get signal strength of Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>]
INFO:__main__:PROCESS:START:144.023:SignalStrength:0x06 0x00
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] processing SignalStrength:0x06 0x00)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] sending SignalStrength:0x06 0x00)
INFO:root:usb.write.len: 3
0000   0x06 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0xc1 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:<SignalStrength:0x06 0x00:size(64)>:readSignalStrength:193
INFO:__main__:finished processing SignalStrength:0x06 0x00, 193
INFO:__main__:PROCESS:END:172.011:SignalStrength:0x06 0x00
INFO:__main__:we seem to have found a nice signal strength of: 193
INFO:__main__:at this point, we could issue remote commands to a medical
    device, let's inspect the interfaces
INFO:__main__:PROCESS:START:178.269:UsbStats:0x05 0x01
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000   0x05 0x01 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x01 0x2b 0x00 0x00 0x01 0x2b 0x01    ..+...+.
0010   0x2c 0x01 0x30 0x01 0x2b 0x04 0x00 0x00    ,.0.+...
0018   0x05 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 299L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 299L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:204.279:UsbStats:0x05 0x01
INFO:__main__:PROCESS:START:206.757:RadioStats:0x05 0x00
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000   0x05 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:232.552:RadioStats:0x05 0x00
INFO:__main__:{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 0L,
           'packets.transmit': 0L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 299L,
         'packets.transmit': 299L}}
INFO:__main__:CLEAR BUFFERS
INFO:__main__:PROCESS:START:248.966:UsbStats:0x05 0x01
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000   0x05 0x01 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x01 0x2d 0x00 0x00 0x01 0x2d 0x01    ..-...-.
0010   0x2e 0x01 0x32 0x01 0x2d 0x04 0x00 0x00    ..2.-...
0018   0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 301L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 301L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:274.756:UsbStats:0x05 0x01
INFO:__main__:PROCESS:START:277.207:RadioStats:0x05 0x00
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000   0x05 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:303.256:RadioStats:0x05 0x00
DEBUG:__main__:INTERFACE STATS:
{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 0L,
           'packets.transmit': 0L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 301L,
         'packets.transmit': 301L}}
INFO:__main__:XXX:clear_buffer[attempt][0]:segments[0],total_segments[0]:raw[0]:BEGIN :first poll
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>]>:STARTING POLL PHASE:attempt:0
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[None] poll_size[0] poll_i[0] command[<RadioStats:0x05 0x00:size(64)>]>:poll:attempt:0
INFO:__main__:PROCESS:START:324.154:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[0] poll_i[0] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[0] poll_i[0] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:353.146:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[1] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]>:poll:attempt:1
INFO:__main__:PROCESS:START:460.698:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[1] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[1] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:494.258:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[2] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]>:poll:attempt:2
INFO:__main__:PROCESS:START:603.956:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[2] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[2] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:637.509:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[3] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]>:poll:attempt:3
INFO:__main__:PROCESS:START:746.472:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[3] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[3] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:783.5:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[4] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]>:poll:attempt:4
INFO:__main__:PROCESS:START:894.143:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[4] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[4] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:934.696:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[5] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]>:poll:attempt:5
INFO:__main__:PROCESS:START:1045.187:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[5] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[5] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:1096.143:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
DEBUG:__main__:<Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[6] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]>:poll:attempt:6
INFO:__main__:PROCESS:START:1214.223:LinkStatus:0x03:status:size=64
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[6] command[<LinkStatus:0x03:status:size=64:size(64)>] processing LinkStatus:0x03:status:size=64)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[6] command[<LinkStatus:0x03:status:size=64:size(64)>] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000   0x03 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00    .U......
0008   0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:__main__:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:__main__:PROCESS:END:1283.147:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:__main__:poll zero, sleeping in POLL, .100
INFO:__main__:Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[6] command[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>]:STOP POLL after 7 attempts:size:0
INFO:__main__:XXX:clear_buffer[attempt][0]:segments[0],total_segments[0]:raw[0]:END first poll 0:SHOULD DOWNLOAD :False
INFO:__main__:PROCESS:START:1406.02:UsbStats:0x05 0x01
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000   0x05 0x01 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x01 0x36 0x00 0x00 0x01 0x36 0x01    ..6...6.
0010   0x37 0x01 0x3b 0x01 0x36 0x04 0x00 0x00    7.;.6...
0018   0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 310L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 310L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:1469.186:UsbStats:0x05 0x01
INFO:__main__:PROCESS:START:1474.994:RadioStats:0x05 0x00
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000   0x05 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:1537.981:RadioStats:0x05 0x00
INFO:__main__:XXX:clear_buffer[attempt][0]:END:no data:INTERFACE STATS
{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 0L,
           'packets.transmit': 0L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 310L,
         'packets.transmit': 310L}}
INFO:__main__:NO PENDING BUFFER
INFO:__main__:DONE CLEARING BUFFERS
INFO:__main__:PROCESS:START:1590.241:UsbStats:0x05 0x01
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000   0x05 0x01 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x01 0x38 0x00 0x00 0x01 0x38 0x01    ..8...8.
0010   0x39 0x01 0x3d 0x01 0x38 0x04 0x00 0x00    9.=.8...
0018   0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 312L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 312L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:1655.439:UsbStats:0x05 0x01
INFO:__main__:PROCESS:START:1661.219:RadioStats:0x05 0x00
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:__main__:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:__main__:link Stick transmit[None] reader[None] download_i[False] status[<LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)>] poll_size[0] poll_i[False] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000   0x05 0x00 0x00                             ...
DEBUG:__main__:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:__main__:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:__main__:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:__main__:PROCESS:END:1708.045:RadioStats:0x05 0x00
INFO:__main__:INTERFACE STATS:
{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 0L,
           'packets.transmit': 0L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 312L,
         'packets.transmit': 312L}}
INFO:__main__:howdy! all done looking at the stick
real    0m 2.74s
user    0m 1.44s
sys 0m 0.16s
INFO:__main__:howdy! I'm going to take a look at your pump download something info.
INFO:link:Link opened serial port: Serial<id=0xb681d290, open=True>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=0.40000000000000002, xonxoff=False, rtscts=False, dsrdtr=False)
INFO:stick:PROCESS:OPEN:0.267
INFO:stick:PROCESS:START:2.519:ProductInfo:0x04
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:PROCESS:END:35.441:ProductInfo:0x04
INFO:stick:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:PROCESS:START:40.069:ProductInfo:0x04
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:PROCESS:END:66.081:ProductInfo:0x04
INFO:stick:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:get signal strength of Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>]
INFO:stick:PROCESS:START:73.076:SignalStrength:0x06 0x00
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] processing SignalStrength:0x06 0x00)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] sending SignalStrength:0x06 0x00)
INFO:root:usb.write.len: 3
0000   0x06 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0xbe 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:<SignalStrength:0x06 0x00:size(64)>:readSignalStrength:190
INFO:stick:finished processing SignalStrength:0x06 0x00, 190
INFO:stick:PROCESS:END:100.8:SignalStrength:0x06 0x00
INFO:stick:we seem to have found a nice signal strength of: 190
INFO:session:setting up to talk with <SERIAL>
INFO:stick:PROCESS:START:107.234:UsbStats:0x05 0x01
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000   0x05 0x01 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x01 0x3d 0x00 0x00 0x01 0x3d 0x01    ..=...=.
0010   0x3e 0x01 0x42 0x01 0x3d 0x04 0x00 0x00    >.B.=...
0018   0x05 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 317L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 317L, 'errors.crc': 0}
INFO:stick:PROCESS:END:134.68:UsbStats:0x05 0x01
INFO:stick:PROCESS:START:137.124:RadioStats:0x05 0x00
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000   0x05 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00    .U......
0008   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0010   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0018   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x01 0x00 0x14 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:stick:PROCESS:END:163.064:RadioStats:0x05 0x00
INFO:__main__:{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 0L,
           'packets.transmit': 0L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 317L,
         'packets.transmit': 317L}}
INFO:stick:PROCESS:OPEN:0.176
INFO:stick:PROCESS:START:2.493:ProductInfo:0x04
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:PROCESS:END:28.193:ProductInfo:0x04
INFO:stick:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:PROCESS:START:32.68:ProductInfo:0x04
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] processing ProductInfo:0x04)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000   0x04 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:PROCESS:END:58.718:ProductInfo:0x04
INFO:stick:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:stick:get signal strength of Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<ProductInfo:0x04:size(64)>]
INFO:stick:PROCESS:START:65.701:SignalStrength:0x06 0x00
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] processing SignalStrength:0x06 0x00)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] sending SignalStrength:0x06 0x00)
INFO:root:usb.write.len: 3
0000   0x06 0x00 0x00                             ...
DEBUG:stick:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000   0x01 0x55 0x00 0xbd 0x1c 0x00 0x00 0x00    .U......
0008   0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b    .ComLink
0010   0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01     II.....
0018   0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00    ........
0020   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0028   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0030   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
0038   0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00    ........
INFO:stick:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:stick:<SignalStrength:0x06 0x00:size(64)>:readSignalStrength:189
INFO:stick:finished processing SignalStrength:0x06 0x00, 189
INFO:stick:PROCESS:END:93.592:SignalStrength:0x06 0x00
INFO:stick:we seem to have found a nice signal strength of: 189
INFO:__main__:read HISTORY DATA
INFO:session:execute attempt: 1
INFO:session:session transferring packet
INFO:stick:transmit_packet:write:<TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:>
INFO:stick:PROCESS:START:106.562:TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:
INFO:stick:link Stick transmit[TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:>] processing TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:>] sending TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:)
Traceback (most recent call last):
  File "decocare/download.py", line 84, in <module>
    downloader.download( )
  File "decocare/download.py", line 24, in download
    self.device.execute(comm)
  File "/home/root/decoding-carelink/decocare/session.py", line 100, in execute
    return super(type(self), self).execute(command)
  File "/home/root/decoding-carelink/decocare/session.py", line 34, in execute
    self.transfer( )
  File "/home/root/decoding-carelink/decocare/session.py", line 69, in transfer
    return self.stick.transmit_packet(self.command)
  File "/home/root/decoding-carelink/decocare/stick.py", line 844, in transmit_packet
    result = self.process( )
  File "/home/root/decoding-carelink/decocare/stick.py", line 483, in process
    raw = self.send_force_read( )
  File "/home/root/decoding-carelink/decocare/stick.py", line 599, in send_force_read
    self.link.write(reader.format( ))
  File "/home/root/decoding-carelink/decocare/stick.py", line 370, in format
    serial = list(bytearray(self.serial.decode('hex')))
  File "/usr/lib/python2.7/encodings/hex_codec.py", line 42, in hex_decode
    output = binascii.a2b_hex(input)
TypeError: Non-hexadecimal digit found
Command exited with non-zero status 1
real    0m 1.20s
user    0m 0.91s
sys 0m 0.13s

OUT

Observations

Sun Oct 12 16:27:51 UTC 2014

stick

  • stick runs appear to be ok

pump

downloaded: 0

commands session:finished: 0

howdy! pump runs were NOT OK

Last send command

INFO:stick:link Stick transmit[TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:>] processing TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:>] sending TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:)
Traceback (most recent call last):

stats before traceback

154:INFO:stick:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 292L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 292L, 'errors.crc': 0}
174:INFO:stick:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
176:INFO:__main__:{'radio': {'errors.crc': 0,
177:           'errors.naks': 0,
178:           'errors.sequence': 0,
179:           'errors.timeouts': 0,
180:           'packets.received': 0L,
181:           'packets.transmit': 0L},
182: 'usb': {'errors.crc': 0,
183:         'errors.naks': 0,
184:         'errors.sequence': 0,
185:         'errors.timeouts': 0,
186:         'packets.received': 292L,
187:         'packets.transmit': 292L}}
365:INFO:__main__:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 299L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 299L, 'errors.crc': 0}
385:INFO:__main__:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
387:INFO:__main__:{'radio': {'errors.crc': 0,
388:           'errors.naks': 0,
389:           'errors.sequence': 0,
390:           'errors.timeouts': 0,

Traceback

         'packets.transmit': 287L}}
INFO:__main__:BEGIN POWER CONTROL
PowerControl SERIAL <SERIAL>
INFO:__main__:execute attempt: 1
INFO:__main__:session transferring packet
INFO:stick:transmit_packet:write:<TransmitPacket:PowerControl:data:unknown>
INFO:stick:PROCESS:START:183.433:TransmitPacket:PowerControl:data:unknown
INFO:stick:link Stick transmit[TransmitPacket:PowerControl:data:unknown] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:PowerControl:data:unknown>] processing TransmitPacket:PowerControl:data:unknown)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[TransmitPacket:PowerControl:data:unknown] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:PowerControl:data:unknown>] sending TransmitPacket:PowerControl:data:unknown)
Traceback (most recent call last):
  File "decocare/session.py", line 126, in <module>
    session.power_control( )
  File "decocare/session.py", line 80, in power_control
    response = self.query(commands.PowerControl)
  File "decocare/session.py", line 103, in query
    self.execute(command)
  File "decocare/session.py", line 100, in execute
    return super(type(self), self).execute(command)
  File "decocare/session.py", line 34, in execute
    self.transfer( )
  File "decocare/session.py", line 69, in transfer
    return self.stick.transmit_packet(self.command)
  File "/home/root/decoding-carelink/decocare/stick.py", line 844, in transmit_packet
    result = self.process( )
  File "/home/root/decoding-carelink/decocare/stick.py", line 483, in process
--
         'errors.timeouts': 0,
         'packets.received': 292L,
         'packets.transmit': 292L}}
INFO:session:execute attempt: 1
INFO:session:session transferring packet
INFO:stick:transmit_packet:write:<TransmitPacket:ReadPumpModel:data:unknown>
INFO:stick:PROCESS:START:179.271:TransmitPacket:ReadPumpModel:data:unknown
INFO:stick:link Stick transmit[TransmitPacket:ReadPumpModel:data:unknown] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:ReadPumpModel:data:unknown>] processing TransmitPacket:ReadPumpModel:data:unknown)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[TransmitPacket:ReadPumpModel:data:unknown] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:ReadPumpModel:data:unknown>] sending TransmitPacket:ReadPumpModel:data:unknown)
Traceback (most recent call last):
  File "decocare/commands.py", line 1485, in <module>
    log.info('PUMP MODEL: %s' % session.read_model( ))
  File "/home/root/decoding-carelink/decocare/session.py", line 88, in read_model
    model = self.query(commands.ReadPumpModel)
  File "/home/root/decoding-carelink/decocare/session.py", line 103, in query
    self.execute(command)
  File "/home/root/decoding-carelink/decocare/session.py", line 100, in execute
    return super(type(self), self).execute(command)
  File "/home/root/decoding-carelink/decocare/session.py", line 34, in execute
    self.transfer( )
  File "/home/root/decoding-carelink/decocare/session.py", line 69, in transfer
    return self.stick.transmit_packet(self.command)
  File "/home/root/decoding-carelink/decocare/stick.py", line 844, in transmit_packet
    result = self.process( )
  File "/home/root/decoding-carelink/decocare/stick.py", line 483, in process
--
INFO:stick:PROCESS:END:93.592:SignalStrength:0x06 0x00
INFO:stick:we seem to have found a nice signal strength of: 189
INFO:__main__:read HISTORY DATA
INFO:session:execute attempt: 1
INFO:session:session transferring packet
INFO:stick:transmit_packet:write:<TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:>
INFO:stick:PROCESS:START:106.562:TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:
INFO:stick:link Stick transmit[TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:>] processing TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:)
INFO:stick:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:stick:link Stick transmit[TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:>] sending TransmitPacket:ReadHistoryData:size[1024]:[page][0]:data[0]:)
Traceback (most recent call last):
  File "decocare/download.py", line 84, in <module>
    downloader.download( )
  File "decocare/download.py", line 24, in download
    self.device.execute(comm)
  File "/home/root/decoding-carelink/decocare/session.py", line 100, in execute
    return super(type(self), self).execute(command)
  File "/home/root/decoding-carelink/decocare/session.py", line 34, in execute
    self.transfer( )
  File "/home/root/decoding-carelink/decocare/session.py", line 69, in transfer
    return self.stick.transmit_packet(self.command)
  File "/home/root/decoding-carelink/decocare/stick.py", line 844, in transmit_packet
    result = self.process( )
  File "/home/root/decoding-carelink/decocare/stick.py", line 483, in process
    raw = self.send_force_read( )
  File "/home/root/decoding-carelink/decocare/stick.py", line 599, in send_force_read
  • NO CRC ERROR FOUND
  • no nak found
  • NOT A CLEAN RUN

mm-temp-basal says CRITICAL but sets temp basal

pi@raspberrypi ~/decoding-carelink/bin $ python mm-temp-basals.py --port /dev/ttyUSB0 --serial 639191 set --duration 120 --rate 0.1

do stuff with an insulin pump over RF

using Namespace(command='set', dryrun=False, duration=120, init=False, no_postlude=False, no_prelude=False, no_rf_prelude=False, port='/dev/ttyUSB0', rate=0.1, serial='639191', verbose=None)

{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 315L,
           'packets.transmit': 324L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 1,
         'packets.received': 777L,
         'packets.transmit': 777L}}

PUMP MODEL: ReadPumpModel:size[64]:data:'715'

WARNING:decocare.stick:bad zero CRC?
response: ReadBasalTemp:size[64]:data:{'duration': 0, 'rate': 0.0}

decoded:

{'duration': 0, 'rate': 0.0}

CRITICAL:decocare.session:this seems like a problem
response: TempBasal:size[64]:data:bytearray(b'\x00')
hexdump:

0000   0x00                                       .

decoded:

bytearray(b'\x00')

response: ReadBasalTemp:size[64]:data:{'duration': 120, 'rate': 0.1}

decoded:

{'duration': 120, 'rate': 0.1}

end stats

{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 320L,
           'packets.transmit': 329L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 1,
         'packets.received': 791L,
         'packets.transmit': 791L}}

pi@raspberrypi ~/decoding-carelink/bin $ python mm-temp-basals.py --init --port /dev/ttyUSB0 --serial 639191 query

do stuff with an insulin pump over RF

using Namespace(command='query', dryrun=False, duration=0, init=True, no_postlude=False, no_prelude=False, no_rf_prelude=False, port='/dev/ttyUSB0', rate=0, serial='639191', verbose=None)

{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 320L,
           'packets.transmit': 329L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 1,
         'packets.received': 796L,
         'packets.transmit': 796L}}
PowerControl SERIAL 639191

PUMP MODEL: ReadPumpModel:size[64]:data:'715'

response: ReadBasalTemp:size[64]:data:{'duration': 120, 'rate': 0.1}

decoded:

{'duration': 120, 'rate': 0.1}

end stats

{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 0,
           'packets.received': 324L,
           'packets.transmit': 333L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 1,
         'packets.received': 807L,
         'packets.transmit': 807L}}

</code>

unabsorbedinsulin: variable size record

UnabsorbedInsulin

The head is two bytes, there is no date/time, making it a unique record.
Given a record header of 0x5c 0x08, the total record length is 8, and there are 6 bytes in the body:

# two byte header
#8 byte record size
bytearray([ 0x5c, 0x08,
                  # means body of 6 bytes
                  0x32, 0x4e, 0x04,
                  0x26, 0x58, 0x04, ])

Each unabsorbed record is a 3 byte record encoding the amount, age, and curve.
The amount needs to be divided by the pump model's strokes per unit in order to determine the number of units of insulin.

In the above example, since there are 6 bytes in the body, we know that there are 2 records:

  >>> print pformat(rec.parse( UnabsorbedInsulinBolus._test_1 ))
  [{'age': 78, 'amount': 1.25, 'curve': 4},
   {'age': 88, 'amount': 0.95, 'curve': 4}]

The body should always be a multiple of three bytes, thus the record size in general will always be the 2 byte header + some multiple of 3.

Problems when running on a Raspberry Pi

Hello,

I am having trouble connecting to the Medtronic Pump ( Paradigm Veo ).

When running
python decocare/stick.py /dev/ttyUSB0

I get:

INFO:main:howdy! I'm going to take a look at your carelink usb stick.
INFO:link:Link opened serial port: Serial<id=0x13d9cf0, open=True>(port='/dev/ttyUSB0', baudrate=9600, bytesize=8, parity='N', stopbits=1, timeout=0.5, xonxoff=False, rtscts=False, dsrdtr=False)
INFO:main:PROCESS:OPEN:2.203
INFO:main:PROCESS:START:4.995:ProductInfo:0x04
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[ProductInfo:0x04:size(64)] processing ProductInfo:0x04)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[ProductInfo:0x04:size(64)] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000 0x04 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00 .U......
0008 0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b .ComLink
0010 0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01 II.....
0018 0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:main:PROCESS:END:43.326:ProductInfo:0x04
INFO:main:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:main:PROCESS:START:49.361:ProductInfo:0x04
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[ProductInfo:0x04:size(64)] processing ProductInfo:0x04)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[ProductInfo:0x04:size(64)] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000 0x04 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00 .U......
0008 0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b .ComLink
0010 0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01 II.....
0018 0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:main:PROCESS:END:84.515:ProductInfo:0x04
INFO:main:{'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:main:get signal strength of Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[ProductInfo:0x04:size(64)]
INFO:main:PROCESS:START:93.62:SignalStrength:0x06 0x00
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] processing SignalStrength:0x06 0x00)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] sending SignalStrength:0x06 0x00)
INFO:root:usb.write.len: 3
0000 0x06 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0xbf 0x1c 0x00 0x00 0x00 .U......
0008 0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b .ComLink
0010 0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01 II.....
0018 0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:<SignalStrength:0x06 0x00:size(64)>:readSignalStrength:191
INFO:main:finished processing SignalStrength:0x06 0x00, 191
INFO:main:PROCESS:END:129.955:SignalStrength:0x06 0x00
INFO:main:we seem to have found a nice signal strength of: 191
INFO:main:test fetching product info Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>]
INFO:main:PROCESS:START:139.586:ProductInfo:0x04
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[ProductInfo:0x04:size(64)] processing ProductInfo:0x04)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[ProductInfo:0x04:size(64)] sending ProductInfo:0x04)
INFO:root:usb.write.len: 3
0000 0x04 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x09 0x1c 0x00 0x00 0x00 .U......
0008 0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b .ComLink
0010 0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01 II.....
0018 0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:finished processing ProductInfo:0x04, {'description': 'ComLink II', 'software.version': '1.16', 'interfaces': [(0, 'Paradigm RF'), (1, 'USB')], 'product.version': '0.0', 'rf.freq': '916.5Mhz', 'serial': '091c00'}
INFO:main:PROCESS:END:172.931:ProductInfo:0x04
INFO:main:{'description': 'ComLink II',
'interfaces': [(0, 'Paradigm RF'), (1, 'USB')],
'product.version': '0.0',
'rf.freq': '916.5Mhz',
'serial': '091c00',
'software.version': '1.16'}
INFO:main:get signal strength of Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[ProductInfo:0x04:size(64)]
INFO:main:PROCESS:START:193.123:SignalStrength:0x06 0x00
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] processing SignalStrength:0x06 0x00)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<SignalStrength:0x06 0x00:size(64)>] sending SignalStrength:0x06 0x00)
INFO:root:usb.write.len: 3
0000 0x06 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0xc2 0x1c 0x00 0x00 0x00 .U......
0008 0x00 0x43 0x6f 0x6d 0x4c 0x69 0x6e 0x6b .ComLink
0010 0x20 0x49 0x49 0x01 0x10 0x02 0x00 0x01 II.....
0018 0x01 0x03 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:<SignalStrength:0x06 0x00:size(64)>:readSignalStrength:194
INFO:main:finished processing SignalStrength:0x06 0x00, 194
INFO:main:PROCESS:END:228.613:SignalStrength:0x06 0x00
INFO:main:we seem to have found a nice signal strength of: 194
INFO:main:at this point, we could issue remote commands to a medical
device, let's inspect the interfaces
INFO:main:PROCESS:START:237.29:UsbStats:0x05 0x01
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000 0x05 0x01 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00 .U......
0008 0x00 0x00 0x7d 0x00 0x00 0x00 0x7d 0x00 ..}...}.
0010 0x7e 0x00 0xfa 0x00 0x7d 0x04 0x00 0x00 ~...}...
0018 0x05 0x03 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 125L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 125L, 'errors.crc': 0}
INFO:main:PROCESS:END:271.032:UsbStats:0x05 0x01
INFO:main:PROCESS:START:274.077:RadioStats:0x05 0x00
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000 0x05 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00 .U......
0008 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0010 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0018 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:main:PROCESS:END:307.889:RadioStats:0x05 0x00
INFO:main:{'radio': {'errors.crc': 0,
'errors.naks': 0,
'errors.sequence': 0,
'errors.timeouts': 0,
'packets.received': 0L,
'packets.transmit': 0L},
'usb': {'errors.crc': 0,
'errors.naks': 0,
'errors.sequence': 0,
'errors.timeouts': 0,
'packets.received': 125L,
'packets.transmit': 125L}}
INFO:main:CLEAR BUFFERS
INFO:main:PROCESS:START:336.626:UsbStats:0x05 0x01
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000 0x05 0x01 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00 .U......
0008 0x00 0x00 0x7f 0x00 0x00 0x00 0x7f 0x00 ........
0010 0x80 0x00 0xfe 0x00 0x7f 0x04 0x00 0x00 ........
0018 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 127L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 127L, 'errors.crc': 0}
INFO:main:PROCESS:END:370.152:UsbStats:0x05 0x01
INFO:main:PROCESS:START:374.031:RadioStats:0x05 0x00
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000 0x05 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00 .U......
0008 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0010 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0018 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:main:PROCESS:END:408.926:RadioStats:0x05 0x00
DEBUG:main:INTERFACE STATS:
{'radio': {'errors.crc': 0,
'errors.naks': 0,
'errors.sequence': 0,
'errors.timeouts': 0,
'packets.received': 0L,
'packets.transmit': 0L},
'usb': {'errors.crc': 0,
'errors.naks': 0,
'errors.sequence': 0,
'errors.timeouts': 0,
'packets.received': 127L,
'packets.transmit': 127L}}
INFO:main:XXX:clear_buffer[attempt][0]:segments[0],total_segments[0]:raw[0]:BEGIN :first poll
DEBUG:main:<Stick transmit[None] reader[None] download_i[False] status[None] poll_size[None] poll_i[None] command[<RadioStats:0x05 0x00:size(64)>]>:STARTING POLL PHASE:attempt:0
DEBUG:main:<Stick transmit[None] reader[None] download_i[False] status[None] poll_size[0] poll_i[0] command[<RadioStats:0x05 0x00:size(64)>]>:poll:attempt:0
INFO:main:PROCESS:START:443.806:LinkStatus:0x03:status:size=64
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[0] poll_i[0] command[LinkStatus:0x03:status:size=64:size(64)] processing LinkStatus:0x03:status:size=64)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[None] poll_size[0] poll_i[0] command[LinkStatus:0x03:status:size=64:size(64)] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000 0x03 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00 .U......
0008 0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00 ........
0010 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0018 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:main:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:main:PROCESS:END:480.424:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:main:poll zero, sleeping in POLL, .100
DEBUG:main:<Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[1] command[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)]>:poll:attempt:1
INFO:main:PROCESS:START:590.065:LinkStatus:0x03:status:size=64
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[1] command[LinkStatus:0x03:status:size=64:size(64)] processing LinkStatus:0x03:status:size=64)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[1] command[LinkStatus:0x03:status:size=64:size(64)] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000 0x03 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00 .U......
0008 0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00 ........
0010 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0018 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:main:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:main:PROCESS:END:627.83:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:main:poll zero, sleeping in POLL, .100
DEBUG:main:<Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[2] command[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)]>:poll:attempt:2
INFO:main:PROCESS:START:737.454:LinkStatus:0x03:status:size=64
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[2] command[LinkStatus:0x03:status:size=64:size(64)] processing LinkStatus:0x03:status:size=64)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[2] command[LinkStatus:0x03:status:size=64:size(64)] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000 0x03 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00 .U......
0008 0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00 ........
0010 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0018 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:main:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:main:PROCESS:END:776.246:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:main:poll zero, sleeping in POLL, .100
DEBUG:main:<Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[3] command[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)]>:poll:attempt:3
INFO:main:PROCESS:START:886.022:LinkStatus:0x03:status:size=64
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[3] command[LinkStatus:0x03:status:size=64:size(64)] processing LinkStatus:0x03:status:size=64)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[3] command[LinkStatus:0x03:status:size=64:size(64)] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000 0x03 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00 .U......
0008 0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00 ........
0010 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0018 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:main:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:main:PROCESS:END:925.597:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:main:poll zero, sleeping in POLL, .100
DEBUG:main:<Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[4] command[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)]>:poll:attempt:4
INFO:main:PROCESS:START:1035.194:LinkStatus:0x03:status:size=64
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[4] command[LinkStatus:0x03:status:size=64:size(64)] processing LinkStatus:0x03:status:size=64)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[4] command[LinkStatus:0x03:status:size=64:size(64)] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000 0x03 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00 .U......
0008 0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00 ........
0010 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0018 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:main:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:main:PROCESS:END:1074.381:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:main:poll zero, sleeping in POLL, .100
DEBUG:main:<Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[5] command[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)]>:poll:attempt:5
INFO:main:PROCESS:START:1183.929:LinkStatus:0x03:status:size=64
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[5] command[LinkStatus:0x03:status:size=64:size(64)] processing LinkStatus:0x03:status:size=64)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[5] command[LinkStatus:0x03:status:size=64:size(64)] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000 0x03 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00 .U......
0008 0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00 ........
0010 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0018 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:main:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:main:PROCESS:END:1221.475:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:main:poll zero, sleeping in POLL, .100
DEBUG:main:<Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[6] command[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)]>:poll:attempt:6
INFO:main:PROCESS:START:1330.723:LinkStatus:0x03:status:size=64
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[6] command[LinkStatus:0x03:status:size=64:size(64)] processing LinkStatus:0x03:status:size=64)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[6] command[LinkStatus:0x03:status:size=64:size(64)] sending LinkStatus:0x03:status:size=64)
INFO:root:usb.write.len: 3
0000 0x03 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x02 0x00 0x00 0x00 .U......
0008 0x05 0x04 0x00 0x00 0x00 0x00 0x00 0x00 ........
0010 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0018 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:['OK']

INFO:main:finished processing LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[], 0
INFO:main:PROCESS:END:1368.497:LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]
DEBUG:main:poll zero, sleeping in POLL, .100
INFO:main:Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[6] command[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)]:STOP POLL after 7 attempts:size:0
INFO:main:XXX:clear_buffer[attempt][0]:segments[0],total_segments[0]:raw[0]:END first poll 0:SHOULD DOWNLOAD :False
INFO:main:PROCESS:START:1480.445:UsbStats:0x05 0x01
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[False] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[False] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000 0x05 0x01 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00 .U......
0008 0x00 0x00 0x88 0x00 0x00 0x00 0x88 0x00 ........
0010 0x89 0x01 0x10 0x00 0x88 0x04 0x00 0x00 ........
0018 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 136L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 136L, 'errors.crc': 0}
INFO:main:PROCESS:END:1516.429:UsbStats:0x05 0x01
INFO:main:PROCESS:START:1520.893:RadioStats:0x05 0x00
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[False] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[False] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000 0x05 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00 .U......
0008 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0010 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0018 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:main:PROCESS:END:1555.239:RadioStats:0x05 0x00
INFO:main:XXX:clear_buffer[attempt][0]:END:no data:INTERFACE STATS
{'radio': {'errors.crc': 0,
'errors.naks': 0,
'errors.sequence': 0,
'errors.timeouts': 0,
'packets.received': 0L,
'packets.transmit': 0L},
'usb': {'errors.crc': 0,
'errors.naks': 0,
'errors.sequence': 0,
'errors.timeouts': 0,
'packets.received': 136L,
'packets.transmit': 136L}}
INFO:main:NO PENDING BUFFER
INFO:main:DONE CLEARING BUFFERS
INFO:main:PROCESS:START:1585.167:UsbStats:0x05 0x01
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[False] command[<UsbStats:0x05 0x01:size(64)>] processing UsbStats:0x05 0x01)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[False] command[<UsbStats:0x05 0x01:size(64)>] sending UsbStats:0x05 0x01)
INFO:root:usb.write.len: 3
0000 0x05 0x01 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00 .U......
0008 0x00 0x00 0x8a 0x00 0x00 0x00 0x8a 0x00 ........
0010 0x8b 0x01 0x14 0x00 0x8a 0x04 0x00 0x00 ........
0018 0x05 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:finished processing UsbStats:0x05 0x01, {'errors.timeouts': 0, 'packets.transmit': 138L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 138L, 'errors.crc': 0}
INFO:main:PROCESS:END:1619.848:UsbStats:0x05 0x01
INFO:main:PROCESS:START:1623.06:RadioStats:0x05 0x00
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[False] command[<RadioStats:0x05 0x00:size(64)>] processing RadioStats:0x05 0x00)
INFO:main:send_force_read: attempt 0/5 send command, read until we get something within some timeout
INFO:main:link Stick transmit[None] reader[None] download_i[False] status[LinkStatus:0x03:status:size=??LinkStatus:error:True:reason:[]:size(0)] poll_size[0] poll_i[False] command[<RadioStats:0x05 0x00:size(64)>] sending RadioStats:0x05 0x00)
INFO:root:usb.write.len: 3
0000 0x05 0x00 0x00 ...
DEBUG:main:sleeping 0.001
INFO:root:usb.read.len: 64
INFO:root:usb.read.raw:
0000 0x01 0x55 0x00 0x00 0x00 0x00 0x00 0x00 .U......
0008 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0010 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0018 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0020 0x00 0x01 0x00 0x0a 0x00 0x00 0x00 0x00 ........
0028 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0030 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
0038 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 ........
INFO:main:quit send_force_read, found len: 64 expected 64 after 0 attempts
INFO:main:finished processing RadioStats:0x05 0x00, {'errors.timeouts': 0, 'packets.transmit': 0L, 'errors.naks': 0, 'errors.sequence': 0, 'packets.received': 0L, 'errors.crc': 0}
INFO:main:PROCESS:END:1659.514:RadioStats:0x05 0x00
INFO:main:INTERFACE STATS:
{'radio': {'errors.crc': 0,
'errors.naks': 0,
'errors.sequence': 0,
'errors.timeouts': 0,
'packets.received': 0L,
'packets.transmit': 0L},
'usb': {'errors.crc': 0,
'errors.naks': 0,
'errors.sequence': 0,
'errors.timeouts': 0,
'packets.received': 138L,
'packets.transmit': 138L}}

INFO:main:howdy! all done looking at the stick

An when running
sudo ./status-quo.sh /dev/ttyUSB0 SERIALNUMBER

I get:

run all ./status-quo.sh /dev/ttyUSB0 SERIALNUMBER

./status-quo.sh

!/bin/bash

make an example of an interesting log worth sharing

CMD="$*"
NAME=$0
export PORT=${1-'/dev/ttyUSB0'}
export SERIAL=${2-'208850'}

. bin/common

run_all 2>&1 | tee status-quo.log

echo "OUT" | tee logs/explain.log
. ./explain-brief.sh | tee -a logs/explain.log
explain_markdown

EOF

Mon Oct 6 13:06:05 UTC 2014

bin/common: line 36: time: command not found
bin/common: line 46: time: command not found
bin/common: line 51: time: command not found

Was there an ACK ERROR?

DIAGNOSE CRC

bin/common: line 41: time: command not found
bin/common: line 57: time: command not found

OUT

Observations

Mon Oct 6 13:06:05 UTC 2014

stick

  • not ok

pump

downloaded: 0

commands session:finished: 0

howdy! pump runs were NOT OK

Last send command

stats before traceback

Traceback

  • NO CRC ERROR FOUND
  • no nak found

* NOT A CLEAN RUN

USB issue ubuntu/vmware

Hi - Im trying to run decocare on the latest version of ubuntu under vmware on my mac using the bayer stick. I can see the stick if I do an lsusb, but it doesnt seem to exist under /dev/ttyUSB*, 0 or otherwise. I can also see the stick is installed under vmware's USB settings. I had a similar problem when I tried to run it directly from terminal on my mac.

If I do dmesg | grep ttyUSB I get no response. Mac os is 10.9.5 but that shouldnt matter since Im running vmware.

Any help would be great clearly Im doing something wrong!

Output decoded ReadProfile info

Is there a script to retrieve the details of the current basal profile? If not, please consider this a feature request. :-)

how to run on Mac?

It should run on mac osx. The main trick is in getting the OS to use some kind of generic usb serial driver.

The FTDI VCP driver does not work. I have not tried with Prolific yet.
Apple docs indicate that they have one.
Medtronic actually uses jungo's serial windriver. There is a tool called wdreg which inserts the module into the kernel to create a serial device, but I haven't been able to test fully.

Newest data not available when flipping page.

Hello @bewest,

I am building a notifier based on decoding-carelink ( https://github.com/bustavo/carelink_notificator )

The code is Ruby based as I had mentioned before. Until now it covers my needs ( except for the part where sometimes I lose range ), but found out today that when my pump turns to a new page to start storing data, the newest GlucoseSensorData gets lost. When trying to read the page before the neweset one, I get data from 2 hours ago.

Is this a bug? or is there a different place where the info gets stored once the pump starts on a new page?

Thanks!!!


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

mm-send-comm.py sleep 1 returns 0 regardless of errors

I'm trying to run something like:
mm-send-comm.py sleep 1 && echo "Already initialized" || mm-send-comm.py --init sleep 1
to check if the pump is already initialized before trying to do so. But mm-send-comm.py always returns 0, no matter whether it can talk to the pump or not.

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/7015751-mm-send-comm-py-sleep-1-returns-0-regardless-of-errors?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github).

Support Contour Next Link USB in addition to CareLink USB stick

MedTronic just rolled out a new version of CareLink, which supports data uploads using the Contour Next Link USB meter. This device works on USB 3 ports, while the old CareLink stick won't. There's no official word but I'd assume the old CareLink stick is deprecated in favor of Next Link. (The new meter seems to have been on cheap offer lately as well.)

Some Bolus History Data Not Correct From mm-latest.py3

In reading the data from a 723 pump, I m getting 90%+ of the bolus history correct from mm-latest.py, but a couple of data points are well off. Here is an example.

Here, the bolus amount should be 11 units, and the carb ratio should be 9. I attached a jpg of the pump bolus history itself below. Again, most of the bolus data points are perfect.

I am trying to get bolus history to do on board insulin calculations hence my need for the data.

Newer pumps like the 723 do have this as a parameter and that may be easier to get, but I am not sure where to start in terms of figuring out a new command. Im guessing its in there somewhere.

Thanks for any help / insights into either why the bolus history is wrong or how to grab the onboard insulin number.

{
"_type": "BolusWizard",
"bg": 0,
"bg_target_high": 90,
"_description": "BolusWizard 2014-11-08T10:11:57 head[2], body[15] op[0x5b]",
"timestamp": "2014-11-08T10:11:57",
"sensitivity": 65,
"bg_target_low": 110,
"carb_ratio": 12.0,
"food_estimate": 4.7,
"unabsorbed_insulin_total": 0.0,
"correction_estimate": 0.0,
"carb_input": 100,
"bolus_estimate": 4.7
},
{
"_type": "Bolus",
"_description": "Bolus 2014-11-08T10:11:57 head[8], body[0] op[0x01]",
"timestamp": "2014-11-08T10:11:57",
"programmed": 4.7,
"amount": 4.7,
"unabsorbed": 0.0,
"duration": 0,
"type": "normal"

img_9637

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/5867720-some-bolus-history-data-not-correct-from-mm-latest-py3?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github).

Output bolus wizard settings to json

Could we add bolus wizard settings like sensitivity, bg_target_low, and bg_target_high to the --settings-out output? Alternately, we could add another --bolus-settings-out type flag. Seems like they really belong in --settings-out though.

Setup for New User

Hello @bewest, I'm very proud of the work you've done thus far, thank you from a Type I owner of a Minimed 523!

I received a never-used carelink recently, and run Ubuntu 14.04 with 3.16 kernel, trying to connect my pump for the first time.

Can't seem to get it to go, I've installed everything but cannot get past "python decocare/stick.py /dev/ttyUSB0" as you can see in the captured log here: http://paste.ubuntu.com/10738995/

I'm noticing a lot of these in syslog: "kernel: [57091.695561] generic ttyUSB0: usb_serial_generic_write_bulk_callback - urb stopped: -32" perhaps these are related?

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/10474394-setup-for-new-user?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github).

Improve error messages when pump is out of range or not responding

pi@raspberrypi ~/decoding-carelink $ mm-send-comm.py tweak ReadHistoryData --page 0 --save

do stuff with an insulin pump over RF

using Namespace(begin=None, bytesPerRecord=None, command='tweak', descr=None, dryrun=False, effectTime=None, end=None, init=False, maxRecords=None, name=None, no_postlude=False, no_prelude=False, no_rf_prelude=False, other='ReadHistoryData', page=0, params=None, port='/dev/ttyUSB0', postfix=None, prefix=None, prefix_path='', save=True, saveall=False, serial='<removed>', verbose=None)

{'radio': {'errors.crc': 0,
           'errors.naks': 0,
           'errors.sequence': 0,
           'errors.timeouts': 9,
           'packets.received': 194L,
           'packets.transmit': 211L},
 'usb': {'errors.crc': 0,
         'errors.naks': 0,
         'errors.sequence': 0,
         'errors.timeouts': 0,
         'packets.received': 556L,
         'packets.transmit': 556L}}
ERROR:decocare.stick:size (0) is less than 64 and not 15, which may cause an error.
CRITICAL:decocare.stick:FAILED TO DOWNLOAD ANYTHING, after 4  expected:64
ERROR:decocare.stick:ReadRadio ACK is zero bytes!
Traceback (most recent call last):
  File "/usr/local/bin/mm-send-comm.py", line 8, in <module>
    app.run(None)
  File "/home/pi/decoding-carelink/decocare/helpers/cli.py", line 103, in run
    self.prelude(args)
  File "/home/pi/decoding-carelink/decocare/helpers/cli.py", line 140, in prelude
    model = pump.read_model( )
  File "/home/pi/decoding-carelink/decocare/session.py", line 88, in read_model
    model = self.query(commands.ReadPumpModel)
  File "/home/pi/decoding-carelink/decocare/session.py", line 103, in query
    self.execute(command)
  File "/home/pi/decoding-carelink/decocare/session.py", line 100, in execute
    return super(type(self), self).execute(command)
  File "/home/pi/decoding-carelink/decocare/session.py", line 38, in execute
    self.download( )
  File "/home/pi/decoding-carelink/decocare/session.py", line 51, in download
    data = self.stick.download( )
  File "/home/pi/decoding-carelink/decocare/stick.py", line 743, in download
    data = self.download_packet(size)
  File "/home/pi/decoding-carelink/decocare/stick.py", line 655, in download_packet
    ack, response = self.command.respond(raw)
  File "/home/pi/decoding-carelink/decocare/stick.py", line 267, in respond
    raise AckError("ACK is 0 bytes: %s" % lib.hexdump(raw))
decocare.errors.AckError: ACK is 0 bytes:

<bountysource-plugin>

---
Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/6451810-improve-error-messages-when-pump-is-out-of-range-or-not-responding?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github).
</bountysource-plugin>
--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/6451810-improve-error-messages-when-pump-is-out-of-range-or-not-responding?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F522759&utm_medium=issues&utm_source=github).

how to run on windows?

Opening this is a discussion place holder for people wanting to run on windows.

From what I understand things should work on Windows, the trick is:
a. Getting the OS to create a serial device (it can be observed in the Hardware Manager)
b. Giving the correct name of the serial device to the scripts.

The name is something like \\\\USB.\\\MedtronicMMT.... or something like that.
I believe what is happening is that Medtronic's own driver automatically creates the serial device, and puts it in the system registry.

It should be possible to query the Windows registry to find/identify/locate the correct port argument, which would allow users to use the auto-scanning feature by default.

Here are some more details:


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

how does pump command `PowerControl 93` work

Do all sessions require using PowerControl command?

There is a ComLink2 command with opcode 93 referred to here as PowerControl

  • is it necessary to disconnect before using?
  • how long do the sessions last?
  • should pump be suspended?
  • are there error signals that indicate auditing is not safe?

Documentation

Hi !

At first I must say you have all done a wonderful job with this project, there is quite a lot of data available, but for someone who has to do this again in some other language (java) and from zero so to speak, it's not so easy...

If I haven't "bugged" @bewest whole weekend I would have a really hard time making it...

What needs to be in documentation (at least what helped me):

  • how data needs to be decoded (sequentaly, delimited with opCodes, and each response package/message for itself)
  • how dates are encoded
  • special entries like UnabsorbedInsulin
  • list of opcodes for Pump History Data and for CGMS History Data. I used file history.csv in doc, problem is that that list is not correct (different sizes for different pump types), at least not for all types of devices (which I learned at later time) and there is no such list for CGMS entries..
  • how analysis data can be converted back into binary packages, for testing...

Take care,
Andy


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Add an --init-on-fail option

On commands that require a recent --init to work, we should have an option (maybe called --init-on-fail or similar) that tries the command without --init first (since that's much faster if it works) and then does an --init if that fails on the first try. We should also make it possible to to get the behavior without a command-line argument, maybe by reading some sort of environment variable (maybe INIT_ON_FAIL=true).

Thoughts?

Ability to Suspend and Resume Pump

It would be fantastic to have commands to suspend and resume the pump. When my 722 downloads the history to carelink.mm.com it suspends the pump, downloads the history, and then resumes the pump. Having the suspend and resume would allow for computerized control of insulin delivery which could fill many uses. Hopefully these commands could be built by looking at the USB interactions via USBlyzer or similar tool.

determine latest insulin usage

read insulin remaining / insulin delivered in the last x minutes
A feature request from a friend.

InsulinRemaining is implemented, several log-fetching commands are also implemented.

All the commands appear to be implemented ok, but it would help to come up with a list of exactly which commands to run in order to figure out latest activity, which a special emphasis on "insulin used in last $x minutes."

Minimed Revel 723 compatibility

Has anyone tried this yet with this model (MMT-723NAS) of pump? I'm trying what I can with mine, so far almost nothing works past insert.sh. The serial number on my pump isn't just an integer. It's PAR801601H, according to the sticker on the back of my pump. Is there a simple command line tool that can use my carelink to get this kind of info?

date strings should include timezone

It would be convenient if mm-latest.py and friends appended the timezone to date strings (inferred from the locale info of the machine they're running on). So "2014-12-14T19:03:33" would become "2014-12-14T19:03:33-0800".

analyze data for correctness

@loudnate left us some great data to verify data decoding.

This must be a new pump or something, it came in blank, with lots of NoDelivery errors, and then it looks like everything changes. There are some novel records to be found here, and looks like we'll verify decoding for many.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.