Skip to content

Occasional large delays when connecting to multiple peripherals #44

Open

Description

@Snevzor

Using Bluetoothctl I can connect to 3 peripherals in parallel without additional delays. So one connection takes 3-6 seconds (we have some really constrained connection parameters on our peripherals) and for 3 peripherals it still takes 3-6 seconds per connection.

With gatt-python we're seeing extreme large delays but not always... . For instance on an average of 10 connect/disconnect cycles with 3 peripherals: Average total connection duration 135.988185 seconds with a min/max value of 8/263.836915 seconds. So sometimes it only takes 8 seconds but it can also take 263 seconds. Very inconsistent and hard to debug.

I presume it's rather D-Bus related or perhaps gatt-python performs some additional load on D-bus?

I'm struggling really hard to debug this because when waiting for 200+ seconds on an connect_xxx callback there are no entries in bluetoothd and dbus-monitor logs. So the system hangs and there is not a single indication of why this is happening.

Activity

  1. Snevzor commented on Mar 22, 2019

    @Snevzor
    Author

    I can't really tell by looking at the gatt-python source code, but could this be related?

    adafruit/Adafruit_Python_BluefruitLE#11

  2. Machoney commented on Nov 2, 2019

    @Machoney

    Hi, any update in this issue? I'm struggling with the same problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions