All of lore.kernel.org
 help / color / mirror / Atom feed
From: Luiz Augusto von Dentz <luiz.dentz@gmail.com>
To: ProklovAV@mail.zabtrans.ru
Cc: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: Re: Problem with StopDiscovery() via dbus-send
Date: Fri, 24 Aug 2018 17:36:12 +0300	[thread overview]
Message-ID: <CABBYNZ+7MkWgS9ML0q58axM37m-PzW5jMDy6x1Q_TUWWU86V7g@mail.gmail.com> (raw)
In-Reply-To: <CABBYNZ+ee5BTR_gqjP3XJFMCfoSxGZNCVBuDA3mraS0hN5LkNg@mail.gmail.com>

Hi,

On Fri, Aug 24, 2018 at 11:19 AM, Luiz Augusto von Dentz
<luiz.dentz@gmail.com> wrote:
> Hi,
>
> On Fri, Aug 24, 2018 at 4:58 AM, =D0=9F=D1=80=D0=BE=D0=BA=D0=BB=D0=BE=D0=
=B2 =D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B0=D0=BD=D0=B4=D1=80 =D0=92=D0=B0=D0=
=BB=D0=B5=D1=80=D1=8C=D0=B5=D0=B2=D0=B8=D1=87
> <ProklovAV@mail.zabtrans.ru> wrote:
>>  Hello All,
>>
>> Thanks for your work. Since version bluez-5.50 start-stop discovery work
>> from command line and scripts:
>> #bluetoothctl scan on
>> #bluetoothctl scan off
>> (see mail-list "Problem with StopDiscovery() via dbus-send")
>>
>> --------------------------------------------
>>
>> My next task is to do pair with device from bash script. I tried several
>> ways:
>> 1. #bluetoothctl pair 11:22:33:44:55:66 does not work because the agent =
is
>> not created.
>> 2. Make  agent via Dbus:
>> #dbus-send --system --print-reply --type=3Dmethod_call --dest=3Dorg.blue=
z
>> /org/bluez org.bluez.AgentManager1.RegisterAgent objpath:/org/bluez/agen=
t1
>> string:KeyboardOnly
>> the command works, but I do not see in Dbus /org/bluez/agent1 created.
>> 3. Make agent via bluetoothctl:
>> [bluetooth]#agent on
>> the command works, but I do not see in Dbus agent path!.
>
> Im not sure Im following, you would like to have non-interactive mode
> working for bluetoothctl pair? The point number 2 don't make much
> sense since dbus-send normally disconnected after the reply that means
> the agent would be gone, also regarding 3 if you use a more recent
> version of bluetootctl it registers and agent automatically nowadays.
>
>> May be possible to set a default pin code via /etc/bluetooth/main.conf
>> if it is available, do not make a request for a pin from the command lin=
e? I
>> think that then #bluetoothctl pair 11:22:33:44:55:66 will be able to wor=
k
>> fine.
>
> That is something I had in mind, lets see if I can come up with something=
.

Actually it doesn't seems to be possible with the current IO
capabilities even if I set KeyboardOnly the phone end up displaying
the passcode on its end, so it seems there is no combination where the
acceptor would be asked to enter a passkey and the initiator to enter
it. I wonder if that is on purpose though, because right now the only
options in case of headless solution would be to use just works and
switch Adapter.Pairable on demand.

--=20
Luiz Augusto von Dentz

  reply	other threads:[~2018-08-24 14:36 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-08-24  1:58 Problem with StopDiscovery() via dbus-send Проклов Александр Валерьевич
2018-08-24  8:19 ` Luiz Augusto von Dentz
2018-08-24 14:36   ` Luiz Augusto von Dentz [this message]
2018-08-26 23:58   ` Проклов Александр Валерьевич
2018-08-27  7:24     ` Luiz Augusto von Dentz
2018-08-28  2:41       ` Проклов Александр Валерьевич
2018-09-06  0:43   ` Проклов Александр Валерьевич
2018-10-29  5:47   ` Non intheractive request pin-code Проклов Александр Валерьевич
2018-11-01  3:44   ` Serial communication over BT using the DBus API Проклов Александр Валерьевич
  -- strict thread matches above, loose matches on Subject: below --
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           ` Проклов Александр Валерьевич
2017-09-19 23:58           ` Проклов Александр Валерьевич
2017-09-25  1:26           ` Проклов Александр Валерьевич
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=CABBYNZ+7MkWgS9ML0q58axM37m-PzW5jMDy6x1Q_TUWWU86V7g@mail.gmail.com \
    --to=luiz.dentz@gmail.com \
    --cc=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.