CMD_READER_HITAG requires always a hitag_data struct
used as SendCommandMIX(CMD_READER_HITAG, RHT2F_UID_ONLY, 0, 0, NULL, 0); sent to ReaderHitag((hitag_function)packet->oldarg[0], (hitag_data *)packet->data.asBytes); void ReaderHitag(hitag_function htf, hitag_data *htd) => we should always send a hitag_data struct
This commit is contained in:
@@ -455,9 +455,10 @@ static void printHitagConfiguration(uint8_t config) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
static bool getHitagUid(uint32_t *uid) {
|
static bool getHitagUid(uint32_t *uid) {
|
||||||
|
hitag_data htd;
|
||||||
|
memset(&htd, 0, sizeof(htd));
|
||||||
clearCommandBuffer();
|
clearCommandBuffer();
|
||||||
SendCommandMIX(CMD_READER_HITAG, RHT2F_UID_ONLY, 0, 0, NULL, 0);
|
SendCommandMIX(CMD_READER_HITAG, RHT2F_UID_ONLY, 0, 0, &htd, sizeof(htd));
|
||||||
PacketResponseNG resp;
|
PacketResponseNG resp;
|
||||||
if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) {
|
if (!WaitForResponseTimeout(CMD_ACK, &resp, 2500)) {
|
||||||
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
|
PrintAndLogEx(WARNING, "timeout while waiting for reply.");
|
||||||
|
|||||||
Reference in New Issue
Block a user