I am trying to use a card reader (OmniKey) with Android Box. So far I am able to check the device hooked up into the system. I want to get the scanned cards. I have found some useful post on StackOverflow
- https://stackoverflow.com/a/45366577/2696230
- Communicate with smartcard reader through Android USB host
I am able to hookup to the device through Java:
HashMap<String, UsbDevice> deviceList = usbManager.getDeviceList();
UsbDevice device = deviceList.get("/dev/bus/usb/001/004");
Following other posts that inorder to use the reader, I need to activate using the following command:
write(connection, epOut, "62000000000000000000");
returns 36 32 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30 30
next, when try to read from the device, the result is -1; and after a few attempts; the device becomes silent (unreponsive) where I had to unplug and plug back.
I was able to pull this line from the android device using command line:
<6>[ 2.476262] hid-generic 0003:076B:5428.0001: input,hidraw0: USB HID v1.10 Keyboard [HID OMNIKEY 5427 CK] on usb-ff500000.usb-1.5/input0
Is there any way to read the scanned cards? Am I actually on the correct path? I was expecting to have the scanned IDs straightforwad, but I am now in very deep technical issue. If anyone can clarify that this is the normal behaviour on Android Box?