adafruit / adafruit/Adafruit_CircuitPython_BLE
add addtional service to ProvideServicesAdvertisement
- Dominant language
- Python
- Stars
- 138
- Forks
- 58
- PR merge metrics
- No merged PRs in 30d
Description
[easyg_trycode.txt](https://github.com/adafruit/Adafruit_CircuitPython_BLE/files/15119831/easyg_trycode.txt)
when running the code i get error
Traceback (most recent call last):
File "", line 21, in
File "adafruit_ble/advertising/standard.py", line 197, in __init__
File "adafruit_ble/advertising/standard.py", line 120, in extend
AttributeError: 'list' object has no attribute 'uuid'
what is the meaning of advertisement = ProvideServicesAdvertisement() does it advertise all services ?
import time
from ble_packet_buffer_service import PacketBufferService
from ble_json_service import SensorService
from adafruit_ble import BLERadio
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble_adafruit.temperature_service import TemperatureService
from adafruit_ble_adafruit.humidity_service import HumidityService
from adafruit_ble.services.standard import BatteryService
ble = BLERadio()
ble.name= "ZP"
pbs = PacketBufferService()
service = SensorService()
advertisement = ProvideServicesAdvertisement()
temp_svc = TemperatureService()
temp_svc.measurement_period = 1000
temp_last_update = 0
humidity_svc = HumidityService()
humidity_svc.measurement_period = 100
humidity_last_update = 0
battery_svc = BatteryService()
addtional question does PacketBufferService could interfere SensorService ?
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with adafruit_ble/advertising/standard.py, especially ProvideServicesAdvertisement and extend, then reproduce the traceback using the attached easyg_trycode.txt example. Determine the intended handling of the supplied services and document or test the expected behavior, including whether PacketBufferService and SensorService can coexist.
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