Note on compile libnfc and mfoc

概述

本文主要记录编译nfc-tools时遇到的问题以及解决方案

测试平台:Raspberry 2B+

1. 访问不了google code,无法下载源码

mfc-tools 仓库已经从google转移到github

2. 编译nfcuk和mfoc时,autoreconf失败

加入-vis参数,全部指令如下

1
autoreconf -vis
automake
autoconf
./configure
make

3. 按照网上教程,需要修改str_nfc_target函数

不需要,现已修复

4. 在树莓派2B+上使用配置nfc,无法打开SPI端口,提示”TFI error”

修改SPI速率参数,保持默认值即可,/etc/nfc/libnfc.conf全文如下

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
# Allow device auto-detection (default: true)
# Note: if this auto-detection is disabled, user has to set manually a device
# configuration using file or environment variable
allow_autoscan = true

# Allow intrusive auto-detection (default: false)
# Warning: intrusive auto-detection can seriously disturb other devices
# This option is not recommended, user should prefer to add manually his device.
allow_intrusive_scan = false

# 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 = 1

# 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 = "Itead_PN532_SPI"
#device.connstring = "pn532_spi:/dev/spidev0.0:500000"

# 正确配置
device.name = "Itead_PN532_SPI"
device.connstring = "pn532_spi:/dev/spidev0.0"

5. PN532无法识别门禁卡

可以识别13.56MHz 高频IC卡,但无法识别125KHz 低频ID卡
NOTE: 可以自制125KHz天线,软件模拟ID卡射频协议