Skip to content

Lab: BLE Connectivity

Course 1 · Module 7 Type: Hands-on lab (status → advertising → host link; optional scan) Suggested time: ~2–2.5 hours on hardware

Read first: Lesson · Cheatsheet · ← Table of Contents · ← M06 · M08 →

Note: the snippets in this lab use the API of the TESAIoT Bitstream firmware, which is not yet open source. See detail and equivalent examples in the public SDK in the note at the top of the lesson BLE for Edge Products

The ble-flet host is not yet published — the TESAIoT_Hackathon README (commit f5f09a6) states that python-app/, ble-react/ and ble-flet/ belong to the maintainers and are not in the public repo. Use the backup path the lesson already suggests: a general GATT explorer such as nRF Connect, LightBlue, or AIROC™ Bluetooth® Connect

Document Use when
Hackathon ble-flet A desktop central + stream
Infineon Find Me CE A mobile-app workflow (vendor)
M06 lab Comparing against the cloud path
M04 lab Task + delay

  • Read the BLE peripheral status from the CM55
  • Control ADV start/stop/restart and confirm the host sees the name TESAIoT-* (or whatever name you set)
  • Connect at least one host (ble-flet, or a GATT explorer)
  • (Optional) run a brief scan and record the result from an IPC event

  • A board + HEX/firmware with the BLE profile turned on
  • A PC or phone with Bluetooth on
  • (Recommended) clone TESAIoT_Hackathon and have ble-flet ready
  • Close any other Central that might steal the link (nRF Connect still open, etc.)

  1. Flash the example firmware (or your own build with BLE)
  2. From a task on the CM55, call:
ipc_ble_periph_status_t st;
bool ok = cm55_ble_periph_status_get_sync(&st, 5000U);
  1. Record the values: profile_ble_active, stack_ready, connection_id, last_error

Pass when: the sync succeeds, and stack_ready (or the build’s equivalent) shows the stack is ready


  1. Start ADV:
uint8_t result = 0xFF;
(void)cm55_ble_periph_adv_ctrl_sync(1U, &result, 5000U);
  1. On the host:

    • Main path: run ble-flet → let it hunt for TESAIoT-*
    • Backup path: open nRF Connect / a scanning app → find the device’s set name
  2. Once connected, read the status again — expect connection_id != 0 and/or tx_notify_enabled, depending on the host’s state

Pass when: the host sees and connects to the device at least once, with evidence (a screenshot)


  1. Stream or read a value briefly on the host (~30–60 seconds)
  2. Press disconnect on the host, then start/restart ADV if needed
  3. Successfully reconnect

Pass when: you can reconnect without reflashing (except for the ADV-timeout case the Hackathon documentation notes — then reboot per the guide)


  1. Register cm55_ble_ipc_set_event_handler
  2. Call cm55_ble_request_scan_all() (or scan_name) briefly
  3. Record at least 1 advertisement entry (addr / rssi / name) from the log

Pass when (optional): there is a readable scan-result log


  • A status table before/after connecting
  • A screenshot of the host seeing TESAIoT-* (or whatever name you set)
  • A short note: how does BLE differ from MQTT in your project?
  • (If you did Part D) a sample scan log

Symptom Approach
Status times out Check the HEX has BLE on · wait longer after boot · check the IPC
No scan results Start ADV · get closer · close other Centrals · reboot the board
Connects then drops immediately Don’t open two Central apps at the same time
ble-flet finds nothing after 60s An ADV timeout — reboot, or a HEX with auto-restart fixed (see the Hackathon README)
Confused with the Wi‑Fi lab M07 needs no broker; the focus is the BLE radio

Lesson · Cheatsheet · Table of Contents · M08 →

Cite this lesson

If you teach from this lesson or reuse it in slides or documents, credit it with the text below. If you changed it, add (adapted) after the title.

"Lab: BLE Connectivity" from TESA Open Knowledge by the Thai Embedded Systems Association (TESA), https://github.com/tesaiot/tesa-qualification-program, licensed under CC BY-NC 4.0

Thai attribution: "แล็บ: การเชื่อมต่อ BLE" จาก TESA Open Knowledge โดยสมาคมสมองกลฝังตัวไทย (Thai Embedded Systems Association: TESA) https://github.com/tesaiot/tesa-qualification-program สัญญาอนุญาต CC BY-NC 4.0

Lesson link: https://tesaiot.github.io/tesa-qualification-program/en/courses/firmware-sdk-edge-ai/m07-ble/l02-lab/

This lesson adapts the source below; keep its credit too.
https://github.com/drsanti/TESAIoT-Courses/blob/287c21814ba8c75f693136616dcd270349a15966/C1/M07/lab.md · Original content by Asst. Prof. Dr. Santi Nuratch (ผศ.ดร.สันติ นุราช), KMUTT. Course 1 (C1/) of drsanti/TESAIoT-Courses. TESA funded the work and holds the rights; published here under CC BY-NC 4.0. The upstream repository carries no licence file. Text kept faithful; structure, front matter, quizzes and notes added by TESA Open Knowledge.

Full guide: how to cite TESA

TESA Open Knowledge · © 2026 สมาคมสมองกลฝังตัวไทย (TESA) · CC BY-NC 4.0

Content is licensed CC BY-NC 4.0. Reuse it non-commercially and credit the Thai Embedded Systems Association (TESA) every time. · How to cite TESA