gattlib icon indicating copy to clipboard operation
gattlib copied to clipboard

GDBus.Error:org.bluez.Error.Failed: Software caused connection abort error received while trying to establish connection with BLE device.

Open hizzawaseem opened this issue 4 years ago • 2 comments

I am facing GDBus error while establishing connection with the BLE device frequently via Raspberry Pi 3. Mostly connection establishes successfully but every now and then the following error appears, and the code exits. The error message is:

Device connected error (device:/org/bluez/hci0/dev_XX_XX_XX_XX_XX_XX): GDBus.Error:org.bluez.Error.Failed: Software caused connection abort

Interface is initialized properly and after successful connection and data sharing, we close the connection gracefully as well. The command that I am using to establish connection to the BLE Device is:

gatt_connection = gattlib_connect(NULL, mac, GATTLIB_CONNECTION_OPTIONS_LEGACY_DEFAULT);

I am running my code using a docker container using following docker run command:

docker run --name lockers --rm --privileged --net=host -v /var/run/dbus/system_bus_socket:/var/run/dbus/system_bus_socket -v /dev:/dev -v /home/pi/config:/root/config -v /etc/ssl/certs:/etc/ssl/certs:ro -v /etc/localtime:/etc/localtime:ro mizumono/smartlockers:latest --wireless --config /root/config/config.json --logdir /root/config/

hizzawaseem avatar Aug 20 '20 10:08 hizzawaseem

I have the same problem as you. Have you resolved this problem? Thank you.

ForarestLiu avatar Jun 10 '21 10:06 ForarestLiu

This solved my "GDBus.Error:org.bluez.Error" .. "connection abort": sudo apt install pulseaudio-module-bluetooth & pulseaudio -k & pulseaudio --start

Randomfinger avatar Feb 10 '22 11:02 Randomfinger