All of lore.kernel.org
 help / color / mirror / Atom feed
* mgmt-api.txt
@ 2013-02-18  7:27 Randy Yates
  2013-02-18  8:12 ` mgmt-api.txt Johan Hedberg
  0 siblings, 1 reply; 4+ messages in thread
From: Randy Yates @ 2013-02-18  7:27 UTC (permalink / raw)
  To: linux-bluetooth

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.
-- 
Randy Yates
Digital Signal Labs
http://www.digitalsignallabs.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mgmt-api.txt
  2013-02-18  7:27 mgmt-api.txt Randy Yates
@ 2013-02-18  8:12 ` Johan Hedberg
  2013-02-18  8:58   ` mgmt-api.txt Johan Hedberg
  0 siblings, 1 reply; 4+ messages in thread
From: Johan Hedberg @ 2013-02-18  8:12 UTC (permalink / raw)
  To: Randy Yates; +Cc: linux-bluetooth

Hi Randy,

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.

Johan

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mgmt-api.txt
  2013-02-18  8:12 ` mgmt-api.txt Johan Hedberg
@ 2013-02-18  8:58   ` Johan Hedberg
  2013-02-18 16:00     ` mgmt-api.txt Randy Yates
  0 siblings, 1 reply; 4+ messages in thread
From: Johan Hedberg @ 2013-02-18  8:58 UTC (permalink / raw)
  To: Randy Yates, linux-bluetooth

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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: mgmt-api.txt
  2013-02-18  8:58   ` mgmt-api.txt Johan Hedberg
@ 2013-02-18 16:00     ` Randy Yates
  0 siblings, 0 replies; 4+ messages in thread
From: Randy Yates @ 2013-02-18 16:00 UTC (permalink / raw)
  To: linux-bluetooth

Thanks much, Johan. That clarifies things nicely.

--Randy

Johan Hedberg <johan.hedberg@gmail.com> writes:

> 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
> --
> 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

-- 
Randy Yates
Digital Signal Labs
http://www.digitalsignallabs.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-02-18 16:00 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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   ` mgmt-api.txt Johan Hedberg
2013-02-18 16:00     ` mgmt-api.txt Randy Yates

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.