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

BleakDBusError: [org.bluez.Error.Failed] Software caused connection abort #15

Open
amotl opened this issue Feb 24, 2023 · 3 comments
Open

Comments

@amotl
Copy link
Contributor

amotl commented Feb 24, 2023

Hi there,

people using this software on real hardware reported about occasional connection errors.

So after a few new tests I notice that it often comes to:

BleakDBusError: [org.bluez.Error.Failed] Software caused connection abort

On this matter, I've already discovered hbldh/bleak#666 and hbldh/bleak#802. Probably there should be another connection retry when this happens?

With kind regards,
Andreas.

@UserMacUseface
Copy link

The error happens on first connection sometimes.
After the detection of a device and while attempting to connect.

@amotl
Copy link
Contributor Author

amotl commented Feb 24, 2023

I see. Thank you for clarifying.

@amotl
Copy link
Contributor Author

amotl commented Feb 24, 2023

Thank you for sharing the full traceback of another similar exception at GH-22, which can also be worked around by just trying again.

  File "/usr/lib/python3.9/site-packages/calypso_anemometer/engine.py", line 79, in handler
    await calypso.set_datarate(rate)
  File "/usr/lib/python3.9/site-packages/calypso_anemometer/core.py", line 217, in set_datarate
    await self.client.write_gatt_char(
  File "/usr/local/lib/python3.9/dist-packages/bleak/backends/bluezdbus/client.py", line 690, in write_gatt_char
    assert_reply(reply)
  File "/usr/local/lib/python3.9/dist-packages/bleak/backends/bluezdbus/utils.py", line 22, in assert_reply
    raise BleakDBusError(reply.error_name, reply.body)
bleak.exc.BleakDBusError: [org.bluez.Error.Failed] Operation failed with ATT error: 0x0e (Connection Rejected Due To Security Reasons)

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

2 participants