Hello everyone! I am currently having a big issue with an RFID Reader. I'm trying to read data from
this reader from Amazon right here, which only supports Wiegand 26 an 34 transmissions, using an ESP32 device and utilizing
this library from github.
I know that the library is shown to be for Arduino devices, but it contains functionality for ESP32 devices as well. I wanna get the right results, but I just can't get it right, and would highly appreciate all help. I'm just trying to grasp the functionality, so that I can write my own software with it in C only.
What I have tried:
I tried out the library I've linked above, and created a simple program using PlatformIO that matches the one on the GitHub page, using the pins I've chosen:
#include <Arduino.h>
#include "Wiegand.h"
WIEGAND wg;
void setup() {
pinMode(GPIO_NUM_23, OUTPUT);
Serial.begin(9600);
wg.begin(GPIO_NUM_18, GPIO_NUM_21);
digitalWrite(GPIO_NUM_23, LOW);
}
void loop() {
if(wg.available())
{
Serial.print("Wiegand HEX = ");
Serial.print(wg.getCode(),HEX);
Serial.print(", DECIMAL = ");
Serial.print(wg.getCode());
Serial.print(", Type W");
Serial.println(wg.getWiegandType());
Serial.print(", Raw Data: ");
Serial.println(wg.getCode());
}
}
The
digitalWrite
function sets the reader in either WG26 or WG34 mode, right here in WG34 Mode, which is (probably) the right length. That being said, holding a card against it produces this output:
Quote:
Wiegand HEX = D1E24D, DECIMAL = 13754957, Type W34
This is not the result it is supposed to give. According to the ID I got from a brand reader, it should be this: 1204937293. Mind you, the application labels it SNR, which might as well stand for serial number. The Raw Data Output of this card would be 0000000000004DE2D147, and the card type is a Legic Advant 14443. I've tried changing the modes, the output stays the same. I'd appreciate any hints and tips, everything helps!