This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
| en:iot-open:networking2:wireless [2023/11/21 00:44] – ktokarz | en:iot-open:networking2:wireless [2023/11/23 18:11] (current) – pczekalski | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| + | |||
| + | ====== Media Layers - Wireless Network Protocols ======= | ||
| + | {{: | ||
| + | Wireless connections define core communication for IoT devices. A vast and growing amount of protocols, their variations and the dynamic IoT networking market all present a non-solid situation where old " | ||
| + | |||
| + | <figure iot-protocols> | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | === PHY + MAC + LLC Layers === | ||
| + | |||
| + | Below is a list of the most popular wireless protocols for the lower ISO/OSI layers 1–2 (Physical and Media Access Control); some also implement layer 3 – Networking in a single component). | ||
| + | |||
| + | == WiFi == | ||
| + | WiFi is the set of standards for wireless communication using the 2.4 GHz or 5 GHz band, slightly different spectrum in different countries. The core specification of the 2.4 GHz contains 14 channels with 20 MHz (currently 40 MHz) bandwidth. While there is no centralised physical layer controller, collisions frequently occur even more with a growing number of devices sharing the band. The collision is handled using CSMA-CA with a random binary exponential increase of repeating time. | ||
| + | |||
| + | With the high transmission speed and range usually not exceeding 100 m, it is widely used as the direct replacement of wired Ethernet in local area networks. It is an excellent choice when the amount of data to be transferred is larger, for example, video streams or assembled IoT streams delivered by gateways.\\ | ||
| + | It can also be used in direct connectivity for smart sensors and other IoT elements, but the protocol is not designed to transmit small data packets. It is too energy-consuming for many IoT applications, | ||
| + | Moreover, WiFi itself offers only 1-to-1 (figure {{ref> | ||
| + | <figure wifionetoone> | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | <figure wifistar> | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | WiFi has become a more and more popular choice for not-so-constrained IoT devices because they need to implement a full TCP/IP stack, and those devices that are also not so constrained with power resources. A list of WiFi standards and related transmission speeds is present in table {{ref> | ||
| + | <table Ref.Tab.1.1> | ||
| + | < | ||
| + | ^ 802.11 standard | ||
| + | | 802.11b | ||
| + | | 802.11a | ||
| + | | 802.11g | ||
| + | | 802.11n | ||
| + | | 802.11ac | ||
| + | | 802.11ax | ||
| + | </ | ||
| + | |||
| + | == Bluetooth == | ||
| + | Bluetooth is a prevalent method of connecting various devices at short distances. Almost every computer and smartphone has a Bluetooth module built in. Standard has been defined by Bluetooth SIG (Special Interest Group), founded in 1998. Bluetooth operates in the 2.4 GHz band with 79 channels with automatic channel switching when interference occurs (frequency hopping). The single channel offers up to about 1Mbps (where around 700kbps is available for the user) bandwidth, and it provides communication within the range from up to 1 m (class 3, 1 mW) to up to 100 m (class 1, 100 mW). The most prevalent version is class 2, with a 10 m range (2.5 mW). | ||
| + | |||
| + | Every Bluetooth device has a unique 48-bit MAC address. | ||
| + | |||
| + | Bluetooth offers various " | ||
| + | |||
| + | Now Bluetooth covers two branches: BR/EDR (Basic Rate/ | ||
| + | |||
| + | Classical (before BLE and 4.0) Bluetooth networks can create ad-hoc, so-called WPAN (Wireless Personal Area Networks), sometimes referenced as Piconets. Bluetooth Piconet can handle up to 7 + 1 devices, where 1 device acts as Master and can contact up to 7 Slave devices. Only the Master device can initiate a communication. Fortunately for the IoT approach, much Bluetooth hardware can act as Slave and Master simultaneously, | ||
| + | |||
| + | <figure net_bt_scatternet> | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | Bluetooth Low Energy (BLE) uses a simplified state machine implementation and thus is more constrained-devices friendly. It offers a limited range and is designed to expose the state rather than transmit streamed data. However, it provides a speed reaching up to about 1.4 Mbps (2 Mbps aerial throughput) if needed. It uses a 2.4 GHz band but is designed to avoid interference with WiFi AP and clients. Communication is organised into three advertising channels (located " | ||
| + | |||
| + | Latest Bluetooth implementations (protocol version 5.0 and newer, implemented in mid-2017) offer a Bluetooth mesh network extending ubiquitous connectivity via a many-to-many communication model dedicated to IoT devices, lighting, Industry 4.0, etc. The Bluetooth mesh is layer-organised, | ||
| + | |||
| + | <figure bt-5-mesh> | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | \\ | ||
| + | Improvements introduced in the 5.1, 5.2, and 5.3 versions focused on localising neighbouring nodes better, on audio use, and improving power efficiency. Version 5.4 introduces a new feature that allows nodes to send encrypted data in the advertising frames (Encrypted Advertising Data). Another improvement is also focused on advertising frames, making it possible to respond to such a frame (Periodic Advertising with Responses). Both extensions are beneficial in the IoT world, allowing nodes to send small, encrypted packets using an advertising mechanism. Bluetooth 5.4 enables connectionless, | ||
| + | <table Ref.Tab.1.2> | ||
| + | < | ||
| + | ^ Bluetooth | ||
| + | | 1.0 | 21 kbps | Few implementations | ||
| + | | 1.1 | 124 kbps | | | ||
| + | | 1.2 | 328 kbps | First popular version | ||
| + | | 2.0 + EDR | 3 Mbps | Extended Data Rate | | ||
| + | | 3.0 + HS | 24 Mbps | High Speed | | ||
| + | | 3.1 + HS | 40 Mbps | ||
| + | | 4.0 + LE | 1 Mbps | Low Energy | ||
| + | | 4.1 | Designed for IoT | | | ||
| + | | 5.0 | 50 Mbps | One standard for all purposes | ||
| + | | 5.1 | | Better accuracy of node localization | ||
| + | | 5.2 | | Defined for Audio | | ||
| + | | 5.3 | | Improved power efficiency | ||
| + | | 5.4 | | Improved security | ||
| + | </ | ||
| + | |||
| + | == Cellular == | ||
| + | Cellular (mobile/ | ||
| + | |||
| + | Figure {{ref> | ||
| + | |||
| + | <figure gsm_generations> | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | Figure {{ref> | ||
| + | |||
| + | <figure gsm-net> | ||
| + | {{ : | ||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | GSM protocols are proprietary, | ||
| + | On the one hand, the GSM network seems to be a good solution for extended distant IoT networks. They have many disadvantages, | ||
| + | |||
| + | <note important> | ||
| + | |||
| + | Besides limited access constraints, | ||
| + | |||
| + | == ZigBee == | ||
| + | ZigBee protocol is prevalent in Smart House but also in Industry appliances. Zigbee is a wireless technology developed as an open standard to address the needs of low-cost, low-power wireless machine-to-machine networks. However, it is more popular in the industry because of the relatively higher equipment cost than WiFi, Bluetooth or other RF modules.\\ | ||
| + | The Zigbee standard operates on the radio bands 2.4 GHz for smart home applications, | ||
| + | Transmission speed is up to 250 kbps, with a theoretical range of up to 100 m but usually to some 10–30 m.\\ | ||
| + | ZigBee does not provide direct, unique IP-addressing on the Networking layer like 6LowPAN or Thread do. A single ZigBee network can handle up to 65000 devices. | ||
| + | |||
| + | == Z-Wave == | ||
| + | Z-Wave is a protocol similar in principle to the ZigBee, but hardware is cheaper; thus, it is more towards inexpensive home automation systems. Like in ZigBee, Z-Wave operates on different frequencies depending on the world region, usually between 865 MHz and 926 MHz. The transmission speed is up to 200 kbps, and the range is 100m. A single Z-Wave network is pretty limited in the number of concurrent devices in one network, that is, only 232 devices. Each Z-Wave network has a unique ID, and each node (device) in a network has a unique 8-bit identifier. | ||
| + | |||
| + | == Thread == | ||
| + | Another standard ((https:// | ||
| + | |||
| + | == NFC == | ||
| + | NFC (Near Field Communication) is a technology that enables two-way interactions between electronic devices. One device mustn' | ||
| + | Transmission speed varies between 100–420 kbps, the range between active devices is up to 10 cm, and the operating frequency is 13.56 MHz. | ||
| + | |||
| + | == Sigfox == | ||
| + | Sigfox ((https:// | ||
| + | |||
| + | == LoRa and LoRaWAN == | ||
| + | LoRa (Long Range) is the technology for data transmission with a relatively low speed (20 bps do 41 kbps) and a range of about 2 km (new transceivers can transmit data up to 15 km). It uses CSS (Chirp Spread Spectrum) modulation in the 433 MHz or 868 ISM radio band. | ||
| + | |||
| + | A chirp signal is characterized by a continuous frequency sweep over time. This means that the frequency of the transmitted signal starts at some lower frequency and continuously increases throughout the transmission of a single symbol. In LoRa the starting frequency differs depending on the symbol encoded, and while the modulated signal achieves the maximal value of the frequency starts from the minimal one. It means that each chirp uses the whole available bandwidth. Chirp Spread Spectrum modulation makes LoRa signals less susceptible to interference and noise and allows LoRa to achieve long-range communication. LoRa modulation is characterized by two parameters: | ||
| + | * **Spreading Factor** determines the speed of the signal frequency change over time. Higher spreading factors result in a longer communication range but lower data rates. It also defines the number of bits encoded by one chirp. | ||
| + | * The **Bandwidth** of the LoRa signal determines the amount of spectrum occupied by the transmitted signal. It can be 125, 250 or 500 kHz. It also specifies the sampling frequency of the signal in the receiver. | ||
| + | Having these parameters it is possible to calculate the efficient data rate (in bps). | ||
| + | Because the range of LoRa communication is long, transmitters can interfere, so some rules for the maximum time of occupation of the channel were introduced. In the European Union, the maximum percentage of transmission time known as the Duty Cycle is 1%. This gives a maximum transmission time of 864 seconds per day. Transmission should be as short as possible, and the delay between following transmissions should last a few minutes. The duty cycle together with bandwidth and spreading factor makes it possible to calculate the maximum payload of the frame and the bitrate. Some online calculators help set LoRa parameters to fulfil the local regulations ((https:// | ||
| + | |||
| + | The cell topology is the star, with the gateway at the central point. End devices use one-hop communication with the gateway. A LoRaWAN gateway is usually connected to the standard IP network with a central network server. The LoRa technology is supported as LoRaWAN by LoRa Alliance ((https:// | ||
| + | There are 3 classes of devices in LoRa: | ||
| + | * Class A: where downlink is active only after the device uses uplink in a particular time window (twice). It has the greatest energy efficiency among other classes. Downlink opportunity appears asynchronously, | ||
| + | * Class B: with scheduled receive window, where the downlink is synchronised; | ||
| + | * Class C: is a class where the device listens to the downlink communication almost continuously. This brings the lowest latency in communication and the highest energy demand compared to the other classes. | ||
| + | |||
| + | === NET (NWY) Layer === | ||
| + | Traditionally, | ||
| + | |||
| + | == IPv4 == | ||
| + | Internet Protocol v4 (1981) is perhaps the most widespread networking protocol. The predecessor of the IPv4 protocol, originally called IP, was introduced in 1974 and supported up to 2^8 hosts, organised in 2^4 subnetworks (RFC 675). | ||
| + | |||
| + | In IPv4 (RFC 760/ | ||
| + | |||
| + | Some relief to the suffocating Internet was brought as an ad-hoc solution with the NAT (Network Address Translation) introduction. NAT-enabled subnetworks are those where one public address represents a set of devices hidden behind the router. However, that limits usability because of the lack of direct access and unique identification in the global network level of the devices sharing private address spaces. Even so, more than 29 billion IoT devices are expected to be connected to the Internet by the end of 2030, according to Statista forecast ((https:// | ||
| + | |||
| + | == IPv6 == | ||
| + | IPv6 is the next generation of the IPv4 protocol. It is supposed to replace IPv4. The transition process is not as quick as expected because many Internet and intranet services implement IPv4 only and would become inoperable if IPv4 were unavailable.\\ IPv6 brings addressing space large enough to cover all existing and future needs as it is possible to forecast. The number of possible addresses is 2^128. Addresses are presented by 8 groups of 4 hexadecimal values, e.g. 2001: | ||
| + | |||
| + | This brings the capability to uniquely identify any device connected to the Internet using its IPv6 address. Regarding IoT, implementations have many drawbacks (IPv4 also has them). IPv6 network is star-like, whereas IoT networks can benefit from the mesh model. IPv6 network requires a controller providing free addresses (a DHCP server) – devices must contact it to obtain the address. Every IoT device needs to keep a list of devices it corresponds with (ARP) to resolve their physical address. Moreover, full IPv6 stack implementation requires large RAM when used. | ||
| + | |||
| + | == 6LoWPAN == | ||
| + | The name is the abbreviation of "IPv6 over Low-Power Wireless Personal Area Networks" | ||
| + | This protocol was introduced as a lightweight version of full IPv6, IoT-oriented.\\ | ||
| + | This feature allows connecting 6LoWPAN networks with other networks using a so-called Edge Router. Thus, every node can be visible on the Internet and uniquely addressable, | ||
| + | |||
| + | 6LoWPAN supports two addressing models: 64-bit and 16-bit. The former limits the number of devices connected to one network to 64000 nodes. The primary frame size is just 127 bytes (compared to full IPv6, where it is 1280 bytes at least). 6LoWPAN supports unicast and broadcast. It also supports IP routing and link-layer mesh (802.15.5) that introduces the fail-safe redundant, self-organising networks because the link-layer mesh can have more than one Edge Router. | ||
| + | 6LoWPAN uses autoconfiguration for neighbour device discovery, so it does not require a DHCP server. It also supports ciphered transportation using AES 128 (and AES 64 for constrained devices). | ||
| + | |||
| + | <figure Sample_6LoWPAN> | ||
| + | |||
| + | {{ : | ||
| + | < | ||
| + | </ | ||
| + | |||
| + | 6LoWPAN devices can be just nodes (Hosts) or nodes with routing capability (Routers) as presented in figure {{ref> | ||
| + | |||
| + | The Edge Router implements a gateway between 6LoWPAN and the regular IPv6 (IPv4) network. It aims to translate " | ||