Bluetooth & BLE · Study deck

Device Discovery and Connection Setup

A gateway is a device that passes data between a local device and another network.

Radio Remi is your guide for this deck.

connectionestablishment
Radio Remi, the module guide, in a scene from this chapter.
iotclass.org

After studying this chapter

Learning objectives

You will be able to:

  • Explain: Classic discovery is a rendezvous problem: the inquiring radio and the discoverable radio must land on the same carrier at the same time even though they do not yet share a piconet clock.
  • Explain: Be precise about the bit widths: the DAC access code is constructed from the target's 24-bit lower address part (LAP); it is not merely a 24-bit address field on air.
  • Explain: A setup failure can therefore sit in discoverability, inquiry scan timing, paging, piconet address assignment, pairing, or profile discovery; the review should name which boundary actually failed.
iotclass.org

Major section

Start With the Story · Treat Connection Setup as a Chain of Evidence

A gateway is a device that passes data between a local device and another network.

  • Seeing the sensor nearby is only the first step.
  • An advertisement is a short radio notice that says a Bluetooth device is present.
  • A phone scans for that notice and may ask to connect.
iotclass.org

Major section

Build a Connection Review Record

A practical Bluetooth connection review record says what setup path is being approved and what would make that approval stale.

  • It should show the initiating device, discoverability state, connection role, security ceremony, negotiated behavior, GATT or profile handoff, failure recovery, and retest trigger.
  • A setup-only BLE workflow, a background sensor link, a Classic profile connection, and a mesh provisioning path all need different evidence.
  • The approval should not say that BLE is the product network.

Why it matters

This record prevents teams from treating "connected once" as a broad release claim.

iotclass.org

Major section

Build a Connection Review Record (continued)

This record prevents teams from treating "connected once" as a broad release claim.

  • A device uses BLE only to receive Wi-Fi credentials during first-run setup.
  • It should approve the reviewed commissioning path for the tested phones, app permissions, firmware, reset behavior, and recovery states.
  • A wearable sends periodic measurements to a phone.
iotclass.org

Major section

State Machines, Timers, and Reconnection

Under the hood, connection establishment is a sequence of state transitions.

  • Each boundary produces different evidence, so a friendly name discovered during inquiry does not prove that paging, address assignment, authentication, or profile setup succeeded.
  • The inquiry and paging timers are also evidence.
  • With a 625 microsecond slot, the added wait is therefore.

Key terms

Classic Bluetooth
Classic Bluetooth is a useful contrast because its setup path is explicit.
Assignment of AM_ADDR
Assignment of AM_ADDR is useful evidence that the paging exchange reached connected state, but it does not prove authentication, encryption, profile discovery, or application readiness.
The twelve-step Classic Bluetooth inquiry, paging, and connection procedure
The twelve-step Classic Bluetooth inquiry, paging, and connection procedure
iotclass.org

Major section

State Machines, Timers, and Reconnection (continued)

Those values describe the configured scan schedule, not a promise that every product will be found in 11.25 ms.

  • Sniff schedules listening windows, hold pauses normal traffic for an agreed interval, and park gives up the active-member address until the master unparks the device.
  • Classic inquiry uses wake-up carriers and inquiry-scan windows so undiscovered devices do not need to listen continuously.
  • Connection parameters and supervision behavior are operational evidence, not tuning trivia.
iotclass.org

Major section

State Machines, Timers, and Reconnection (continued)

If the inquiry transmission misses the window, it must continue hopping until a later overlap.

  • They also show why Classic setup and BLE setup feel different in the field: timing depends on procedure, backoff, retries, and current radio conditions rather than a single guaranteed connection time.
  • Paging then uses the discovered address and clock information to converge on the target's hopping sequence.
  • The final local identifier is the 3-bit active-member address, AM_ADDR.
iotclass.org

Major section

State Machines, Timers, and Reconnection (continued)

The Bluetooth device address (BD_ADDR) is a 48-bit value normally written as twelve hexadecimal digits; the upper 24 bits identify the manufacturer allocation and the lower 24 bits identify the device within that allocation.

  • Friendly names are user-facing labels and can be duplicated, renamed, or include only part of the address for disambiguation, so they are not a substitute for address-level inventory evidence.
  • A setup failure can therefore sit in discoverability, inquiry scan timing, paging, piconet address assignment, pairing, or profile discovery; the review should name which boundary actually failed.
  • Aggressive timing can improve responsiveness but increase wakeups and failure sensitivity.
iotclass.org

Major section

State Machines, Timers, and Reconnection (continued)

Classic discovery is a rendezvous problem: the inquiring radio and the discoverable radio must land on the same carrier at the same time even though they do not yet share a piconet clock.

  • A discoverable controller periodically opens an inquiry-scan window; a representative controller schedule uses an 11.25 ms window every 1.28 s.
  • Once a scanner hears an inquiry ID packet, it does not let every nearby device answer in the same reply slot.
  • A friendly name may be fetched later and is not part of this timing proof.
  • Long gaps between radio events can save energy but make interaction slower.
iotclass.org

Major section

State Machines, Timers, and Reconnection (continued)

Values 1 through 7 identify the seven simultaneously active slaves in a Classic piconet; zero is reserved for broadcast traffic.

  • The FHS response supplies the information the initiator actually needs for the next phase: the responder's Bluetooth address and native-clock information from which a clock offset can be estimated.
  • Be precise about the bit widths: the DAC access code is constructed from the target's 24-bit lower address part (LAP); it is not merely a 24-bit address field on air.
  • That record turns “Bluetooth setup was slow” into a timer or state hypothesis that can be retested.
