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/13 16:40] – [PHY + MAC + LLC Layers] pczekalski | en:iot-open:networking2:wireless [2023/11/23 16:11] (current) – pczekalski | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== ===== | ||
- | <box # | ||
- | <box # | ||
- | ===== Media Layers - Wireless Network Protocols ====== | ||
- | <box # | ||
- | <box # | ||
+ | ====== 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 " | 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> | <figure iot-protocols> | ||
- | {{ : | + | {{ : |
< | < | ||
</ | </ | ||
- | ==== PHY + MAC + LLC Layers | + | === 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). | 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 == |
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. | 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. | ||
Line 24: | Line 20: | ||
Moreover, WiFi itself offers only 1-to-1 (figure {{ref> | Moreover, WiFi itself offers only 1-to-1 (figure {{ref> | ||
<figure wifionetoone> | <figure wifionetoone> | ||
- | {{ : | + | {{ : |
< | < | ||
</ | </ | ||
<figure wifistar> | <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> | + | 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> | <table Ref.Tab.1.1> | ||
< | < | ||
Line 45: | Line 41: | ||
</ | </ | ||
- | === Bluetooth | + | == 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). | 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). | ||
Line 52: | Line 48: | ||
Bluetooth offers various " | Bluetooth offers various " | ||
- | Now Bluetooth covers two branches: BR/EDR (Basic Rate/ | + | 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, | + | 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> | <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 " | 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, | + | 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> | <figure bt-5-mesh> | ||
- | {{ : | + | {{ : |
< | < | ||
</ | </ | ||
\\ | \\ | ||
- | Improvements introduced in 5.1, 5.2 and 5.3 versions focused on making it possible to better localize | + | Improvements introduced in the 5.1, 5.2, and 5.3 versions focused on localising |
<table Ref.Tab.1.2> | <table Ref.Tab.1.2> | ||
< | < | ||
Line 89: | Line 85: | ||
</ | </ | ||
- | === Cellular | + | == Cellular == |
Cellular (mobile/ | Cellular (mobile/ | ||
Line 95: | Line 91: | ||
<figure gsm_generations> | <figure gsm_generations> | ||
- | {{ : | + | {{ : |
< | < | ||
</ | </ | ||
Line 102: | Line 98: | ||
<figure gsm-net> | <figure gsm-net> | ||
- | {{ : | + | {{ : |
- | {{ : | + | {{ : |
< | < | ||
</ | </ | ||
- | GSM protocols are proprietary, | + | 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, | On the one hand, the GSM network seems to be a good solution for extended distant IoT networks. They have many disadvantages, | ||
Line 115: | Line 110: | ||
Besides limited access constraints, | Besides limited access constraints, | ||
- | === ZigBee | + | == 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.\\ | 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, | + | 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.\\ | 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. | 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 == |
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. | 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 | + | == Thread == |
- | Another standard ((Thread Stack Fundamentals, | + | Another standard ((https:// |
- | === NFC === | + | == NFC == |
- | NFC (Near Field Communication) is a technology that enables two-way interactions between electronic devices. One device mustn' | + | 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. | 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 == |
Sigfox ((https:// | Sigfox ((https:// | ||
- | === LoRaWAN | + | == 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. 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:// | + | 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: | There are 3 classes of devices in LoRa: | ||
- | * Class A: where downlink is active only after the device uses uplink in a very specific | + | * Class A: where downlink is active only after the device uses uplink in a particular |
* Class B: with scheduled receive window, where the downlink is synchronised; | * 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. | * 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 ==== | + | === NET (NWY) Layer === |
- | Traditionally, | + | Traditionally, |
- | === IPv4 === | + | == 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). | 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). | ||
Line 151: | Line 154: | ||
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:// | 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 == |
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: | 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. | 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 | + | == 6LoWPAN == |
- | The name is the abbreviation of “IPv6 over Low-Power Wireless Personal Area Networks” ((Jonas Olsson, | + | 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 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, | 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, | ||
Line 166: | Line 169: | ||
<figure Sample_6LoWPAN> | <figure Sample_6LoWPAN> | ||
- | {{ : | + | {{ : |
- | < | + | < |
</ | </ | ||
- | 6LoWPAN devices can be just nodes (Hosts) or nodes with routing capability (Routers) as presented in Figure | + | 6LoWPAN devices can be just nodes (Hosts) or nodes with routing capability (Routers) as presented in figure |
The Edge Router implements a gateway between 6LoWPAN and the regular IPv6 (IPv4) network. It aims to translate " | The Edge Router implements a gateway between 6LoWPAN and the regular IPv6 (IPv4) network. It aims to translate " | ||