View Single Post
Posts: 1,313 | Thanked: 2,978 times | Joined on Jun 2011 @ Finland
#755
Continued from http://talk.maemo.org/showthread.php?t=82899&page=11

Originally Posted by jalyst View Post
TBH I'm not sure of too many others either, I know there's many other uses/profiles, but I only use a tiny fraction of them regularly.
Perhaps if I dug-up some more info. on BT profiles that would help?

Maybe, I just thought conditions based on use-case (i.e. profile being used) would be slightly better, but maybe it isn't.
Thank god I made some progress on this, so now I can catch the D-Bus messages that I was aiming at. This gives some hope for getting this to work, but I'm not yet fully in clear waters.

So far it seems to me that querying another Bluetooth device for its profiles requires more steps (= which means more power hungry too). So unless there's convincing arguments made why detection by Bluetooth addresses is not workable for peoples use cases, I'm going to pursue the simpler route.

The problem still is that I don't fully understand the use-cases. I've done a little testing with my two devices and if I understand correctly, the devices are always paired after initial pairing unless pairing is explicitly removed. The other signal that I'm watching is connected. I did some tests and seems connection is not made unless something is transferred. When I transferred a picture from one device to another a Bluetooth connection was made for the duration of the transfer, and then dropped.

The question I have for people wanting this condition, is what's their use cases? Is there more than the audio streaming? During audio streaming it's common sense the Bluetooth connection is "alive", so a condition on Bluetooth device's connection would fit well to that use case. But is there some other uses that requires something else?

There is also possibility to scan near-by Bluetooth devices, but I'm unwilling to include that as it's likely to be power hungry judging by how the APIs have been structured.

Oh I see, I hadn't considered that, hmmm...
Maybe some sort of check can be devised to warn users that they're creating a rule which will cause issues?
Or maybe that check could prevent them from creating that rule, PERIOD?
Now that I managed to make some advances using the D-Bus detection, I hope I won't even have to consider this approach. I haven't thought this through, but it might be a bit tricky to detect all kinds of loops that can be possible to create (using different combinations of rules).
__________________
My N9/N950 projects:
 

The Following 2 Users Say Thank You to ajalkane For This Useful Post: