Go Down

Topic: Read Write HID 125K RFID tags (Read 24634 times) previous topic - next topic


I would like to build a reader/writer for HID 125KHz RFID tags. I am just starting to learn how RFID works and thought building this would be fun. Does anyone know where I could find a chip or shield that will read and write the cards? If I build a reader/writer for HID 125KHz tags can the same circuit be used to read other manufacturers 125KHz tags?
Thank you,


I'm not sure if this will work with your tags, but it is a RFID read/write shield.

Do you have a link to your tags?


I would like to build a reader/writer for HID 125KHz RFID tags.

Most tags at 125KHz are read only. The ones you can write to are just to put the readable ID into the tag, there is no room for data.

If I build a reader/writer for HID 125KHz tags can the same circuit be used to read other manufacturers 125KHz tags?

Some but not all. There are different ways a tag can encode data so it has to match the HID way in order to work.


That link is for:-
the perfect tool for any 13.56MHz RFID or NFC application.

So it is not a 125KHz tag.


This is a 125kHz reader:


Although it claims to be also a writer I've never seen a writable 125kHz tag.

There are two version of it, they differ in the reading interface. To begin go for the UART version.


The cards I am looking at using are these: http://www.hidglobal.com/documents/proxcard_ds_en.pdf

For the time being, Just being able to change the ID would work for me to learn with.


For the time being, Just being able to change the ID would work for me to learn with.

That is all you can do with those cards you can't write any data.


Are there shields or antennas that can be bought/ built for reading/writing the HID 125KHz cards?


just a bit of code.. It can maybe help someone...

It's an arduino sketch whitch decode the card number from hid proximity card (36 bit stream) - It can be optimised :-) but I don't have time yet.. Thanks to http://colligomentis.com/2012/05/16/hid-reader-arduino-rfid-card-catcher/ site where I found the basis.

unsigned long bitHolder1 = 0;
unsigned long bitHolder2 = 0;
unsigned int bitCount = 0;
unsigned long cardChunk1 = 0;
unsigned long cardChunk2 = 0;
unsigned long result =0;
char buffer[200];
char val[50];
String value;
String value2;
String cardNumber;
int parity = 0;

// Begin Code for DATA0 and DATA1 Interrupts to get the binary data from the card
// For whatever reason, when wired to the micro DATA1 and DATA0 need to be reversed
void DATA0(void) {
    if(bitCount < 23) {
      bitHolder1 = bitHolder1 << 1;
    else {
      bitHolder2 = bitHolder2 << 1;

void DATA1(void) {
   if(bitCount < 23) {
      bitHolder1 = bitHolder1 << 1;
      bitHolder1 |= 1;
   else {
     bitHolder2 = bitHolder2 << 1;
     bitHolder2 |= 1;

// End code for DATA0 and DATA1

void setup() {
  attachInterrupt(0, DATA0, RISING);  // DATA0 (green) on HID reader, Pin 2 on Arduino
  attachInterrupt(1, DATA1, RISING);  // DATA1 (white) on HID reader, Pin 3 on Arduino
//  Serial.println("READER_0001");
  bitCount = 0; bitHolder1 = 0; bitHolder2 = 0;

void loop() {
    // Check if bits received are a valid length to be a card
    if (bitCount >= 26) {

        // Call function to get our two chunks of card values
        //Debug stuff
/*        Serial.print("bitHolders: ");
        Serial.print(bitHolder1, BIN);
        Serial.print(", ");
        Serial.println(bitHolder2, BIN);
        Serial.print("cardChunk1: ");
        Serial.println(cardChunk1, BIN);
        Serial.print("cardChunk2: ");
        Serial.println(cardChunk2, BIN);
        Serial.print("Card Value (BIN): ");
        Serial.print(cardChunk1, BIN);
        Serial.println(cardChunk2, BIN);
        Serial.print("Card Value (HEX): ");
        Serial.print(cardChunk1, HEX);
        Serial.println(cardChunk2, HEX); */
        cardNumber = (String(cardChunk1, HEX) + String(cardChunk2, HEX));
//        Serial.println(cardNumber);
        value = (String(cardNumber.substring(cardNumber.length()-4)));
        result = (hexToInt(value.charAt(value.length()-1)));
        result = result + ((hexToInt(value.charAt(value.length()-2)))*16);
        result = result + ((hexToInt(value.charAt(value.length()-3)))*256);
        result = result + ((hexToInt(value.charAt(value.length()-4)))*4096);
        value = ("000000" + String(result));
        value = (String(value.substring(value.length()-5)));
        value = (cardNumber.charAt(5) + value);
        result = value.toInt();
        bitCount = 0; bitHolder1 = 0; bitHolder2 = 0;
        delay(100); // Extend this if you want to see the card value on the LCD screen longer

int hexToInt(char nibble)
  if (nibble >= '0' && nibble <= '9')
    return nibble - '0';
  else if (nibble >= 'a' && nibble <= 'f')
    return 10 + nibble - 'a';
    return 10 + nibble - 'a';

// Function to clear interrupts and prepare them for use
void clearinterrupts () {
  // the interrupt in the Atmel processor messes up the first negative pulse as the inputs are already high,
  // so this gives a pulse to each reader input line to get the interrupts working properly.
  // Then clear out the reader variables.
  // The readers are open collector sitting normally at a one so this is OK
  for(int i = 2; i < 4; i++){
    pinMode(i, OUTPUT);
    digitalWrite(i, HIGH); // enable internal pull up causing a one
    digitalWrite(i, LOW); // disable internal pull up causing zero and thus an interrupt
    pinMode(i, INPUT);
    digitalWrite(i, HIGH); // enable internal pull up

// Function to append the card value (bitHolder1 and bitHolder2) to the necessary array then tranlate that to
// the two chunks for the card value that will be output
void getCardValues() {
  if (bitCount == 36) {
       for(int i = 19; i >= 0; i--) {
          if(i == 13 || i == 12){
            bitWrite(cardChunk1, i, 1);
          else if(i > 12) {
            bitWrite(cardChunk1, i, 0);
          else {
            bitWrite(cardChunk1, i, bitRead(bitHolder1, i + 10));
          if(i < 10) {
            bitWrite(cardChunk2, i + 14, bitRead(bitHolder1, i));
          if(i < 14) {
            bitWrite(cardChunk2, i, bitRead(bitHolder2, i));


Writable 125KHz tag;-

EM4205/EM4305: 512 bit Read/Write Multi-purpose Contactless Identification Device

EM4200: 128 bit Read Only Low Frequency Contactless Identification Device (replacing EM4100, EM4102, EM4005, EM4105)

Writable HID tag;-

Google "clone HID rfid", I say nothing.


The proximity cards should already be programmed with the prox number ... it's the system controlling the doors that typically gets "programmed" with the card number so that when it is read, the system knows it is valid for access.

URl- http://www.idcardprintersavings.com/HID-Proximity-Cards-s/155.htm

Thank you!!!


Actually you can clone rfid tags ata5577 rewritable rfid tag, it can emulate EM4200 and also EM4102 I have one in a glass tube in my hand well two. I am looking to build this but would love some help as a newbie :).

Hopefully I have helpped with this guys project :) I want to build a cloner as the one I have is rubbish and will set passwords to the tags or brick them if the couple is broken.


I remember working on such stuff a long time ago - based on a small serial e(e)prom.

such devices had a lock bit - when set, the device could not be re-written.



Go Up