scan_beacon 0.5.4 → 0.5.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6b201d622b5ea2c016eef5c4ce64e007908cfe7
4
- data.tar.gz: 291a61d545e72091f8a5ea1dea06767dc25f49fd
3
+ metadata.gz: e2b7617a9e68313af6754ea7c7eae1149c2e5e83
4
+ data.tar.gz: 5dbe6e0b2a002f5d0305b094721f4cc96b186aac
5
5
  SHA512:
6
- metadata.gz: ac1658d5da26b236bce3d41ecca2e42b81be196d417013fbd42d52129902c1e22a02e166a54f9037cff7627d99994235a12722658697f284647667db3f6f8e05
7
- data.tar.gz: 129517c9ab08a69f95fec722450f85be1cd9c64f3fa245ca02fd32afc2b420836a7fe2cd8257da0b0256e9299fd015bc5713cc4eb18b18df9d32a524ec9c3ce9
6
+ metadata.gz: dd197c5905d393d47eedc823b934ecff75c30ba633bbc56a39a9f945f113d643b24007c912350d2cc461f2c4f172778507eef207d653625e2c56b7401da6330d
7
+ data.tar.gz: 68db3ac31891c2feac3caf8ed29fb7f90378a5862d6d2fc98c9dcdcfac746d85ff9c694769924ce6cfea138562d56e80c51dd065c7820da357ba1de657b97562
data/README.md CHANGED
@@ -8,6 +8,7 @@ A ruby gem that allows you to scan for beacon advertisements using CoreBluetooth
8
8
  ```
9
9
  gem install scan_beacon
10
10
  ```
11
+ [Tips for installing & using on Ubuntu](https://github.com/RadiusNetworks/scanbeacon-gem/wiki/ubuntu)
11
12
 
12
13
  ## Create your scanner
13
14
  ``` ruby
@@ -89,4 +90,3 @@ advertiser.stop
89
90
  To scan for beacons, you must have a Linux machine with BlueZ installed, or a Mac, or a BLE112 device plugged in to a USB port (on Mac or Linux).
90
91
 
91
92
  To advertise as a beacon, you must have a Linux machine with BlueZ installed.
92
-
@@ -57,7 +57,10 @@ module ScanBeacon
57
57
 
58
58
  def random_addr
59
59
  data = @initial_addr + Time.now.to_s
60
- Digest::SHA256.digest(data)[0..5].unpack("H2:H2:H2:H2:H2:H2").join(":")
60
+ new_addr = Digest::SHA256.digest(data)[0..5]
61
+ # the most significant bit must not be set!
62
+ new_addr[0] = [(new_addr[0].unpack("C")[0] & 0x7F)].pack("C")
63
+ new_addr.unpack("H2:H2:H2:H2:H2:H2").join(":")
61
64
  end
62
65
 
63
66
  end
@@ -1,3 +1,3 @@
1
1
  module ScanBeacon
2
- VERSION = "0.5.4"
2
+ VERSION = "0.5.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scan_beacon
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Radius Networks
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-28 00:00:00.000000000 Z
11
+ date: 2015-09-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler