LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 08-03-2017, 06:20 AM   #1
jamiebbbb
Member
 
Registered: Mar 2017
Location: Victoria, Australia
Distribution: Debian Wheezy
Posts: 34

Rep: Reputation: Disabled
how to communicate with HIDDEV0 and HIDRAW0 devices. Blood Glucose Meter (Abbott FREESTYLE OPTIUM NEO)


I have a Abbotts Optimum Neo Glucose Meter. Which I wish to connect to my computer --ubuntu (wheezy). All I wish to do is to extract the data that is collected on the device so that I can provided it to my doctor. The simple straight forward task of just connecting it a USB port and thinking it was going to mount as a usb drive was a grave misconception.
I tried run the Abbotts proprietary software for windows through wine and just wouldn't load.
I haven't a copy of windows to set up a vmware environment.
I tried some programs that are meant to interface with the glucose meter. All failed.
I tried glucometerutils : python3 ./glucometer.py --driver freestyle_optium --device /dev/usb info
FAIL
I tried Glucose : FAIL

How do you communicate with hiddev0 & hidraw0?
All i want to do is dump the data to a readable file.

[/QUOTE]

when the device is connected via USB cable. It am presuming it registers itself as a hiddev0 (/dev/usb/hidev0). At least that is what I was lead to believe from the dmesg output.

Quote:
dmesg

[ 1448.005112] usb 2-2: USB disconnect, device number 5
[ 1458.328340] usb 2-2: new full-speed USB device number 6 using xhci_hcd
[ 1458.469673] usb 2-2: New USB device found, idVendor=1a61, idProduct=3850
[ 1458.469675] usb 2-2: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 1458.469676] usb 2-2: Product: ADC P2
[ 1458.469677] usb 2-2: Manufacturer: Abbott Diabetes Care
[ 1458.471359] hid-generic 0003:1A61:3850.0002: hiddev0,hidraw0: USB HID v10.10 Device [Abbott Diabetes Care ADC P2] on usb-0000:00:14.0-2/input0


Quote:
# lsusb
Bus 001 Device 002: ID 8087:8001 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 004: ID 8087:07dc Intel Corp.
Bus 002 Device 003: ID 04f2:b3a3 Chicony Electronics Co., Ltd
Bus 002 Device 002: ID 0bda:0129 Realtek Semiconductor Corp. RTS5129 Card Reader Controller
Bus 002 Device 006: ID 1a61:3850 Abbott Diabetes Care
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Quote:
# lsusb -vd 1a61:3850


Bus 002 Device 006: ID 1a61:3850 Abbott Diabetes Care


Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1a61 Abbott Diabetes Care
idProduct 0x3850
bcdDevice 1.00
iManufacturer 1 Abbott Diabetes Care
iProduct 2 ADC P2
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 34
bNumInterfaces 1
bConfigurationValue 1
iConfiguration 3 Full Speed Configuration
bmAttributes 0xc0
Self Powered
MaxPower 100mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 0 No Subclass
bInterfaceProtocol 0 None
iInterface 4 Hid Interface
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 10.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 35
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 2
Device Status: 0x0000
(Bus Powered)
 
Old 08-03-2017, 06:41 AM   #2
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,698

Rep: Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895Reputation: 5895
Quote:
How do you communicate with hiddev0 & hidraw0?
This is just how linux is recognizing the meter. Without knowing the devices USB communication protocol you can't.

Did you try this?
https://blogs.gnome.org/xclaesse/201...t-openglucose/
 
Old 08-03-2017, 06:35 PM   #3
jamiebbbb
Member
 
Registered: Mar 2017
Location: Victoria, Australia
Distribution: Debian Wheezy
Posts: 34

