This project demonstrates how to update the code of a running application on the CC1350 Texas Instruments board via Bluetooth Low Energy (BLE).
The project consists of:
- A sample application (cc1350-ota).
- GATT client - a utility used to send the updated app over BLE.
- CC1350 Texas Instruments board
- Code Composer Studio (CCS)
- simplelink_cc13x0_sdk
- Clone this repository
- Open CCS
- Import the BLE stack project from the TI SDK folder
(
<ti>/simplelink_cc13x0_sdk_1_60_00_21/examples/rtos/CC1350_LAUNCHXL/blestack/simple_peripheral/tirtos/ccs
) - Import the cc1350-ota project (from this repository)
- Build the
stack
project - Build the
app
project
- Import the BLE stack project from the TI SDK folder
(
- OTA client
- On Windows - build the gattclient C# client
- On Linux:
- Install dependencies:
sudo dnf install python3-pyelftools bluez
- Install dependencies:
-
Flash the projects onto the board (via Eclipse / Uniflash)
- Flash the built "stack" project onto the board
- Flash the built "app" project onto the board
-
Run the GATT client The GATT client accepts a path to a .json file, and transmits the application blob (metadata + code + data) onto the board via BLE. The JSON file (
ota.json
) can be located under theDebug/
directory of the app project.- On Windows: run the
gattclient.exe <path to json>
- On Linux:
- Convert the JSON artifact into a series of blobs:
./prepare_blobs.py Debug/ota.json
. This will create $PWD/ota_blobs directory. - Discover the MAC address of your CC1350 board, easy way to do this is with
sudo hcitool lescan -i hciXX
- Push the OTA blobs to the board:
./push_ota.sh BLE_MAC_ADDR DIR_WITH_BLOBS
- Convert the JSON artifact into a series of blobs:
- On Windows: run the
BSD