HOWTO Program a key

From i3Detroit
Jump to: navigation, search

Decoding Key IDs

If you have an RFID tag (card or fob) and don't know the ID number required to add it to the door system/CRM (<5 digits>:<5 digits>) there are a few methods:

  1. Key cards have their ID numbers printed in the corner of the card
  2. Key fobs have an encoded version of their ID etched into them. They can be decoded using this Google Sheet (thanks to Evan for the blog post explaining the procedure!)

New Keypad

Since April 2020 adding new keys and changing the status of existing ones is handled through a remote interface on McClellan.

Adding a new key

  1. Take the key you wish to program and either follow the steps on decoding key IDs and skip to running update_door or take it to the keypad and swipe it a few times
  2. Go back inside and SSH into McClellan (ask on Slack for an account)
  3. Check the last few lines of the door access log, it currently lives at /opt/door-management/access.csv
  4. From here you should see a few Denied, Unknown entries with the same key ID, that's you scanning an invalid key! Make a note of the ID
  5. At the terminal prompt enter update_door add "<First Name> <Last Name>" <Key ID> and press enter Ex: update_door add "John Smith" 12345:12345 (Note: As of Dec. 2021 apostrophes in the name field are not sanitized automatically, they must be removed before )
  6. You will be asked to enter the 4-digit PIN for this user - The terminal treats this as a password entry so the cursor will not appear to move and no digits will appear as they are entered. Press enter and repeat the PIN to ensure it is correct.
  7. Enter the key information into the CRM record for the user it belongs to and also update the master PIN spreadsheet to reflect the change
  8. Take the new key out to the door and test it! Remember that (as of Dec. 2021) the system does not beep to tell you the door has been unlocked, only when a key is recognized. After scanning the key and entering the PIN give the door a tug, you'll know if you entered the PIN correctly.

TODO: What happens if the same key ID is added later with a different member? Does it get overwritten? Will there be a collision?

Turning off a key

  1. SSH into McClellan
  2. At the terminal run update_door remove <Key ID>

Note that this does not actually remove the key from the controller but merely marks it inactive

Turning on a key

  1. SSH into McClellan
  2. At the terminal run update_door enable <Key ID>

The Old Keypad

Until ~April 2020 our front door keypad was an Eclipse ACC-950. It uses 125kHz cards in the EM4xxx standard.

Documentation related to the old keypad that should be put on the wiki:


  1. Make sure you have an unassigned key (fob or card) to use.
  2. Go to the keypad, and make sure it's at the ready screen. (i.e. not waiting for a PIN after a swipe, or otherwise distracted.)
  3. Enter the super-secret programming code, starting with * and finishing with #.
  4. Go to Add/Delete and hit # to select
  5. Select "Add by ID" and arrow up/down until you find an open slot (the serial on the bottom will show 00000:00000)
  6. Write the slot number down.
  7. Hit * to go back to the menu and select "Add by RF Learn"
  8. Tag units: 1 <blink>ONLY EVER ENTER 1 HERE. THIS IS THE STEP THAT DESTROYS KEYPADS.</blink>(if you have multiple people to add, do the entire procedure separately for them.)
  9. Close tag into RF area: Wave the unassigned key near the reader. It should pick it up.
  10. Close the tag into the RF area again, and it will show the key's serial number. Write it down.
  11. Now, hit # until you are at the main menu and select "User Settings"
  12. Access mode 3: Card and pin
  13. Careful! It just auto-advanced to the next slot. Back it up so you're working on the slot you just added someone to.
  14. Now, change PIN
  15. Let the new member enter their own PIN, 4 digits, don't press anything afterward.
  16. If it says Success!, you're done. Back out and try the new key.
  17. NOW GO ENTER IT INTO THE CRM. The slot number and the key number you wrote down, above.

Any failures, call.... whom? I'll volunteer: Nate B, 248-379-3614.

Data quality

  • Slot 123, key 123
  • Bad entry -- that's not a valid key serial number.
  • Slot 123, key 123123
  • Bad entry -- Still not a valid key serial.
  • Slot 123, key 00123:00123
  • Bad entry -- highly unlikely that both parts of the key serial are identical to the slot number!
  • Slot 123, key 218:52181
  • Bad entry -- Looks like a valid serial, but format is nonstandard and may break exports.
  • Slot 123, key 00218-52181
  • Bad entry -- Looks like a valid serial, but format is nonstandard and may break exports.
  • Slot 123, key 00218 52181
  • Bad entry -- Looks like a valid serial, but format is nonstandard and may break exports.
  • Slot 123, key 00218:52181
  • Good entry -- Looks like a valid serial, entered in the standard format.