nyholku / purejavahidapi

Other
122 stars 69 forks source link

My Device HP 4430 2D Imaging Barcode Scanner not listing #50

Open IlmadEddine opened 6 years ago

IlmadEddine commented 6 years ago

I tried pure javahedabe api to read data from my device but I could not find it in list of devices attached

I loved it because the others APIs doesn't have input Listener

any idea for resolve this

tresf commented 6 years ago

I could not find it in list of devices attached

Barcode Scanners can be programmed to operate in different modes. There's usually a booklet with a bunch of barcodes to switch modes. If you don't have the booklet you should be able to find a PDF online with the barcodes.

For example, if this barcode scanner is configured for RS232 communication, it will show up as a COM/Serial port on your computer.

nyholku commented 6 years ago

On 7 Feb 2018, at 18:09, ImadEddine notifications@github.com wrote:

I tried pure javahedabe api to read data from my device but I could not find it in list of devices attached

I loved it because the others APIs doesn't have input Listener

any idea for resolve this

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub, or mute the thread.

Which platform you are using (Linux,Windows or Mac OS)?

I'm mainly on Mac but I'm sure there is a system utility by which you can see how the device presents itself to the system i.e. is it COM or .tty or HID or whatever...

IlmadEddine commented 6 years ago

Windows x64 I can switch to COM / USB ... I'm sure it's a USB HID like keyboard

tresf commented 6 years ago

@IlmadEddine you will have to switch it off of Keyboard mode per: https://github.com/nyholku/purejavahidapi#why-hid

Most HID devices (like Mouse, Keyboard etc) have specific APIs provided by the operating system and you should use those to access them.

However some device which are not really Human Interface Devices in the original intent of the USB HID standard nevertheless represent themselves as HID devices. Devices like ThinkGeek USB Rocket Launcher or Oregon Scientific WMR100 weather stations to name two.

IlmadEddine commented 6 years ago

I try Hid4Java .. in console i have this

Device attached: HidServicesEvent{hidDevice=HidDevice [path=\?\hid#vid_03f0&pid_0139#7&2dbe7f3a&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}, vendorId=0x3f0, productId=0x139, serialNumber=S/N VNC2442289, releaseNumber=0x77, manufacturer=Hewlett-Packard, product=HP Image Scanner, usagePage=0x1, usage=0x6, interfaceNumber=-1]}

Device detached: HidServicesEvent{hidDevice=HidDevice [path=\?\hid#vid_03f0&pid_0139#7&2dbe7f3a&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030}, vendorId=0x3f0, productId=0x139, serialNumber=S/N VNC2442289, releaseNumber=0x77, manufacturer=Hewlett-Packard, product=HP Image Scanner, usagePage=0x1, usage=0x6, interfaceNumber=-1]}

nyholku commented 6 years ago

Next thing to do would be to step through or instrument the enumeration code to see what happens:

https://github.com/nyholku/purejavahidapi/blob/55fcca51a2f827acf3c83b0a05c42242e6cb71fa/src/purejavahidapi/windows/WindowsBackend.java#L78

IlmadEddine commented 6 years ago

I read this

Device USB\VID_03F0&PID_0139\S/N_VNC2442289 was not migrated due to partial or ambiguous match.

Last Device Instance Id: USB\VID_0461&PID_0010&MI_00\7&30821C4&0&0000 Class Guid: {745A17A0-74D3-11D0-B6FE-00A0C90F57DA} Location Path: Migration Rank: 0xF000FFFF0000F130 Present: false Status: 0xC0000719

witch part i should add to InterfaceClassGuid List ?

i don't understand your code but i show some message inside enumerateDevices function : devinfo_data.cbSize 28 device_interface_data.cbSize 28 Continue line 120 Break line 117 Break line 166

Continue line 120 Break line 117 Break line 166

Continue line 120 Break line 117

Continue line 120 Break line 117 Break line 166

Continue line 120 Break line 117

Continue line 120 Break line 117

Break line 102

These line in your example after call PureJavaHidApi.enumerateDevices() function : Device : \?\hid#vid_04f3&pid_0103&mi_01&col01#8&109674c3&0&0000#{4d1e55b2-f16f-11cf-88cb-001111000030} Device : \?\hid#vid_04f3&pid_0103&mi_01&col02#8&109674c3&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030} Device : \?\hid#vid_1bcf&pid_0007&col02#7&296bdc72&0&0001#{4d1e55b2-f16f-11cf-88cb-001111000030}

nyholku commented 6 years ago

Does this device work with any software in your system?

googling for " was not migrated due to partial or ambiguous match." suggest that this could be a driver issue...

IlmadEddine commented 6 years ago

As Standard output yes (must be text input editable) (I can switch to Serial Port ... No)

hid

tresf commented 6 years ago

I can confirm this library works properly with HID barcode scanners. I've recently integrated with a Honeywell Scanner using PureJavaHIDAPI.

I ran into two caveats which may or may not be immediately beneficial to this thread:

The HP scanner offers some drivers as well. If they don't install automatically you may need to browse to the driver location and install them manually. https://support.hp.com/us-en/drivers/selfservice/hp-imaging-barcode-scanner/5061524/model/5061525