My favorites | Sign in
Project Home Wiki Issues Source
Search
for
MSP430GettingStarted  
How to get started with BTstack and MSP-EXP430F5438 + CC256x
Featured
Updated Apr 25, 2012 by matthias.ringwald@gmail.com

Hardware Setup

We assume that a PAN1315, PAN1317, or PAN1323 is plugged into the provided port and the "RF3 Adapter board" is used or at least simulated. See http://processors.wiki.ti.com/index.php/PAN1315EMK_User_Guide#RF3_Connector

General Tools

The MSP430 port of BTstack is developed using the Long Term Support version of of mspgcc. General information about it and installation instructions are provided on the MSPGCC Wiki

On Unix-based systems, Subversion, make, and Python are usually installed. If not, use the system's packet manager to install them.

On Windows, you need to install and configure Subversion, make, and Python manually:

  • Subversion for Windows: http://www.sliksvn.com/en/download
  • Optionally Tortoise SVN: This is a GUI frontend for Subversion that makes checkouts and other operations easier by integrating them into the Windows Explorer: http://tortoisesvn.net/downloads.html
  • GNU Make for Windows:
    • Download from http://gnuwin32.sourceforge.net/packages/make.htm
    • Add its bin folder to the Windows Path in Environment variable. The bin folder is where make.exe resides, and it's usually located in "C:\Program Files\GnuWin32\bin". Add this path to the Path environment variable as described later.
  • Python for Windows:
    • Download from http://www.python.org/getit/
    • Add python installation folder to the Windows Path in Environment variable. For example, for one python installation the path is "C:\Python27". Add this path to the Path environment variable as described later
  • mspgcc:
  • Adding paths to the Windows Path variable:
    • Go to Control Panel -> System -> Advanced tab -> Environment Variables.
    • In the top part you will see a list of User variables
    • Click on the Path variable and then click edit.
    • Go to the end of the line, then append "C:\mspgcc\bin" to the list without the quotes.
    • Ensure that there is a semicolon before and after "C:\mspgcc\bin".

Getting BTstack from SVN

Use Subversion to get a check out of the latest version. There are two approaches:

  1. Use subversion in a command line: Simply go to a folder where you would like to download BTstack, then type: svn checkout http://btstack.googlecode.com/svn/trunk/
  2. Windows-only: Use tortoise svn (to checkout by using the URL http://btstack.googlecode.com/svn/trunk/

In both cases, subversion will create a folder and pull all the code there.

CC256x Init Scripts

In order to use the CC256x device inside of the PAN13xx modules, an initialization script must be obtained. Due to licensing restrictions, this initialization script must be obtained as follows:

  • Download the appropriate BTS file from: http://processors.wiki.ti.com/index.php/CC256x_Downloads
  • Copy the included .bts file into chipset-cc256x
  • Run the provided Python script: ./convert_bts_init_scripts.py that's in chipset-cc256x
  • Add bt_control_cc256x.c plus bluetooth_init_cc2560_2.44.c (or newer) or bluetooth_init_cc2560A_2.1.c (or newer) to your project. If you have a PAN1315, use cc2560.
  • Use bt_control_cc256x_instance() to get a bt_control_t instance and use it in hci_init() call

Compiling the Examples

Open a command prompt in the MSP-EXP430F5438-CC256x/example folder and run make. If all the paths are correct, it will generate several hex files. These files are binary and can be downloaded to the MSP430 device, as per the next section.

Downloading Binary

To download binary files to the MSP430 MCU, you need a programming tool, the MSP430 USB FET debugger or other programmer connected, and the MSP430F5438 Experimenter board or other board powered to do so.

List of Examples

  • led_counter: no Bluetooth, just a test to see if the timer interrupt and the debug UART work
  • hid_demo: on start, the device does a device discovery and connects to the first Bluetooth keyboard it finds, paris, and allows to type on the little LCD screen.
  • spp_counter: provides a virtual serial port via SPP. On connect, it sends a message every second
  • spp_accel: provides a virtual serial port via SPP. On connect, it sends the current accelerometer values as fast as possible
  • spp_flowcontrol: provide a virtual serial port via SPP. On connect, it echoes all received data on the debug UART but adds a 1/4 pause after each packet. This was used to test that flowcontrol works.

Next Steps

You can learn more about BTstack by reading the other wiki pages. We recommend the Architecture overview next and the details about using the packet handler to execute a sequence of command on GettingStarted.

Powered by Google Project Hosting