Seeed-Studio / PN532

NFC library using PN532 to read/write card and communicate with android
431 stars 176 forks source link

HSU进行felica写入时报告Wrong response length #148

Open QHPaeek opened 2 weeks ago

QHPaeek commented 2 weeks ago

当我执行nfc.felica_WriteWithoutEncryption(1, &serviceCodeList1, 1, &blocklist1, &write_data);时发生了如下结果: ESP8266+SWHSU=执行成功 STM32F0+HSU=执行失败 STM32F103C+HSU=执行失败 经过调查,发现PN532::felica_SendCommand中使用HSU连接时会报告Wrong response length 如果将源码中的return -5;注释掉 // length check responseLength = pn532_packetbuffer[1] - 1; if ( (status - 2) != responseLength) { DMSG("Wrong response length\n"); //return -5; } 写入操作就可以正常执行,并且经进一步检查,写入的内容完全没有出错。 这个问题似乎是特定于HSU方式连接的。