Original Poster
Rep: Reputation: Disabled
unfortunately -Yes. But I have a newer version webkit2gtk and the source will not compile. :-(
 
Old 08-03-2017, 10:17 PM   #4
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
The format of the data in the meter could be literally anything. You can try
Code:
$ dd if=/dev/hidraw0
and see if anything pops up. You can also use minicom to try to establish a serial connection. Just use hidraw0 as the port, and experiment with baud rate.
 
Old 08-04-2017, 03:12 AM   #5
jamiebbbb
Member
 
Registered: Mar 2017
Location: Victoria, Australia
Distribution: Debian Wheezy
Posts: 34

Original Poster
Rep: Reputation: Disabled
That is closer than I have come to connecting to this device. Can I pass a command via DD?
Quote:
$result?
 
Old 08-04-2017, 03:46 AM   #6
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Some devices connect as usb-storage. But a lot of others speak some sort of protocol. PTP or otherwise, gphoto2 is kind of nice for interacting with devices like that. I've seen hidraw type things in packages and kernel stuffs, so there probably is a way. I just never had a need myself.

According to /var/lib/dpkg/available in debian testing:

python-hidapi
- depends on libhidapi-hidraw0

python-hid
- also depends on that lib (cython interface to hidapi)

usbrelay

openocd

-----

Seems like most of those are programming type interfaces. Seems like hidraw0 is a usb HID thing (human interface device, like a keyboard / mouse). Google seems to suggest that it creates a /dev/hidraw0 device.

https://github.com/thingtrack/glukose-service

Seems to be a start at least. Other things also use the hidraw0 dev thing too, like the ubikey. But that github project mentions your device specifically. At least the google hit did.

Last edited by Shadow_7; 08-04-2017 at 03:49 AM.
 
Old 08-04-2017, 04:36 AM   #7
jamiebbbb
Member
 
Registered: Mar 2017
Location: Victoria, Australia
Distribution: Debian Wheezy
Posts: 34

Original Poster
Rep: Reputation: Disabled
Thank you Shadow 7, Ironically just prior to reading your post I was actually at the point of delving into exactly the same information that you have iterated in your post. It seems there is more to this process that is ABOVE and beyond just simply running a command.
Very frustrating ......
 
Old 08-04-2017, 04:43 AM   #8
jamiebbbb
Member
 
Registered: Mar 2017
Location: Victoria, Australia
Distribution: Debian Wheezy
Posts: 34

Original Poster
Rep: Reputation: Disabled
Could it be the case that my Linux system has recognized the Blood Glucose device incorrectly AS hiddraw0. Is that possible ?
 
Old 08-04-2017, 05:58 AM   #9
jamiebbbb
Member
 
Registered: Mar 2017
Location: Victoria, Australia
Distribution: Debian Wheezy
Posts: 34

Original Poster
Rep: Reputation: Disabled
SOLVED IT - Had to set the permissions correctly on /dev/hidraw*
How I came about working it out was the through the most excellent AwesomeMachine who gave me a great diagnostic tool" dd if=/dev/hidraw0 * ". I just couldn't get the glucose meter to send any data. So I grabbed a Usb Mouse which should of worked. Yet it failed.
Which made me think it was a permission issue. It was.....
Quote:
chmod 666 /dev/hidraw*
Quote:
Output

RawPacket: "
RawPacket: `/0,100,130,3,2,99,0,0,0
CKSM:00000433
CMD OK

RawPacket: `*0,0,0,0,0,0,0,0,0
CKSM:00000327
CMD OK

RawPacket: `CKSM:00000000
CMD OK
CMD OK

RawPacket: `0,0
CKSM:000000A3
CMD OK


RawPacket: `!12,20,14
CKSM:00000199
CMD OK

RawPacket: `1
CKSM:00000048
CMD OK

RawPacket: `>515,1,44,8,4,17,21,2,1,5,1024
514,1,44,8,4,17,20,59,1,5,1024
RawPacket: `>
513,1,44,8,4,17,20,57,1,5,1024
512,1,44,8,4,17,20,57,1,5,102
RawPacket: `>4
511,1,44,8,4,17,20,53,1,5,1024
510,1,44,8,4,17,20,52,1,5,1
RawPacket: `>024
509,1,44,8,4,17,20,51,1,5,1024
508,1,44,8,4,17,20,50,1,5
RawPacket: `>,1024
507,1,44,8,4,17,20,50,1,5,1024
506,1,44,8,4,17,20,50,1
RawPacket: `>,5,1024
505,1,44,8,4,17,20,50,1,5,1024
504,1,44,8,4,17,20,50
RawPacket: `>,1,5,1024
503,1,44,8,4,17,20,49,1,5,1024
502,1,44,8,4,17,20,
RawPacket: `>40,1,5,1024
501,1,44,8,4,17,20,40,1,5,1024
500,1,44,8,4,17,2
RawPacket: `>0,27,1,5,1024
499,1,44,8,4,17,20,24,1,5,1024
498,1,44,8,4,17
RawPacket: `>,20,21,1,5,1024
497,1,44,8,4,17,20,21,1,5,1024
496,1,44,8,3,

 
Old 08-04-2017, 08:39 PM   #10
Shadow_7
Senior Member
 
Registered: Feb 2003
Distribution: debian
Posts: 4,137
Blog Entries: 1

Rep: Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874Reputation: 874
Give it six months or two years. It'll be just an apt-get away at that point. YMMV depending on distro.
 
Old 08-06-2017, 04:43 AM   #11
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Now, if you just redirect the dd output to file, you can parse it to some usable form with awk or PERL.
 
Old 06-25-2018, 05:03 AM   #12
CMartin
Member
 
Registered: Sep 2010
Distribution: Slackware
Posts: 48

Rep: Reputation: 22
Quote:
Originally Posted by jamiebbbb View Post
SOLVED IT - Had to set the permissions correctly on /dev/hidraw*
Please, do you run a proprietary FreeStyle Auto-Asist Neo in Wine ? I got 'glucometerutils' with a driver fsprecisionneo running without problems on my hidraw5, but all it can get is a long ascii list of mg/dl values. I'd really like to have printable diagrams and charts from the proprietary software, if possible.

The proprietary Free Style software which specifically supports Neo, installs and runs in Wine (permission 666 set on all hidraws), yet it can't recognise my connected Neo meter; it always displays a message "meter not connected". What have you done to run it ?

Or, if you are no longer fan of FS Neo, can you recommend a glucometer which you've been able to run, and actually works as expected in Wine ? Thank you.
 
Old 09-07-2021, 09:11 AM   #13
guicaste
LQ Newbie
 
Registered: Sep 2021
Posts: 1

Rep: Reputation: Disabled
Solved using Wine and Setting Permissions

Hi,
I solved this way. I'm using Ubuntu 18.04.5 LTS x86_64 with kernel 5.4.0-81-generic

1) connect the device and check
$ lsusb
.
.
.
Bus 001 Device 036: ID 1a61:3850 Abbott Diabetes Care
.
.
.
$ dmesg
....
[92151.692077] usb 1-1.4: USB disconnect, device number 35
[92159.848178] usb 1-1.4: new full-speed USB device number 36 using xhci_hcd
[92159.957747] usb 1-1.4: New USB device found, idVendor=1a61, idProduct=3850, bcdDevice= 1.00
[92159.957760] usb 1-1.4: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[92159.957769] usb 1-1.4: Product: ADC P2
[92159.957776] usb 1-1.4: Manufacturer: Abbott Diabetes Care
[92159.963700] hid-generic 0003:1A61:3850.000A: hiddev1,hidraw6: USB HID v10.10 Device [Abbott Diabetes Care ADC P2] on usb-0000:00:14.0-1.4/input0

