Wireless technologies: how to choose the right protocol
Nowadays we all use a smartphone, a tool that has now become irreplaceable within our daily lives, with which we can connect to the world around us.
In fact, with this device we can perform a whole host of different operations, ranging from simple web browsing to using it to listen to music or watch a streaming movie. With the smartphone, through appropriate apps, it is also possible to connect to other devices with a wireless connection (such as, for example, all the devices in a “smart home“).
But how is it possible to connect all these wireless devices together, and more importantly, in what “language” do they communicate with each other?
The term “Internet of Things” refers to the implementation of a system in which objects in the physical world are connected to each other through sensors or actuators that communicate without the need for wires, i.e., “wireless.”
If you want to delve into the world of Iot (Internet of Things) and, therefore, wireless communications, you will immediately notice the myriad of different protocols that can be worked with to transmit data from one device to another. Each of these, in fact, differs from the others in parameters such as “data-rate” (i.e., data transmission rate) or working “bandwidth” (frequencies on the order of MHz or GHz).
Some of the key parameters to consider when choosing which wireless technology to use are:
- the data transmission range;
- the band frequency and data-rate (they are in fact directly proportional);
- the bidirectionality or otherwise of communication between two “nodes” in the network;
- he amount of nodes a single network can handle (i.e., the amount of sensors that can communicate with each other);
- the energy consumption.
It is essential, therefore, for the choice of communication protocol, that is, the language with which two or more devices must interact with each other, to answer two questions: how much data should I send per second and what distance should I reach. Based on these two pieces of information, it is possible to identify different families of wireless technologies having characteristics more or less suitable for our purpose.
At this point, if our goal is to transmit a large amount of data “continuously” (i.e., with high bitrate, we should opt for short-range networks,characterized by protocols that work at high frequencies (2.4 GHz) and allow us to transfer tens if not hundreds of Megabits per second (tens or hundreds of millions of data per second!) such as, for example, Bluetooth or WiFi technology.
Devices equipped with Bluetooth technology are divided into 4 classes of transmission power (ERP Power) which is, of course, directly proportional to the communication distance between them. Each device, when connecting to a Bluetooth network, identifies through a 24-bit code (Class of Device) the other devices by activating the services necessary to initiate communication. Such communication can take place in two ways:
- connectionless, which does not require any “pairing” between devices before sending packets (in this case, the transmitter can at any time start sending data as long as it knows the recipient’s address);
- connection-oriented , where a connection between devices is required before sending data.
The various devices within a Bluetooth network can have the role of master (the one who queries) or slave (the one who receives data). With this dual role, 3 types of Bluetooth networks can be created:
- point-to-point – characterized by only one master and one slave;
- point-to-multipoint – where communication takes place between a master and multiple slaves;
- scatternet – where multiple point-to-multipoint subnets communicate with each other to create a larger network.
WiFi technology, based on the IEEE 802.11 standard, is certainly the most widely used technology nowadays in the IoT world; in fact, it is perfectly normal to connect to any WiFi network, public or private, even outside the home. Wi-Fi compatible devices can connect to the Internet via a WLAN (Wide Local Area Network) and a wireless access point (access point).
Each network can consist of one or more access points (or hot-spots), which are network access points that act as the “source” of the signal, and one or more clients that connect to it (such as a cell phone or tablet). Such access points can operate in different modes:
- Root Mode – is the “standard” mode of operation of the access point, in which it is connected to a network and acts as an access point for all wireless nodes (PCs, laptops, cell phones…);
- Bridge Mode – creates a link between two or more access points, each of which is connected to a network signal (thus acting as a “bridge” between access points);
- Repeater Mode – in this configuration, the access point acts as a repeater and is responsible for increasing the coverage radius of the network;
- Client Mode – the access point behaves as a client to another access point in “root” mode; in this way, devices connected (wired) to the access point acting as a client can access a wireless network even if they do not have a network card.
The cons of this family of technologies concern thehigh power consumption (just think of the fact that the cell phone drains faster when connected to the car’s Bluetooth) and the considerable reduction in the distance at which I can transmit this data (moving a few tens of meters, in fact, the smartphone automatically loses the connection with the home router).
If, on the contrary, the goal is to send a few data at a time (in the order of a packet every few seconds or minutes) over long distances (hundreds if not thousands of meters) it is worth moving to all those technologies that are part of the LPWAN (Low Power Wide Area Network) “family” such as,for example, LoRa technology; the latter (like others such as Narrowband Tecnology or Sigfox) is a technology widely used in the industrial, agricultural or naval sectors that exploits the free ISM (Industrial, Scientific and Medical) frequency band at 868 MHz (a lower working frequency than Bluetooth or WiFi).
A LoRa network (exploiting the LoRaWAN communication protocol) consists of 4 basic elements:
- End Nodes – these are the devices located at the “end” of our network; they are equipped with sensors to collect and send data to the Gateway;
- Gateways – gateways are the bridges between the nodes and the actual network; they are in charge of collecting data sent by the nodes and sending it to the Network Server;
- Network Server – this is the Cloud LoRa (an example may be TTN – The Things Network) that consolidates all the packets received from the gateways and sends them to the Application Server;
- Application Server – enables the interpretation and analysis of the processed data both analytically and visually.
This whole family of protocols makes it possible to send data (albeit at an extremely low bitrate) over distances on the order of hundreds if not thousands of meters.
In conclusion, the choice of wireless communication protocol is critical to the success of applications in the Internet of Things, from our smartphones to large industries.
The wide range of options, such as Bluetooth for high-speed transfers over short distances, WiFi for wider local connections, and LoRaWAN for long-distance communications with low power consumption, offers solutions to suit different needs.
Defining key parameters, such as data-rate, distance, and power consumption, is crucial to selecting the most suitable technology for a specific context, thus ensuring efficient and reliable connectivity between wireless devices.