iotclass.org

Major section

State Machines, Timers, and Reconnection (continued)

The target returns the first page response, the pager sends an FHS packet carrying the master's clock and address information, and the target acknowledges with the second page response.

  • Assignment of AM_ADDR is useful evidence that the paging exchange reached connected state, but it does not prove authentication, encryption, profile discovery, or application readiness.
  • The review should tie those choices to the product workflow, not to a generic "fast" or "low power" label.
  • Classic Bluetooth is a useful contrast because its setup path is explicit.
iotclass.org

Major section

Discovery And Pairing Explorer

Once connected, the link layer uses data channels and adapts its channel map.

  • BR/EDR inquiry and SDP: BLE advertising/scanning and GATT, and: Bluetooth Mesh provisioning are different procedures.
  • For BLE, the primary advertising channels are 37, 38, and 39.
  • This separates an application-policy failure from a radio-duty-cycle trade-off.

Key terms

Bluetooth Mesh provisioning
Bluetooth Mesh provisioning are different procedures.
iotclass.org

Major section

BLE Connection Establishment Workbench · Summary

Bluetooth connection establishment should be reviewed as a chain of evidence: discovery, link setup, security, application handoff, and recovery.

  • Classic Bluetooth and BLE use different setup procedures, so the review should name the exact behavior being approved.
  • A visible advertisement or one successful connection does not prove pairing safety, GATT correctness, battery behavior, or reconnection recovery.
  • Pairing, bonding, authorization, privacy, timeout behavior, and ownership transfer need explicit evidence when they are part of the product claim.
iotclass.org

Deck summary

Key takeaways

A gateway is a device that passes data between a local device and another network.

  • A practical Bluetooth connection review record says what setup path is being approved and what would make that approval stale.
  • This record prevents teams from treating "connected once" as a broad release claim.
  • Under the hood, connection establishment is a sequence of state transitions.
  • Those values describe the configured scan schedule, not a promise that every product will be found in 11.25 ms.
iotclass.org

Retrieval practice

Recall check 1 of 5

Radio Remi says: answer from memory, then check your reasoning.

Q1A phone sees a BLE device during scanning, but the app cannot read the sensor value after connecting. Which review response is strongest?

ARepeat scanning with a longer scan window before investigating the read failure after connection.
BApprove the product because seeing an advertisement proves the whole Bluetooth workflow.
CMeasure battery capacity first, since the device may have enough power to advertise but not complete a read.
DKeep discovery evidence separate, then review connection, security, GATT service discovery, permissions.
Show answer

Answer: D Discovery is useful evidence, but the failed value path lives in later connection, security, GATT, and application boundaries.

iotclass.org

Retrieval practice

Recall check 2 of 5

Radio Remi says: answer from memory, then check your reasoning.

Q2A setup-only BLE product connects to a phone and receives network credentials during a lab test. Which approval statement is strongest?

AApprove only the reviewed commissioning path, including discoverability, authorization, credential handling.
BApprove BLE as the permanent product network because it worked during setup.
CSkip reset and timeout behavior because setup is complete after the first successful connection.
DApprove every phone and permission state because one lab phone completed the flow.
Show answer

Answer: A The approval stays tied to the setup workflow and the evidence that can be repeated.

iotclass.org

Retrieval practice

Recall check 3 of 5

Radio Remi says: answer from memory, then check your reasoning.

Q3A product changes its phone app and service schema. What should the team do with prior BLE approval?

ARetest setup, data access, and recovery after app and schema changes.
BKeep old approval solely because the physical radio chip did not change.
CTest the new advertising name alone, ignoring service data access.
DSkip reconnection checks because an initial connection worked once.
Show answer

Answer: A The changed workflow may break evidence from the old path.

iotclass.org

Retrieval practice

Recall check 4 of 5

Radio Remi says: answer from memory, then check your reasoning.

Q4A device advertises but connection setup times out. What is the best first debug step?

ALocate the failure at link setup and capture connection timing.
BRewrite the sensor-value parser before confirming a link exists.
CAssume old pairing keys are the sole possible setup failure.
DChange radio and app settings together without timing evidence.
Show answer

Answer: A The visible advertisement proves discovery, not a working link.

iotclass.org

Retrieval practice

Recall check 5 of 5

Radio Remi says: answer from memory, then check your reasoning.

Q5Which part of the reconnect and notification path needs investigation after this update?

AThe antenna boundary, since reconnecting may work at a signal level too weak for sustained notifications.
BThe application readiness and bonding boundary: stored bond state, service schema, characteristic properties.
CThe discovery boundary, since changing the advertising interval after the update may prevent timely data arrival.
DKeep the bond and increase the notification retry budget, treating the firmware change as transient packet loss.
Show answer

Answer: B Reconnection still works, so the failure likely sits in persisted trust, service compatibility, subscription, or app handling.

iotclass.org

Print reference

Answers

Answer key.

  1. D · Discovery is useful evidence, but the failed value path lives in later connection, security, GATT, and application boundaries.
  2. A · The approval stays tied to the setup workflow and the evidence that can be repeated.
  3. A · The changed workflow may break evidence from the old path.
  4. A · The visible advertisement proves discovery, not a working link.
  5. B · Reconnection still works, so the failure likely sits in persisted trust, service compatibility, subscription, or app handling.
iotclass.org