decoding-contour-next-link
decoding-contour-next-link copied to clipboard
running IO error
When executing sudo python -m decoding-contour-next-link.read_minimed_next24
I am receiving the following:
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/asterios/decoding-contour-next-link/read_minimed_next24.py", line 1333, in
It is probably lack of privileges to the device. You could try running with sudo or as root. I added the following udev-rule in /etc/udev/rules.d/90-contour-next-link24.rules
, which works when the user is a member of dialout
. I am not certain if dialout
is the appropriate group, though.
SUBSYSTEM=="usb", ATTRS{idVendor}=="1a79", ATTRS{idProduct}=="6210", ACTION=="add", GROUP="dialout", MODE="0660"
I have tried both as sudo and as root. Are you certain it is privilege related issue?
I had the exact same error when it was a privilege issue for me. It may arise too, I guess, if the device is not present. What does dmesg
say when you plug in the device?
[ 30.160254] usb 1-3: new full-speed USB device number 5 using xhci_hcd [ 30.312991] usb 1-3: New USB device found, idVendor=1a79, idProduct=7800 [ 30.312998] usb 1-3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 30.313003] usb 1-3: Product: Contour7801-1438844 [ 30.313008] usb 1-3: Manufacturer: AscensiaDiabetesCare [ 30.313012] usb 1-3: SerialNumber: Contour7801-1438844
Hmmm .... that is a different device than mine. I do not know if that makes a difference regarding privileges and permissions.
[121124.965785] usb 1-1.3: new full-speed USB device number 27 using dwc_otg
[121125.104372] usb 1-1.3: New USB device found, idVendor=1a79, idProduct=6210
[121125.104386] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[121125.104395] usb 1-1.3: Product: Contour Link USB Device
[121125.104404] usb 1-1.3: Manufacturer: Bayer HealthCare LLC
[121125.104412] usb 1-1.3: SerialNumber: 0000000001004354
[121125.113952] hid-generic 0003:1A79:6210.000E: hiddev96,hidraw0: USB HID v1.11 Device [Bayer HealthCare LLC Contour Link USB Device] on usb-3f980000.usb-1.3/input0
Ok is there a file where you define the vendor and product ID?
Those come from the device. I use them in the udev-rule to ensure that the device can be used by the dialout
group. But this will not help you, if not even root can access the device.
Hmmm ... look at my last line from the output of dmesg
. There it says that the HID-system recognizes the device. Do you have a similar line? Maybe your device is too new, that the HID-system does not know about it.
If you could provide me with an output of the python command, when the device is not connected, I would be grateful.
[ 318.364998] usbcore: registered new interface driver usbhid [ 318.365000] usbhid: USB HID core driver [ 318.370933] hid-generic 0003:1A79:7800.0001: hiddev0,hidraw0: USB HID v1.11 Device [AscensiaDiabetesCare Contour7801-1438844] on usb-0000:00:14.0-3/input0 *Also I think it is recognised
Ah, now I see. The device that the code is trying to open is specified at line 742 in read_minimed_next24.py
. It is hardcoded, which may mean that the code does only work with the device of USB_PID = 0x6210
. But if the binary interface have not changed, you could try substituting 0x7800 for 0x6210 in that line. Then, at least, HID should be able to open the device.
Yeah device got recognized. Now we reached a point of having invalid packages. E.g.
2018-06-24 03:49:35,568 ERROR [main] Recieved invalid USB packet
Traceback (most recent call last):
File "/usr/lib/python2.7/runpy.py", line 174, in _run_module_as_main
"main", fname, loader, pkg_name)
File "/usr/lib/python2.7/runpy.py", line 72, in _run_code
exec code in run_globals
File "/home/asterios/decoding-contour-next-link/read_minimed_next24.py", line 1333, in
OK. Then this device is probably using a different binary interface. Some of the gurus must help you out here ... @paulokow @pazaan ?
What kind of device are you connecting with? Is it a Next Link 2.4?
It is a contour next-one
You can't connect with countour Next One. you need to have one of Contours that has "Link" in name. So Contour Next Link, Contour Link or Contour Next Link 2.4 (for 6xx).