最近想把PN532通过ttl连接到树莓派上,通过Google上的一些教学贴,已经安装好了libnfc和libusb等,但是在执行nfc-list,nfc-scan-device -v时报错
nfc-scan-device -v报错如下:
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: "Itead_PN532_SPI", connstring: "pn532_uart:/dev/ttyAMA0"
nfc-scan-device uses libnfc 1.7.1
1 NFC device(s) found:
debug libnfc.driver.pn532_uart Attempt to open: /dev/ttyAMA0 at 115200 bauds.
debug libnfc.bus.uart Serial port speed requested to be set to 115200 bauds.
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
error libnfc.driver.pn532_uart pn53x_check_communication error
debug libnfc.chip.pn53x InRelease
debug libnfc.bus.uart TX: 00 00 ff 03 fd d4 52 00 da 00
error libnfc.driver.pn532_uart Unable to transmit data. (TX)
debug libnfc.general Unable to open "pn532_uart:/dev/ttyAMA0".
nfc_open failed for pn532_uart:/dev/ttyAMA0
libnfc.conf内容:
# 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 = 3
# 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_uart:/dev/ttyAMA0"
求助各位dalao,万分感谢
最近编辑记录 C-starm (2018-12-27 12:51:07)
离线
树莓派上自带的TTL设备,rx、tx反接
离线
修改为ttyS0之后,执行nfc-list报错:
nfc-list uses libnfc 1.7.1
nfc_initiator_init: Timeout
离线
这上面只有一个ttyS0,我把剩下的发出来,您看一下:
/dev/tty /dev/tty19 /dev/tty3 /dev/tty40 /dev/tty51 /dev/tty62
/dev/tty0 /dev/tty2 /dev/tty30 /dev/tty41 /dev/tty52 /dev/tty63
/dev/tty1 /dev/tty20 /dev/tty31 /dev/tty42 /dev/tty53 /dev/tty7
/dev/tty10 /dev/tty21 /dev/tty32 /dev/tty43 /dev/tty54 /dev/tty8
/dev/tty11 /dev/tty22 /dev/tty33 /dev/tty44 /dev/tty55 /dev/tty9
/dev/tty12 /dev/tty23 /dev/tty34 /dev/tty45 /dev/tty56 /dev/ttyAMA0
/dev/tty13 /dev/tty24 /dev/tty35 /dev/tty46 /dev/tty57 /dev/ttyprintk
/dev/tty14 /dev/tty25 /dev/tty36 /dev/tty47 /dev/tty58 /dev/ttyS0
/dev/tty15 /dev/tty26 /dev/tty37 /dev/tty48 /dev/tty59
/dev/tty16 /dev/tty27 /dev/tty38 /dev/tty49 /dev/tty6
/dev/tty17 /dev/tty28 /dev/tty39 /dev/tty5 /dev/tty60
/dev/tty18 /dev/tty29 /dev/tty4 /dev/tty50 /dev/tty61
离线
那我去看一下,有问题再提问
离线
成功解决问题,解决方法,接5V电(慎行)
离线