forked from adafruit/Adafruit_CircuitPython_BLE_BroadcastNet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix broken class matching on receive
Restructured match_prefixes to correctly match sequence number field Added insurance that sequence number comes first to do so Also caught the (macOS) case where adapter has no address (WIP) Fixes adafruit#15
- Loading branch information
1 parent
82899ad
commit c936f92
Showing
2 changed files
with
31 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
"""This example merely scans for broadcastnet packets as a quick check that something is sending them.""" | ||
|
||
from adafruit_ble.advertising.standard import ManufacturerDataField | ||
import adafruit_ble | ||
import adafruit_ble_broadcastnet | ||
|
||
ble = adafruit_ble.BLERadio() | ||
|
||
print("scanning") | ||
# By providing Advertisement as well we include everything, not just specific advertisements. | ||
for advert in ble.start_scan( | ||
adafruit_ble_broadcastnet.AdafruitSensorMeasurement, interval=0.5 | ||
): | ||
print(advert) |