Results 1 to 15 of 20

Thread: Bluetooth proximity monitor

Threaded View

Previous Post Previous Post   Next Post Next Post
  1. #3
    I have made some changes and improvements - and also I organized directory structure and added some comments.
    • upgraded DB support to sqlite3
    • rate of looking for a device decreases after specified time the device hasn't been seen
    • optimized for less number of disk writes
    • addes some comments ;-)
    • more minor improvements in all parts


    Starting from this version, temporary files are created in /tmp/btproximity, but option for your own handler scripts remains. You only need to manually create directory with the same name as BT device located in the directory which contains blueproximity.sh script and put script named run-in and/or run-out into.

    Script gets following arguments when it is run:
    device_name mac_address minutes_away

    minutes_away has meaning only for IN event.

    I've learned how to handle sqlite3 via DSO class in PHP, so there is no need to use old sqlite2. Lines
    Code:
    extension=pdo.so
    extension=pdo_sqlite.so
    must be present in your /opt/etc/php.ini file

    initializing database:
    Code:
    sqlite3 btlog.db < db.sql
    or migrating database from sqlite v2 to sqlite v3:
    Code:
    sqlite btlog.db ".dump" > btlog_dump
    ipkg remove sqlite2 ; ipkg install sqlite
    rm btlog.db
    sqlite3 btlog.db < btlog_dump
    I've added optional decreasing of search rate because it takes about 20 second to look for device that's not present (at least in my case) and time to look for all devices is limited by length of cycle. So it saves some time on devicess that haven't been present for longer time (default setting is 24 hours).

    There is still no web management of devices, maybe in next version or up to someone else ;-)

    PS etc/init.d/S99local contains a small mistake - a quote char at line 9 is needed to remove. Newest version below is OK.
    Attached Files Attached Files
    Last edited by taylor729; 12-11-2009 at 12:20.

Similar Threads

  1. Bluetooth в wl500gP
    By TIk in forum Russian Discussion - РУССКИЙ (RU)
    Replies: 410
    Last Post: 22-02-2011, 23:14
  2. vnstat - Network traffic monitor with log
    By WLAN-Fan in forum German Discussion - Deutsch (DE)
    Replies: 4
    Last Post: 22-09-2008, 12:53
  3. [HOW TO] Bluetooth in wl500g
    By TIk in forum WL-500g/WL-500gx Tutorials
    Replies: 1
    Last Post: 17-09-2008, 21:38

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •