NFC: ISO 15693-3 emulation READ_MULTI and GET_BLOCK_SECURITY fixes (#501)

* Fix ISO15693 crash (hopefully)

* NFC: Fix off-by-one block count in ISO 15693-3 READ MULTI command

* NFC: Handle 256 long BLOCK SECURITY response and too large READ MULTI
response

* Move the define so correlation is clearer

* Oops

* Change to no reply if too many blocks requested than can be handled

* Update CHANGELOG.md

---------

Co-authored-by: WillyJL <me@willyjl.dev>
This commit is contained in:
Aaron Tulino
2026-01-25 15:47:12 -07:00
committed by GitHub
parent c94b5505b7
commit c176524fca
5 changed files with 35 additions and 6 deletions

View File

@@ -2,8 +2,12 @@
#include <digital_signal/digital_sequence.h>
#include <nfc/protocols/iso15693_3/iso15693_3_listener_i.h>
#define BITS_IN_BYTE (8U)
#define ISO15693_SIGNAL_BUFFER_SIZE (ISO15693_3_LISTENER_BUFFER_SIZE * BITS_IN_BYTE + 2)
#define ISO15693_SIGNAL_COEFF_HI (1U)
#define ISO15693_SIGNAL_COEFF_LO (4U)
@@ -151,7 +155,7 @@ Iso15693Signal* iso15693_signal_alloc(const GpioPin* pin) {
Iso15693Signal* instance = malloc(sizeof(Iso15693Signal));
instance->tx_sequence = digital_sequence_alloc(BITS_IN_BYTE * 255 + 2, pin);
instance->tx_sequence = digital_sequence_alloc(ISO15693_SIGNAL_BUFFER_SIZE, pin);
for(uint32_t i = 0; i < Iso15693SignalDataRateNum; ++i) {
iso15693_signal_bank_fill(instance, i);