Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

otverio2015: OSError: [Errno 25] ioctl failed #129

Open
doofy opened this issue Dec 24, 2023 · 2 comments
Open

otverio2015: OSError: [Errno 25] ioctl failed #129

doofy opened this issue Dec 24, 2023 · 2 comments

Comments

@doofy
Copy link

doofy commented Dec 24, 2023

Changed permission with chmod o+rw for /dev/sda but cannot read (neither info nor dump work)

Help! :)

(venv) ➜  glucometerutils git:(main) python glucometer.py --driver otverio2015 --device /dev/sda dump
Traceback (most recent call last):
  File "/home/doofy/git/glucometerutils/glucometer.py", line 10, in <module>
    glucometer.main()
  File "/home/doofy/git/glucometerutils/glucometerutils/glucometer.py", line 118, in main
    device = requested_driver.device(args.device)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/doofy/git/glucometerutils/glucometerutils/drivers/otverio2015.py", line 126, in __init__
    self.scsi_ = SCSI(self.scsi_device_)
                 ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/doofy/git/glucometerutils/venv/lib/python3.11/site-packages/pyscsi/pyscsi/scsi.py", line 58, in __init__
    self.__init_opcode()
  File "/home/doofy/git/glucometerutils/venv/lib/python3.11/site-packages/pyscsi/pyscsi/scsi.py", line 86, in __init_opcode
    self.device.devicetype = self.inquiry().result['peripheral_device_type']
                             ^^^^^^^^^^^^^^
  File "/home/doofy/git/glucometerutils/venv/lib/python3.11/site-packages/pyscsi/pyscsi/scsi.py", line 191, in inquiry
    self.execute(cmd)
  File "/home/doofy/git/glucometerutils/venv/lib/python3.11/site-packages/pyscsi/pyscsi/scsi.py", line 107, in execute
    raise e
  File "/home/doofy/git/glucometerutils/venv/lib/python3.11/site-packages/pyscsi/pyscsi/scsi.py", line 105, in execute
    self.device.execute(cmd)
  File "/home/doofy/git/glucometerutils/venv/lib/python3.11/site-packages/pyscsi/pyscsi/scsi_device.py", line 128, in execute
    sgio.execute(
  File "src/linux_sgio.pyx", line 173, in sgio.execute
OSError: [Errno 25] ioctl failed

edit: I am on NixOS, onetouch connected via Micro USB

edit2:

[17461.893209] usb 1-4: USB disconnect, device number 21
[17467.401673] usb 1-4: new full-speed USB device number 22 using xhci_hcd
[17467.531086] usb 1-4: New USB device found, idVendor=2766, idProduct=1000, bcdDevice= 0.01
[17467.531102] usb 1-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[17467.531109] usb 1-4: Product: OneTouch Select Plus
[17467.531114] usb 1-4: Manufacturer: LifeScan
[17467.531118] usb 1-4: SerialNumber: ECRLH04M
[17467.533966] usb-storage 1-4:1.0: USB Mass Storage device detected
[17467.534756] scsi host0: usb-storage 1-4:1.0
[17468.820986] scsi 0:0:0:0: Direct-Access     LifeScan                       PQ: 0 ANSI: 2
[17468.823880] sd 0:0:0:0: [sda] 261738 512-byte logical blocks: (134 MB/128 MiB)
[17468.825021] sd 0:0:0:0: [sda] Write Protect is off
[17468.825033] sd 0:0:0:0: [sda] Mode Sense: 03 00 00 00
[17468.826104] sd 0:0:0:0: [sda] No Caching mode page found
[17468.826114] sd 0:0:0:0: [sda] Assuming drive cache: write through
[17468.850535]  sda:
[17468.851743] sd 0:0:0:0: [sda] Attached SCSI removable disk
@Flameeyes
Copy link
Collaborator

Has something tried to mount the drive? I haven't seen this happening before, and errno 25 is "Inappropriate ioctl for device" which is surprising.

I won't be able to test this until next month unfortunately :(

@andyrozman
Copy link

@Flameeyes

I am experiment with Java and connecting to this device with it and I noticed that Linux kernel attaches to it, so before claiming Verio interface I had to detach the kernel driver. You might need to do something similar here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants