Re: How to Automatically Re-Connect Bluetooth HID over GATT (HOG) Device when BlueZ Plugin "hog" is Disabled

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

 



Hi Martin,

On Thu, Mar 30, 2023 at 11:16 AM Martin Petzold <martin.petzold@xxxxxxxx> wrote:
>
> Dear Luiz,
>
> I now have another issue with remote control HID integration
> (non-system; direct implementation).
>
> I am using Java with d-bus BlueZ 5.55 on Debian Linux. I have "hid" and
> "input" plugin disabled on bluetooth startup.
>
> I have one remote integrated and working. With this one after boot and
> while application startup I iterate over all paired devices with
> existing HID service (check for existing service UUID) and then iterate
> all Report characteristics and enabling notifying for all of them (if
> supported). Everything is running well with this (legacy) remote. After
> pairing it also auto-connects using my own registered object manager, as
> suggested by you.
>
> Now we received our final custom remote control from our manufacturer
> (other chip) and this approach does not work any more. I have tried a
> lot of things now. Once the remote control is paired (which is also
> somehow still buggy) and I rebooted the system with our application, the
> device is found in the list as paired, BUT I cannot access the HID
> service any more. Therefore, I cannot enable notifying for this remote.
>
> What I realized is, that this remote control seems to have something
> like MAC address randomization enabled (probably for security reasons).
> It also does not propagate device information unless I start pairing
> mode. Because of MAC address randomization it also seems that pairing is
> buggy - only works sometimes with some special procedure.
>
> I know this remote works, because if I connected in manually via
> bluetoothctl sometimes I works with enabling of notifying. Also directly
> after pairing it seemed to work.
>
> Have you seen something like this before? What should I do?

It is probably using the privacy (aka Resolvable Private Address/RPA),
there were quite a few fixes since 5.55 so you might want to update
your version to the latest to see if pairing works properly, note that
the D-Bus object might use the RPA address when it is first paired but
after that if you restart the daemon it will use the Identity Address,
so the any code using the device objects shall not attempt to store
and access the object based on their addresses since that can change
due to these conditions.




[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