adafruit / adafruit/Adafruit_CircuitPython_BLE

What causes the "NotImplementedError" in my Python code when I try to start advertising?

Open
#160 4 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
138
Forks
58
PR merge metrics
No merged PRs in 30d

Description

I am working with Adafruit_CircuitPython_BLE on a MacBook running Monterey 12.3. The code below is an example from the Adafruit library (ble_advertising_simpletest.py).

`from adafruit_ble import BLERadio

from adafruit_ble.advertising import Advertisement

ble = BLERadio()
advertisement = Advertisement()
advertisement.short_name = "HELLO"
advertisement.connectable = True

while True:
print(advertisement)
ble.start_advertising(advertisement, scan_response=b"")
while not ble.connected:
pass
print("connected")
while ble.connected:
pass
`
When I get to the "ble.start_advertising" line I get the "NotImplementedError".
The MacBook should support BLE since it communicates with my iPhone, right?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with ble_advertising_simpletest.py and the BLERadio.start_advertising call shown in the report. Reproduce the NotImplementedError on the stated MacBook environment, then determine whether the platform supports this operation and record the confirmed cause or required documentation change.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
embedded-iot
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.