-
Notifications
You must be signed in to change notification settings - Fork 1k
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
[aioble] After timeout, reconnection is successful. (Peripherals are always powered off) #950
Comments
I am facing a similar issue which appears to be related. I have a crappy device that after it disconnects it continues to send trailing connectable advertisements but when a connection attempt is made, the device simply does not respond. Its advertisements also cease. Eventually the connection attempt times out, but the system remains 'connected' in some sense and the system is corrupted. If I take a measurement with another device that is known (a bonded reconnect) I get EINVAL 22 errors all over the place. If, instead, I try and connect to the original device that had the trailing advertisements I get a connection event in the aioble event handler but nothing further happens. The only recovery is to reboot that application. |
I think I have found the reason for the issue and the solution. When the connection attempt times out, aioble fails to cancel the ongoing connection. If you then make tour device discoverable again, the connection will complete (the IRQ gets handled) but there is no longer any support for it so it goes nowhere. If you try to connect with another device, when aioble calls the I was able to solve the issue by calling
I am assuming this timeout get signaled ONLY when the connection attempt times out. |
|
The other device is powered off. However, after a connection timeout, it appears to be connected when retried. In fact, it is failing.
I'm not a native speaker, so sorry if my writing is wrong.
Environment
Steps to reproduce
Code used for testing
I added exception handling because of the following problem. (It is not a good idea to fix it in this place.)
The text was updated successfully, but these errors were encountered: