From: "Проклов Александр Валерьевич" <ProklovAV@mail.zabtrans.ru>
To: linux-bluetooth@vger.kernel.org
Subject: Re: Problem with StopDiscovery() via dbus-send
Date: Mon, 18 Sep 2017 16:59:27 +0800 [thread overview]
Message-ID: <59BF8AEF.7000309@mail.zabtrans.ru> (raw)
In-Reply-To: <CABBYNZLyL4r1b=Kv77uB7dND2M6MUzQ_H3sdDdi-daR1YtHyGw@mail.gmail.com>
18.09.2017 14:53, Luiz Augusto von Dentz пишет:
> Hi,
>
> On Mon, Sep 18, 2017 at 5:50 AM, Проклов Александр Валерьевич
> <ProklovAV@mail.zabtrans.ru> wrote:
>> 15.09.2017 16:46, Luiz Augusto von Dentz пишет:
>>>
>>> Ive just a set of patches adressing race condition with StartDiscovery
>>> and StopDiscovery, please have a try. Also it is not a good idea to
>>> mix usage of D-Bus with btmgmt, they might not play well together
>>> especially when it comes to discovery.
>>>
>>
>> Thank you, I add "patch v2 adapter: Refactor code around discovery" to
>> source bluez-5.47 and compile it.
>>
>> My test results:
>>
>> 1. btmgmt after "find" command NOT set org.bluez.Adapter1 string:Discovering
>> =1 . But the Discovery process is already running, why he does not do it?
>> btmgmt not use dbus for managment?
>
> btmgmt uses the kernel management interface not D-Bus, this is why I
> said it may not play well with bluetoothd.
>
>> 2. If i send method StartDiscovery via dbus-send command, i see
>> org.bluez.Adapter1 string:Discovering =1 status. But I can not stop the
>> process, method StopDiscovery - has no effect.
>
> The StopDiscovery can only stop discovery started by the client, if
> you use btmgmt to start then it can only be stopped by btmgmt.
No i not use btmgmt, I would like to stop the process through Dbus.
My btmgmt example only for show process.
>
>> "btmgmt stop-find" - has no effect, in therminal i see:
>> hci0 type 7 discovering off
>> hci0 type 7 discovering on
>> hci0 type 7 discovering off
>> hci0 type 7 discovering on
>> hci0 type 7 discovering off
>> hci0 type 7 discovering on
>>
>> after btmgmt power off and btmgmt power on
>> org.bluez.Adapter1 string:Discovering =0
>>
>> I assume that the method StopDiscovery must completely terminate the process
>> StartDiscovery, regardless of the way the scan was started (btmgmt,
>> dbus-send, hcitool, bluetoothctl or more other).
>
> Only if StartDiscovery was initiated by the same D-Bus
> connection/process, and in case you are wondering there is proper
> support for discovery in bluetoothctl which does use D-Bus to control
> the discovery.
>
Use Dbus from script is difficult, but now, it is not possible to use.
>> --
>> To unsubscribe from this list: send the line "unsubscribe linux-bluetooth"
>> in
>> the body of a message to majordomo@vger.kernel.org
>> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
>
>
next prev parent reply other threads:[~2017-09-18 8:59 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-09-15 3:25 Problem with StopDiscovery() via dbus-send Проклов Александр Валерьевич
2017-09-15 6:27 ` Luiz Augusto von Dentz
2017-09-15 8:35 ` Проклов Александр Валерьевич
2017-09-15 8:46 ` Luiz Augusto von Dentz
2017-09-18 2:50 ` Проклов Александр Валерьевич
2017-09-18 6:53 ` Luiz Augusto von Dentz
2017-09-18 8:59 ` Проклов Александр Валерьевич [this message]
2017-09-19 23:58 ` Проклов Александр Валерьевич
2017-09-25 1:26 ` Проклов Александр Валерьевич
-- strict thread matches above, loose matches on Subject: below --
2018-08-24 1:58 Проклов Александр Валерьевич
2018-08-24 8:19 ` Luiz Augusto von Dentz
2018-08-24 14:36 ` Luiz Augusto von Dentz
2018-08-26 23:58 ` Проклов Александр Валерьевич
2018-08-27 7:24 ` Luiz Augusto von Dentz
2018-08-28 2:41 ` Проклов Александр Валерьевич
2018-09-06 0:43 ` Проклов Александр Валерьевич
2017-07-25 23:51 Проклов Александр Валерьевич
2017-07-26 8:05 ` Luiz Augusto von Dentz
2017-07-27 0:50 ` Проклов Александр Валерьевич
2017-07-27 11:33 ` Luiz Augusto von Dentz
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=59BF8AEF.7000309@mail.zabtrans.ru \
--to=proklovav@mail.zabtrans.ru \
--cc=linux-bluetooth@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.