0

I am new to GNU Radio and I'm trying to transmit a value using it and the USRP B210 board.

I used Matlab to convert the value 0.121 to wav format then convert the wav file to .dat file using audio_to_file example in GNU Radio.

When I transmit the .dat file using the B210 and GNU Radio, I received a wav file but when I read the wav using matlab function (audioread()) I get a different value.

P.S.

Sample rate for the converted .dat file was 44100 Hz and 16 bits per sample. The receiver and transmitter sampling rate is 400K Hz. I used fm_tx4.py example from the GNU Radio package for my transmitter. I used uhd_nbfm_receiver.grc for the receiver.

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
Dali
  • 1
  • 2
  • What do you mean you want to transmit a single value? Do you mean "a sequence of constant value", eg. `[0.121, 0.121, 0.121, 0.121, ...]`? – Marcus Müller Feb 24 '15 at 09:28

1 Answers1

0

If you're wondering why your received signal doesn't have the same amplitude as your sent signal, you're not getting the very basics of radio communications: as there is no digital line between your transmitter and your receiver, power can go anywhere, and how much reaches the receiver depends on a lot of factors, including gain, antennas, distance, matching...

There will be a lot more things that are different on the RX side than they were on the TX side: Your reception has not been time-synchronized, so you might see a phase shift. You don't mention whether the receiver is the same, a clock-synchronized or an clock-independent B210, which means you have the general case, where no two physical clocks can be identical (yes, that's impossible, but you can reduce errors), so you'll generally see some frequency offset, too.

I recommend reading up a bit on basic radio comm theory, I often recommend GNU Radio's pictured introduction, and GNU Radio's suggested Reading Page. Michael Ossmann gets some recognition for his courses, too, so you should definitely have a look at them.

Also, all your data->Wav->transmit conversion is totally unnecessary. Matlabs fread/fwrite functions can read/store the native machine float format that GNU Radio's file_sink/file_source can store/read. See the FAQ entry.

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94