|
|
@@ -1,5 +1,3 @@
|
|
|
-#include "core/check.h"
|
|
|
-#include "core/log.h"
|
|
|
#include "gen4_poller_i.h"
|
|
|
#include "protocols/gen4/gen4_poller.h"
|
|
|
#include <nfc/protocols/iso14443_3a/iso14443_3a.h>
|
|
|
@@ -7,8 +5,6 @@
|
|
|
#include <nfc/helpers/nfc_util.h>
|
|
|
#include <nfc/nfc_poller.h>
|
|
|
|
|
|
-#include <furi/furi.h>
|
|
|
-
|
|
|
#define GEN4_POLLER_THREAD_FLAG_DETECTED (1U << 0)
|
|
|
|
|
|
typedef NfcCommand (*Gen4PollerStateHandler)(Gen4Poller* instance);
|
|
|
@@ -280,7 +276,7 @@ static NfcCommand gen4_poller_write_mf_classic(Gen4Poller* instance) {
|
|
|
instance->config[25] = iso3_data->atqa[1];
|
|
|
instance->config[26] = iso3_data->sak;
|
|
|
instance->config[27] = 0x00;
|
|
|
- instance->config[28] = instance->total_blocks;
|
|
|
+ instance->config[28] = instance->total_blocks - 1;
|
|
|
instance->config[29] = Gen4PollerDirectWriteBlock0ModeDisabled;
|
|
|
|
|
|
Gen4PollerError error = gen4_poller_set_config(
|
|
|
@@ -359,7 +355,7 @@ static NfcCommand gen4_poller_write_mf_ultralight(Gen4Poller* instance) {
|
|
|
instance->config[25] = iso3_data->atqa[1];
|
|
|
instance->config[26] = iso3_data->sak;
|
|
|
instance->config[27] = 0x00;
|
|
|
- instance->config[28] = instance->total_blocks;
|
|
|
+ instance->config[28] = instance->total_blocks - 1;
|
|
|
instance->config[29] = Gen4PollerDirectWriteBlock0ModeDisabled;
|
|
|
|
|
|
Gen4PollerError error = gen4_poller_set_config(
|