Skip to content

Raspberry Pi software to detect beacons transmitting advertising data and detect their RSSI.

Notifications You must be signed in to change notification settings

JackHilliard/SW-Beacon

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SW-Beacon

Raspberry Pi software to detect beacons transmitting advertising data and detect their RSSI.

Setup guide:

#install libraries sudo apt-get install python-pip sudo apt-get sqlite3 sudo apt-get install pip sudo pip install requests sudo pip install lib sudo apt-get install bluez-hcidump sudo apt-get install git build-essential libglib2.0-dev sudo apt-get install libcap2-bin

cd /home/pi/

#setup database: sudo mkdir sw-database mv /home/pi/sw-code/empty-db.sqlite /home/pi/sw-database/smartward.sqlite sudo sqlite3 sw-database/smartward.sqlite CREATE TABLE Beacon_Readings (id_Readings INTEGER PRIMARY KEY autoincrement, rssi INTEGER NOT NULL, mac_FK INTEGER NOT NULL, timestamp INTEGER NOT NULL, state TEXT DEFAULT 'NEW'); CREATE TABLE Beacons (id INTEGER PRIMARY KEY autoincrement, mac TEXT NOT NULL, active TEXT DEFAULT 'TRUE');

#move config file mv /home/pi/sw-code/example.config.json /home/pi/sw-config/config.json

#setup service sudo echo "[Unit] Description=SmartWard Beacon Scanner Service

[Service] User=pi Group=pi ExecStart=/usr/bin/python -u /home/pi/sw-code/main.py Environment=CONFIG=/home/pi/sw-config/config.json Restart=on-failure RestartSec=3 StandardOutput=journal StandardError=journal

[Install] WantedBy=multi-user.target Alias=sw-beacon.service" > /lib/systemd/system/sw-beacon.service

About

Raspberry Pi software to detect beacons transmitting advertising data and detect their RSSI.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages