DiscoverableTimeout not working as expected
Hi,
My client calls SetProperty(DiscoverTimeout, 20) then SetProperty(Discoverable, True) on my adaptor, but I don't get the expected behaviour:
signal sender=:1.2 -> dest=(null destination) serial=847 path=/org/bluez/1564/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "DiscoverableTimeout"
variant uint32 20
signal sender=:1.2 -> dest=(null destination) serial=850 path=/org/bluez/1564/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "Discoverable"
variant boolean true
signal sender=:1.2 -> dest=(null destination) serial=852 path=/org/bluez/1564/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "DiscoverableTimeout"
variant uint32 0
As the timeout is now 0, discoverable never resets itself to false.
Am I doing something stupid, or is setting the discovery timeout broken?
Ross
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Luiz Augusto von Dentz
maintainerHi Ross,
Quoted 6 lines · Ross Burton
Hi,
My client calls
SetProperty(DiscoverTimeout, 20)thenSetProperty(Discoverable, True)on my adaptor, but I don't get the expected behaviour:
Quoted 9 lines
signal sender=:1.2 -> dest=(null destination) serial=847 path=/org/bluez/1564/hci0; interface=org.bluez.Adapter; member=PropertyChanged string "DiscoverableTimeout"
variant uint32 20
signal sender=:1.2 -> dest=(null destination) serial=850 path=/org/bluez/1564/hci0; interface=org.bluez.Adapter; member=PropertyChanged string "Discoverable"
variant boolean true
signal sender=:1.2 -> dest=(null destination) serial=852 path=/org/bluez/1564/hci0; interface=org.bluez.Adapter; member=PropertyChanged string "DiscoverableTimeout"
variant uint32 0
I got a different behavior (using git tree and testtest-adapter):
signal sender=:1.65 -> dest=(null destination) serial=151 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "DiscoverableTimeout"
variant uint32 10
signal sender=:1.65 -> dest=(null destination) serial=160 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "Discoverable"
variant boolean true
signal sender=:1.65 -> dest=(null destination) serial=161 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "Class"
variant uint32 6430988
signal sender=:1.65 -> dest=(null destination) serial=162 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "Discoverable"
variant boolean false
signal sender=:1.65 -> dest=(null destination) serial=163 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "Class"
variant uint32 6422796
Quoted 1 line
As the timeout is now 0, discoverable never resets itself to false.
Basically the timeout is persistent so once set it will be triggered every time you switch the adapter to discoverable, in other words it wont change to 0 automatically anymore, I guess this was an old behavior but it has been changed long time ago.
Quoted 1 line
Am I doing something stupid, or is setting the discovery timeout broken?
I guess what you need is to update your bluez version then it should work.
Signature · 2 lines
Luiz Augusto von Dentz Computer Engineer
Quoted 19 lines · Luiz Augusto von Dentz
I got a different behavior (using git tree and testtest-adapter):
signal sender=:1.65 -> dest=(null destination) serial=151 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "DiscoverableTimeout"
variant uint32 10
signal sender=:1.65 -> dest=(null destination) serial=160 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "Discoverable"
variant boolean true
signal sender=:1.65 -> dest=(null destination) serial=161 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "Class"
variant uint32 6430988
signal sender=:1.65 -> dest=(null destination) serial=162 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter;
Quoted 8 lines
member=PropertyChanged
string "Discoverable"
variant boolean false
signal sender=:1.65 -> dest=(null destination) serial=163 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "Class"
variant uint32 6422796
Interesting. Using test-adaptor and bluez 4.60 (debian sid), I don't see that behaviour. I also can't see anything relevant in the git log. :(
Ross
Signature · 2 lines
Intel Open Source Technology Centre http://oss.intel.com/
Luiz Augusto von Dentz
maintainerHi Ross,
Quoted 29 lines · Ross Burton
Quoted 19 lines · Luiz Augusto von Dentz
I got a different behavior (using git tree and testtest-adapter):
signal sender=:1.65 -> dest=(null destination) serial=151 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "DiscoverableTimeout"
variant uint32 10
signal sender=:1.65 -> dest=(null destination) serial=160 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "Discoverable"
variant boolean true
signal sender=:1.65 -> dest=(null destination) serial=161 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "Class"
variant uint32 6430988
signal sender=:1.65 -> dest=(null destination) serial=162 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter;Quoted 8 lines
member=PropertyChanged
string "Discoverable"
variant boolean false
signal sender=:1.65 -> dest=(null destination) serial=163 path=/org/bluez/3359/hci0; interface=org.bluez.Adapter; member=PropertyChanged
string "Class"
variant uint32 6422796
Quoted 3 lines
Interesting. Using test-adaptor and bluez 4.60 (debian sid), I don't see that behaviour. I also can't see anything relevant in the git log. :(
Please check if someone isn't sending SetProperty("DiscoverableTimeout", 0), that will cancel the timeout which seems the exact behavior that you are seeing with your application, bluetooth-applet on ubuntu does that when I select Make computer discoverable it set the timeout to 0.
Signature · 2 lines
Luiz Augusto von Dentz Computer Engineer