Quick overview of what's here: Go to gnuradio-examples/python/qpsk_fpga These are special versions of qpsk RX and TX benchmarks which use modified usrp fpga firmware with built-in RRCfilter, fractional interpolator and qpsk modulator. * commandline_tx_*.sh : example commandline for tx * commandline_rx_realtime*.sh : example commandline for rx (realtime) * commandline_rx_file*.sh : example commandline for rx (first prerecording, then demodulating) The python scripts which do the real work: * benchmark_tx_qpsk_fpga.py: generates packets of the size you specify and sends them across the air using the USRP. It uses special fpga firmware with built-in RRC filter, fractional interpolator and qpsk modulator. The firmware filename has to be given on the commandline with -F firmwarefilename.rbf The excess-bandwidth (alpha) and interpolation factor are hardcoded in the firmware. There are four firmwares: The total interpolation_rate=DAC_interpolation*interpolation/decimation the number of symbols/sec is determined by the interpolation_rate and DAC samplerate DAC_samplerate=128 Msamples/sec symbols_per_sec=128.0e6/interpolation_rate bitrate=2*symbols_per_sec for qpsk usrp_frac_interp_2rxhb_2tx_alpha0.2_int16_dec10_DACint4X.rbf bitrate= 40Mbit/sec, alpha=0.2 usrp_frac_interp_2rxhb_2tx_alpha0.2_int16_dec1_DACint4X.rbf bitrate= 4 Mbit/sec, alpha=0.2 usrp_frac_interp_2rxhb_2tx_alpha0.35_int16_dec10_DACint4X.rbf bitrate= 40 Mbit/sec, alpha=0.35 usrp_frac_interp_2rxhb_2tx_alpha0.35_int16_dec1_DACint4X.rbf bitrate= 4 Mbit/sec, alpha=0.35 fpga_filename="usrp_frac_interp_2rxhb_2tx_alpha0.2_int16_dec10_DACint4X.rbf" This particular example uses a firmware with 2 rx channels 2 tx channels alpha=0.35 interpolation=16 decimation=1 (so interpolation_rate=16/1=16.0) DAC interpolation=4X (so total interpolation=4*16=64) This results in a bitrate of bits_per_symbol*DACRATE/(DAC_interpolation*(interpolation/decimation)) =2*128000000/(4*(16/1))= 4 Mbit/sec (qpsk has 2 bits_per_symbol) If you change the line with the fpga_filename to usrp_frac_interp_2rxhb_2tx_alpha0.2_int16_dec1_DACint4X.rbf you get interpolation 4*1.6=6.4 and alpha 0.2. So with this firmware you can send two 40 Mb/sec qpsk streams with alpha 0.2. (one on TXA and one on TXB) The script works well using the USRP with the RFX transceiver daughterboards or basic_TX boards. You can not specify the bitrate. The bitrate is determined by the fractional interpolation rate of the fpga firmware. interpolation_rate=4*16.0 => 4 Mb/s interpolation_rate=4*1.6 => 40 Mb/s You should also pass the interpolation and decimation factor of the hardcoded fractional interpolator as commandline parameter to optimize usb throughput and to show the right bitrate -IFI_INTERP, --fi-interp=FI_INTERP give interpolation of fractional interpolator which is hardcoded in selected fgpa (only used to optimise usb transfers and calculate bitrate) [default=16] -DFI_DECIM, --fi-decim=FI_DECIM give decimation of fractional interpolator which is hardcoded in selected fgpa (only used to optimise usb transfers and calculate bitrate) [default=1] you should also pass the transmit RF frequency with -f or --freq -fFREQ, --freq=FREQ set Tx and/or Rx frequency to FREQ [default=%default] The output level is determined by the bitshift parameter. This reduces the output level in the digital domain before samples go to the DAC (so you do lose some resolution) -bBITSHIFT, --bitshift=BITSHIFT bitshift range(-15,15) determines the tx amplitude attenuation, higher values give more attenuation, a too low value gives overflows and/or distortion in RFX boards 0=> +6dB 1=>0 dB (tx_amplitude=8192) 1=>-6 dB (tx_amplitude=4096), 2=> -12 dB and so on. Values 1, 2 and 3 are good for RFX boards [default=2] I added this option because RFX boards get a distortion problem when you use the full output range of the DAC. If you use multiple usrps you can specify which usrp to use with -u -uUSRP, --usrp=USRP which usrp to use (0, 1, 2 ...) [default=0 is the last one plugged in] The last usrp plugged in is allways usrp 0, the second last is 1, the one before is 2, and so on. You can also select modulation type with the -m commandline argument, but the only legal value for is dqpsk_fpga which is also the default. for basicTX this works well: ./benchmark_tx_qpsk_fpga.py -T A -f 16.0e6 -m dqpsk_fpga -v -F usrp_frac_interp_2rxhb_2tx_alpha0.2_int16_dec1_DACint4X.rbf -I 16 -D 1 (see commandline_tx_txA_basicTX_alpha_0.2_bitrate_4M_freq_16MHz.sh) for RFX900 this should work: ./benchmark_tx_qpsk_fpga.py -T A -f 900.0e6 -v -F usrp_frac_interp_2rxhb_2tx_alpha0.2_int16_dec1_DACint4X.rbf -I 16 -D 1 (see commandline_tx_txA_rfx900_alpha_0.2_bitrate_4M_freq_900MHz.sh) To show all commandline options use -h or --help ./benchmark_tx_qpsk_fpga.py -h usage: benchmark_tx_qpsk_fpga.py [options] options: -h, --help show this help message and exit -mMODULATION, --modulation=MODULATION Select modulation, only dqpsk_fpga is valid for this script [default=dqpsk_fpga] -sSIZE, --size=SIZE set packet size [default=%default] -MMEGABYTES, --megabytes=MEGABYTES set megabytes to transmit [default=%default] -fFREQ, --freq=FREQ set Tx and/or Rx frequency to FREQ [default=%default] -uUSRP, --usrp=USRP which usrp to use (0, 1, 2 ...) [default=0 is the last one plugged in] -FFPGA, --fpga=FPGA set fpga_filename to FPGA [default=usrp_frac_interp_2rx hb_2tx_alpha0.2_int16_dec1_DACint4X.rbf] -bBITSHIFT, --bitshift=BITSHIFT bitshift range(-15,15) determines the tx amplitude attenuation, higher values give more attenuation, a too low value gives overflows and/or distortion in RFX boards 0=> +6dB 1=>0 dB (tx_amplitude=8192) 1=>-6 dB (tx_amplitude=4096), 2=> -12 dB and so on. Values 1, 2 and 3 are good for RFX boards [default=2] -IFI_INTERP, --fi-interp=FI_INTERP give interpolation of fractional interpolator which is hardcoded in selected fgpa (only used to optimise usb transfers and calculate bitrate) [default=16] -DFI_DECIM, --fi-decim=FI_DECIM give decimation of fractional interpolator which is hardcoded in selected fgpa (only used to optimise usb transfers and calculate bitrate) [default=1] -TTX_SUBDEV_SPEC, --tx-subdev-spec=TX_SUBDEV_SPEC select USRP Tx side A or B -v, --verbose * benchmark_rx_qpsk_fpga.py: the receiver half of benchmark_tx.py. Command line arguments are pretty much the same as tx. make sure you set the modulation to dqpsk with -m dqpsk You also must set the excess-bandwidth (alpha) explicitely with --excess-bandwidth benchmark_rx_qpsk_fpga.py --help shows the commandline options. Works well with a USRP and RFX transceiver daughterboards, dbs_rx or basic_rx. ./benchmark_rx_qpsk_fpga.py -h usage: benchmark_rx_qpsk_fpga.py [options] options: -h, --help show this help message and exit -mMODULATION, --modulation=MODULATION Select modulation from: qam64, d8psk, qam16, dbpsk, dqpsk, gmsk [default=%default] -fFREQ, --freq=FREQ set Tx and/or Rx frequency to FREQ [default=%default] -rBITRATE, --bitrate=BITRATE specify bitrate. samples-per-symbol and interp/decim will be derived. -uUSRP, --usrp=USRP which usrp to use (0, 1, 2 ...) [default=0 is the last one plugged in] -FFPGA, --fpga=FPGA set fpga_filename to FPGA [default=usrp_frac_interp_2rx hb_2tx_alpha0.2_int16_dec1_DACint4X.rbf] -RRX_SUBDEV_SPEC, --rx-subdev-spec=RX_SUBDEV_SPEC select USRP Rx side A or B --rx-gain=GAIN set receiver gain in dB [default=midpoint]. See also --show-rx-gain-range --show-rx-gain-range print min and max Rx gain available on selected daughterboard -v, --verbose Expert: -SSAMPLES_PER_SYMBOL, --samples-per-symbol=SAMPLES_PER_SYMBOL set samples/symbol [default=%default] -dDECIM, --decim=DECIM set fpga decimation rate to DECIM [default=%default] --excess-bw=EXCESS_BW set RRC excess bandwith factor [default=%default] (PSK) example: ./benchmark_rx_qpsk_fpga.py -m dqpsk -R B -f 900.0e6 -F usrp_frac_interp_2rxhb_2tx_alpha0.2_int16_dec1_DACint4X.rbf --excess-bw 0.2 -r 4000000 --rx-gain 30 -u 0 (see commandline_rx_realtime_usrp0_rxB_dbsrx_alpha0.2_bitrate_4M_freq_900MHz.sh) use usrp 0 (= the last one plugged in, in this case this is the same usrp as used for tx) use modulation dqpsk rf frequency 900 MHz bitrate 4 Mbit daughterboard B verbose rx-gain 30 dB alpha 0.2 WHen you use seperate usrps for tx and for rx you could use: ./benchmark_rx_qpsk_fpga.py -m dqpsk -R B -f 900.0e6 -F usrp_frac_interp_2rxhb_2tx_alpha0.2_int16_dec1_DACint4X.rbf --excess-bw 0.2 -r 4000000 --rx-gain 30 -u 1 (see commandline_rx_realtime_usrp1_rxB_dbsrx_alpha0.2_bitrate_4M_freq_900MHz.sh) -u 1 use usrp 1 (=the first one plugged in, the last one plugged in is 0 which I use for transmitting in this example. You could even leave out the -F usrp_frac_interp_2rxhb_2tx_alpha0.2_int16_dec1_DACint4X.rbf in this case. The receive script can use the standard firmware of the usrp. ./benchmark_rx_qpsk_fpga.py -m dqpsk -R B -f 900.0e6 --excess-bw 0.2 -r 4000000 --rx-gain 30 -u 1 This only fails when you use the same usrp for both transmit and receive. In that case you have to tell the receive script to use the same firmware which is needed for the transmit side. You can also work with basicRX and basicTX daughterboards. Make sure you set the right gain (-g 10 should work) and connect both I and Q. Should also work with basicRX daughterboard with both I and Q connected. Will also work with TVRX daugherboard, but you'll need to fiddle with the gain. Special notes: Since the usrp can do only 8 MSPS on receive side, (or 16 when using 8 bit mode) you cannot receive the 40 Mb/sec which you can send with benchmark_tx_qpsk_fpga.py when using a firmware with interpolation_rate 1.6. You can only receive with firmware with 16.0 interpolation_rate (4Mb/sec). Most machines are not fast enough for this though. For this I added benchmark_rx_qpsk_file.py This script can demodulate prerecorded streams. You can record them with usrp_rx_cfile_basicrxcomplex_fpga.py (for using basicRX daughterboard with both I and Q connected to basicTX) or usrp_rx_cfile_fpga.py (for recording with other daughterboards or for only using I on basicRX) The following examples first prerecord a stream and then demodulate it. The recieved raw sample stream of the usrp is saved in data_cfloat.raw commandline_rx_file_usrp0_rxA_basicRX_freq_16MHz_alpha_0.2_bitrate_4M.sh commandline_rx_file_usrp0_rxA_basicRX_freq_16MHz_alpha_0.35_bitrate_4M.sh commandline_rx_file_usrp0_rxB_rfx900_freq_900MHz_alpha_0.2_bitrate_4M.sh commandline_rx_file_usrp0_rxB_rfx900_freq_900MHz_alpha_0.35_bitrate_4M.sh commandline_rx_file_usrp1_rxB_rfx900_freq_900MHz_alpha_0.2_bitrate_4M.sh commandline_rx_file_usrp1_rxB_rfx900_freq_900MHz_alpha_0.35_bitrate_4M.sh Explanation: use it like: usrp_rx_cfile[_basicrxcomplex_fpga].py -R daughterboard_side -d 16 -f freq -F usrp_frac_interp_2rxhb_2tx_alpha0.2_int16_dec1_DACint4X.rbf -g gain -N numberofsamplestoget data_cfloat.raw daughterboard_side should be A or B f is the frequency in Hertz gain is in decibels (use 10 for basicRX, use 30 for dbsRX) If you try to prerecord a stream which is send with the same usrp at the same time then you must give the fpga firmware filename on the commandline with -F fpga_filename.rbf (Otherwise the usrp_rx_cfile_XXX_fpga.py script tries to load the default firmware while the benchmark_tx_qpsk_fpga.py has loaded the qpsk firmware, which will halt both scripts) Now you can demodulate the stream with usrp_rx_cfile_complex_fpga.py The default filename of the prerecorded stream is data_cfloat.raw benchmark_rx_qpsk_file.py -m dqpsk -F data_cfloat.raw -f 0.0 -r 4000000 -v -S 2 -d 16 --excess-bw=0.35 ./benchmark_rx_qpsk_file.py -h usage: benchmark_rx_qpsk_file.py [options] options: -h, --help show this help message and exit -mMODULATION, --modulation=MODULATION Select modulation from: qam64, d8psk, qam16, dbpsk, dqpsk, gmsk [default=%default] -FFILENAME, --filename=FILENAME filename -fFREQ, --freq=FREQ set Tx and/or Rx frequency to FREQ [default=%default] -rBITRATE, --bitrate=BITRATE specify bitrate. samples-per-symbol and interp/decim will be derived. -v, --verbose Expert: -SSAMPLES_PER_SYMBOL, --samples-per-symbol=SAMPLES_PER_SYMBOL set samples/symbol [default=%default] --excess-bw=EXCESS_BW set RRC excess bandwith factor [default=%default] (PSK)