maZZoo maZZoo's blog
very low frequency tech postings  -  code/bluestep.writeback
    home
    blog
    feed
    eyes
    info

    code [12]
    dect [4]
    hard [8]
    meta [5]
    security [5]

Thu, 10 Nov 2005

bluestep
/*
 * bluestep - locks your screen once you step out of the room,
 *            provided that you took your bluetooth enabled
 *            mobile phone with you.
 *
 * version 0.01
 *
 * usage: bluestep <bdaddr>
 *
 *      bdaddr  - MAC address of the remote bluetooth device
 *
 *
 * (c) 2005 by Matthias Wenzel, licensed under GPLv2
 *
 */

this tiny daemon peridically pings your bluetooth mobile, if doesn't get responses for a while it will lock your X desktop with "xscreensaver-command -lock".

hints:
figure out your <bdaddr> with:
# hciconfig hci0 up
# hcitool scan
Scanning ...
        00:11:22:33:44:55       my_left_foot
# 
try to ping your device (hciconfig/hcitool/l2ping come with your bluetooth libraries and tools):
# l2ping -c 3 00:11:22:33:44:55
Ping: 00:11:22:33:44:55 from 00:55:44:33:22:11 (data size 44) ...
0 bytes from 00:11:22:33:44:55 id 0 time 27.52ms
0 bytes from 00:11:22:33:44:55 id 1 time 32.05ms
0 bytes from 00:11:22:33:44:55 id 2 time 47.04ms
3 sent, 3 received, 0% loss

if the above command works you're probably set to run bluestep!

bluestep-0.01.tar.bz2

0 writebacks

writebacks...

comment...

 
Name:
URL/Email: (optional)
Title: (optional)
Comments:
Save my Name and URL/Email for next time

validate HTML