Wir spielen mit NFC! ====== Hardware ====== PN532 NFC RFID Module (aka. NFC MODULE V3), [[http://www.elechouse.com/elechouse/images/product/PN532%20NFC%20Module/PN532%20NFC%20RFID%20Module%20Manual.pdf|Datenblatt]] ====== Ansteuerung ====== Der Chip lässt sich nicht direkt über UART ansteuern. Man benötigt die [[http://nfc-tools.org|libnfc]] und diese Config in ''/etc/nfc/libnfc.conf'': Unter macOS lässt sich die ''libnfc'' mittels MacPorts installieren. Die config Datei wird dort unter ''/opt/local/etc/nfc/libnfc.conf'' gesucht. # Set log level (default: error) # Valid log levels are (in order of verbosity): 0 (none), 1 (error), 2 (info), 3 (debug) # Note: if you compiled with --enable-debug option, the default log level is "debug" log_level = 2 # Manually set default device (no default) # To set a default device, you must set both name and connstring for your device # Note: if autoscan is enabled, default device will be the first device available in device list. device.name = "nfcfoo" # ggf. anpassen device.connstring = "pn532_uart:/dev/ttyUSB0" Danach kann der Chip mit den ''nfc-*''-Commandline-Tools angesprochen werden, z.B.: $ nfc-poll nfc-poll uses libnfc 1.7.1 NFC reader: pn532_uart:/dev/ttyUSB0 opened NFC device will poll during 30000 ms (20 pollings of 300 ms for 5 modulations) ISO/IEC 14443A (106 kbps) target: ATQA (SENS_RES): 00 04 UID (NFCID1): 56 c5 ff 9d SAK (SEL_RES): 08 nfc_initiator_target_is_present: Target Released Waiting for card removing...done.