Re: Bluetooth LE mouse staying "connected"

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

 



Hi Bastien,

On Tue, Nov 21, 2017 at 12:53 PM, Bastien Nocera <hadess@xxxxxxxxxx> wrote:
> Hey,
>
> I re-tested the battery support for Bluetooth LE, and I still have my
> mouse staying "connected" because the PropertiesChanged signal is never
> sent for it.
>
> I believe the reason is that a btd_device reference is staying around.
>
> Reproducer:
> 1. Launch bluetoothd
> 2. Turn mouse on
> 3. "disconnect" the device from the computer side
> 4. Notice that the "Connected" property didn't change but the device
> will now appear disconnected in a properties dump
>
> When connecting, the flow is:
> - batt_probe() is called, I ref() the device
> - batt_accept() is called
>
> When disconnecting, the flow is:
> - batt_disconnect() is called
>
> Shouldn't batt_remove also be called in this case, so the refing is
> symmetrical? If not, should I move the btd_device ref to batt_accept()
> and add a removal for batt_disconnect()? Or is the problem in the core?

batt_probe and batt_remove are symmetrical, probe callback should be
called just once per device when the UUID is discovered and then when
it is removed. So if you are not seeing this happen then perhaps we
have a bug somewhere.

> Cheers
> --
> 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



-- 
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