This article is applicable for situations where the badge ID printed on the credential does not match any of the badge ID’s that are generated from the calculate button on the Settings > Credential page in Pure Access.
This article contains instructions on how to calculate a custom bitmask by comparing the desired badge ID with the raw data read from the card. This new bitmask will allow credentials to be enrolled by typing in the heat-stamped number manually.
- A web access profile with the Credentials Settings permission.
- A calculator that can convert hexadecimal and decimal values to binary. Note that the default Windows calculator has this ability when set to programmer mode.
- A sample badge/fob for which the custom bitmask is intended.
- A reader that is connected to Pure Access and is currently online.
In order to calculate our custom bitmask, we must first get the bits of our card data.
- Present the unenrolled credential to a reader to produce a “Decline Badge Not Found” event in the dashboard history. Take note of the value under the “BADGE” column:
In this example, we have 0000379500. When calculating a new bitmask, this portion of the data will need to be discarded. More on this later.
- Gather the “Raw Data” value of the credential:
- Navigate to Users and then click > Manage Credentials next to a User.
- Choose Badge from the Credential Type drop-down box.
- Choose the Credential Format (bit format) from the drop-down box.
- Click the Enroll by Presentation radio button.
- Choose the Access Point to which you just presented the credential from the drop-down box.
- Click “Read”:
- Copy the entire “Raw Data” value into a Notepad document.
- Copy the heat-stamped number printed on the badge into Notepad:
- If we compare this raw data value with the badge number from the decline event in the history (see step one above), we can see that 0000379500 matches between the two. Delete this portion of the raw data from the document:
Converting data to binary:
We will now take the values in our Notepad document and convert them to binary. To do this, open the Windows calculator in programmer mode and set it to “HEX” (hexadecimal).
- Copy the raw data value from Notepad and paste it into the calculator, then click “BIN” (binary).
- Copy this binary data into the Notepad document.
- Clear your calculator and set it to “DEC” (decimal). Paste or type the heat-stamped value and then click “BIN” to see the binary equivalent:
- Copy this to Notepad under your binary raw data:
Comparing the raw data with the badge ID:
Now that we have our binary value of both the raw data and the badge ID, we must align the 1’s and 0’s to start our custom bitmask calculation.
- Shift the heat-stamped binary value to the right until each 1 and 0 aligns to match the 1’s and 0’s from the raw data binary value above it.
- From here we can determine which bits we want vs. which we don’t want. On a third line, compare the binary values and type 0 for any mismatch and 1 for any match.
- The rightmost bit on the raw data binary is a parity bit which can be ignored for now. In our example, this is a 0.
- Going from right to left, we want to keep every bit that matches (up to the first 1 that we encounter) in our Raw Data Binary.
- Any data preceding our heat-stamp binary will be 0’s.
- Take the wanted bits binary value and put this in your calculator while it is in BIN mode, then select HEX to get the hexadecimal equivalent:
- This value is our custom bitmask.
We can now put this into our custom bitmask field in Pure Access with all preceding zeros (24 digits total):
- Click the Settings tab on the left side navigation.
- Select Credential from the secondary navigation.
- Under Set Credential Bitmask:
- Select Custom from the Bitmask drop-down box.
- Paste the value from abvoe into the Custom Bitmask box.
- Enter the External Keypad Site Code.
- Click SAVE and then SEND BITMASK TO ALL READERS.
To test your custom bitmask: enroll the credential to a user via presentation, send an update to your access points, then present the credential to a reader.