← Back

LESSON 12

IoT Networking

IoT Architecture Layers Application Layer Mobile Apps • Dashboards • Business Logic Smart Home, Healthcare, Agriculture Apps Processing Layer Edge Computing • Cloud Analytics • AI/ML AWS IoT, Azure IoT Hub, Google Cloud IoT Network Layer Connectivity Protocols Wi-Fi • BLE • LoRaWAN • NB-IoT • LTE-M Perception Layer (Sensors & Devices) Temperature • Humidity • Motion • Camera • GPS Physical Sensors, Actuators, RFID Tags

IoT Architecture

Data Flow: Device/Sensor → Connectivity Layer → Processing (Edge/Cloud) → Interface (App/Dashboard)

  • Perception Layer: Sensors, actuators (temp, humidity, motion)
  • Network Layer: Communication protocols
  • Processing Layer: Edge computing or cloud analytics
  • Application Layer: User interfaces, business logic

IoT Connectivity Technologies

Technology Spectrum Range Power Use Case
Wi-Fi Unlicensed Short (~100m) High Smart home, video
BLE Unlicensed Short (~10m) Very Low Wearables, beacons
Zigbee Unlicensed Short (mesh) Low Home automation
LoRaWAN Unlicensed Long (~10km) Low Smart city, agriculture
Sigfox Unlicensed Long (~50km) Low Asset tracking
NB-IoT Licensed (cellular) Long Low Utilities (smart meters)
LTE-M Licensed (cellular) Long Medium Vehicle tracking
Choosing the right tech:
Smart Home (video doorbell): Wi-Fi (high bandwidth for video)
Fitness Tracker: BLE (battery lasts days)
Farm Sensors (100 km² area): LoRaWAN (long range, low power)
Smart Parking Meter: NB-IoT (cellular, reliable, battery lasts years)

LPWAN (Low-Power Wide-Area Networks)

Designed for massive scale IoT deployments with low data rates and long battery life

LoRaWAN vs NB-IoT

Feature LoRaWAN NB-IoT
Spectrum Unlicensed (free) Licensed (carrier)
Deployment Private/community gateways Cellular towers
Coverage 10-15 km Wide (existing cell network)
Cost Low (no subscription) Subscription fees
QoS Best effort Guaranteed
Mobility Limited Good (handoff support)
LoRaWAN Example: Farmer deploys 100 soil sensors across 50 km². Sets up 5 private gateways. No monthly fees.
NB-IoT Example: City deploys 10,000 smart meters. Uses existing carrier network. Pays monthly per device but guaranteed reliability.

Cloud IoT Concepts

Digital Twin: Virtual representation of physical asset (real-time mirror)

  • Example: Engine digital twin predicts maintenance needs based on sensor data

Device Shadow: Persistent state of device in cloud (even when offline)

  • Example: Smart thermostat offline → Cloud stores desired temp → When reconnects, syncs state

IoT Architecture

දත්ත ප්‍රවාහය: Sensor → Network → Processing → Application

උදාහරණය - ස්මාර්ට් කෘෂිකර්මය:

  1. සංවේදකය (Perception): පස් තෙතමනය සංවේදකය කෙතේ තබලා තියෙනවා
  2. සම්බන්ධතාව: LoRaWAN use කරලා දත්ත යවනවා gateway එකට
  3. සැකසීම: Cloud එකේ විශ්ලේෂණය → "පස ඉතා වියළියි, වාරිමාර්ග අවශ්‍යයි"
  4. යෙදුම: ගොවියාගේ phone app එකේ: "කෙත 3 වතුර අවශ්‍යයි" දැනුම්දීම

IoT Connectivity Technologies

Wi-Fi:

  • ඉහළ bandwidth (video streaming), නමුත් බලශක්ති භාවිතය ඉහළ
  • පරාසය: ~100m
  • භාවිතය: Smart TVs, ආරක්ෂක කැමරා

BLE (Bluetooth Low Energy):

  • ඉතා අඩු බලශක්තිය (බැටරි මාස/අවුරුදු)
  • කෙටි පරාසය (~10m)
  • භාවිතය: Smartwatches, fitness trackers

LoRaWAN (Long Range WAN):

  • දිගු පරාසය (10-15 km), අඩු බලශක්තිය
  • බලපත්‍ර රහිත වර්ණාවලිය (නොමිලේ භාවිතය)
  • අඩු දත්ත අනුපාතය (කාලගුණ දත්ත, ස්ථාන ලුහුබැඳීම වගේ කුඩා දත්ත)
  • භාවිතය: කෘෂිකර්ම සංවේදක, ස්මාර්ට් නගර වාහන නැවැත්වීම

