1 / 96

Bluetooth for Wireless Sensor Networks

Explore the capabilities and applications of Bluetooth technology for wireless sensor networks, including its advantages, limitations, and protocols.

eteresa
Télécharger la présentation

Bluetooth for Wireless Sensor Networks

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Modulo 11 Wireless sensors and actuators networks Igor Bisio - Franco Davoli – Fabio Lavagetto franco.davoli@unige.it Master Universitario di II Livello "Internet of Things and Big Data" A.A.2018-2019 Università degli Studi di Genova - www.master-iot.it

  2. Obiettivi e Risultati attesi Obiettivi (per la parte di F. Davoli) • Protocolli di accesso multiplo • Reti WLAN e WPAN • WiFi e Bluetooth Risultati attesi • Conoscenza di base di architettura e protocolli per WiFi e Bluetooth Prerequisiti: Conoscenze di base di reti di TLC (architetture e protocolli) Master Universitario di II Livello "Internet of Things and Big Data" A.A.2018-2019 Università degli Studi di Genova - www.master-iot.it

  3. Bluetooth • It originated as a technology for the replacement of cables • universal connection instead of proprietary cabling; • support for a large range of devices • PCs, printers, modems, and mobile phones, PDAs; • limited coverage (usually a room) • 10 m, with devices that can reach up to 50 m; • speed 1-3 Mb/s.

  4. Bluetooth • It realizes what is sometimes called a Personal Area Network (PAN). • Single chip for radio and baseband functionalities • lower power consumption, lower price. • Why use this one instead of the Wireless LAN (IEEE 802.11)? • consumption; • prices • field of applicability.

  5. Bluetooth utilization Internet Access Replacing the cabling Ad hoc Networks

  6. Radio headphones access to various devices; advantages of using headphones drive a vehicle; full operation of both hands Synchronization automatic synchronization of calendars, address books, business cards; even among similar devices; operation in the vicinity, without the need for cables. Bluetooth applications …and much more… http://blog.bluetooth.com/revolutionizing-the-iot

  7. Bluetooth • The name "Bluetooth" is derived from the name of the Danish King Harald Blåtand (who lived around the 10th century) or Harold Bluetooth in English. • The first version of the standard is 1.0 (July 1999), which was released in three versions 1.0, 1.0a and 1.0b (December 1999). • The second version is 1.1 (February 2001), whose differences from the previous version are substantially related to the correction of specific problems detected in the course of use, and performance optimization. • In June 2002, the IEEE has produced its own version of the standard called 802.15.1. • In November 2003, version 1.2 was released. • The following description is mainly based on the 1.2 standard. • In 2004 version 2.0 has been released (updated to 2.1 in 2007), with an improvement of the rate, which is 2.1 Mbps (effective, 3 Mbps nominal). • In 2009 a version 3.0 has been released. Starting from this version Bluetooth is used for negotiation and establishment of WiFi connections. • Version 4.0 in 2010 changes the structure of the protocol stack to make the application development more effective . • Still in version 4.0, an additional type of BT standard sub-version called “low power” has been defined.

  8. IEEE 802.15 • It represents the evolution line of Bluetooth v. 1.1, which covers changes in • RF layer; • baseband layer (FEC, CRC, ARQ, encryption); • link-layer manager (SCO and ACL link management, traffic management and links, power management); • L2CAP layer (multiplexing, SAR). • 802.15.1 • WPAN / Bluetooth. • 802.15.2 • Unlicensed Band Coexistence. • 802.15.3 • High Rate WPAN (20+ Mbps). • 802.15.4 ( ZigBee) • Low Rate WPAN (<200 kbps).

  9. A specification for the hardware devices. A software structure for supporting applications. Applications HID RFCOMM TCP/IP Data Control Audio L2CAP Link Manager Baseband RF What is Bluetooth? Software Hardware

  10. WAE vCard/vCal WAP OBEX AT Commands TCS BIN SDP TCP UDP IP PPP RFCOMM Audio L2CAP Host Controller Interface LMP Baseband Bluetooth radio Architecture Telephony Control protocol Specification - Binary Service Discovery Protocol Serial Port Emulator Logical Link Control and Adaptation Protocol Single chip interface -USB, RS-232 or PCMCIA Link Manager Protocol

  11. Protocol types • Bluetooth Core Protocol • Radio, Baseband, LMP, L2CAP, SDP, HCI. • Cable Replacement Protocol • RFCOMM • Telephony Control Protocol • TCS Binary, AT-Commands • Adopted Protocols • PPP, TCP/UDP/IP, OBEX, WAP, vCard, vCal.

  12. Protocol architecture summary • Radio: defines the requirements of the radio part. • Baseband: describes the baseband functionalities and other low-level procedures. • LMP: establishment and control of the link. • HCI: a common interface between hardware and software. • L2CAP: multiplexing, segmentation and reassembly, and transport of information related to QoS. • RFCOMM: emulation of serial ports. • SDP: allows applications to discover which services are available on other devices.

  13. WAE vCard/vCal WAP OBEX AT Commands TCS BIN SDP TDP UDP IP PPP RFCOMM Audio L2CAP Host Controller Interface LMP Baseband Bluetooth radio Radio layer

  14. 83.5 MHz 83.5 MHz 26 MHz 715 MHz 1 MHz … 2.4835 GHz 5.825 GHz 902 MHz 5.15 GHz 928 MHz 2.4 GHz 79 1 2 3 2.402 GHz 2.480 GHz Radio LayerAvailable bands (Unlicensed) Cordless phones Baby monitor 802.11/802.11b Bluetooth 802.11a • Frequency Hopping Spread Spectrum • 79 channels (2.402 GHz + k MHz, k = 0,…,78); • 1600 hops/s (32-hop cycle); • 23 channels in France.

  15. Radio LayerModulations and data rates • There are two reference data rate modes: • Basic Data RateSupported by all BT versions • Enhanced Data RateSupported by the BT versions starting from 2.1. The packet headers are transmitted by using basic data rate, whereas the payloads are transmitted with the enhanced (faster) one. • Each mode uses a different modulation technique • Basic data rate • GFSK Modulation – 1 M Symbol/s rate with rate 1 Mbps (1 bit per symbol). • Enhanced data rate, two possible choices: • pi/4 Rotated Differential Quaternary Phase Shift Keying (π/4 DQPSK) – same symbol rate (Msps) rate, but 2 bit/symbol = 2 Mbps • 8 phase Differential Phase Shift Keying (8DPSK) • same symbol rate (Msps) but 3 bit/symbol = 3 Mbps.

  16. Radio LayerTransmission power • There are 3 classes of devices: • Class 1: tx power <20 dBm (100 mW)long-range terminals (100 m); • Class 2: tx power <4 dBm (2.5 mW)normal terminals (10 m); • Class 3: tx power <0 dBm (1 mW)short range terminals (10 cm). • Bluetooth antenna provides a nominal power of 0 dBm (class 2) • the devices may optionally vary the transmitted power; • devices equipped with power control commands can optimize the consumption by means of LMP commands.

  17. WAE vCard/vCal WAP OBEX AT Commands TCS BIN SDP TDP UDP IP PPP RFCOMM Audio L2CAP Host Controller Interface LMP Baseband Bluetooth radio Baseband layer

  18. Baseband layerFunctionalities • Selection of frequency hopping (FH). • Physical channel and link management (along with LMP) • power control; • link control • synchronous and asynchronous links, • generation/reception of packets, • paging / inquiry. • Error correction. • Security.

  19. Baseband layerNetwork topology • Bluetooth has two basic topologies: • point-to-point; • point-to-multipoint. • Two or more stations which use the same channel form a piconet • a station assumes the role of master; • the others become slaves. M S M S S S

  20. Baseband layerNetwork topology • The master • is unique in the piconet; • establishes the synchronization of the system; • regulates access to the channel of all stations. • A maximum of 7 slaves can be active in a piconet • additional stations can remain connected to the master by using the “parking mode” • They cannot transmit; • They maintain synchronization with the master.

  21. Baseband layerNetwork topology • Several spatially overlapping piconets form a scatternet • slaves may belong to different piconets, by using time division multiplexing • the master of a piconet can be slave in another piconet; • piconets need not be synchronized with each other; • The FH sequence must be different. P P M S S S P P M P P S M S

  22. Baseband layerPhysical channel • A physical channel is defined by a pseudo-random sequence of 79 (or 23) frequencies • the sequence is unique for a piconet; • it is determined starting from the master; • all stations in a piconet are synchronized to the channel in time and hop. • The access to the channel is of TDD (Time Division Duplexing) type • the channel is divided into time slots (625 ms); • master and slave alternatively use the slot to communicate.

  23. Baseband layerPhysical channel • A frame consists of two slots • one for transmission and one for reception. • The master provides the synchronization and coordination of transmissions, by cyclically polling slaves. • Information is exchanged through packets • each packet is transmitted on a different frequency hop; • packets are transmitted within the slot • they may extend for 1, 3 or 5 slots

  24. f(k+1) f(k+2) f(k) 625 s Baseband layerChannel access

  25. Baseband layerPiconet • In the piconet • the sequence of frequencies is determined by the BT master; • the phase of the FH is determined by the master clock (modulo 227); • the time slots are numbered according to the clock of the master; • each piconet has a maximum capacity (1, 2, 3 Mbps); • the master can transmit only in the even slots; • slaves can only transmit in odd slots; • communication occurs only between master-slave; • packet transmission must start at the beginning of slots • packets sent from the master define the timing of the piconet (over so short distances, delays are negligible); • some slots are reserved for the transmission of a beacontrain • for the synchronization of stations in the parking state.

  26. Baseband layerAddresses • Bluetooth device addresses (BD_ADDR) • IEEE 48-bit MAC address. • Active Member Address (AM_ADDR) • 3 bits of address for the active slaves; • 0 indicates broadcast. • Parked Member Address (PM_ADDR) • 8 bits for the “parked” slaves . • Active Address Request (AR_ADDR) • used by the parked slave to determine the slave-to-master half slot in the access window it is allowed to send access request messages in. • assigned to the slave when it enters the park mode and only valid as long as the slave is parked; not necessarily unique.

  27. Baseband layerLogical Link • Between master and slave two main types of logical links can be established: • Synchronous Connection-Oriented (SCO) • Asynchronous Connection-Less (ACL)

  28. Baseband layerLogical Link – SCO • Point-to-point symmetric link between the master and one slave • can be treated as “circuit-switched” connections; • basic rate of 64 kbps in each direction. • The master reserves slots at regular intervals • using the LMP protocol. • Maximum number of SCOs allowed: • for masters: 3 • for slaves: 2 (if originating from different masters) or 3 (same master) • They are mainly designed for services with constraints on the maximum delay (voice) • There are two main kinds of SCO: • User Synchronous (SCO-S) • where packets are never retransmitted. • User Extended Synchronous (eSCO-S) • which supports also retransmissions.

  29. Baseband layerLogical Link – ACL • Point-to-multipoint links between a master and all slaves. • They use slots not reserved for SCO links, even for transmission to stations with SCO links • the communication is performed independently for each individual slot (no establishment of logic circuits). • Isochronous and asynchronous links are supported. • A slave can transmit only if it has received a packet from the master in the previous slot. • It typically applies the retransmission of packets to ensure integrity. • The bit rates achievable are • For the basic version • 723.2 kbps and 57.6 kbps, in the asymmetric case; • 433.9 kbps, in the symmetric case. • For the EDR ones • In the π/4 DQPSK modulation • 1448.5 kbps and 115.2 kbps, in the asymmetric case; • 869.1 kbps, in the symmetric case. • In the 8DPSK modulation • 2176.1 kbps and 177.1 kbps, in the asymmetric case; • 1306.9 kbps, in the symmetric case.

  30. Baseband layerPacket structure (Basic rate) • Access Code • Purposes • synchronization, • compensation of the offset, • identification (each piconet has its own Access Code), • paging, • inquiring; • Types: • CAC (Channel Access Code), the unique identifier of the piconet; • DAC (Device Access Code), for paging; • IAC (Inquiry Access Code), for the inquiry procedures. 68/ 72 bits 54 bits 0-2744 bits Access Code Payload Header They have no header or payload –> 68 bits

  31. Baseband layerPacket structure • Header • LT_ADDR (3-bits) addressing up to 7 active slaves; • TYPE (4 bits): type of the packet, not all used; • FLOW (1 bit): flow control; • ARQN (1 bit), response to transmitted packets; • SEQN (1 bit), sequence number (ABP); • HEC (8 bits), data integrity; • the remaining bits are used for 1/3 FEC protection . 68/ 72 bits 54 bits 0-2744 bits Access Code Payload Header

  32. Baseband layerPacket structure • Payload • fields can contain voice, data, or both; • in the case of data, there is also a header of the payload and a CRC for the data protection. 68/72 bits 54 bits 0-2744 bits Access Code Payload Header

  33. Baseband layerPacket types • Packets used in piconets may depend on the physical link • common control packets for SCO and ACL links • ID, Null, Poll, FHS, DM1; • unique TYPE for different physical links; • SCO packets • HV1, HV2, HV3, DV. • eSCO packets • EV3, EV4, EV5, 2-EV3, 2-EV5, 3-EV3, 3-EV5. • ACL packets • AUX1, DM3, DM5, DH1, DH3, DH5. • The space available has been divided in segments, according to the number of slots used in transmission.

  34. Baseband layerCommon packets • ID (Identity) • consists only of the CAC (DAC or IAC); • used for signaling (paging, inquiry, …); • is a very robust packet. • NULL • has no payload; • used to communicate information regarding the source • the correct reception of the previous packet (ARQN) • the state of the receiving buffer (FLOW); • The NULL packet must not be acknowledged. • POLL • very similar to NULL it has no payload; • it can be used by the master to poll the slave • it does not influence the fields ARQN and SEQN; • when the slave receives a POLL it must respond with a packet • the answer is an implicit acknowledgement • FHS (Frequency Hop Synchronization) • carries information about the master clock; • used for the creation or modification of a piconet • master page response, inquiry, master-slave switch; • synchronization of FH.

  35. Baseband layerCommon packets – some examples • DM1 (Data - Medium rate, 1 slot) • used to carry control messages over any type of link; • may also carry user data; • since it is recognized over SCO links, it can interrupt the synchronous data flow.

  36. Baseband layerSCO Packets • HV1 (High quality Voice, 10 bytes) • HV2 (High quality Voice, 20 bytes) • HV3 (High quality Voice, 30 bytes) • the payload has fixed length: 240 bits; • packets are never retransmitted; • they do not use any CRC. • DV (Data - Voice) • the payload is divided into two fields • Voice (80 bits), without FEC protection ; • Data (up to 150 bits) - up to 10 bytes of data (including 1-byte header), 16-bit CRC and FEC 2/3; • voice and data are treated separately • voice is never retransmitted, • data integrity is verified and retransmission is possible.

  37. Baseband layerSCO packets – HV1, HV2 and HV3 72 bits 54 bits 240 bits = 366 bits Access Code Payload Header 10 bytes HV1 + FEC 1/3 20 bytes HV2 + FEC 2/3 30 bytes HV3 3.75 ms HV3 64 kb/s 2.5 ms HV2 1.25 ms HV1

  38. Baseband layerACL packets • They carry control information or data. • They use a CRC and are retransmitted in case of error (except AUX1). • DM1 (Data - Medium rate, 1 slot) • carries up to 18 bytes of data; • includes CRC and FEC; • includes a payload header (length of the message). • DH1 (Data - High rate, 1 slot) • as DM1, but not protected by FEC. • AUX1 • as DH1, without CRC and FEC.

  39. Baseband layerACL packets • DM3 (Data - Medium rate, 3 slots) • is similar to a DM1 packet • but it covers 3 slots; • during its tx/rx the RF frequency must not change. • DH3 (Data - High rate, 3 slots) • as DM3, but not protected by FEC. • DM5 (Data - Medium rate, 5 slots) • is conceptually identical to the DM3 packet • but it covers 5 slots; • DH5 (Data - High rate, 5 slots) • as DM5, but not protected by FEC.

  40. Baseband layerError correction • Bluetooth provides three mechanisms for error correction: • FEC 1/3 (double the data – same bit repeated 3 times); • FEC 2/3 (Hamming code); • ARQ for data. • The purpose of the FEC schemes is to reduce the number of retransmissions • the header is always protected by a FEC code 1/3. • ARQ retransmits the data until it receives a correct version • correctness is verified by a CRC code; • the ARQ scheme is not used for voice headers and payloads

  41. Baseband layerLogical channels • LC, Link Control • It is represented in the packet headers; • It carries information relating to the low-level control of the link: ARQ, flow control, characterization of the payload. • LM, Link Manager • It uses the SCO or ACL packet payload; • It carries the information exchanged by the link managers (LMP) of the master and the slaves; • The LM is identified by the field L_CH (= 11) in the header of the payload.

  42. Baseband layerLogical channels • UA, User Asynchronous data • It carries user asynchronous data between L2CAP layers, possibly with fragmentation • It is carried in the payload of ACL packets and, possibly, DV. • UI, User Isochronous data • The channel for isochronous data is created by delaying packets at higher layers; • At the baseband layer, the transmission is identical to the UA channel . • It is carried in the payload of ACL packets and, possibly, DV. • US, User Synchronous data • It transports synchronous data via SCO packets.

  43. Baseband layerClocks • CLKN, Native Clock • native clock of each device; • accuracy of 20 ppm (250 ppm in the sleep states); • it is never adjusted; • the resolution should be at least 1/2 slot (312.5 ms); • the period is about a day. • CLKE, Estimated Clock • it is obtained by adding an offset to CLKN; • it is an estimation of the native clock of the receiver made by a device that performs paging. • CLK, Master Clock • it is the master clock in the piconet; • it is used for timing and organizing all the activities; • each device extracts this clock from CLKN by adding an offset, • for the master CLK = CLKN; • due to the drift of the different oscillators, the master must periodically update the CLK value.

  44. Baseband layerStates • BT has two main states • STANDBY • is the default low power state of the devices, • only the local clock is active and there are no interactions with other devices; • CONNECTION • stations can exchange streams (using the access code to the channel and the BT clock); • Other sub-states: • transition states to add a new slave in a piconet; • page, page scan, inquiry, inquiry scan, master response, slave response, inquiry response.

  45. Baseband layerStates STANDBY Inquiry Inquiry scan Page scan Page master response inquiry response slave response CONNECTION

  46. Baseband layerPiconet creation • The procedures required to create the piconet are inquiry and paging • the inquiry is not necessary when some data about the device were already known (i.e., BD address). • There are several paging schemes • one must be mandatorily supported • when the units are meeting for the first time, • in response to a process of inquiry; • the others are optional • units agree after having connected through the mandatory scheme.

  47. Baseband layerPiconet creation: station connection • During the Inquiry and Paging procedures Access Codes (IAC and DAC) are used • stations that trigger the procedure periodically transmit Inquiry/Page packets on all frequencies; • stations that are waiting to be "discovered" arise periodically in listening (Inquiry / Page scan) • the listening frequency is derived from the device address (BD_Addr) • This reduces the collision probability of the answers (it is likely that in each frequency only one station is listening).

  48. Baseband layerPiconet creation: station connection • step 1 • the inquiry procedure allows the identification of the devices (and their addresses) within transmission range. • It is activated by a potential master solicited by an application or periodically from a master already active: • The potential master sends inquiry packets (ID packets containing the Inquiry Access Code, IAC) on 32 wake-up frequencies and waits for responses (inquiry state); • stations that are located in the inquiry scan state (destinations) receive inquiry packets; • stations that receive inquiry packets enter the inquiry response state and they send a response to the source via an FHS packet. • The master does not respond and continues the inquiry procedure until the end of a timeout • The potential slave that responded to the inquiry packet may decide to move to the page_scan state if it decides to "connect" to the new piconet.

  49. Baseband layerPiconet creation: station connection • Step 2 • The potential master, after the end of the inquiring procedure, goes into the pagestate and begins the pagingof the stations that responded in the previous phase, creating the piconet; • The procedure is realized a station at a time by using the address of the slave collected during the inquiry phase (or already known); • The device performing the procedure becomes definitely the master of the piconet. • the procedure for each station is organized as in the following : • The master in the page state computes page frequency hopping on the basis of the slave address. It then sends an ID packet that contains the Device Access Code, DAC (derived from the 24 least significant bits of the slave address). • the destination in the page scan state receives the ID packet, it recognizes that it is addressed to itself by observing the DAC, and sends back the same packet, entering the slave response state; • The master then sends an FHS packet to the destination, entering the master response state; • the destination sends a second ID packet (identical to the previous one) for confirmation and switches to the hopping sequence specified by the master FHS packet, entering the connection state; • The master continues with the paging of the other stations.

  50. Baseband layerConnection State • In the connection state • the communication begins with a Poll from the master to check the proper use of the FH sequence and the timing from the slave side • The slave can responds with any type of packet. • The connection is terminated using the commands • detach, canonical disconnection handling • the data in the link controller are still valid; • reset, full reset of all processes • after the reset, the controller must be reconfigured.

More Related