Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Lock and unlock a Mac using Bluetooth detection' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Lock and unlock a Mac using Bluetooth detection
Authored by: ptone on Dec 31, '09 07:17:38AM

If one wanted to take an entirely scripted approach - you could use the lightblue python library. I started on this once and just have a proof of concept script that looks like:

import sys
import os
import lightblue
import time

def main():
    while True:
        try:
            lightblue.finddevicename('00:23:32:F9:EF:7C',usecache=False)
            print 'still here'
        except lightblue._lightbluecommon.BluetoothError:
            print time.strftime("%H:%M:%S")
            return
        time.sleep (5)

if __name__ == '__main__':
    main()


[ Reply to This | # ]