1

I am trying to use the ACR122U NFC Reader with the WebHID API but I cannot seem to get it to be found by Chrome 91 Desktop on both Linux nor Windows.

I know the browser is seeing the reader from chrome://usb-internals showing me this screen:

chrome://usb-internals

The two pieces of code that I have tried so far is here seen through the Inspect Element tools in the script tag. The VendorID and ProductID in the scripts match that which Chrome can recognise it through, so I'm not sure why it is not working for this.

The only popup dialog that I have gotten the reader to appear within is the Chrome NFC WebUSB but I cannot use that API as it implements a protected class, which is why I am using WebHID as the alternative in hopes it may work.

How do I correct my code to allow Chrome to recognise this device; what am I missing?

rxm
  • 71
  • 2
  • 11

2 Answers2

1

I was able to control the ACR122U NFC Reader through WebUSB. See the library I've updated at https://github.com/beaufortfrancois/chrome-nfc

What is not working for you?

François Beaufort
  • 4,843
  • 3
  • 29
  • 38
  • I tried the example, running the example.html directly in chrome or edge on windows 10. When clicking the 'discover' button, it asks me for my device: 'ACR122U PICC Interface', but when I press 'connect' I see an error in the console 'DOMException: Access denied chrome-nfc.js:829'. If I try it again after that and it asks for my device it is shown as 'ACR122U PICC Interface - Paired'. I know the reader itself works through nfc-tools or WinSCard.dll (using that from VB6)) – SuperDre Oct 19 '21 at 12:16
  • Do you see some information in about://usb-internals that may help to diagnose what is going on? Can you try in another OS to see if that's a Windows issue with WebUSB? – François Beaufort Oct 20 '21 at 06:36
  • I finally got ubuntu up and running through virtualbox, and I got exactly the same result, starting the `app.html` from the file-explorer. When doing usb-internals, it also give the same `Failed to read the device descriptor. (Reason: Transfer Error)` when I click the 'Get Device Descriptor' button. – SuperDre Nov 01 '21 at 15:09
0

I think this won't work because ARC122U NFC Reader doesn't implement the HID protocol. According to the product page, it uses the USB CCID protocol.

nondebug
  • 761
  • 3
  • 5