Rosslare AYC-Q54B (Wiegand) Keypad

Hi,

I'm trying to read the key-presses on a Rosslare keypad (http://www.rosslaresecurity.com/products/ayc-q54b/). I tried using this code, which is the only thing I could find: GitHub - monkeyboard/Wiegand-Protocol-Library-for-Arduino: Wiegand 26 and Wiegand 34 Protocol Library for Arduino
...but it doesn't work (nothing shows up in the serial output).

I am NOT trying to read RFID, only the 1-9 keypad entries.

Any guidance? Keypad is lit up, buttons make a beep when pressed. Two data lines, two ground lines, 1 power line.

Thanks!

I'm sorry but I don't have any information on the communication protocol for that device. What can you tell us about that ?
If you bought it you must have a manual . Can you provide some information from the manual ?

I'm not sure if we can help someone hack a security keypad. There are legal issues . I'm sure you understand. We don't know who you are or why you are trying to hack this security access keypad. This whole post is very suspicious. I am almost inclined to forward a link to this post to the FBI just on general principles. I might need to notify the Global Moderator so he can get your IP address for the records in case the FBI ask us later.

Huh? What are you talking about?

I bought a keypad that I'm trying to use as an access method for getting into my house.

Doesn't it come with any documentation that might describe the communication protocol ?

I somehow found a library and figured out how to read the incoming data. Each keypress generates a 4-digit binary code. I'm having trouble capturing the entire code though (so that I can use it elsewhere). Any help would be much appreciated!

const int data0 = 0; // Interrupt 0, digital pin 2
const int data1 = 1; // Interrupt 1, digital pin 3

int nums = 0;

volatile long readerdata = 0;
String val1 = "";
String val2 = "";

void setup() {
attachInterrupt(data0, readerdata0, CHANGE);
attachInterrupt(data1, readerdata1, CHANGE);
Serial.begin(9600);
Serial.println("\n--Ready--");
}

void readerdata0() {
int status = digitalRead(data0+2);
if (status == LOW)
readerdata = readerdata << 1;
else if (digitalRead(data1+2) == HIGH) {
//Serial.print(readerdata, BIN);
val1 = String(readerdata, BIN);
readerdata = 0;
nums++;
}
}

void readerdata1() {
int status = digitalRead(data1+2);
if (status == LOW)
readerdata = (readerdata << 1) | 1;
else if (digitalRead(data0+2) == HIGH) {
//Serial.print(readerdata, BIN);
val2 = String(readerdata, BIN);
readerdata = 0;
nums++;
}
}

void loop() {
if(nums == 4) {
Serial.println("Code Received: " + val1 + val2);
nums = 0;
}
}

It is only a 12 key keypad so it must be DCBA code :
code/keys
0 (1)
1 (2)
2 (3)
3 (4)
4 (5)
5 (6)
6 (7)
7 ("8")
8 (9)
9 (10
A (11)
B (12)

 const int data0 = 0; // Interrupt 0, digital pin 2
const int data1 = 1; // Interrupt 1, digital pin 3

int nums = 0;

volatile long readerdata = 0;
String val1 = "";
String val2 = "";

void setup() {
  attachInterrupt(data0, readerdata0, CHANGE);
  attachInterrupt(data1, readerdata1, CHANGE);
  Serial.begin(9600);
  Serial.println("\n--Ready--");
}

void readerdata0() {
  int status = digitalRead(data0+2);
  if (status == LOW)
    readerdata = readerdata << 1;
  else if (digitalRead(data1+2) == HIGH) {
    //Serial.print(readerdata, BIN);           
    val1 = String(readerdata, BIN);
    readerdata = 0;
    nums++;
  }
}

void readerdata1() {
  int status = digitalRead(data1+2);
  if (status == LOW)
    readerdata = (readerdata << 1) | 1;
  else if (digitalRead(data0+2) == HIGH) {
    //Serial.print(readerdata, BIN);
    val2 = String(readerdata, BIN);
    readerdata = 0;    
    nums++;    
  }
}

void loop() {
if(nums == 4) {
  Serial.println("Code Received: " + val1 + val2);
  nums = 0;
  }
}

You almost had it.....this is the solution and even just simpler. Note that you were resetting the "readerdata" every time and it will hold the number entered on the keypad, no need for the variable Val
--- Petur ----

const int data0 = 0; // Interrupt 0, digital pin 2
const int data1 = 1; // Interrupt 1, digital pin 3

int nums = 0;

volatile long readerdata = 0;

void setup() {
attachInterrupt(data0, readerdata0, CHANGE);
attachInterrupt(data1, readerdata1, CHANGE);
Serial.begin(9600);
Serial.println("\n--Ready--");
}

void readerdata0() {
int status = digitalRead(data0+2);
if (status == LOW)
readerdata = readerdata << 1;
else if (digitalRead(data1+2) == HIGH) {
nums++;
}
}

void readerdata1() {
int status = digitalRead(data1+2);
if (status == LOW)
readerdata = (readerdata << 1) | 1;
else if (digitalRead(data0+2) == HIGH) {
nums++;
}
}

void loop() {
if(nums == 4) {
Serial.println(readerdata);
nums = 0;
readerdata = 0;
}
}