Tools4SDR   A new version of the website is under development, powered by MediaWiki! You can already use it here.
 
 
 
 

Valid HTML 4.01 Transitional

The "hello world !" of the communication with two USRPs, matlab and windows

1. Objectives of the scripts

The objectives of the script is to transmit a simple signal from a PC connected to an USRP running Matlab (windows) to another PC connected to a second USRP running Matlab (windows).

The signal to transmit is a square signal of period T=3Te where Te is the sampling frequency (or the inverse of the transmitted signal bandwidth), and equals to 1us:

the received signal

2. Signal generation and transmission

The following commands have been used to generate the signal
y = kron(ones(100000,1),[ones(3,1);-ones(3,1)]);
t = (0:length(y)-1)*1e-6;
Then the USRP has been initialized:
USRP_Init();
And the signal has been transmitted. We use a bandwidth of 1MHz (second parameters) and the signal has been modulated around the frequency 2422MHz (3e WiFi channel)
USRP_SendSignal(y,1,2422e6);
This last command prints some information:
  1. Preparing the signal for transmission
  2. The transmission begins
  3. The signal has been sent
The acquisition script on the second PC has to be launched after the transmission has began and should be over before the end of the transmission.

3. Signal reception

On the second PC that runs matlab, the following commands are used. The USRP is first initialized:
USRP_Init();
When the transmission begins on the first PC, the acquisition script is launch. It records a signal around the frequency 2422MHz over a bandwidth equal to 1 MHz:
[t,y] = USRP_ReceiveSignal(5,1,2422e6);
The signal is then plotted:
plot(t,real(y));
The received signal is composed of delayed bursts, each one being a replica of the transmitted signal. If you zoom on one of this burst, you should observe a signal like the following one:

the received signal

To go further and study the RF impairments of the USRP, you can estimate the channel impulse response of the channel when 2 USRPs are separated by a Gaussian channel.
About | Contact | Site map | Support