BGAPI and BGLIB SPP Server Example

Application Note for BT121 and DKBT

Document Revision: 1.10

Introduction

This document provides a comprehensive guide to implementing a BGAPI and BGLIB Serial Port Profile (SPP) server example. It details the structure and usage of the BGAPI serial protocol and its companion BGLib library, using sample implementations provided with the BT121 Software Development Kit (SDK).

The example project is designed for use with the BT121 Module Development Kit and the free 'Community' version of Microsoft Visual Studio. The core implementation is compatible with any ANSI C host platform, allowing for the creation or porting of similar libraries onto platforms capable of host-to-module communication over a UART interface.

To follow along effectively, users should have the BT121 Module Development Kit, Microsoft Visual Studio Community Edition or similar, and an Android-based phone with Bluetooth 4.0 or higher support.

Getting Started

The document outlines the steps to install the Bluetooth Dual Mode SDK, including downloading the SDK from Silicon Labs' website and running the installer.

It also details the SDK's folder structure, including API, BIN, EXAMPLES, FW, HOST_EXAMPLE, and HOSTBGAPI directories, and the included tools such as BGTool, bgbuild.exe, and bgupdate.exe.

Project Walkthrough

A detailed walkthrough of the BT121 SPP Server demo project is provided, covering BGAPI project components, module firmware projects, and host application projects. The document explains the project.xml file, hardware configuration, GATT services configuration, and SDP entries.

Instructions are given for compiling the module firmware with BGBuild and flashing the new firmware using bgupdate.exe. Additionally, it covers compiling the host application project with Visual Studio and running it on Windows.

Testing and Summary

The document concludes with instructions for testing client connectivity using an Android smartphone and the S2 Bluetooth Terminal app. It guides users through scanning, pairing, establishing an SPP connection, sending data, and disconnecting.

A summary and quick-reference guide for BGAPI/BGLib implementation is provided, highlighting key aspects for both module firmware and host application projects.

PDF preview unavailable. Download the PDF instead.

AN1034-BGAPI-BGLIB-SPP-Server Microsoft Word for Office 365

Related Documents

Preview Silicon Labs Bluetooth C Application Developer's Guide for SDK v3.x
Comprehensive guide for C developers on building applications with the Silicon Labs Bluetooth SDK v3.x for Wireless Gecko devices, covering stack architecture, development flow, configuration, and resource management.
Preview AN1255: Transitioning from Bluetooth SDK v2.x to v3.x
This document provides a comprehensive guide on migrating projects from Bluetooth SDK v2.x to v3.x, detailing changes in software architecture, API, GATT configurator, and project structure. It offers step-by-step instructions and code examples to facilitate a smooth transition for developers.
Preview AN844: ASHv3-UART Host Interfacing Guide | Silicon Labs
A technical application note from Silicon Labs detailing how to set up and test UART communication between a host and Network Co-Processor (NCP) using ASHv3-UART. Covers software overview, testing procedures like bootstrap, echo, and XON/XOFF, along with debugging tips.
Preview Using the Gecko Bootloader with Silicon Labs Bluetooth Applications
This application note provides detailed information on using the Silicon Labs Gecko Bootloader with Silicon Labs Bluetooth applications for Gecko SDK (GSDK) 4.1.0 and higher. It covers BGAPI UART DFU and Bluetooth OTA upgrades, including configuration, processes, and examples.
Preview Gecko Bootloader User Guide - Silicon Labs
Comprehensive guide to the Gecko Bootloader from Silicon Labs, covering fundamentals, development, security features, and application integration for Series 3 and higher devices.
Preview Simplicity SDK Release Notes Version 2025.6.1
Release notes for Simplicity SDK Version 2025.6.1, detailing updates, new features, bug fixes, and API changes for the Silicon Labs IoT software development ecosystem.
Preview AN1128: Bluetooth Coexistence with Wi-Fi
Silicon Labs' AN1128 application note guides developers on improving coexistence between 2.4 GHz Wi-Fi and Bluetooth radios for EFR32 wireless SoCs, covering PTA support, software setup, and application code extensions.
Preview AN1269: Dynamic Multiprotocol Development with Bluetooth and Proprietary Protocols on RAIL in GSDK v3.x
Silicon Labs AN1269 provides a comprehensive guide to developing dynamic multiprotocol applications that combine Bluetooth and proprietary protocols using the Gecko SDK Suite (GSDK) v3.x. Learn about protocol coexistence, project setup, configuration, and implementation details for embedded systems.