A record of all 3 evaluations of the Bluetooth® 5 certified SoC RSL10 for the first time - Part 3 "Construction of a demo environment using BLE communication with RSL10"

Introduction

This time, we will build a demo environment using BLE communication with ONSEMI's RSL10. Here, we will guide those who are developing RSL10 for the first time and those who will be developing in the future to build a demo environment using BLE communication with RSL10.

For Part 1 and Part 2, see this link.
・ 1st "Turn on the LED"
・Part 2 Part 1 "Until a sensing error occurs in RSL"
・Part 2 Part 2 "The cause and solution of sensing errors in RSL"

What to prepare and how to connect, development tools, development environment preparation

what to prepare

・Smartphone: Android or Iphone
・The following evaluation boards

RSL10-SIP-001GEVB

RSL10-BDK-GEVK

NOA-1305

Hardware connection method

Connect as shown below.
RSL10-SIP-001GEVB is a product in which the RSL10, antenna (*), and other peripheral passive components are packaged in one package, so please connect as shown below.
(*) Certified to international radio regulations (CE, IC, KC, MIC, FCC)

development tools

・onsemi IDE: An Eclipse®-based integrated development environment.

onsemi IDE

Preparing the development environment

For preparation of the development environment, please refer to the first article.

Start designing with onsemi IDE

Importing the sample code for building a demo environment using BLE communication

1. Start ONSEMI's IDE. To open the ON Semiconductor IDE, select ON Semiconductor > ON from the Windows​ ​Start​ ​menu.

2. Click on the "Example" tab to see a list of all example projects included in the RSL10 CMSIS-Pack.

3. Select the sample project called Custom Service Firmware(BDK-GEVK) and click the copy button to import it into your workspace. This sample program also implements a custom service protocol over BLE to communicate with the RSL10 Sense and Control Android or iOS mobile application. (See Fig. 1)

Figure 1 Pack Manager Perspective: Examples Tab


4. C/C++ will open in Project Explorer and you will see the newly copied project (bdk_ics_firmware).

5. By clicking main.c in the bdk_ics_firmware folder on the Project Explorer, you can check the C language code for building a demo environment using BLE communication. (See Figure 2)

Fig. 2 How to check the C language code related to building a demo environment using BLE communication

How to build a sample code for building a demo environment using BLE communication

1. Right-click the folder for bdk_ics_firmware and click Build Project. Alternatively, select a project and click [Build Project].

2. When the build is executed, the output of the build will be displayed on the on-semi IDE C/C++ as shown in Figure 3.

Figure 3 Build output example


3. The main results output to the Debug folder on the Project Explorer are as follows. Shown in Figure 4. The file used to build the demo environment using BLE communication is bdk_ics_firmware.elf.

Figure 4 Output files from build

How to debug the sample code for building a demo environment using BLE communication

Debug using the bdk_ics_firmware.elf file.

1. Right-click the bdk_ics_firmware.elf file in the Project Explorer and select Debug As > Debug Configurations.

2. When the Debug Configurations dialog appears, right-click GDB SEGGER J-Link Debugging and select New Configuration. You will see a new configuration of bdk_ics_firmware.elf under the GDB SEGGER heading. The details of the new configuration appear in the right panel.

3. Go to the Debugger tab and enter "RSL10" in the "Device Name" field. Make sure SWD is selected as the target interface. (See Fig. 5)

Figure 5 GDB startup settings and Debugger tab settings


4. After the configuration update is complete, connect the evaluation and development board to your PC with a micro USB cable and click Debug. J-Link will automatically download a sample code called bdk_ics_firmware and store it in the RSL10 's flash memory.

5. After clicking Debug, click Resume (F8) in Figure 6 below.

Figure 6 Resume click location

Building a demo environment using BLE communication using a smartphone

1. Download and launch the RSL10 Sense and Control application on your smartphone. (See Figure 7)

Figure 7 RSL10 Sense and Control

Figure 8 About the settings page

2. Switch to Receive over BLE mode. Click the gear icon on the top right to open the settings page. The settings page should confirm: (Refer to Fig. 8 on the left)

・Enable Broadcast slider is off
・Manage Receive Channel is set to [Receive via BLE]

Figure 9 Connect to a booted BDK_BLE_Terminal device

3. Connect to the booted BDK_BLE_Terminal device. (See Figure 9 left) Each device is identified by name and MAC address. Devices can be assigned a custom name by clicking the three dots on the right. Also, the device name can be changed in the RSL10 program (main.c:44).

Fig. 10 Select ALS-NOA1305 sensor from components

4. Select ALS-NOA1305 sensor from components. (Refer to Fig. 10 on the left)


5. You can observe the sensor data received and updated by the app on your smartphone. (See Figure 11 below)

Fig. 11 Observation of sensor data received and updated by an app on a smartphone

Inquiry

If you are interested in the contents and products introduced this time, please contact us.

Onsemi Manufacturer information Top

If you want to go back to ONSEMI Manufacturer Information Top, please click below.