Open kariudo opened 2 years ago
Additional errors include:
2021-12-31 14:45:12 INFO Likely found a onewheel, using ***
2021-12-31 14:45:15 ERROR Connection error: [WinError -2147483629] The object has been closed
2021-12-31 14:45:15 WARNING Cannot read data, not connected
Full debug output after detecting the board with scan:
2021-12-31 14:50:41 DEBUG Connecting to BLE device @ ***
2021-12-31 14:50:42 DEBUG _ConnectionStatusChanged_Handler: 1
2021-12-31 14:50:42 DEBUG Get Services...
2021-12-31 14:50:43 DEBUG _ConnectionStatusChanged_Handler: 0
2021-12-31 14:50:43 ERROR Connection error: Could not get GATT services: Unreachable
2021-12-31 14:50:43 DEBUG _ConnectionStatusChanged_Handler: 1
2021-12-31 14:50:43 INFO Connected to board: None
2021-12-31 14:50:43 DEBUG _ConnectionStatusChanged_Handler: 0
2021-12-31 14:50:43 WARNING Not connected, exiting loop
2021-12-31 14:50:43 DEBUG _ConnectionStatusChanged_Handler: 1
2021-12-31 14:50:43 DEBUG Disconnecting from ***
2021-12-31 14:50:43 DEBUG _ConnectionStatusChanged_Handler: 0
2021-12-31 14:50:43 DEBUG Disconnecting from BLE device...
2021-12-31 14:50:43 DEBUG Disconnected
I think the problem is coming from this bit in bleak
# Windows does not support explicitly connecting to a device.
# Instead it has the concept of a GATT session that is owned
# by the calling program.
self._session.maintain_connection = True
# This keeps the device connected until we set maintain_connection = False.
# wait for the session to become active
await asyncio.wait_for(event.wait(), timeout=timeout)
except BaseException:
handle_disconnect()
raise
finally:
self._session_active_events.remove(event)
# Obtain services, which also leads to connection being established.
await self.get_services()
Since this looks like a bleak
issue and I am more interested in linux support for my usage currently, this is not a priority unless someone else has a fix or input short of me making changes to bleak to work around it.
Currently with the
bleak
rewrite, windows should be supported.There is however an error at the unlock response (notify likely failing to get response):