Linux bluetooth development
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Randy Yates <yates@digitalsignallabs.com>,
	linux-bluetooth@vger.kernel.org
Subject: Re: mgmt-api.txt
Date: Mon, 18 Feb 2013 10:58:06 +0200	[thread overview]
Message-ID: <20130218085806.GB11034@x220> (raw)
In-Reply-To: <20130218081221.GA8590@x220>

Hi,

On Mon, Feb 18, 2013, Johan Hedberg wrote:
> On Mon, Feb 18, 2013, Randy Yates wrote:
> > Almost all text files in doc/ are consistently-documented dbus APIs,
> > specifying service, interface, and object path.
> > 
> > However, doc/mgmt-api.txt is in a completely different format. It states
> > something about "Packet Structures" but I have no idea which packets the
> > document is referring to.
> > 
> > Can someone explain how to use this API? We have a requirement to set
> > some of these properties, such as discoverability and link level
> > security.
> 
> This is just a special socket type that kernel versions from 3.4 onwards
> provide. See e.g. the mgmt_new_default() function in src/shared/mgmt.c
> for an example of creating a mgmt socket that you can use to communicate
> using the protocol described in mgmt-api.txt. There are also several
> tools in the source tree that use mgmt sockets, e.g. tools/btmgmt
> client/bluetoothctl and monitor/btmon. Looking at the source code for
> those tools may also be helpful.

Minor mistake there: bluetoothctl doesn't use mgmt sockets (it uses just
the D-Bus interface). I also went ahead and pushed a description of how
to create mgmt sockets to mgmt-api.txt since this was a quite obvious
omission in the file. Another file you'll probably find useful is
lib/mgmt.h which has structs and numerical definitions for the mgmt
protocol.

Johan

  reply	other threads:[~2013-02-18  8:58 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-02-18  7:27 mgmt-api.txt Randy Yates
2013-02-18  8:12 ` mgmt-api.txt Johan Hedberg
2013-02-18  8:58   ` Johan Hedberg [this message]
2013-02-18 16:00     ` mgmt-api.txt Randy Yates

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=20130218085806.GB11034@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=yates@digitalsignallabs.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