Bluetooth presence and proximity

Forum regarding Linux Software and Home Automation Domotica.
Post Reply
Kroonen
Member
Member
Posts: 302
Joined: Mon Oct 01, 2007 6:38 pm
Location: Netherlands

Bluetooth presence and proximity

Post by Kroonen »

Hi,

Bluetooth under linux ou can easy make presense so you can switch something by just having you gsm with you

here a simple script

#!/bin/bash


deviceid=00:18:8D:69:12:C7
devicename=User

count=0
while [ $count -lt 1 ] ; do
hcitool name $deviceid > /tmp/$devicename
if [ -s /tmp/$devicename ] ; then
echo $devicename in de buurt ;
date
else
echo $devicename niet in de buurt ;
date
fi
sleep 7

Here a link with also you can do proximity, so you can do with more bluetooth devices (receivers) get a correct location where people are in the house for example

http://snippets.dzone.com/user/jrobertson/tag/hcitool
Post Reply

Return to “Linux Forum”