summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBruna Moreira <bruna.moreira@openbossa.org>2012-03-01 10:06:32 -0400
committerBruna Moreira <bruna.moreira@openbossa.org>2012-03-01 10:08:46 -0400
commite64b61e34bb60056a68f9b16cd3b950106754dfd (patch)
treecf4cefc987b0be1eae2ff906342e61952304eebf
parent08445788da0f03f4d3e61e9646fc042a532364ba (diff)
downloadbluez-le-docs-e64b61e34bb60056a68f9b16cd3b950106754dfd.tar.gz
bluez-le-docs-e64b61e34bb60056a68f9b16cd3b950106754dfd.tar.xz
bluez-le-docs-e64b61e34bb60056a68f9b16cd3b950106754dfd.zip
bluez: Add Management Interface description
-rw-r--r--bluez.tex63
1 files changed, 63 insertions, 0 deletions
diff --git a/bluez.tex b/bluez.tex
index 1f27fcd..12c7ec4 100644
--- a/bluez.tex
+++ b/bluez.tex
@@ -140,6 +140,68 @@ source code repository.
\subsubsection{input}
\subsubsection{network}
+\subsection{Management Interface}
+The Management Interface ("mgmtops" plugin) is a new interface for userspace
+side in BlueZ to communicate with the kernel side. Its purpose is to remove the
+raw HCI sockets from userspace and replace the deprecated "hciops" plugin (old
+interface).
+
+Some advantages of mgmtops plugin in comparison with hciops plugin:
+
+\begin{itemize}
+\item Command queues and synchronization: All HCI traffic is handled by the kernel,
+ so the risk of conflicts between kernel and userspace is avoided.
+\item Blocking operations: No need to use the blocking ioctl interface to e.g.
+ power on/off adapters. Asynchronous messages are used, so blocking issues are
+ solved as well.
+\item Distributed security policy and logic: user interaction and link key storage
+ is handled in userpace and kernel handles link key requests.
+\item Early-tracing capability: special tracing socket will permit userspace catch
+ all HCI traffic since first moment which adapter is plugged.
+\end{itemize}
+
+There is a layer called "adapter operations" ({\em adapter\_ops} struct in
+{\em src/adapter.c}) that describes how to communicate with kernel side. For the
+management interface, this layer is implemented in {\em plugins/mgmtops.c}.
+
+The mgmt interface is enabled by default on recent Linux kernel tree. It is
+still necessary to enable the LE support, so it can be used with LE devices.
+There are two ways to enable LE support:
+
+\begin{enumerate}
+\item If the Bluetooth subsystem is compiled as module, it can be enabled while
+ loading the "bluetooth" module:
+
+\begin{verbatim}
+$ sudo modprobe bluetooth enable_le
+\end{verbatim}
+
+\item Otherwise, if it is built-in, or the module is already loaded, enable it at
+ runtime with:
+\begin{verbatim}
+$ echo 1 | sudo tee /sys/module/bluetooth/parameters/enable_le
+\end{verbatim}
+
+\end{enumerate}
+
+To verify that LE support is enabled, use:
+
+\begin{verbatim}
+$ cat /sys/module/bluetooth/parameters/enable_le
+\end{verbatim}
+
+If will show "Y" if LE support is enabled.
+
+BlueZ will use mgmtops automatically instead of hciops if it detects that the
+kernel has support for mgmt.
+
+Note that all LE development is being implemented only for the management
+interface. No support or updates to hciops will be provided.
+
+Detailed information regarding management interface is available at {\em
+doc/mgmt-api.txt}. For a technical introduction and rationale, see at BlueZ
+homepage \cite{bzhp}.
+
\subsection{Services over GATT}
The Generic Attribute Profile (GATT) defines a service framework for
@@ -289,6 +351,7 @@ The temperature value is represented by \verb|(mantissa) x (10**exponent)|.
\section{Contact channels}
\begin{thebibliography}{9}
+\bibitem{bzhp}The upcoming Management Interface. \url{www.bluez.org/the-management-interface}
\bibitem{lls}Link Loss service. \url{https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239391}
\bibitem{ias}Immediate Alert service. \url{https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239390}
\bibitem{txp}TX Power service. \url{https://www.bluetooth.org/docman/handlers/downloaddoc.ashx?doc_id=239393}