Basic Setup

xaqq edited this page Sep 17, 2014 · 25 revisions

This page will guide you through a basic setup of a Leosac generic board connected with a R10 card reader from HID.

What you will need:

  • A debian based board (Raspbian ...)
  • R10 RFID card reader
  • A breadboard with a few cables and resistors

1. Install Leosac

First, make sure you have installed all the dependencies:

sudo apt-get install build-essential cmake git libtclap-dev libboost-dev

Also make sure g++ version is recent enough (4.8 or above).

g++ --version

If not, that probably means you're still under wheezy or older. See this tutorial

Then you can follow instructions on this page for a standard install.

2. Configuration

Copy the example configuration in your working directory (don't forget to replace installdir)

cp -r installdir/share/leosac/cfg/basic .
cd basic

The default configuration should be enough to get you up and running, but feel free to tinker a bit with these files. For more details take a look at the configuration section.

3. Wiring

If you don't care about electronic and are looking for something that looks like an end-product, see hardware releases.

Wiegand reader

Note: A Wiegand reader will usually use +5V as its "high" voltage level.

RaspberryPi rev2

This requires a RaspberryPi board with Raspbian installed. This introduction will not explain how to install Raspbian on your RaspberryPi, but plenty of tutorials are available on the web for that.

Wiegand wiring

Use this pin-out and the diagram above to wire the reader.

The values on the resistors are not strictly fixed. As long as the ratio between the upper and lower resistor value is 1/2 for the voltage divider, the 5k resistor can be safely replaced with another in the range from 2k to 10k depending on what you have. If you only have 10k resistors, you could even put 2 in series to obtain 20k.

Do not forget to plug the reader on a 12V current source. 5V is also suitable if you don't have another choice but is less recommended.

Door relay

Relay wiring

The relay is used to control the door. Here it is materialized by a lamp for the sake of simplicity, but feel free to replace it by the mechanism you want to use to open the door, like an electric strike. If you really don't have this hardware now, you could also just left the controlled circuit open (just wire the GPIO), and you'll hear the relay click when the door is activated.

4. Start Leosac

To start, just execute this command:

sudo leosac -g hw.xml -f core.xml

Leosac is run as root solely for gpio access and network configuration (if specified).

5. Test it !

You can now place a badge in front of the reader and see if it is recognized and opens the door. You can manage authorized IDs via the auth.conf file, Leosac will make sure to reload this file every time it changes.

You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session.
Press h to open a hovercard with more details.