Skip to content

acmnyit/csci870

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Indoor Localization Framework with WiFi Fingerprinting

Setup

  • distribution files
cp deploy/config.py.dist config.py
cp deploy/wsgi.py.dist wsgi.py
sudo cp dist/apache.conf.dist /etc/apache2/sites-available/<name>.conf
# edit the files appropriately
  • virtual environment
virtualenv -p python3 local
. local/bin/activate
pip install Flask
pip install psycopg2
deactivate
  • database
sudo adduser <user>
sudo su -l postgres
psql
create user <user> with superuser password '<pass>';
create database <db> owner <user>;
alter role <user> in database <db> set search_path to public,dbo,dbv,new,map,fnd;
alter database <db> set extra.secretkey to '<secretkey>';
su -l <user>
psql -d <db> < <script.sql>

Notes

  1. test api with curl
curl -X POST -d 'data=one' csci870.nydev.local/api/test
curl -X GET csci870.nydev.local/api/test
  1. check sequence numbers
select last_value from dbo.actor_id_seq;
select last_value from dbo.wap_id_seq;
  1. update sequence after restore
select setval('dbo.actor_id_seq', (select max(id) from dbo.actor));
select setval('dbo.wap_id_seq', (select max(id) from dbo.wap));

References

  1. https
  2. email
  3. wsgi-envvars
  4. wifi
  5. service
  6. sqlite

About

Indoor Localization Framework with WiFi Fingerprinting

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 100.0%