1

我正在尝试将 nfc 模块 pn532 与 Android 手机通信。

我使用了 rasberry pi 的itad nfc模块接口,并使用 libnfc(1.7.1) 和 libllcp 与移动设备通信。

运行 libllcp 测试程序 (snep-client.c) 示例后,

$ LIBNFC_LOG_LEVEL=3 ./examples/snep-client/snep-client

我收到这个错误

“错误 libnfc.driver.pn532_spi 无法等待 SPI 数据。(RX)

libllcp.mac.link 无法发送 2 个字节”

日志 :

debug libnfc.bus.spi RX: 00
debug libnfc.bus.spi TX: 02
debug libnfc.bus.spi RX: 00
debug libnfc.bus.spi TX: 02
debug libnfc.bus.spi RX: 00
debug libnfc.bus.spi TX: 02
debug libnfc.bus.spi RX: 01
debug libnfc.bus.spi TX: 03
debug libnfc.bus.spi RX: 00 00 ff 20
debug libnfc.bus.spi RX: e0
debug libnfc.bus.spi TX: 03
debug libnfc.bus.spi RX: d5
debug libnfc.bus.spi TX: 03
debug libnfc.bus.spi RX: 57
debug libnfc.bus.spi RX: 00
debug libnfc.bus.spi TX: 03
debug libnfc.bus.spi RX: 01 df 0b 63 89 dc 35 50 ec 59 a2 00 00 00 0e 32 46 66 6d 01 01 11 03 02 00 13 04 01 96
debug libnfc.bus.spi RX: 96
debug libnfc.bus.spi TX: 03
debug libnfc.bus.spi RX: 00
libllcp.mac.link (pn532_spi:/dev/spidev0.0) nfc_initiator_poll_dep_target() succeeded
libllcp.mac.link (pn532_spi:/dev/spidev0.0) LLCP Link activated (initiator)
libllcp.llc.link llc_link_configure (0x143d80, (nil), 0)
libllcp.llc.link mq_open (/libllcp-2532-0x143d80-up)
libllcp.llc.link mq_open (/libllcp-2532-0x143d80-down)
libllcp.llc.link LLC Link started successfully
libllcp.mac.link Sending 2 bytes
libllcp.mac.link LTOs: 1000 ms (local), 100 ms (remote)
debug libnfc.chip.pn53x InDataExchange
debug libnfc.chip.pn53x Timeout value: 1100libllcp.llc.llc (0xb6d16470) Link activated
libllcp.llc.llc (0xb6d16470) mq_receive+
debug libnfc.bus.spi TX: 01 00 00 ff 05 fb d4 40 01 00 00 eb
debug libnfc.bus.spi TX: 02
debug libnfc.bus.spi RX: 01
debug libnfc.bus.spi TX: 03
debug libnfc.bus.spi RX: 00 00 ff 00 ff 00
debug libnfc.chip.pn53x PN53x ACKed
debug libnfc.bus.spi TX: 02
debug libnfc.bus.spi RX: 00
debug libnfc.bus.spi TX: 02
debug libnfc.bus.spi RX: 00
.
.
.
.
***** AFTER SOME SAME LOG********
.
.
.
debug libnfc.bus.spi RX: 00
debug libnfc.bus.spi TX: 02
debug libnfc.bus.spi RX: 00
debug libnfc.bus.spi TX: 02
debug libnfc.bus.spi RX: 00
debug libnfc.bus.spi TX: 02
debug libnfc.bus.spi RX: 00
debug libnfc.bus.spi TX: 02
debug libnfc.bus.spi RX: 00
error libnfc.driver.pn532_spi Unable to wait for SPI data. (RX)
libllcp.mac.link Could not send 2 bytes

我使用 pn532(itead nfc) 模块与 android 4.3 (samsung S3) 进行通信。

我使用 libnfc -> libllcp -> libndef 将数据从树莓派发送到 android。

问题:

当我用 nfc 模块点击它时,我的手机会振动,但没有显示任何消息,并且在 pi 控制台上出现错误。

问题:

1.7.1 libnfc 版本是否可以与 libllcp 库和 snep 协议一起使用以将我的 NDEF 消息发送到 android?

如果我将文本 RTD 记录发送到 android,手机会在屏幕上显示文本吗?

请评论您对此错误日志的看法,它可以帮助我解决错误。

谢谢

4

0 回答 0