summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2018-01-06 23:59:35 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2018-01-06 23:59:35 +0100
commit005fec07bd69e9b086b3c8a8d2f99309e1709fa8 (patch)
tree51a0bc6f8dcb8a355f16fcb86556f1064884cdc7
parentlifescan binary protocol: make the packet generator a function. (diff)
downloadglucometerutils-005fec07bd69e9b086b3c8a8d2f99309e1709fa8.tar
glucometerutils-005fec07bd69e9b086b3c8a8d2f99309e1709fa8.tar.gz
glucometerutils-005fec07bd69e9b086b3c8a8d2f99309e1709fa8.tar.bz2
glucometerutils-005fec07bd69e9b086b3c8a8d2f99309e1709fa8.tar.lz
glucometerutils-005fec07bd69e9b086b3c8a8d2f99309e1709fa8.tar.xz
glucometerutils-005fec07bd69e9b086b3c8a8d2f99309e1709fa8.tar.zst
glucometerutils-005fec07bd69e9b086b3c8a8d2f99309e1709fa8.zip
-rw-r--r--glucometerutils/drivers/otverioiq.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/glucometerutils/drivers/otverioiq.py b/glucometerutils/drivers/otverioiq.py
index c4e70cf..96b9c93 100644
--- a/glucometerutils/drivers/otverioiq.py
+++ b/glucometerutils/drivers/otverioiq.py
@@ -29,15 +29,17 @@ _PACKET = lifescan_binary_protocol.LifeScanPacket(
_COMMAND_SUCCESS = construct.Const(b'\x06')
-_VERSION_REQUEST = construct.Const(b'\x0d\x02') # Untested
+_VERSION_REQUEST = construct.Const(b'\x0d\x01')
_VERSION_RESPONSE = construct.Struct(
_COMMAND_SUCCESS,
'version' / construct.PascalString(construct.Byte, encoding='ascii'),
+ # NULL-termination is not included in string length.
+ construct.Constant('\x00'),
)
_SERIAL_NUMBER_REQUEST = construct.Const(
- b'\x0b\x00\x02')
+ b'\x0b\x01\x02')
_SERIAL_NUMBER_RESPONSE = construct.Struct(
_COMMAND_SUCCESS,