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

hidDevice.open() return NULL #442

Open
Chakib-Temal opened this issue Oct 28, 2019 · 2 comments
Open

hidDevice.open() return NULL #442

Chakib-Temal opened this issue Oct 28, 2019 · 2 comments

Comments

@Chakib-Temal
Copy link

Chakib-Temal commented Oct 28, 2019

hello

i use your libraries Hid4Java on My Ubuntu 16.04

all is fine to detect devices and read them parameters

but when i call
HidDevice hidDevice = hidServices.getHidDevice(6753, 13904, null);
i have null result
it's a FreeStyle Libre device, and it's detectable with hidServices.getAttachedHidDevices()

i'm trying to find the problem , i'm sure it"s the Path
HidDevice [path=0001:0008:00, vendorId=0x1a61, productId=0x3650, serialNumber=null, releaseNumber=0x100, manufacturer=null, product=null, usagePage=0x0, usage=0x0, interfaceNumber=0]

but the function return Null , there is any problem with the path path=0001:0008:00 ?

if i can't to connect to the device , i can't communicate with him

any suggestion ? Thank's a lot

@Chakib-Temal Chakib-Temal changed the title hidDevice.open() reurn NULL hidDevice.open() return NULL Oct 28, 2019
@Youw
Copy link

Youw commented Oct 28, 2019

what is the version of hidapi?

HidDevice [path=0001:0008:00, vendorId=0x1a61, productId=0x3650, serialNumber=null, releaseNumber=0x100, manufacturer=null, product=null, usagePage=0x0, usage=0x0, interfaceNumber=0]

How did you get this output?

manufacturer=null, product=null

this output is extremely rare and usually means broken HID driver or broken device

Have you tried native C app to open your device?
Check https://github.com/todbot/hidapitester


This version of the library is no longer maintained (original author is not answering).
See #373

Check https://github.com/libusb/hidapi

@Chakib-Temal
Copy link
Author

for (int devices = 0 ; devices < hidServices.getAttachedHidDevices().size() ; devices++) {
System.out.println(hidServices.getAttachedHidDevices().get(devices));
}

here is the output :
HidDevice [path=0002:0004:00, vendorId=0x413c, productId=0x2003, serialNumber=null, releaseNumber=0x301, manufacturer=null, product=null, usagePage=0x0, usage=0x0, interfaceNumber=0]
HidDevice [path=0002:0003:00, vendorId=0x461, productId=0x4d81, serialNumber=null, releaseNumber=0x200, manufacturer=null, product=null, usagePage=0x0, usage=0x0, interfaceNumber=0]
HidDevice [path=0001:0008:00, vendorId=0x1a61, productId=0x3650, serialNumber=null, releaseNumber=0x100, manufacturer=null, product=null, usagePage=0x0, usage=0x0, interfaceNumber=0]

1-Mouse , 2- keyboard 3-FreeStyle libre(glucometer)
i'm not sure that is a broken device , you cann see the output for the mouse and the keyboard

i'm trying now to use the hidApiTester in the command line, but it's not very clear to start
todbot/hidapitester#1
may be you can help me if you already used it before ?

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

2 participants