RadiusNetworks / scanbeacon-gem

A Ruby gem for scanning beacons
MIT License
30 stars 9 forks source link

BLE112 advertising & address rotation #10

Closed davemradnet closed 9 years ago

davemradnet commented 9 years ago

Update the BLE112Device class to support bluetooth address rotation (privacy mode)

I used the following code to test out the functionality

device = ScanBeacon::BLE112Device.new
device.open do |device|
  device.start_private
end

5.times do |i|
  sleep 1
  puts "changing: #{i}"
  device.open do |device|
    device.change_bluetooth_address
  end
end

device.open do |device|
  device.stop_adv
end
syoder commented 9 years ago

I verified using ScanBeacon for Mac that we can advertise and rotate the address (it shows up as a new device every time you rotate).