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

Could not start notify on 0011: Unreachable #1473

Open
snowuyl opened this issue Dec 5, 2023 · 2 comments
Open

Could not start notify on 0011: Unreachable #1473

snowuyl opened this issue Dec 5, 2023 · 2 comments
Labels
Backend: WinRT Issues or PRs relating to the WinRT backend

Comments

@snowuyl
Copy link

snowuyl commented Dec 5, 2023

  • bleak version: v0.21.1
  • Python version: v3.11.5
  • Operating System: Windows 11

Description

I run main.py for testing Nordic UART service. But exception occurred with the following log messages.

Logs

D:\workspace_Python\bleak-example>python3 main.py
Zephyr Bluetooth device
D7:D2:19:5F:4D:5D
Paired: True
D:\workspace_Python\bleak-example\main.py:108: FutureWarning: is_connected has been changed to a property. Calling it as an async method will be removed in a future version
x = await client.is_connected()
manual
C. Capture
M. Measure
S. Stop measure
R. Reading result
Q. Quit

Enter an option: Disconnected callback called!
Exception in thread Thread-1 (thread_function):
Traceback (most recent call last):
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 1038, in _bootstrap_inner
self.run()
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\threading.py", line 975, in run
self._target(*self._args, **self.kwargs)
File "D:\workspace_Python\bleak-example\main.py", line 170, in thread_function
loop.run_until_complete(run_uart(bt_mac_address, loop))
File "C:\Program Files\WindowsApps\PythonSoftwareFoundation.Python.3.11_3.11.1520.0_x64__qbz5n2kfra8p0\Lib\asyncio\base_events.py", line 653, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "D:\workspace_Python\bleak-example\main.py", line 111, in run_uart
await client.start_notify(UART_RX_UUID, notification_handler)
File "C:\Users\broth\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\bleak_init
.py", line 834, in start_notify
await self._backend.start_notify(characteristic, wrapped_callback, **kwargs)
File "C:\Users\broth\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\bleak\backends\winrt\client.py", line 973, in start_notify
_ensure_success(
File "C:\Users\broth\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.11_qbz5n2kfra8p0\LocalCache\local-packages\Python311\site-packages\bleak\backends\winrt\client.py", line 163, in _ensure_success
raise BleakError(f"{fail_msg}: Unreachable")
bleak.exc.BleakError: Could not start notify on 0011: Unreachable

@snowuyl
Copy link
Author

snowuyl commented Dec 5, 2023

bleak-example.zip

@snowuyl
Copy link
Author

snowuyl commented Dec 5, 2023

Procedures to reproduce this issues are as follows.

  1. Unzipping bleak-example.zip to D:\workspace_Python folder.
  2. cd D:\workspace_Python\bleak-example
  3. python3 main.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend: WinRT Issues or PRs relating to the WinRT backend
Projects
None yet
Development

No branches or pull requests

2 participants