NB-IoT (Narrowband IoT):

  • සෙලියුලර් ජාලය (බලපත්‍රිත වර්ණාවලිය)
  • හොඳ ආවරණය (පවතින cell towers භාවිතා කරනවා)
  • විශ්වසනීය, සහතික කළ QoS
  • භාවිතය: ස්මාර්ට් මීටර (විදුලිය, ජලය), යටිතල පහසුකම් නිරීක්ෂණය

LTE-M:

  • සෙලියුලර්, චලනය සඳහා සහාය (towers අතර handoff)
  • භාවිතය: වාහන ලුහුබැඳීම, චලනය වන වත්කම්

LoRaWAN vs NB-IoT (Exam Important!)

LoRaWAN:

  • වර්ණාවලිය: බලපත්‍ර රහිත (නොමිලේ, ඕනෑම කෙනෙකුට යෙදවිය හැකි)
  • යෙදවීම: තමන්ගේම gateways සකසන්න ඕන
  • පිරිවැය: Hardware විතරයි (gateway + සංවේදක), මාසික ගාස්තු නැහැ
  • QoS: උපරිම උත්සාහය (සහතික බෙදාහැරීමක් නැහැ)
  • සුදුසු: පුද්ගලික යෙදවීම් (ගොවිපල, විශ්ව භූමිය)

NB-IoT:

  • වර්ණාවලිය: බලපත්‍රිත සෙලියුලර් (වාහකයා සපයනවා - Dialog, Mobitel)
  • යෙදවීම: පවතින cell towers භාවිතා කරනවා (යටිතල පහසුකම් අවශ්‍ය නැහැ)
  • පිරිවැය: උපාංගයකට මාසික දායකත්වය
  • QoS: සහතික බෙදාහැරීම
  • චලනය: හොඳ (මෝටර් රථයක සංවේදකයක් උනාම tower-to-tower handoff)
  • සුදුසු: නගර-පුරා යෙදවීම් (ස්මාර්ට් මීටර ලක්ෂ ගණන්)

උදාහරණය:
ගොවියා (LoRaWAN): ගොවිපලේ සංවේදක 100ක්. Gateway 5ක් දාලා, මුළු පිරිවැය අඩු, මාසික බිල් නැහැ
නගරය (NB-IoT): ස්මාර්ට් මීටර 10,000. වාහක ජාලය භාවිතා කරනවා, විශ්වසනීය, නමුත් උපාංගයකට මාසික ගාස්තු තියෙනවා

Cloud IoT Concepts

Digital Twin:

භෞතික උපාංගයේ අතථ්‍ය පිටපතක් cloud එකේ. තත්‍ය කාලීන දත්ත සමමුහුර්ත වෙනවා.

උදාහරණය: ගුවන් යානා එන්ජිමක්. එන්ජිමේ digital twin cloud එකේ ධාවනය වෙනවා. සැබෑ එන්ජිමේ සංවේදක දත්ත (උෂ්ණත්වය, කම්පනය, පීඩනය) අඛණ්ඩව සමමුහුර්ත වෙනවා. Digital twin එක අනුකරණය කරලා පුරෝකථනය කරනවා: "මෙම එන්ජිමට පියාසර පැය 50කින් නඩත්තුව අවශ්‍යයි" (පුරෝකථන නඩත්තුව).

Device Shadow:

IoT උපාංගය offline උනත්, cloud එකේ අවසාන දන්නා තත්ත්වය ගබඩා වෙනවා. උපාංගය online උනාම සමමුහුර්ත වෙනවා.

උදාහරණය: ස්මාර්ට් thermostat:
1. පරිශීලක app එකෙන් උෂ්ණත්වය 25°C ට සකසනවා
2. Thermostat offline (විදුලිය කප්පාදුව)
3. Cloud එකේ "shadow" තත්ත්වය: අපේක්ෂිත උෂ්ණත්වය = 25°C
4. Thermostat online වෙනවා → Shadow එකෙන් සමමුහුර්ත → උෂ්ණත්වය 25°C ට සකසනවා
ප්‍රතිලාභය: Offline කාල පරිච්ඡේද වලදී උපදෙස් නැති වෙන්නේ නැහැ