Dear ifdnfc community,
My goal is to use my PN532 reader in Java@RPi4
I've setup libnfc properly with pn532_uart driver
My /etc/nfc/libnfc.conf looks like this:
allow_autoscan = true
allow_intrusive_scan = false
log_level = 3
device.name = "IFD-NFC"
device.connstring = "pn532_uart:/dev/ttyUSB0:115200"
and nfc-scan-device returns:
debug libnfc.general log_level is set to 3
debug libnfc.general allow_autoscan is set to true
debug libnfc.general allow_intrusive_scan is set to false
debug libnfc.general 1 device(s) defined by user
debug libnfc.general #0 name: "IFD-NFC", connstring: "pn532_uart:/dev/ttyUSB0:115200"
nfc-scan-device uses libnfc 1.8.0
debug libnfc.general 0 device(s) found using acr122_usb driver
debug libnfc.general 0 device(s) found using pn53x_usb driver
1 NFC device(s) found:
debug libnfc.driver.pn532_uart Attempt to open: /dev/ttyUSB0 at 115200 baud.
debug libnfc.bus.uart Serial port speed requested to be set to 115200 baud.
debug libnfc.chip.pn53x Diagnose
debug libnfc.chip.pn53x Timeout value: 500
debug libnfc.bus.uart TX: 55 55 00 00 00 00 00 00 00 00 00 00 00 00 00 00
debug libnfc.chip.pn53x SAMConfiguration
debug libnfc.chip.pn53x Timeout value: 1000
debug libnfc.bus.uart TX: 00 00 ff 03 fd d4 14 01 17 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart RX: 00 00 ff 02 fe
debug libnfc.bus.uart RX: d5 15
debug libnfc.bus.uart RX: 16 00
debug libnfc.bus.uart TX: 00 00 ff 09 f7 d4 00 00 6c 69 62 6e 66 63 be 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart RX: 00 00 ff 09 f7
debug libnfc.bus.uart RX: d5 01
debug libnfc.bus.uart RX: 00 6c 69 62 6e 66 63
debug libnfc.bus.uart RX: bc 00
debug libnfc.chip.pn53x GetFirmwareVersion
debug libnfc.bus.uart TX: 00 00 ff 02 fe d4 02 2a 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart RX: 00 00 ff 06 fa
debug libnfc.bus.uart RX: d5 03
debug libnfc.bus.uart RX: 32 01 06 07
debug libnfc.bus.uart RX: e8 00
debug libnfc.chip.pn53x SetParameters
debug libnfc.bus.uart TX: 00 00 ff 03 fd d4 12 14 06 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart RX: 00 00 ff 02 fe
debug libnfc.bus.uart RX: d5 13
debug libnfc.bus.uart RX: 18 00
debug libnfc.general "IFD-NFC" (pn532_uart:/dev/ttyUSB0:115200) has been claimed.
- IFD-NFC:
pn532_uart:/dev/ttyUSB0:115200
debug libnfc.chip.pn53x ReadRegister
debug libnfc.bus.uart TX: 00 00 ff 0c f4 d4 06 63 02 63 03 63 0d 63 38 63 3d b0 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart RX: 00 00 ff 07 f9
debug libnfc.bus.uart RX: d5 07
debug libnfc.bus.uart RX: 00 00 00 00 00
debug libnfc.bus.uart RX: 24 00
debug libnfc.chip.pn53x PN53X_REG_CIU_TxMode (Defines the transmission data rate and framing during transmission)
debug libnfc.chip.pn53x PN53X_REG_CIU_RxMode (Defines the transmission data rate and framing during receiving)
debug libnfc.chip.pn53x WriteRegister
debug libnfc.bus.uart TX: 00 00 ff 08 f8 d4 08 63 02 80 63 03 80 59 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart RX: 00 00 ff 02 fe
debug libnfc.bus.uart RX: d5 09
debug libnfc.bus.uart RX: 22 00
debug libnfc.chip.pn53x InRelease
debug libnfc.bus.uart TX: 00 00 ff 03 fd d4 52 00 da 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart RX: 00 00 ff 03 fd
debug libnfc.bus.uart RX: d5 53
debug libnfc.bus.uart RX: 00
debug libnfc.bus.uart RX: d8 00
debug libnfc.general set_property_bool NP_ACTIVATE_FIELD False
debug libnfc.chip.pn53x RFConfiguration
debug libnfc.bus.uart TX: 00 00 ff 04 fc d4 32 01 00 f9 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart RX: 00 00 ff 02 fe
debug libnfc.bus.uart RX: d5 33
debug libnfc.bus.uart RX: f8 00
debug libnfc.chip.pn53x PowerDown
debug libnfc.bus.uart TX: 00 00 ff 03 fd d4 16 f0 26 00
debug libnfc.bus.uart RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.uart RX: 00 00 ff 03 fd
debug libnfc.bus.uart RX: d5 17
debug libnfc.bus.uart RX: 00
debug libnfc.bus.uart RX: 14 00
Then I've compiled ifdnfc and while service pcscd status gives me:
● pcscd.service - PC/SC Smart Card Daemon
Loaded: loaded (/lib/systemd/system/pcscd.service; indirect; vendor preset: enabled)
Active: active (running) since Thu 2022-02-10 15:30:57 GMT; 17s ago
and my /etc/reader.conf.d/libifdnfc looks like this:
FRIENDLYNAME "IFD-NFC"
LIBPATH /usr/local/lib/libifdnfc.so
CHANNELID 0
Unfortunately ifdnfc-activate returns:
debug libnfc.general log_level is set to 3
debug libnfc.general allow_autoscan is set to true
debug libnfc.general allow_intrusive_scan is set to false
debug libnfc.general 1 device(s) defined by user
debug libnfc.general #0 name: "IFD-NFC", connstring: "pn532_uart:/dev/ttyUSB0:115200"
debug libnfc.general 0 device(s) found using acr122_usb driver
debug libnfc.general 0 device(s) found using pn53x_usb driver
Activating ifdnfc with "pn532_uart:/dev/ttyUSB0:115200"...
IFD-NFC is inactive.
I'm already on aarch64 bit, because on 32bit systemifdnfc-activate was returning Insufficient buffer
My Java program:
import java.util.List;
import javax.smartcardio.CardException;
import javax.smartcardio.CardTerminal;
import javax.smartcardio.TerminalFactory;
public class Simple {
public static void main(String[] args) throws CardException {
TerminalFactory factory = TerminalFactory.getDefault();
List<CardTerminal> terminals = factory.terminals().list();
System.out.println("Terminals: " + terminals);
}
}
returns [] terminals...
What can I do in order to make ifdnfc "active"?
Kind regards
Dear ifdnfc community,
My goal is to use my PN532 reader in Java@RPi4
I've setup
libnfcproperly withpn532_uartdriverMy
/etc/nfc/libnfc.conflooks like this:and
nfc-scan-devicereturns:Then I've compiled
ifdnfcand whileservice pcscd statusgives me:and my
/etc/reader.conf.d/libifdnfclooks like this:Unfortunately
ifdnfc-activatereturns:I'm already on aarch64 bit, because on 32bit system
ifdnfc-activatewas returningInsufficient bufferMy Java program:
returns
[]terminals...What can I do in order to make
ifdnfc"active"?Kind regards