Wireless Protocols For IoT
Wireless Protocols For IoT
Raj Jain
Professor of CSE
Washington University in Saint Louis
Saint Louis, MO 63130
[email protected]
Audio/Video recordings of this class lecture are available on-line at:
http://www.cse.wustl.edu/~jain/cse574-18/
Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse574-18/ ©2018 Raj Jain
11-1
Overview
Ref: Rohde & Schwarz, “Bluetooth phusicall layer evolution: From cable replacement to the IoT,”
http://www.rohde-schwarz.com/appnote/1MA108
Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse574-18/ ©2018 Raj Jain
11-5
Bluetooth: Details
Frequency Range: 2402 - 2480 MHz
(total 79 MHz band) 23 MHz in some countries, e.g., Spain
Data Rate: 1 Mbps using 1 MHz (Nominal) 720 kbps (User)
Radio Frequency hopping: 1600 times/s 625 ms/hop
Security: Challenge/Response Authentication. 128b Encryption
TX Output Power:
Class 1: 20 dBm Max. (0.1W) – 100m
Class 2: 4 dBm (2.5 mW)
Class 3: 0 dBm (1mW) – 10m
Frequency
Network 1
Network 2
Time
Ref: http://www.bluetooth.com/, http://www.bluetooth.org/, http://grouper.ieee.org/groups/802/15/index.html
Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse574-18/ ©2018 Raj Jain
11-6
Piconet
Piconet is formed by a master and many slaves
Up to 7 active slaves.
Slaves can only transmit when requested by master
Up to 255 Parked slaves
Active slaves are polled by master for transmission
Each station gets a 8-bit parked address
255 parked slaves/piconet
The parked station can join in 2ms.
Other stations can join in more time.
Scatter net: A device can participate in
multiple Pico nets Timeshare and must
synchronize to the master of the current piconet.
Routing protocol not defined.
Ref: P. Bhagwat, “Bluetooth Technology for short range wireless Apps,” IEEE Internet Computing, May-June 2001, pp. 96-103,
bluetooth.pdf (Must read)
Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse574-18/ ©2018 Raj Jain
11-7
Frequency Hopping Sequences
Frequency 1
Frequency 2
Frequency 3
625 ms slots using a 312.5 ms clock
Time-division duplex (TDD)
Downstream and upstream alternate
Master starts in even numbered slots only.
Slaves start in odd numbered slots only
Slaves can transmit in one slot right after receiving a packet
from master
Packets = 1 slot, 3 slot, or 5 slots long
The frequency hop is skipped during a packet.
Transmit Connected
Active
Inquiry Page
Transmit Connected
Sniff Park
Freq.
Freq.
(GFSK) modulation
Baseband: Frequency hop Time Time
selection, connection, MAC FSK GFSK
Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse574-18/ ©2018 Raj Jain
11-13
Baseband Layer
Each device has a 48-bit IEEE MAC address
3 parts:
Lower address part (LAP) – 24 bits
Freq.
Freq.
Star topology
1 Mbps Gaussian Frequency Shift Keying Time Time
Better range than Bluetooth classic FSK GFSK
Adaptive Frequency hopping. 40 Channels
with 2 MHz spacing.
3 channels reserved for advertizing and 37 channels for data
Advertising channels specially selected to avoid interference
with WiFi channels
37 0 1 2 3 4 5 6 7 8 9 10 38 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 39
Freq.
Ref: J. Decuir, “Bluetooth 4.0: Low Energy,” 2010,
https://californiaconsultants.org/wp-content/uploads/2014/05/CNSV-1205-Decuir.pdf
Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse574-18/ ©2018 Raj Jain
11-19
Bluetooth Smart MAC
Two Device Types: “Peripherals” simpler than “central”
Two PDU Types: Advertising, Data
Non-Connectable Advertising: Broadcast data in clear
Discoverable Advertising: Central may request more
information. Peripheral can send data without connection
General Advertising: Broadcast presense wanting to connect.
Central may request a short connection.
Directed Advertising: Transmit signed data to a previously
connected master
Channel 37 Channel 38 Channel 39 Channel 37..39 Channel 37..39 Channel 37..39
Peripheral
Adv_Ind Adv_Ind Adv_Ind Scan_Resp
Scan_Req Conn_Req
Central
Ref: J. Decuir, “Bluetooth 4.0: Low Energy,” 2010,
https://californiaconsultants.org/wp-content/uploads/2014/05/CNSV-1205-Decuir.pdf
Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse574-18/ ©2018 Raj Jain
11-20
Bluetooth Smart MAC (Cont)
After connecting, master tells slave about hopping sequence
and wake up cycle
All subsequent data transfers in 37 data channels
Both devices can sleep between transactions
Data can be encrypted.
~3 ms per transaction, 15 mW Power = 10 mA using 1.5V
30mAs/transaction
21.6 M transactions using 180 mAh battery
41.1 years with 1 transaction/minute
Advertising Channel Data Channels
Peripheral Slave
Adv_Ind Data LL End
Applications Apps
Generic Access Profile
Generic Attribute Profile
Host
Attribute Protocol Security Manager
Logical Link Control and Adaptation Protocol
Host Controller Interface
Link Layer Direct Test Mode Controller
Physical Layer
Ref: J. Decuir, “Bluetooth 4.0: Low Energy,” 2010,
https://californiaconsultants.org/wp-content/uploads/2014/05/CNSV-1205-Decuir.pdf
Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse574-18/ ©2018 Raj Jain
11-22
Generic Attribute (GATT) Profile
Defines data formats and interfaces with the Attribute Protocol
Type-Length-Value (TLV) encoding is used
Each attribute has a 16-bit Universally Unique ID (UUID)
standardized by Bluetooth SIG
128-bit UUID if assigned by a manufacturer
Allows any client to find a server, read/write data
Allows servers to talk to generic gateways
Allows security up to AES-128
Each to encode in XML
Makes profile (application) development easier
Ref: E. Vlugt, “Bluetooth Low Energy, Beacons and Retail,” Verifone White paper, 2013, 12 pp.,
https://www.slideshare.net/verifone/bluetooth-low-energy-beacons-and-retail-final
Washington University in St. Louis http://www.cse.wustl.edu/~jain/cse574-18/ ©2018 Raj Jain
11-25
Beacons
Advertizing based on proximity
Peripherals (your phone) broadcasts its presence if Bluetooth is
turned on
Primary aim of these broadcasts is to allow device discovery
Advertising packets consist of a header and max 27B of
payload with multiple TLV-encoded data items
May include signal strength Þ Distance
iOS7 iPhones can send/received iBeacons
Can be used for customized
advertising, indoor location, geofencing
PayPal uses this to identify you.
You can pay using a PIN and your phone.
Raj Jain
http://rajjain.com