2

I'm working on a NFC project and sometimes my reader is get messed up and i can't reconnect to it. If i re-plug the USB cable everything is fine. Can you do this in Java to without a physical re-plug?

If it can't, is there maybe an other way to do this?

S.Pols
  • 3,414
  • 2
  • 21
  • 42

2 Answers2

1

The USB protocol does have a thing called a Reset signal, but actually using it depends heavily on what operating system you are using and what drivers the OS is using for your device.

You might try using libusb and running libusb_reset_device, which is documented here:

http://libusb.sourceforge.net/api-1.0/group__dev.html#ga7321bd8dc28e9a20b411bf18e6d0e9aa

David Grayson
  • 84,103
  • 24
  • 152
  • 189
0

you need to ask yourself why it's happend maybe it's not a good idea to use on libusb_reset_device you need first get the libusb_device_handle

nbg ltd.
  • 1
  • 1