Giter Club home page Giter Club logo

bluetooth-scanner-activity-monitor's Introduction

bluetooth-scanner-activity-monitor

An activity monitor for physical locations that scans for bluetooth devices

This project scans for bluetooth devices, takes a picture from the webcam and then dumps the devices found, timestamp and picture location into a MySQL database.

We use bluetoothctl to scan for bluetooth devices. We have the scan run for 15 seconds. The output is piped through grep to only grab the lines with "device" in them. This is then saved to bt.txt.

Requirements:

  • Install LAMP Stack
    • Create Bluetooth database with Log table
    • Create bt_user account and give privileges to bluetooth database.
  • Install Open CV for Python
  • Python 3
  • All files are in /var/www/html directory

This implementation has the python script be manually triggered and then it simply goes through a while True: loop that has a sleep of 60 seconds.

Might be better to have a cron job fire off every minute and eliminate the sleep in the python script

Code explaination: take-pic-mysql-loop.py is the main script that triggers OpenCV to take a picture, bluetoothctl to scan for devices and inputs results to MySQL bt-mysql-report.php is a basic ASCII dashboard to show device activity over different periods of time bt-mysql-loop-picture-report.php shows a per minute devices found, a picture and a timestamp

Scrap paper:

Demo system is Ubuntu Desktop

Bluetoothctl —timeout 10 scan on | grep Device > bt.txt

Sudo apt install pip

Pip install opencv-python

Create database bluetooth

Create table log - id int primary key auto_increment - timestamp double - pic name text - bt-list text

Create user bt_user create bt_user identified by '123456'; GRANT ALL PRIVILEGES ON bluetooth.* TO 'bt_user';

Localhost, bluetooth, log, bt_user, 123456

bluetooth-scanner-activity-monitor's People

Contributors

elithecomputerguy avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.