#!/usr/bin/ruby
#file: whereib.rb
deviceid = '00:0E:6D:29:38:EB'devicename = 'Nokia 6600'
count = 0
while count <> if `hcitool name #{deviceid}`.chomp == devicename puts devicename + ' IN RANGE' puts Time.now else puts devicename + ' OUT OF RANGE' puts Time.now end sleep 7
end
No comments:
Post a Comment