Skip to content
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

TimeoutError when Trying to recive service from connection #197

Open
FyrfyX8 opened this issue May 11, 2024 · 0 comments
Open

TimeoutError when Trying to recive service from connection #197

FyrfyX8 opened this issue May 11, 2024 · 0 comments

Comments

@FyrfyX8
Copy link

FyrfyX8 commented May 11, 2024

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")

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant