From 005fec07bd69e9b086b3c8a8d2f99309e1709fa8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Diego=20Elio=20Petten=C3=B2?= Date: Sat, 6 Jan 2018 22:59:35 +0000 Subject: otverioiq: update version and serial number requests. These are now coming from the software trace. The version response is funny though. --- glucometerutils/drivers/otverioiq.py | 6 ++++-- 1 file 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, -- cgit v1.2.3