Re: Why does BlueZ remove BLE device services with disconnect reason 0?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Petri,

On Tue, Oct 13, 2015 at 8:59 PM, Petri Gynther <pgynther@xxxxxxxxxx> wrote:
> linux-bluetooth:
>
> I'm seeing the following issue with BlueZ 5.30 and BLE HoG remote control:
>
> The BLE HoG device is already paired and been able to reconnect to
> BlueZ host previously.
> But, every once in a while, the reconnect fails with "Reason:
> Connection Failed to be Established (0x3e)" -> reason 0
> (MGMT_DEV_DISCONN_UNKNOWN).
> That causes BlueZ to remove all services of this HoG device
> (disconnected -> unavailable), and after that, the HoG device is
> useless on any future reconnect attempts.
>
> Question:
> Why does BlueZ tear down all services of a BLE device when there is an
> intermittent connection error with reason 0
> (MGMT_DEV_DISCONN_UNKNOWN)?

IT is probably because in 5.30 we used to cleanup the database if the
discovery failed.

> This obviously does not happen in the normal case when the disconnect
> reason is 3 (MGMT_DEV_DISCONN_REMOTE).
> Can someone point me to the relevant code? I need to prevent this BLE
> service tear-down.

Check the git history, I think we fixed that already, or even better
use 5.35 that has persistent caching so the services are only removed
if you remove the device.

-- 
Luiz Augusto von Dentz
--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux