-
Notifications
You must be signed in to change notification settings - Fork 57
Python advertisement data #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Rename Advertisement to AdvertisingPacket. Make adding advertising flags is now done explicitly by callers. 2. ServerAdvertisement creates a scan response packet to send the the full name, if it doesn't fit in the initial advertising data packet. 3. Allow UARTServer to specify peripheral name.
Started testing -- with CP PR 1993 installed. -- all of the demos seem to be working. Tried uart, eddystone and both peripheral and central demos.Used 2 nrf52840 express for central<-> peripheral demo. |
Just for fun. Also tried central demo on a maker diary nrf52840 usb dongle, only change was to use AINx for Ax for the inputs. works fine. also tested on a pca10059 (dongle) -- works as well using pins P0_02,P0_29,P0_31 as the analog inputs. |
FYI this scanner is a modification of an older version from early ble testing -- it prints out lots of stuff in my house!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In general I like having more logic in Python and less in C.
However, I'm worried about what happens to BLE APIs when we have a couple long lived Services that are managed by the supervisor rather than user code.
@tannewt This is ready for re-review. There were a few more global changes after thinking about your feedback and working on the code:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! Thank!
Updating https://github.com/adafruit/Adafruit_CircuitPython_DisplayIO_SSD1305 to 1.0.3 from 1.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_DisplayIO_SSD1305#5 from makermelissa/master Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.6.0 from 3.5.6: > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#51 from makermelissa/master > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#47 from Johennes/feature/numpy Updating https://github.com/adafruit/Adafruit_CircuitPython_BLE to 3.0.0 from 1.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_BLE#34 from dhalbert/check-cpy-version > Merge pull request adafruit/Adafruit_CircuitPython_BLE#32 from dhalbert/doc-and-cleanup > Merge pull request adafruit/Adafruit_CircuitPython_BLE#31 from dhalbert/char-fixes-and-float > Merge pull request adafruit/Adafruit_CircuitPython_BLE#30 from tannewt/api_rework > Merge pull request adafruit/Adafruit_CircuitPython_BLE#29 from adafruit/dherrada-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_BLE#25 from kattni/plotter-code > Merge pull request adafruit/Adafruit_CircuitPython_BLE#23 from kattni/update-color-picker > Merge pull request adafruit/Adafruit_CircuitPython_BLE#22 from kattni/update-color-picker > Merge pull request adafruit/Adafruit_CircuitPython_BLE#21 from kattni/cpb-color-picker > Merge pull request adafruit/Adafruit_CircuitPython_BLE#18 from dhalbert/bleio-api-revamp > Merge pull request adafruit/Adafruit_CircuitPython_BLE#17 from dhalbert/demo-central > Merge pull request adafruit/Adafruit_CircuitPython_BLE#16 from dhalbert/pairing > Merge pull request adafruit/Adafruit_CircuitPython_BLE#15 from dhalbert/python-advertisement-data
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
These
adafruit_ble
library updates are necessary for adafruit/circuitpython#1993 (bleio revamp and addition of central).adafruit_ble.advertising
instead of in C inbleio
.adafruit_ble.beacon
has changed.adafruit_ble.scanner.Scanner
andScanEntry
, which wrapbleio.Scanner
andbleio.ScanEntry
, and add additional functionality.adafruit_ble.uart.UARTServer
toadafruit_ble.uart_server.UARTServer
.adafruit_ble.uart_client.UARTClient
to provide UART functionality as a BLE central.