SchneiderGateController

From VentureResearchWiki
Jump to navigation Jump to search

Schneider Gate Controller - 4 Port Reader Setup[edit | edit source]

Customer Specific Configuration[edit | edit source]

wget http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/testing/schneider/vr-4port-secondrun.sh -O - | sh

Install Gate Controller Application on Schneider Device (FIDO only) - VRPackager Method (preferred)[edit | edit source]

Run the pre-ship script to install and configure the application for Schneider network[edit | edit source]

wget http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/testing/schneider/pre-ship.sh -O - | sh

=== Install gatecontrol package manually ===

{{{ wget ​http://downloads.ventureresearch.com/schneider/gatecontroller/gatecontrol-2719.vrpkg.tar.gz -O /tmp/gatecontrol-2719.vrpkg.tar.gz }}}

{{{ vrpackager install /tmp/gatecontrol-2719.vrpkg.tar.gz }}}

Setup Gate Controller Software Development[edit | edit source]

Install python3[edit | edit source]

This software requires python3.5. Install it:

Ubuntu 12.04, 14.04[edit | edit source]

sudo add-apt-repository ppa:fkrull/deadsnakes
sudo apt-get update
sudo apt-get install python3.5 python3.5-venv

Ubuntu 16.04[edit | edit source]

Python 3.5 is already installed! Just need a:

sudo apt install python3.5-venv

on the reader (FIDO only)[edit | edit source]

opkg install python3 python3-modules python3-pyvenv

Create python3 venv[edit | edit source]

Next, create a venv for running the software. Read about virtualenv: ​https://virtualenv.pypa.io/en/stable/

pyvenv-3.5 py3.5-venv
source py3.5-venv/bin/activate

On the reader: create the venv in /home/root/venv/

cd /home/root/
pyvenv-3.5 venv
source venv/bin/activate

Install dependencies[edit | edit source]

pip install toml
pip install marshmallow
pip install aiohttp
pip install protobuf
pip install requests
pip install http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/src/vrreader-api-py3/dist/VRReaderAPI-1.0.2-py3-none-any.whl

Windows[edit | edit source]

cd \python35\scripts
pip install http://readonly:secret@svn.crm.ventureresearch.com/svn/linux/src/vrreader-api-py3/dist/VRReaderAPI-1.0.2-py3-none-any.whl

Check out source code[edit | edit source]

cd /opt/
svn co http://svn.crm.ventureresearch.com/svn/linux/py3apps/gatecontrol
cd gatecontrol

add extra locations required for the code

mkdir -p /opt/record/
mkdir -p /opt/txn/

Install systemd startup script[edit | edit source]

cp /opt/gatecontrol/gatecontrol.service /lib/systemd/system/gatecontrol.service
systemctl daemon-reload
systemctl enable gatecontrol
systemctl start gatecontrol

Testing with vrreader-playback[edit | edit source]

vrreader-playback will play back recorded events in a file, and simulate running them as the RFID service telnet API on port 2020.

run it like so:

python3 vrreader-playback.py ~/schneider/simfile-with-ultrasonic