About this project
The host_test project provides serial port access to the TI BLE Stack APIs, such
as GAP, GATT and ATT, and allows PC software such as BTool
and TI BLE Device
Monitor
to emulate a BLE device and connect to and browse other BLE devices
within range.
Using the project
To use BTool or BLE Device Monitor, a kit must be programmed with this project. You must import the project, build it, and download the stack and app portions to the device.
Additionally, when using CCS with more than one debugger / kit connected, you must manually specify the serial number of the debugger you want to use on a per-project basis.
Import host_test
For the CC1350 LaunchPad and the CC2640R2 LaunchPad you can find the host_test
project in their respective SDKs in Resource Explorer:
Software → < DEVICE SDK > → Examples → < DEVICE LAUNCHPAD > → blestack → host_test → TI-RTOS → CCS Compiler → host_test
Clicking on the host_test folder inside the CCS Compiler folder will open the folder contents in the right panel of Resource Explorer.
For the CC1350 LaunchPad, there is one project. Click the CCS logo in
the upper right corner of that window to import the project into your Project
Explorer. Two projects will appear in your Project Explorer window:
host_test_cc1350lp_app_FlashROM
and host_test_cc1350lp_stack_FlashROM
For the CC2640R2 LaunchPad, there are two projects: host_test_app and
host_test_stack_library. You will need to import both projects by selecting
the project folder under CCS Compiler, and clicking the CCS logo in the upper
right corner of Resource Explorer to import into your Project Explorer window.
You should end up with two projects:
host_test_cc2640r2lp_app
and host_test_cc2640r2lp_stack_library
Connect and configure second debugger
By now you should have already connected the board you want to develop on to your computer via USB and noted the serial port number used by this board.
Now connect the board you want to run host_test on, and make a note of the
Application/User
COM port exposed by that board.
With several debuggers connected, you will need to manually configure the
targetConfigs/CC2640R2F.ccxml
file in the targetConfigs folder of the
host_test_cc2640r2lp_app project for the CC2640R2 LaunchPad or the
targetConfigs/CC1350F128.ccxml
of both the host_test_cc1350lp_app_FlashROM
and host_test_cc1350lp_stack_FlashROM projects for the CC1350 LaunchPad to
use the serial number of the debugger on the board you will be running
host_test on.
Find the serial number
The correct debugger type is selected by default when you import the project. However, you may sometimes have to manually select exactly which debugger out of several connected to your computer should be used.
Follow the steps below, with only one debugger connected, or with knowledge of the serial numbers of the already connected debuggers.
- Open the
ccxml
file for your device. - Change the connection to
XDS110 USB Debug Probe
if needed (for LaunchPad) - Click on
Target Configuration
- Click on the top-level node (XDS110 USB Debug Probe)
- Choose 'Select by serial number'
- Start command prompt and call
c:\ti\ccs\ccs_base\common\uscif\xds110\xdsdfu.exe -e
to enumerate the connected debugger.
C:\ti>c:\ti\ccs\ccs_base\common\uscif\xds110\xdsdfu.exe -e
USB Device Firmware Upgrade Utility
Copyright (c) 2008-2014 Texas Instruments Incorporated. All rights reserved.
Scanning USB buses for supported XDS110 devices...
<<<< Device 0 >>>>
VID: 0x0451 PID: 0xbef3
Device Name: XDS110 with CMSIS-DAP
Version: 2.2.4.2
Manufacturer: Texas Instruments
Serial Num: 0000FF01
Mode: Runtime
Found 1 device.
C:\ti>
Finding XDS110 serial number- Insert the serial number. Above it's
0000FF01
. - Save the settings.
- Test the connection.
Flash the device with host_test
If you are using the CC1350 LaunchPad, you will need to flash both the app and stack projects separately:
- Compile the
host_test_cc1350lp_stack
project by right-clicking and selectingBuild project
- Do the same for the
_app
project. - Select
host_test_cc1350lp_stack
project by left-clicking, and debug by clicking on the green bug icon. - Terminate the debug session by clicking the red square icon.
- Debug the
host_test_cc1350lp_app
project (F11) - Terminate the debug session.
For the CC2640R2 LaunchPad, you will need to build both the app and the stack library projects but you will only need to flash the app project:
- Compile the
host_test_cc2640r2lp_stack_library
project by right-clicking and selectingBuild project
- Do the same for the
_app
project. - Select
host_test_cc2640r2lp_app
project by left-clicking, and debug by clicking on the green bug icon. - Terminate the debug session.
You can now use BTool or Device Monitor to connect to the virtual COM port connected to this board.
This work is licensed under a Creative Commons Attribution-NonCommercial-NoDerivatives 4.0 International License.