From 9f4e78b8e55d1a0a1fe6d37e6245160510c57616 Mon Sep 17 00:00:00 2001 From: Red Daly Date: Thu, 19 Jan 2017 23:15:09 +0000 Subject: Open OneTouch Verio devices in readwrite mode by default. Opening the device with read+write permissions is necessary to send write10 SCSI commands. The error message I was receiving was "SG_IO ioctl error; Operation not permitted" when running as non-root. http://sg.danny.cz/sg/sg_io.html describes SCSI permissions in greater depth and helped illuminate the nature of the permissions problem. --- glucometerutils/drivers/otverio2015.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/glucometerutils/drivers/otverio2015.py b/glucometerutils/drivers/otverio2015.py index bcb76d6..80de6ed 100644 --- a/glucometerutils/drivers/otverio2015.py +++ b/glucometerutils/drivers/otverio2015.py @@ -100,7 +100,7 @@ def _convert_timestamp(timestamp): class Device(object): def __init__(self, device): self.device_name_ = device - self.scsi_device_ = SCSIDevice(device) + self.scsi_device_ = SCSIDevice(device, readwrite=True) self.scsi_ = SCSI(self.scsi_device_) self.scsi_.blocksize = _REGISTER_SIZE -- cgit v1.2.3