.: What is Done in This Example? :.

The follow figures illustrate the flow of the 2x1 example.

This example runs the following steps.

    1. rx1 starts receiving.
    2. tx2 synchronizes two USRP2s, and sets the transmitting timestamp to a large enough value (TIMESTAMP=256000000) at the metadata. By doing this, two USRP2s can send their first sample at the same time.
    3. Two antennas at tx2 reads samples from the files 'tx2-ofdm-freq-1.dat' and 'tx2-ofdm-freq-2.dat', respectively, and performs fft to convert the frequency-domain samples to the time-domain samples. Each antenna of tx2 will send three access codes. The access codes of two antennas are interleaved.
    4. rx1 estimates the channel h1 and h2, and dumps the results to files. Decoding is performed offline.

.: Run the Example :.

    1. In the receiver side $ cd gr-mimo/python
    2. In the transmitter side $ cd source
    3. in the receiver-side, link the python module 'mimo_usrp2_ofdm_receiver_miso.py' to 'mimo_usrp2_ofdm_receiver.py'. Make sure the file is linked correctly. $ ln -sf mimo_usrp2_ofdm_receiver_miso.py mimo_usrp2_ofdm_receiver.py
      $ ls -la mimo_usrp2_ofdm_receiver.py
      Re-build this folder if there are errors when you run the python code. $ make clean
      $ make
    4. Start the receiver program. You can change the central frequency, decimation, and the interface, but remember to keep "rx_ant_num" as 1. $ sudo ./mimo_usrp2_rx.py -f 2.45G -d 64 -e eth1 --rx_ant_num 1 -v
    5. Wait a bit until the receiver finishes setting up. Then start the transmitter program. Again, you can change the central frequency and interpolation, but remember to keep the settings the same as in the receiver side. The value of interpolation should be the same with the decimation in the receiver side. $ sudo mimo_miso_tx2 -f 2.45G -i 64 -e eth1 -a eth2 -v
    6. in the receiver side, the program will keep running to capture the trace. Press 'Ctrl-C' to stop the program once you see the message '@ enter_finish_first_pkt'.
    7. In the receiver, offline decode the received signals and compute the SNR. $ cp *.dat ../../matlab/
      $ cd ../../matlab/
      $ matlab &
      Run decode_miso() in matlab

.: Result :.

The matlab code decode_miso() will plot the channels from two antennas (USRP2s) at tx2 computed in python and in matlab, respectively. If the program is run correctly, your results should be similar to the following figures.

.: Check whether USRP2s are synced :.

The matlab code decode_miso() also plots the raw received signal. In this example, each transmitter antenna sends its access code individually. The access codes of two antennas are interleaved. Therefore, if USRP2s are synced correctly, the raw received signal should look like the following figure on the left. However, if they are not synced properly, you will see some gaps as shown in the following figure on the right.