D0wn and D1rty with Wiegand

A few months ago, we published a history of where Wiegand came from and a “light-on-technical-details” overview of how it works. For those of us that are more engineer-y, it left a bit to be desired. For me in particular, I recently was doing some low-level work with one of my engineers. We were monitoring the lines from a badge reader and I couldn’t recall what the spec for the pulse width should be. For most people, this level of detail is overkill, but for those of you who get down and dirty with D0/D1 of Wiegand, this post is for you.

Wiegand - The venerable access control interface is explained in detail in this post.

As you might recall from our earlier post, Wiegand is used interchangeably to describe a number of things – an electronic effect, an access card, a bit stream associated with a card, or a specific reader-to-card interface. We are going to be referring to Wiegand as the signal that comes from an access control reader, out of the Data 0 (D0) and Data 1 (D1) lines. This data is interpreted as an access card number by parsing the bit stream.

The Wiegand standard is only a de facto standard, but there is a Security Industry Association (SIA) document “Access Control Standard Protocol for the 26-bit Wiegand(tm) Reader Interface” which describes an agreed standard that should work with all manufacturers’ panels. Some of the basic information found in this document is found below.

When a reader with a Wiegand interface is hooked up to an access panel, it generally includes 6 lines with the below color scheme, which interfaces with the back-end access panel.

Wiegand Wiring
D0 (green) and D1 (white) outputs are almost universally colored Wiegand readers.

Back when Telaeris was developing our XPressProx mobile proximity reader to read HID Prox cards, we needed to demodulate the data directly from the RF signal (*). Once we decoded this signal, the data was pushed both over a USB connection as well driving the signal as over standard D0/D1 Wiegand lines. When we hooked up our Agilent 54622D Oscilloscope to the data lines and presented different cards to the reader, these are examples of what we saw:

26 bit output
26 output bits 10000000100000010111001011 
   parity even 1            parity odd  1 
                00000001   Facility=1    
          BadgeID=741   0000001011100101 
36 bit output
 36 output bits 011011001011001000100101101011100101 
37 bit output
37 output bits 0001001000000011111101000001011001000

The 26 bit card is parsed out for you to see as the bit format is almost universally standard. The 36 and 37 bit cards are part of HID’s corporate 1000 line, which often mix up the location of the bits in weird and wonderful ways. The security in these cards is often simply that it is difficult to know how a bit stream might be parsed. These bitstreams can come in a variety of lengths, all the way up to 200 for some US Government PIV cards.

If you are interested in what is going on at the RF level for HID-style prox cards, send me an e-mail.


  1. I am adding a cheap Ebay magnetic door access entry /magnetic door lock to my store (not for heavy security-just temp use) . I am using a Uhpotte branded stainless steel door entry keypad with Wiegand capability for programmable key fobs. There are many wires running all over my store (coming from the back of the keypad and I am stuck and my instruction manual (and everything else I find online) only shows the two wires coming out as D0/green and D1/white….and it does not instruct me where these wires go. The keypad can read cards and I imagine they connect to my control box. My options are -Control, +Control, Push, Gnd, +12v, Com, NC, NO . Of course I’m a noob and this is my first encounter with one of these. it’s been a lot of fun hooking up bbut I am ready to move forward with these last two wires. Any help you could offer would be truly appreciated. Thanks and thanks for the great article.

  2. Hello Rand – We’re not familiar with your control box. Generally, access control panels have Wiegand data ports nicely labeled and the access data can be set up from access control software. Good luck! David

Leave A Comment

Email Subscription

Get the latest updates sent directly to your inbox!

By signing up, I understand and agree to the email marketing terms and conditions