ES: Wireless Communication Fundamentals

Wireless communication is not “magic data in the air.” As an embedded systems engineer, you must see it as controlled electromagnetic energy, modulated in time and frequency, propagating through space, captured by an antenna, then reconstructed into bits.

Electromagnetic Waves: The Physical Layer Begins

Wireless communication starts with electromagnetic (EM) waves. These waves are oscillating electric and magnetic fields traveling through space at the speed of light.

txt
Electric Field (E)
     ↑
     |      ~~~~~~~~
     |    ~~
     |  ~~
-----+--------------------> Propagation Direction
     |  ~~
     |    ~~
     |      ~~~~~~~~
Magnetic Field (H) perpendicular to E

Key characteristics:

  • Frequency (Hz)
  • Wavelength (λ)
  • Amplitude
  • Phase

The relationship: λ = c / f

Where:

  • λ = wavelength
  • c = speed of light (~3 × 10^8 m/s)
  • f = frequency

Higher frequency → shorter wavelength → smaller antenna possible

Lower frequency → longer wavelength → better penetration

And this leads us naturally to the concept of spectrum allocation.


Frequency Spectrum and Bands: Organizing the Air

The electromagnetic spectrum is huge, but we use specific bands for communication.

txt
|----LF----|----HF----|----VHF----|----UHF----|----SHF----|
  kHz        MHz         MHz         GHz         GHz

Common embedded wireless bands:

  • 433 MHz (Sub-GHz IoT)
  • 868 MHz (Europe ISM)
  • 915 MHz (US ISM)
  • 2.4 GHz (Wi-Fi, BLE, Zigbee)
  • 5 GHz (Wi-Fi)

Examples:

  • Bluetooth Low Energy → 2.4 GHz
  • Wi‑Fi → 2.4 GHz / 5 GHz
  • Zigbee → 2.4 GHz / Sub-GHz

Why ISM bands matter:

  • No license required
  • Limited power
  • Shared medium → interference expected

Modulation: Turning Bits into Waves

Digital systems generate 0s and 1s. But antennas radiate analog waves.

So we modulate a high-frequency carrier signal.

Carrier: Carrier: ~~~~~~~~~~~~~~~~~~~~~~~

Amplitude Shift Keying (ASK)

txt
1 → High amplitude
0 → Low amplitude

1:  ~~~~~~~~ 
0:  ~~

Frequency Shift Keying (FSK)

txt
1 → High frequency
0 → Low frequency

1:  ~~~~~~ ~~~~~~
0:  ~~  ~~  ~~  ~~

Phase Shift Keying (PSK)

txt
1 → 0°
0 → 180° shift

Modern protocols use combinations:

  • QPSK
  • OFDM (Wi-Fi)
  • GFSK (BLE)

And now once we transmit modulated waves, they must travel through a non-ideal environment.


Propagation and Path Loss: The Real World Problem

In real environments, signals:

  • Attenuate
  • Reflect
  • Diffract
  • Scatter

Free-space path loss: Received Power ∝ 1 / d²

txt
TX )))))))))))))      )))))))))      )))))))     RX
        Strong            Medium         Weak

Multipath:

txt
        Wall
         |
TX ----->|----> RX
  \              ^
   \____Reflect__|

Consequences:

  • Fading
  • Inter-symbol interference
  • Packet loss

This is why link budget calculation is essential.


The link budget determines whether communication will succeed.

txt
TX Power
- Cable Loss
+ Antenna Gain
- Path Loss
- Environmental Loss
= RX Power

If: RX Power > Receiver Sensitivity → Communication OK

Example typical BLE:

  • TX Power: 0 dBm
  • Sensitivity: -90 dBm
  • Margin: ~90 dB

Engineers must calculate this before PCB layout or enclosure design.

And once the physical layer works, we must share the medium.

Which brings us to a critical concept: how do we encode bits onto a carrier?

In wireless systems, two major design questions always exist:

txt
1) Who talks when?        → Medium Access (CSMA, FDMA, TDMA…)
2) Who talks to whom?     → Network Topology (Star, Mesh…)


Medium Access: Who Talks When?

_(Who is allowed to transmit?)_

Wireless is a shared medium. If two devices transmit at the same time on the same frequency → collision.

txt
Device A  ---> )))))
Device B  ---> )))))
                 X  (Collision)

So we need rules.

Common access mechanisms:

  • CSMA/CA (Wi-Fi)
  • Time slots
  • Frequency hopping (BLE)
  • TDMA

Example CSMA/CA:

txt
Node A: Listen → Free → Transmit
Node B: Listen → Busy → Wait

BLE frequency hopping: Channel 1 → Channel 18 → Channel 5 → Channel 32 ...

This reduces interference and improves robustness.

Now we move from radio theory to real embedded protocols.

CSMA – Carrier Sense Multiple Access

Used in:

  • Wi-Fi
  • Ethernet (wired version)

Idea:

Before transmitting → listen first.

txt
Step 1: Listen
Step 2: If channel free → transmit
Step 3: If busy → wait random time

---

Channel:  ____________BUSY____________

Node A:   Listen → WAIT
Node B:   Listen → WAIT
Node C:   Listen → FREE → TRANSMIT

In Wi-Fi (CSMA/CA – Collision Avoidance):

  • Device listens
  • Waits random backoff time
  • Then transmits

Why “avoidance”?

Because wireless cannot detect collision while transmitting.

Pros:

  • Simple
  • Flexible
  • Good for burst traffic

Cons:

  • Collisions still happen
  • Performance degrades under heavy load
  • Hidden node problem

Hidden node example:

txt
A ----> Router <---- B
A and B can't hear each other
But both collide at Router

This leads us to a different strategy.

FDMA – Frequency Division Multiple Access

Instead of sharing time…

We share frequency.

txt
Total Spectrum
|----F1----|----F2----|----F3----|
   User A      User B     User C

Each device gets its own frequency band.

No listening required.

No collision (if well separated).

Used in:

  • Cellular systems
  • Some industrial RF systems

Embedded example:

Sub-GHz IoT with 3 channels:

txt
Channel 1 → Sensor A
Channel 2 → Sensor B
Channel 3 → Sensor C

Pros:

  • Deterministic
  • No collisions
  • Low latency

Cons:

  • Wastes spectrum if idle
  • Limited number of users
  • Requires filtering hardware

Common Embedded Wireless Technologies

Bluetooth Low Energy

  • 2.4 GHz
  • Low power
  • Star topology
  • Advertising + connection model
  • Uses GFSK

Ideal for:

  • Wearables
  • Sensors
  • Mobile integration

Wi‑Fi

  • High throughput
  • Higher power consumption
  • Uses OFDM
  • Infrastructure-based

Ideal for:

  • OTA updates
  • High data transfer
  • Cloud connectivity

Zigbee

  • Mesh topology
  • Low data rate
  • Ultra-low power
  • Self-healing networks

Ideal for:

  • Smart home
  • Industrial sensor networks

And once devices connect, security becomes the most critical layer.


Wireless Security Fundamentals

Wireless = broadcast medium → anyone can listen.

Threats:

  • Eavesdropping
  • Replay attacks
  • Man-in-the-middle
  • Jamming
  • Rogue access points

Security mechanisms:

  • AES encryption
  • Secure pairing
  • Rolling keys
  • Frequency hopping
  • TLS (for Wi-Fi/IP devices)

BLE example security flow:

txt
Device A ---- Pair Request ----> Device B
Device B ---- Public Key ------> Device A
Shared Secret Generated
Session Key Derived
Encrypted Link Established

As an embedded security engineer, you must always assume:

The attacker is listening.