From: Johan Hedberg <johan.hedberg@gmail.com>
To: Natalya Rozhnova <rozhnova.natalya@gmail.com>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: Understanding Bluez mgmt events
Date: Tue, 16 May 2017 17:24:14 +0300 [thread overview]
Message-ID: <20170516142414.GA9507@x1c> (raw)
In-Reply-To: <CAMybWM3jHv75hrixjk3Ep8Er7Qkw8T5peKTN6SNE3qJLg9n2eg@mail.gmail.com>
Hi Natalya,
On Tue, May 16, 2017, Natalya Rozhnova wrote:
> I'm trying to understand the mgmt events in Bluez.
> If I understand correctly, the MGMT_OP_... commands are first sent as following:
>
> mgmt_send(adapter->mgmt, MGMT_OP_START_DISCOVERY, ...)
>
> And then it should trigger a corresponding event like
> MGMT_EV_DISCOVERING, MGMT_EV_DEVICE_FOUND etc.
>
> I'm quite lost in understanding who, where and how generates these
> MGMT_EV... events...
> Could anybody please explain this on a simple example or showing a
> piece of code in bluez sources where it is done...
The mgmt protocol is a protocol between user space and the kernel. User
space (normally bluetoothd) sends commands to the kernel, and the kernel
sends events to user space. You can find the kernel-side implementation
in net/bluetooth/mgmt.c.
Johan
next prev parent reply other threads:[~2017-05-16 14:24 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-05-16 8:49 Understanding Bluez mgmt events Natalya Rozhnova
2017-05-16 14:24 ` Johan Hedberg [this message]
2017-05-16 15:27 ` Natalya Rozhnova
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=20170516142414.GA9507@x1c \
--to=johan.hedberg@gmail.com \
--cc=linux-bluetooth@vger.kernel.org \
--cc=rozhnova.natalya@gmail.com \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox