summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJefferson Delfes <jefferson.delfes@openbossa.org>2012-02-28 15:04:16 -0400
committerJefferson Delfes <jefferson.delfes@openbossa.org>2012-02-28 16:01:15 -0400
commitdf36d89880691bcd5825471f20f130b170e21e3b (patch)
treef7ddfd70d19aaf6ca963b4e6073fabee48a3cf5d
parentb51f60130a42ee58bf7f231c53f83286ea95c35f (diff)
downloadbluez-le-docs-df36d89880691bcd5825471f20f130b170e21e3b.tar.gz
bluez-le-docs-df36d89880691bcd5825471f20f130b170e21e3b.tar.xz
bluez-le-docs-df36d89880691bcd5825471f20f130b170e21e3b.zip
howto: add thermometer documentation
-rw-r--r--howto.tex48
1 files changed, 48 insertions, 0 deletions
diff --git a/howto.tex b/howto.tex
index d3e8ea3..6f79199 100644
--- a/howto.tex
+++ b/howto.tex
@@ -642,6 +642,54 @@ PropertyChanged('ImmediateAlertLevel', 'high')
\end{enumerate}
+\subsection{Thermometer API}
+
+After connected with a {\em Thermometer}, the daemon of BlueZ will export a new
+interface \verb|org.bluez.Thermometer| under \verb|org.bluez| service in D-Bus.
+Each {\em Thermometer} device will appear with object path as \\
+\verb|[prefix]/{hciX}/dev_XX_XX_XX_XX_XX_XX|.
+The device path can be found using \verb|FindDevice| method under adapter path.
+
+With device path, we just need to register a {\em Watcher} to listen measures
+updates. For this, we create a {\em Watcher} object that implements \\
+\verb|MeasurementReceived| method.
+
+\begin{enumerate}
+
+\item For testing purposes, there is a Python named \verb|test-thermometer| in BlueZ.
+To get temperature information, run:
+
+\begin{verbatim}
+$ ./test-thermometer -b <device address>
+Final measurement received
+Exponent: -1
+Mantissa: 372
+Unit: Celsius
+Time: 943934599
+Type: Mouth
+\end{verbatim}
+
+\item To get {\em Intermediate Temperature} characteristic, we need to enable
+in test script:
+
+\begin{verbatim}
+$ ./test-thermometer EnableIntermediateMeasurement -b <device address>
+Intermediate measurement received
+Exponent: -1
+Mantissa: 372
+Unit: Celsius
+Time: 943934590
+Type: Mouth
+Final measurement received
+Exponent: -1
+Mantissa: 372
+Unit: Celsius
+Time: 943934599
+Type: Mouth
+\end{verbatim}
+
+\end{enumerate}
+
% \section{Supporting tools}
%
%