| BlueNRG-1 DK: BLE examples

- Main Page
- Modules
- Files

- File List

OTA_ServiceManager_main.c File Reference

This application implements a basic standalone BLE Over The Air (OTA) firmware updgrade. It provides the BLE Over-The-Air Service management for handling the OTA firmware upgrade of a BlueNRG-1 application which doesn't have any BLE OTA service. More...

Go to the source code of this file.

## Detailed Description

This application implements a basic standalone BLE Over The Air (OTA) firmware updgrade. It provides the BLE Over-The-Air Service management for handling the OTA firmware upgrade of a BlueNRG-1 application which doesn't have any BLE OTA service.

# KEIL project

To use the project with KEIL uVision 5 for ARM, please follow the instructions below:

1. Open the KEIL uVision 5 for ARM and select Project->Open Project menu.
2. Open the KEIL project `...\Project\BLE_Examples\OTA_ServiceManager\MDK-ARM\OTA_ServiceManager.uvprojx`
3. Select desired configuration to build
4. Select Project->Rebuild all target files. This will recompile and link the entire application
5. To download the binary image, please connect STLink to JTAG connector in your board (if available).
6. Select Project->Download to download the related binary image.
7. Alternatively, open the BlueNRG1 GUI, put the board in bootloader mode and download the built binary image.

# IAR project

To use the project with IAR Embedded Workbench for ARM, please follow the instructions below:

1. Open the Embedded Workbench for ARM and select File->Open->Workspace menu.
2. Open the IAR project `...\Project\BLE_Examples\OTA_ServiceManager\EWARM\OTA_ServiceManager.eww`
3. Select desired configuration to build
4. Select Project->Rebuild All. This will recompile and link the entire application
5. To download the binary image, please connect STLink to JTAG connector in your board (if available).
6. Select Project->Download and Debug to download the related binary image.
7. Alternatively, open the BlueNRG1 GUI, put the board in bootloader mode and download the built binary image.

## Project configurations

- `Release` - Release configuration

# Boards supported

- `STEVAL-IDB007V1`

# Power configuration settings

STEVAL-IDB007V1
Jumper name |  | Description
JP1 | JP2 |
ON 1-2 | ON 2-3 | USB supply power
ON 2-3 | ON 1-2 | The supply voltage must be provided through battery pins.
ON 1-2 |  | USB supply power to STM32L1, JP2 pin 2 external power to BlueNRG1

# Jumper settings

STEVAL-IDB007V1
Jumper name | Description
JP1 | 1-2: to provide power from USB (JP2:2-3). 2-3: to provide power from battery holder (JP2:1-2)
JP2 | 1-2: to provide power from battery holder (JP1:2-3). 2-3: to provide power from USB (JP1:1-2). Pin2 to VDD to provide external power supply to BlueNRG-1 (JP1: 1-2)
JP3 | pin 1 and 2 UART RX and TX of MCU. pin 3 GND.
JP4 | Fitted: to provide VBLUE to BlueNRG1. It can be used also for current measurement.
JP5 | Fitted : TEST pin to VBLUE. Not fitted: TEST pin to GND

# Pin settings

PIN name | STEVAL-IDB007V1
ADC1 | Not Used
ADC2 | Not Used
IO0 | Not Used
IO1 | Not Used
IO11 | Not Used
IO12 | Not Used
IO13 | Not Used
IO14 | Not Used
IO2 | Not Used
IO3 | Not Used
IO4 | Not Used
IO5 | Not Used
IO6 | Not Used
IO7 | Not Used
IO8 | Not Used
TEST1 | Not Used

# Serial I/O

Parameter name | Value | Unit
Baudrate | 115200 [default] | bit/sec
Data bits | 8 | bit
Parity | None | bit
Stop bits | 1 | bit

# LEDs description

LED name | STEVAL-IDB007V1
DL1 | Activity led
DL2 | Not Used
DL3 | ON when OTA upgrade is ongoing
DL4 | Not Used

# Buttons description

BUTTON name | STEVAL-IDB007V1
PUSH1 | Not Used
PUSH2 | Not Used
RESET | Reset BlueNRG1

# Usage

- The OTA Service Manager is a basic application which only supports the OTA Bootloader service.
- It provides the BLE OTA bootloader service to any BlueNRG-1 application stored at fixed base address on user Flash (0x1004E800) which doesn' include any OTA service. It also includes the OTA Reset Manager functionalities in order to transfer the control to the proper valid application, after a BLE OTA session.
- User is only requested to load the OTA_ServiceManager application and then build any application using it with the ST_USE_OTA_SERVICE_MANAGER_APPLICATION=1 as preprocessor and liker option.

- Further, for jumping to the OTA Service Manager application, the application can call the OTA_Jump_To_Service_Manager_Application function (i.e. just using a platform button to activate such call).

  NOTEs:

  - Refer to Use_OTA_ServiceManager workspaces on BLE_Beacon, BLE_Chat and SensorDemo IAR projects for all related examples.

Definition in file OTA_ServiceManager_main.c.