Skip to content

TimeoutError when Trying to recive service from connection #197

@FyrfyX8

Description

@FyrfyX8

when trying to recive a service using its UUID i get an TimeoutError:

code.py output:
Scanning...
<BoundServiceList: UUID(0xff00)>
True
Traceback (most recent call last):
File "code.py", line 18, in
File "adafruit_ble/init.py", line 104, in getitem
File "adafruit_ble/init.py", line 68, in _discover_remote
TimeoutError:

here is the code:

from adafruit_ble import BLERadio
from adafruit_ble.advertising.standard import ProvideServicesAdvertisement
from adafruit_ble.uuid import VendorUUID, StandardUUID

ble = BLERadio()
print("Scanning...")
found = set()

ad = []
for advertisement in ble.start_scan(ProvideServicesAdvertisement):
addr = advertisement.complete_name
if addr == "GravitraxConnect":
found.add(addr)
print(advertisement.services)
con = ble.connect(advertisement, timeout=20)
break
print(con.connected)
print(con[StandardUUID(0xff00)])
print("Scan done")

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions