0

I want to use my PN532 as input device like a keyboard on my pc with windows 10. I have a PN210 USB to UART Bridge.

Is there a way to use my PN532 on a x86/64 device?

1
1

If you want to use it “as a keyboard”, i.e. whenever a card is presented some data from the card is sent to the PC as if it were typed on a keyboard, they I don’t believe you can do that with this combination:

  • An USB/UART converter will present itself as a serial port to the PC, not as a keyboard (which would be an “HID”)
  • The PN532 will not just spit out raw data anyway, it needs to exchange properly formatted commands and responses. Some NFC chips are programmable to do that, I don’t believe that is the case of the PN532.

If you really want an NFC reader acting as a keyboard you’ll probably need a device that has been designed for that (there are quite a few). If you want to do it yourself, you can probably use the PN532 but you’ll need something a bit more intelligent to connect it to the PC, some kind of microcontroller with USB peripheral support which allows use of the HID profile and an UART to talk to the PN532.

Some Arduino boards as well as some of the Teensy boards should be able to do that.

In any case, you’ll need to determine exactly what you want to read from the tags and output as keystrokes. A classic case is the card’s UID, but other applications may require reading different information from the card, possibly with encryption and whatnot.

If you don’t care about it actually acting as a keyboard, but just want to communicate with the PN532, then the combination should work out. Note that IIRC the PN532 has multiple interfaces (SPI, I2C, UART I believe), and some ready-made boards are preset to a specific interface. Other will require cutting or soldering some jumpers to select the right mode.

Note that on PCs, the optimal use case is generally to have a reader which is compatible with the PC/SC protocol. This allows you to use all sorts of software which can work with any such reader.

3
  • Is there a way to read the card in a script using this hardware combination? – RumelDilDumpel Jun 2 at 7:20
  • This is addressed in the second last paragraph. If you have a PN532 which can be set to UART you should be able to. Don’t know if there are libraries for that like there are for Arduino (probably depends on what language you want to use), but in the worst case porting the Arduino library should be straightforward. – jcaron Jun 2 at 7:27
  • Correction, there’s libnfc as mentioned in the comments to your question. – jcaron Jun 2 at 7:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.