Internet of things in Russian. Baseband Hotel LoRaWAN for RTL-SDR Owners
The concept of transferring signal processing to the cloud is not new. Firstly, VRAN (virtual radio access network) is the main way to build a network of mobile operators. Secondly, SigFox’s IoT network is built on the same principle, as can be seen from its patents. Simply put, it's all unreal cool! So what can we do so as not to sit on the sidelines of progress, but to join the topic?
The history of the issue is as follows: I have been engaged in radio navigation for a long time , and could not pass by such a common radio standard on the Internet of things as LoRa. I really wanted to make positioning for him.
The most economical way of positioning is the differential rangefinder , in English terminology time difference of arrival ( TDOA ). The meters with this method can be single-channel, which compares them favorably with multi-channel with angle of arrival (AOA) methods. The method requires measuring the relative time of arrival of signals to spatially spaced meters.
There are two options: the first, to tie measurements to one reference time scale, the second, to calculate the mutual arrival time directly by the mutual correlation function . The second requires significantly greater bandwidth of the communication channels with the meter, but has potentially better noise immunity. I have chosen this approach.
It should be noted that for simplicity of presentation, I omit the issue of synchronization of the carrier frequency and the sampling frequency of the meters for the time being. I hope to cover this issue in future publications.
Mathematically, the second approach is based on a cross-correlation function (VKF). Technically, this means that the signal samples must be transferred to one place for calculating the WKF. At the same time, it is necessary to select the time samples of one radiation source on all meters involved in positioning. That is, in order to build a conceived LoRa TDOA positioning system, it is necessary to put on each meter an SDR receiver with a LoRa software demodulator, for example, as described in this popular Russian-language article. Next, on each SDR meter receiver, you need to allocate the ID of the emitting means and send to the central computer a sample of samples with this ID. The central calculator will then be able to, when receiving packets of samples with one ID, start the calculation procedure of the WKF and the positioning procedure. This structure seemed to me too demanding on the performance of the equipment and the complexity of the meter software. And with a peak load, it would give an excessive load on the communication channel. Therefore, I remembered the approach to building the signal processing structure of cellular networks, which they have been using for a long time, and in the 5G generation this approach should become mandatory.
This approach is called the Virtual Radio Access Network ( V-RAN ). You can google this combination of words. I found some description in English only. Something meaningful in the Wiki on V-RAN is not, but according to the latest concept - Cloud Radio Access Network or Centralized Radio Access Network ( C-RAN ). The concept seems far from reality - "spaceships plow the expanses of the universe."
As the name implies, the main feature is that the signal demodulation and all subsequent processing steps are transferred to the cloud ( Baseband hotel ). With this approach, the cost of buying equipment is reduced, but there are costs for renting cloud computers, the amount of which can be adjusted quite quickly and conveniently, and most importantly - in accordance with urgent requirements. This brings savings. Savings are superficially examined in this article . And this is a more detailed study of the concept.
Surprisingly, the low-speed nature of IoT makes it possible to use such a “space” approach in the national economy!
To do this, you need to take Raspberry (or any other Linux computer with RTL-SDR and SOAPY support) and RTL-SDR itself, which a relatively large number now have
households people, download the source or binaries of the program, connect to the cloud and watch messages in the LoRa IoT message aggregator, such as, for example, The Things Network.
And you need fast internet. Now the stream is calculated as follows: 200 kHz * 32 bits (I, Q) = 6.4 Mbps. Then this stream is compressed, it turns out about 3-4 Mbit / s leaves Raspberry in the direction of our server continuously.
Now let's take a look at the build and launch process in stages.
Here is the RTL-SDR inserted in the Raspberry Pi 3.
Here is the source code for software that takes samples from RTL-SDR, filters and decimates them, and sends them to the cloud over your Internet. This is to reduce the data rate required to deliver the digital signal to the cloud. Software can be assembled like this
unusually original teams:
mkdir build cd build cmake .. make
Then you need to configure the receive frequency (default is 868.1 MHz), the address and port of the processing server at startup:
./Bolt5_Client host port [frequency]
and run the program. If she gives out
, then everything goes fine and you can configure The Things Network (TTN). This is described in detail here .
To send a message, you need a LoRa node. For simplicity, we used this kit on Arduino:
Then you need to actually transmit the test message and make sure that the cloud LoRa is working. An example of sending a message using Arduino and LoraWAN shield can be found here .
At the moment, it is possible to send messages via the ABP system (Activation By Personalization, Activation by personalization).
In our case, the sent message looks like this:
A message received and recorded in TTN looks like this:
Now the system works in an experimental, manual mode. Various miracles are possible, but we strive to make everything stable as soon as possible. Since our main goal is to position LoRa, we are looking for volunteers willing to connect their hardware (RTL-SDR and Raspberry or another computer) to our server in only one specific area of St. Petersburg: Pionerskaya, Udelnaya and Kolomyagi metro . We already have two meters: one at the intersection of Kolomyazhsky Avenue and Korolev Street, the second in the Liner business center on Verbnaya Street. With your help, we want to create a network with geometry that will allow you to position LoRa in the area of Specific Park.
For our part, we promise to write about the system here. I hope we have enough resources for three months, which should be enough to create a LoRa positioning system.
Join us in mining radio broadcasts for the Internet of things!
The main developer of this miracle is deef137 , please love and favor.