$ ls -l /dev/hidraw*
crw------- 1 root root 241, 0 sep 6 09:04 /dev/hidraw0
crw------- 1 root root 241, 1 sep 6 09:04 /dev/hidraw1
crw------- 1 root root 241, 2 sep 6 09:04 /dev/hidraw2
crw------- 1 root root 241, 3 sep 6 09:04 /dev/hidraw3
crw------- 1 root root 241, 4 sep 6 09:04 /dev/hidraw4
crw------- 1 root root 241, 5 sep 6 09:04 /dev/hidraw5
crw------- 1 root root 241, 6 sep 7 10:40 /dev/hidraw6
2) Set permission right

$ sudo chmod 777 /dev/hidraw6
3) Verify
$ ls -l /dev/hidraw*
crw------- 1 root root 241, 0 sep 6 09:04 /dev/hidraw0
crw------- 1 root root 241, 1 sep 6 09:04 /dev/hidraw1
crw------- 1 root root 241, 2 sep 6 09:04 /dev/hidraw2
crw------- 1 root root 241, 3 sep 6 09:04 /dev/hidraw3
crw------- 1 root root 241, 4 sep 6 09:04 /dev/hidraw4
crw------- 1 root root 241, 5 sep 6 09:04 /dev/hidraw5
crwxrwxrwx 1 root root 241, 6 sep 7 10:40 /dev/hidraw6
4) Install software using wine
5) Launch
 
Old 04-14-2024, 10:30 AM   #14
AndyRozman
LQ Newbie
 
Registered: Apr 2024
Posts: 1

Rep: Reputation: 0
Wink

Quote:
Originally Posted by CMartin View Post

Or, if you are no longer fan of FS Neo, can you recommend a glucometer which you've been able to run, and actually works as expected in Wine ? Thank you.
I wrote diabetes application called GGC which is writen in Java (https://github.com/andyrozman/ggc) and supports many meter devices (most of them are old, but there are few new ones there). You could try to see if it suits your needs. At the time of writing this (14.4.2024), I am just prearing for next release, but if you contact me on github I can get you preliminary version for testing.

Andy
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
LXer: Blender 2.67 Brings Freestyle Rendering LXer Syndicated Linux News 0 05-08-2013 07:31 AM
Omron Blood Pressure Meter? senjak Linux - Software 0 10-16-2009 11:08 AM
Blood Glucose Monitor: in Hearty Heron how can I download readings cuddy Linux - Newbie 5 07-25-2008 12:05 PM
Blood and Blood 2 on linux... pAn1k Linux - Games 6 07-18-2005 02:52 PM
My freestyle/rap on Windows XP randyriver10 General 15 07-13-2004 09:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 07:32 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration