DigiTekXplorer
Home
Capstone Project
abCore16 Folder
  • abCore16 Project
  • Instruction Set
  • abCore16 User Guide
AI Case Studies
Coding Basics
Embedded Systems
RP Pico Folder
  • Raspberry Pi Pico
  • Pico VGA Project
  • Pico Audio Project
FPGAs
Basic Concepts
Android App Folder
  • BLE Basics
  • Android Studio
  • BLE App User Guide
  • The Gemini Prompt
  • Android App Development
UART Design Folder
  • UART Design
DigiTekXplorer
Home
Capstone Project
abCore16 Folder
  • abCore16 Project
  • Instruction Set
  • abCore16 User Guide
AI Case Studies
Coding Basics
Embedded Systems
RP Pico Folder
  • Raspberry Pi Pico
  • Pico VGA Project
  • Pico Audio Project
FPGAs
Basic Concepts
Android App Folder
  • BLE Basics
  • Android Studio
  • BLE App User Guide
  • The Gemini Prompt
  • Android App Development
UART Design Folder
  • UART Design
More
  • Home
  • Capstone Project
  • abCore16 Folder
    • abCore16 Project
    • Instruction Set
    • abCore16 User Guide
  • AI Case Studies
  • Coding Basics
  • Embedded Systems
  • RP Pico Folder
    • Raspberry Pi Pico
    • Pico VGA Project
    • Pico Audio Project
  • FPGAs
  • Basic Concepts
  • Android App Folder
    • BLE Basics
    • Android Studio
    • BLE App User Guide
    • The Gemini Prompt
    • Android App Development
  • UART Design Folder
    • UART Design
  • Home
  • Capstone Project
  • abCore16 Folder
    • abCore16 Project
    • Instruction Set
    • abCore16 User Guide
  • AI Case Studies
  • Coding Basics
  • Embedded Systems
  • RP Pico Folder
    • Raspberry Pi Pico
    • Pico VGA Project
    • Pico Audio Project
  • FPGAs
  • Basic Concepts
  • Android App Folder
    • BLE Basics
    • Android Studio
    • BLE App User Guide
    • The Gemini Prompt
    • Android App Development
  • UART Design Folder
    • UART Design

DigiTekXplorer - BLE Basics

Getting Started with Bluetooth Low Energy (BLE)

BLE Basics: Client and Server Roles

To understand how the Android app and your Pico 2 W communicate, it helps to think of them playing specific roles defined by the Bluetooth Low Energy (BLE) standard:

  • Raspberry Pi Pico 2 W (The Server / Peripheral):
    • Think of the Pico 2 W in this setup as a small shop or information booth. Its main job is to provide information or perform actions when asked.
    • It advertises its presence, like putting up a sign saying "B-Bot Service Here!", so nearby devices know it exists and what it generally offers.
    • It defines specific Services (like different departments in the shop, e.g., "Movement Control", "Status Info") and within those, Characteristics (like specific items or counters, e.g., "Speed Setting", "LED State", "HB Count"). These define exactly what data can be read or written.
    • It waits for a client (the Android app) to connect.
    • It responds to requests from the connected app, such as providing the current HB Count when asked (a "Read" request) or changing the LED state when told (a "Write" request).
  • Android App (The Client / Central):
    • The Android app acts like the customer visiting the shop. Its main job is to find the server and interact with the services it offers.
    • It scans the area looking for devices advertising the specific "B-Bot Service" sign it recognizes.
    • When it finds the Pico 2 W, it connects to it, like walking into the shop.
    • It then explores (discovers) the Services and Characteristics offered by the Pico 2       W to understand what information is available and what commands it can send.
    • It actively requests information (e.g., "Read the HB Count characteristic") or sends       commands (e.g., "Write 'on' to the LED characteristic") to the Pico 2 W.
    • It listens for any notifications the Pico 2 W might send automatically (though in our current setup, most updates are initiated by the app's requests).


In summary, the Pico 2 W server holds the data and performs actions, advertising what it can do. The Android app client finds the server, connects, and then actively reads, writes, or listens to the characteristics provided by the server to control it and get information.

Bluetooth Overview

For an in-depth Bluetooth description see Hunter Adams website:

https://vanhunteradams.com/Pico/BLE/GATT_Server.html


Other helpful resources:

https://bluekitchen-gmbh.com/btstack

https://punchthrough.com/lightblue


Copyright © 2025 DigiTekXplorer - All Rights Reserved.


Powered by

This website uses cookies.

We use cookies to analyze website traffic and optimize your website experience. By accepting our use of cookies, your data will be aggregated with all other user data.

Accept