changing structure: move from MSPP430 to general BTstack manual

This commit is contained in:
mila@ringwald.ch 2014-11-07 13:17:14 +00:00
parent 96f1894675
commit a9aa8324cd
3 changed files with 46 additions and 22 deletions

View File

@ -68,6 +68,7 @@ morekeywords={*, timer_source_t, data_source_t, uint32_t, uint16_t, uint8_t, RUN
\newcommand{\authorMatthias}{Dr. sc. Matthias Ringwald} \newcommand{\authorMatthias}{Dr. sc. Matthias Ringwald}
\newcommand{\bkContact}{\href{contact@bluekitchen-gmbh.com}{contact@bluekitchen-gmbh.com}} \newcommand{\bkContact}{\href{contact@bluekitchen-gmbh.com}{contact@bluekitchen-gmbh.com}}
\newcommand{\barWidth}{0.3cm} \newcommand{\barWidth}{0.3cm}
\newcommand{\urlfoot}[2]{\href{#1}{{\color{blue} #2}}\footnote{#1}}
\makeatletter \makeatletter
\renewcommand{\maketitle}{ \renewcommand{\maketitle}{
@ -86,7 +87,7 @@ morekeywords={*, timer_source_t, data_source_t, uint32_t, uint16_t, uint8_t, RUN
\vspace*{1.5cm} \vspace*{1.5cm}
\begin{spacing}{2} \begin{spacing}{2}
{\huge \color{bkblue} \@title} \\ {\huge \color{bkblue} \@title} \\
{\Large \color{bklightblue} Using MSP430 Examples} {\Large \color{bklightblue} Including Quickstart Guide and Recipes}
\end{spacing} \end{spacing}
\vspace*{1.5cm} \vspace*{1.5cm}
{\color{bkblue}\large \authorMila \\ {\color{bkblue}\large \authorMila \\
@ -105,8 +106,8 @@ morekeywords={*, timer_source_t, data_source_t, uint32_t, uint16_t, uint8_t, RUN
} }
\makeatother \makeatother
\title[BTstack for MSP430] {BTstack Getting Started} \title[BTstack Manual] {BTstack Manual}
\author{Copyright \copyright 2012-2013 BlueKitchen GmbH} \author{Copyright \copyright 2012-2014 BlueKitchen GmbH}
%%% BEGIN DOCUMENT %%% BEGIN DOCUMENT
\begin{document} \begin{document}
@ -120,7 +121,8 @@ morekeywords={*, timer_source_t, data_source_t, uint32_t, uint16_t, uint8_t, RUN
Thanks for checking out BTstack! In this manual, we first provide the usual 'quick starter guide' before highlighting BTstack's main design choices and going into more details with a few examples. Finally, we outline the basic steps when integrating BTstack into existing single-threaded or even multi-threaded environments. The Revision History is shown in the Appendix \ref{appendix:revision_history} on page \pageref{appendix:revision_history}. Thanks for checking out BTstack! In this manual, we first provide the usual 'quick starter guide' before highlighting BTstack's main design choices and going into more details with a few examples. Finally, we outline the basic steps when integrating BTstack into existing single-threaded or even multi-threaded environments. The Revision History is shown in the Appendix \ref{appendix:revision_history} on page \pageref{appendix:revision_history}.
\input{hwsetup_msp430} \section{Quick Start}
\section{BTstack Architecture} \section{BTstack Architecture}
@ -1510,7 +1512,6 @@ void fill_advertising_report_from_packet(advertising_report_t * report, uint8_t
} }
\end{lstlisting} \end{lstlisting}
\begin{lstlisting}[caption=GATT client queries handling., label=code:gattBrowserQueryHandler] \begin{lstlisting}[caption=GATT client queries handling., label=code:gattBrowserQueryHandler]
void handle_gatt_client_event(le_event_t * event){ void handle_gatt_client_event(le_event_t * event){
le_service_t service; le_service_t service;
@ -1567,6 +1568,13 @@ void handle_gatt_client_event(le_event_t * event){
\end{lstlisting} \end{lstlisting}
\include{example_spp_le_counter}
\subsection{sdp\_bnep\_query}
\section{Platforms}
\input{hwsetup_msp430}
\section{Porting to Other Platforms} \section{Porting to Other Platforms}
In this chapter, we highlight the BTstack components that need to be adjusted for different hardware platforms. In this chapter, we highlight the BTstack components that need to be adjusted for different hardware platforms.

View File

@ -1,6 +1,4 @@
% !TEX root = btstack_gettingstarted.tex % !TEX root = btstack_gettingstarted.tex
\newcommand{\urlfoot}[2]{\href{#1}{{\color{blue} #2}}\footnote{#1}}
\newcommand{\UserGuide}{\urlfoot{http://processors.wiki.ti.com/index.php/PAN1315EMK\_User\_Guide\#RF3\_Connector}{User Guide}{}} \newcommand{\UserGuide}{\urlfoot{http://processors.wiki.ti.com/index.php/PAN1315EMK\_User\_Guide\#RF3\_Connector}{User Guide}{}}
\newcommand{\MSPGCCWiki}{\urlfoot{http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=MSPGCC\_Wiki}{MSPGCC Wiki}} \newcommand{\MSPGCCWiki}{\urlfoot{http://sourceforge.net/apps/mediawiki/mspgcc/index.php?title=MSPGCC\_Wiki}{MSPGCC Wiki}}
\newcommand{\Subversion}{\urlfoot{http://www.sliksvn.com/en/download}{Subversion}} \newcommand{\Subversion}{\urlfoot{http://www.sliksvn.com/en/download}{Subversion}}
@ -12,12 +10,13 @@
\newcommand{\MSPFlasher}{\urlfoot{http://processors.wiki.ti.com/index.php/MSP430\_Flasher\_-\_Command\_Line\_Programmer}{MSP430Flasher software}} \newcommand{\MSPFlasher}{\urlfoot{http://processors.wiki.ti.com/index.php/MSP430\_Flasher\_-\_Command\_Line\_Programmer}{MSP430Flasher software}}
\newcommand{\MSPDebug}{\urlfoot{http://mspdebug.sourceforge.net/}{MSPDebug}} \newcommand{\MSPDebug}{\urlfoot{http://mspdebug.sourceforge.net/}{MSPDebug}}
\section{Get started with BTstack and MSP-EXP430F5438 + CC256x}
\subsection{Hardware Setup} \subsection{MSP-EXP430F5438 + CC256x }
\subsubsection{Hardware Setup}
We assume that a PAN1315, PAN1317, or PAN1323 module is plugged into RF1 and RF2 of the MSP-EXP430F5438 board and the "RF3 Adapter board" is used or at least simulated. See \UserGuide{}. We assume that a PAN1315, PAN1317, or PAN1323 module is plugged into RF1 and RF2 of the MSP-EXP430F5438 board and the "RF3 Adapter board" is used or at least simulated. See \UserGuide{}.
\subsection{General Tools} \subsubsection{General Tools}
The MSP430 port of BTstack is developed using the Long Term Support (LTS) version of mspgcc. General information about it and installation instructions are provided on the \MSPGCCWiki{}. The MSP430 port of BTstack is developed using the Long Term Support (LTS) version of mspgcc. General information about it and installation instructions are provided on the \MSPGCCWiki{}.
@ -33,8 +32,8 @@ On Windows, you need to install and configure Subversion, mspgcc, GNU Make, and
\item \Python{} for Windows: Add Python installation folder to the Windows Path in Environment Variables. \item \Python{} for Windows: Add Python installation folder to the Windows Path in Environment Variables.
\end{itemize} \end{itemize}
\subsubsection{Adding paths to the Windows Path variable}\label{sec:windowsPath} Adding paths to the Windows Path variable:
\begin{itemize} \begin{itemize} \label{sec:windowsPath}
\item Go to: Control Panel$\rightarrow$System$\rightarrow$Advanced tab$\rightarrow$Environment Variables. \item Go to: Control Panel$\rightarrow$System$\rightarrow$Advanced tab$\rightarrow$Environment Variables.
\item The top part contains a list of User variables. \item The top part contains a list of User variables.
\item Click on the Path variable and then click edit. \item Click on the Path variable and then click edit.
@ -43,7 +42,7 @@ On Windows, you need to install and configure Subversion, mspgcc, GNU Make, and
\end{itemize} \end{itemize}
\subsection{Getting BTstack from SVN} \subsubsection{Getting BTstack from SVN}
Use Subversion to check out the latest version. There are two approaches: Use Subversion to check out the latest version. There are two approaches:
\begin{itemize} \begin{itemize}
@ -61,7 +60,7 @@ Use Subversion to check out the latest version. There are two approaches:
In both cases, Subversion will create the \path{btstack} folder and place the code there. In both cases, Subversion will create the \path{btstack} folder and place the code there.
\subsection{CC256x Init Scripts} \subsubsection{CC256x Init Scripts}
In order to use the CC256x chipset on the PAN13xx modules, an initialization script must be obtained. Due to licensing restrictions, this initialization script must be obtained separately as follows: In order to use the CC256x chipset on the PAN13xx modules, an initialization script must be obtained. Due to licensing restrictions, this initialization script must be obtained separately as follows:
\begin{itemize} \begin{itemize}
@ -74,11 +73,11 @@ The common code for all CC256x chipsets is provided by $bt\_control\_cc256x.c$.
Note: Depending on the PAN13xx module you're using, you'll need to update \path{bluetooth_init_cc25...} in the Makefile to match the downloaded file. Note: Depending on the PAN13xx module you're using, you'll need to update \path{bluetooth_init_cc25...} in the Makefile to match the downloaded file.
\subsection{Compiling the Examples} \subsubsection{Compiling the Examples}
Go to \path{btstack/MSP-EXP430F5438-CC256x/example} folder in command prompt and run make. If all the paths are correct, it will generate several .hex files. These .hex files are the firmware for the MSP430 and can be loaded onto the device, as described in the next section. Go to \path{btstack/MSP-EXP430F5438-CC256x/example} folder in command prompt and run make. If all the paths are correct, it will generate several .hex files. These .hex files are the firmware for the MSP430 and can be loaded onto the device, as described in the next section.
\subsection{Loading Firmware} \subsubsection{Loading Firmware}
To load firmware files onto the MSP430 MCU, you need a programmer like the MSP430 MSP-FET430UIF debugger or something similar. Now, you can use one of following software tools: To load firmware files onto the MSP430 MCU, you need a programmer like the MSP430 MSP-FET430UIF debugger or something similar. Now, you can use one of following software tools:
@ -106,7 +105,7 @@ run
\end{lstlisting} \end{lstlisting}
\subsection{Run the Example} \subsubsection{Run the Example}
As a first test, we recommend the SPP Counter example (see Section \ref{section:sppcounter}). During the startup, the LEDs flash rapidly while the init script is transferred to the CC256x chipset. After that, the Experimenter board is discoverable as "BTstack SPP Counter" and provides a single virtual serial port. When you connect to it, you'll receive a counter value as text every second. The SPP Counter doesn't use the display to keep the memory footprint small. As a first test, we recommend the SPP Counter example (see Section \ref{section:sppcounter}). During the startup, the LEDs flash rapidly while the init script is transferred to the CC256x chipset. After that, the Experimenter board is discoverable as "BTstack SPP Counter" and provides a single virtual serial port. When you connect to it, you'll receive a counter value as text every second. The SPP Counter doesn't use the display to keep the memory footprint small.

View File

@ -41,9 +41,7 @@ The SDP protocol allows to discover services provided by a Bluetooth device.
The SMP protocol allows to setup authenticated and encrypted connection. The SMP protocol allows to setup authenticated and encrypted connection.
\subsection{ATT - Attribute Protocol} \subsection{ATT - Attribute Protocol}
ATT is a wire application protocol, while GATT dictates how ATT is employed in service composition. Every Low Energy profile must be based on GATT. So, ultimately, every LE service uses ATT as the application protocol. An ATT server stores attributes. An ATT client stores nothing; it uses the ATT wire protocol to read and write values on server attributes. Most of the ATT protocol is pure client-server: client takes the initiative, server answers. But ATT has notification and indication capabilities, in which the server takes the initiative of notifying a client that an attribute value has changed, saving the client from having to poll the attribute.
\subsection{GATT - Generic Attribute Profile}
The GATT profile is a service that uses the ATT for discovering services, and for reading and writing characteristic values on a peer device.
\subsection{SPP - Serial Port Profile} \subsection{SPP - Serial Port Profile}
The SPP profile defines how to set up virtual serial ports and connect two Bluetooth enabled devices. See Appendix \ref{appendix:api_} for the SPP API. The SPP profile defines how to set up virtual serial ports and connect two Bluetooth enabled devices. See Appendix \ref{appendix:api_} for the SPP API.
@ -64,13 +62,13 @@ There are two ways to send advertising out with GAP: The Advertising Data payloa
\subsection{GATT - Generic Attribute Profile} \subsection{GATT - Generic Attribute Profile}
The Generic Attribute Profile (GATT) is a profile that uses the ATT for discovering services, and for reading and writing characteristic values on a peer device. GATT also specifies the format of data contained on the GATT server: it groups ATT attributes into Services and Characteristics, and defines set of queries the GATT Client can use to discover services, characteristics. The GATT profile uses the ATT for discovering services, and for reading and writing characteristic values on a peer device. GATT also specifies the format of data contained on the GATT server: it groups ATT attributes into Services and Characteristics, and defines set of queries the GATT Client can use to discover services, characteristics.
\subsubsection{GATT BLE Roles} \subsubsection{GATT BLE Roles}
\begin{itemize} \begin{itemize}
\item \emph{GATT Server Role} - The GATT server stores the data and accepts GATT client requests, commands and confirmations. The GATT server sends responses to requests and when configured, sends indication and notifications asynchronously to the GATT client. \item \emph{GATT Server Role} - The GATT server stores the data and accepts GATT client requests, commands and confirmations. The GATT server sends responses to requests and when configured, sends indication and notifications asynchronously to the GATT client.
\item \emph{GATT Client Role} - The GATT Client discovers ... \item \emph{GATT Client Role} - The GATT Client is used to discover services, and their characteristics and descriptors on a peer device. It can also subscribe for notifications or indications that the characteristic on the GATT server has changed its value.
\end{itemize} \end{itemize}
\subsubsection{Attribute Database - GATT-based Profile Hierarchy} \subsubsection{Attribute Database - GATT-based Profile Hierarchy}
@ -78,6 +76,25 @@ Attributes, as transported by the Attribute Protocol, are formatted as services
The security that is required to access a service or a characteristic is defined in ATT database along with service/characteristic declaration. The GATT Server usually does not initiate any security request, but it can. The security that is required to access a service or a characteristic is defined in ATT database along with service/characteristic declaration. The GATT Server usually does not initiate any security request, but it can.
\subsection{BNEP - Bluetooth Network Encapsulation Protocol}
The BNEP protocol is built on top of L2CAP and it is used to transport control and data packets over standard network protocols such as TCP, IPv4 or IPv6. . BNEP specifies a minimum L2CAP MTU of 1691.
\subsection{PAN - Personal Area Networking Profile}
The PAN profile uses BNEP to provide on-demand networking capabilities between Bluetooth devices. The PAN profile defines the following roles:
\begin{itemize}
\item PAN User (PANU)
\item Network Access Point (NAP)
\item Group Ad-hoc Network (GN)
\end{itemize}
PANU is a Bluetooth device that communicates as a client with GN, or NAP, or with another PANU Bluetooth device, through a point-to-point connection. Either the PANU or the other Bluetooth device may terminate the connection at anytime.
NAP is a Bluetooth device that provides the service of routing network packets between PANU by using BNEP and the IP routing mechanism. A NAP can also act as a bridge between Bluetooth networks and other network technologies by using the Ethernet packets.
The GN role enables two or more PANUs to interact with each other through a wireless network without using additional networking hardware. The devices are connected in a piconet where the GN acts as a master and communicates either point-to-point or a point-to-multipoint with a maximum of seven PANU slaves by using BNEP.
Currently, BTstack supports only PANU.
\section{Dual Mode Support} \section{Dual Mode Support}
\subsection{BR/EDR - Basic Rate/Extended Data Rate, or shortly Classic} \subsection{BR/EDR - Basic Rate/Extended Data Rate, or shortly Classic}
\subsection{LE - Low Energy} \subsection{LE - Low Energy}