3

I have an Android tablet (custom commercial tablet by a company called Glory Star) that is running on Android 5.1.1. With it I am using a MagTek Dynamag card reader (model #21073075), that is usable with the mtscra.jar library provided by MagTek (https://www.magtek.com/support/dynamag?tab=software). The library/card reader are working correctly, in that I am able to connect to and communicate with the card reader, pulling in card data whenever a card is swiped. Their library is using USB Host (http://developer.android.com/guide/topics/connectivity/usb/host.html).

Once a connection is established, an interface needs to be found and subsequently an endpoint on which the communication takes place. This all occurs as it should EXCEPT under one condition...after the tablet is rebooted. Once the tablet is rebooted and my app is launched, the mtscra library is still able to find the MagTek card reader, but it cannot locate an interface, so it ultimately can't establish a connection. If I unplug and replug in the card reader, however, the interface can again be found. I believe something is happening on reboot that is disabling the ability for the interface of the card reader to be located.

Is there a known solution to this issue? Is there a way to essentially programmatically "reset" the usb port (that would resemble unplugging and replugging it back in) when my app is launched (I have root access)? Or, is there a way to disable/enable the usb port via the command line?

jnom
  • 31
  • 4

0 Answers0