Hi, Habr.
In the
previous section , signal reception using GNU Radio was considered. Now we will consider the inverse problem - the transmission of signals of various types of modulation.

')
As in the case of reception, using GNU Radio, you can create a complex software system for transmitting signals without writing a single line of code. But first, let's consider SDR devices capable of working not only for reception, but also for transmission, ranging from megahertz to gigahertz.
Continued under the cut.
Iron
Unlike a cheap RTL SDR V3 receiver, which you can buy for $ 30, you need more serious and expensive iron to work on the transmission. However, the choice is now quite large. I do not consider here purely "amateur radio" SDR-transceivers (Flex / Icom / Yaesu, etc.), because there is little left of SDR in them and they don’t fit us, we’ll consider full-fledged SDRs designed for experiments with DSP that allow us to transmit anything in the format we need.
LimeSDR and LimeSDR Mini
An interesting series of devices, cover the range of reception / transmission from about 10 MHz to 3.5 GHz. LimeSDR formally works from 100kHz, but there is no sensitivity according to reviews.
The price of the issue is about $ 200, but the board can be problematic to buy, because they are sold exclusively through crowdsupply and are not always available. The authors raised money for 2 million. $ But did not get their own web server and a full-fledged store. However, to their credit, all orders were shipped.
Adalm Pluto SDR
Analog Devices fee, mainly for students. A cheap version of the “SDR for the poor” for about $ 120, the reception / transmission range from 300 MHz to 3.8 GHz.
Hackrf
One of the first boards of this kind, which appeared 5-6 years ago, has a frequency range from 1 MHz to 6 GHz. The board is quite old, and for its parameters, dear ($ 300-400), does not know how to work in full duplex and has an 8-bit DAC / ADC. Now there are Chinese clones, but I can not say anything about their quality.
There are other models (Ettus Research, BladeRF, Red Pitaya), they are interesting, but not cheap and most are unlikely to take them. For a beginner, LimeSDR would probably be the best choice. But it must be emphasized that all these boards are designed for experiments with digital signal processing - they are not transceivers in the amateur understanding, their output power is about 50 MW, there are no attenuators, amplifiers, filters in the device, and for CQ DX they are not optimized at all (yes and even p / l software under them is usually not). Although I transmitted from the HackRF wspr signal at 7 and 14 MHz, and it was received at 1000 km, which is quite a good result for a 50 MW and a room antenna.
Of course, this list does not claim to be a complete review, but for general understanding, I hope, is enough. There is a useful label, albeit a bit outdated, but one can understand the parameters of different devices from it:

Soft
For a start, an important note: all experiments when working on the transmission should be carried out with a minimum power and in the allowed ranges, so as not to interfere with other services. In principle, it’s difficult to prevent someone from 10mW, but the radio air must also be kept clean;)
So, we start GNU Radio and get started (if someone missed the
previous part , it is advisable to read it in order to understand better how to use this program).
It is important to understand the general principle - since we have Software Defined radio, we can transmit anything, within the device bandwidth. We only need to form the necessary digital stream, and the DAC will broadcast everything “as it is” on the air. As it was written in the previous part, the GNU Radio is called Sink, the specific name will depend on the device model.
Simple toneThe simplest test: just connect the sine wave source to the transmitter.

Not very interesting, but for some testing, or as a simple signal generator, it can be useful. We launch RTL SDR as a control receiver, and we see our signal.
NfmLet's go further - consider how to transfer something more useful, for example, sound from a wav file or microphone. For this, GNU Radio has a ready-made NBFM Transmit unit. It does all the necessary work - converts our audio stream into a complex IQ-signal with frequency modulation, which the SDR "understands".

The result on the screenshot - the sound is transmitted, and you can hear it, if you choose FM. It is also possible to receive such a signal on portable radio stations.

As you can see, the frequency of reception and transmission was changed to 433 MHz - unlicensed LPD-range.
Wireless switch controlConsider now something more interesting. Since we are talking about the 433 MHz range, we can demonstrate one “dirty hack” - the playback of a pre-recorded signal. This will allow not to deal with the encoding of the signal, but simply to record and transmit it, without analyzing what is inside. Hack "dirty" almost literally, because we will reproduce the signal recorded from the ether, which is far from ideal.
For example, take the cheap 434 MHz wireless switch. I used something like this, bought in Mediamarkt.

We will not deal with its format, but simply record the signal "as it is." To do this, collect a simple scheme in GNU Radio.

The sampling frequency was chosen to be small so as not to write too broad a band - the file will take up a lot of space, and the excess will be broadcast.
FFT Sink is needed for visualization to make sure that there is a signal:

Turn on the recording, press the button on the remote, turn off the recording. The recorded file, by the way, can be opened in Cool Edit and make sure that the signal is recorded normally:

Now we “collect” the transmitting part of the circuit: load the signal from the file and simply send it to the transfer.

We should also separately note the Throttle block, which indicates with what sampling rate to read data from a file (there is no this information in the file itself). The Multiply Const block enhances the signal, in case its level in the recording was insufficient.
Then everything is simple - we start the transmitter, make sure that the desk lamp lights up :) At full power of the transmission, we managed to light a lamp from the other end of the apartment. However, the method, as already mentioned, is quite “dirty” - the signal itself is not ideal, and everything that is on the air is transmitted, including recorded noises and possibly accidentally recorded signals from other devices. But for tests or controlling a radio-controlled machine within the room, it’s fine.
Conclusion
As you can see, SDR provides a fairly extensive field for experiments with different signals, and this is quite simple.
In one piece, all the plans again did not fit. In the next part will be considered more complex types of modulation.