Getting Started with EZ-BT WICED Modules
Document Number: 002-23400 Rev. **
19
7.3
Part 1: Merge SPP and Hello Sensor Application Samples
This section takes you step-by-step through the process of merging the Bluetooth BR/EDR and BLE sample application
projects. In this example project, we will use the SPP (Bluetooth BR/EDR) and hello_sensor (BLE) sample application
projects.
The merging process includes the following steps: 1) creating a new project, 2) copying appropriate files in to the new
project folder, and 3) making necessary modifications. You can
if you simply wish to try the example
project provided with this application note without going through the code development process. Detailed steps to
complete the merging process are shown below.
7 . 3 . 1
C r e a t i n g a N e w P r o j e c t
1. Create a new folder, and name it as
“spp_custom” under the
apps/snip/bt
folder in Project Explorer (see
). In this example, the project folder is created at the following location:
...\WICED-Studio-6.1\20706-A2_Bluetooth\apps\snip\bt\spp_custom
Figure 12. Creating a New Project Folder
The next two steps involve copying files from the existing sample application projects, spp and hello_sensor, which
are available as part of the WICED SDK installation.
2. Copy all files (
spp.c, makefile.mk, wiced_bt_cfg.c
) from the
spp
sample application project folder located at
…\WICED-Studio-6.1\20706-A2_Bluetooth\apps\snip\bt\spp
and paste them in the
spp_custom
folder created in
Step 1.
3. Copy two files,
hello_sensor.c
and
hello_sensor.h
from the location
…\WICED-Studio-6.1\20706-
A2_Bluetooth\apps\demo\hello_sensor
and paste them into the
spp_custom
folder created in Step 1.
7 . 3 . 2
Ad d
‘ h ell o _sen so r ’ P roj ect Fil es to t h e make f il e
1. Open
makefile.mk
and make the following changes:
▪
Add
hello_sensor.c
application source file:
Code 1.
makefile.mk
: Add Application Source Files
A
= hello_sensor.c
2. Open
spp.c
and make the following changes:
▪
Include the
hello_sensor.h
header file.
Code 2.
spp.c
: Add Header File
#include
"hello_sensor.h"