gattlib icon indicating copy to clipboard operation
gattlib copied to clipboard

Unbearably slow connection

Open ghost opened this issue 8 years ago • 2 comments

Is it just me or is the connection time unbearably slow? Using on custom nrf51 boards, but the ble_scan also connects super slowly to all other ble devices in range. Any way how to speed things up? Tried both sync and async connections.

ghost avatar Mar 23 '17 09:03 ghost

As you saw in the other threads, I cannot unfortunately reproduce the issue some (most?) people are seeing.

ble_scan has a timeout to wait for the bluetooth controller to scan and find advertising BLE devices around. Reducing this timeout to 0 will use BLE devices previously found.

At the moment, the timeout is set at 4 https://github.com/labapart/gattlib/blob/master/examples/ble_scan/ble_scan.c#L9.

The hardware I use to test: a 32bit x86 Ubuntu 16.04 laptop (the one I am using), a 64bit Ubuntu 14.04 laptop, nRF52 Development Kit (BLE peripheral for gattlib), a 96board Hikey board (BLE peripheral for gattlib). The performance looks similar to mainstream gatttool on all devices.

oliviermartin avatar Mar 23 '17 10:03 oliviermartin

The scanning is fast, the connection time is super slow! Connect->read/write->disconnect

On 23 Mar 2017, at 12:48, Olivier Martin [email protected] wrote:

As you saw in the other threads, I cannot unfortunately reproduce the issue some (most?) people are seeing.

ble_scan has a timeout to wait for the bluetooth controller to scan and find advertising BLE devices around. Reducing this timeout to 0 will use BLE devices previously found.

At the moment, the timeout is set at 4 https://github.com/labapart/gattlib/blob/master/examples/ble_scan/ble_scan.c#L9.

The hardware I use to test: a 32bit x86 Ubuntu 16.04 laptop (the one I am using), a 64bit Ubuntu 14.04 laptop, nRF52 Development Kit (BLE peripheral for gattlib), a 96board Hikey board (BLE peripheral for gattlib). The performance looks similar to mainstream gatttool on all devices.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub, or mute the thread.

ghost avatar Mar 23 '17 11:03 ghost