Lior Elazary KK6BWA

...because this life is yours. Some of it was given to you, the rest you make yourself.

  • Increase font size
  • Default font size
  • Decrease font size
Home

TX/RX digital data using the UV5R

E-mail Print PDF

While messing around with the hacked UV5R, I noticed that its capable of transmitting and receiving two tones using software. After messing around a bit, I thought of using AFSK by switching between two tones, but I could only get about 1200 baudrate. However, I wanted to see if I can get more speed, so 9600 baud would be nice. Rob (WX9O) suggested on the yahoo groups that the RDA1846 has the ability to disable the high and low pass audio filter, which should allow the radio to do 9600 GMSK.

Looking at the programming manual, register 58 can be set to disable the hpf/lpf or the pre/de-emph. For now I was going to test to see if the radio can send 9600 GMSK. For this test I used the hacked radio for transmitting and a SDR dongle (the $20 ones) for receiving. I have not changed the antenna on the radio yet, but placed the antenna about 3 feet away from the uv5r. The UV5R was transmitting on the lowest power possible with 0 volts going into the bias power. I used gnuradio to capture the signal and record it. The headphone output from my soundcard was plugged in directly into the UV5R (no filtering).
I tested by transmitting a 1KHz,2KHz,3KHz,4KHz tones generate by the chip as well as this a raw file which contains GMSK data generate with gmskmodem.

Here is the gnuradio connections used for capture

Here is the gnuradio file. I originally used the WBFM Receive PLL but it was causing  a lot of noise, so I converted it tot he WBFM receive, which seems to work better.

 

gmskmodem was checked out from here: https://github.com/on1arf/gmsk
I used a test.txt file with the following numbers: 0 1 2 3 4 5 6 7 8 9
The audio file was then generated with the following program
gmsk/gmskmodem_dstar_raw/gmskmodem/gmskmodem -noreceiver -format c -sif test.txt -sof test.raw
The file was then played into the radio with aplay:

Originally I played the wave file with aplay with the following params:
aplay -f dat test.raw

However, I  found that to be a problem because it was treating the file as stereo, which made it play at twice the speed. The correct way is:

aplay -f dat -c 1 test.raw

For each test I tried it with register 58 set to the following values:
default value: Register 58 set to 0200
just lpf disabled: Register 58 set to 0230
just hpf disabled: Register 58 set to 0203
lpf with pre/de-emph disabled: Register 58 set to 020B
hpf with pre/de-emph disabled: Register 58 set to 0238
lpf + hpf +  and pre/de-emph disabled: Register 58 set to 023B

The sdr was set to capture the data at 2M samples per second.  For the Tone frequency test, the radio was set to transmit and then play 1KHz tone, then a 2KHz tone, 3KHz tone and finally the 4KHz tone before shutting down the transmitter.

Here is the message that was sent using gmskmodem

Albert Einstein, about the radio

Albert Einstein, when asked to describe radio, replied: "You see, wire telegraph
is a kind of a very, very long cat. You pull his tail in New York and his head
is meowing in Los Angeles. Do you understand this? And radio operates exactly th
e same way: you send signals here, they receive them there. The only difference
is that there is no cat."


 

Here are the resulting wave files captured from sdr radio. Note that there is a bit of static, and I noticed latter that the tuning between the sdr and the uv5r was off by about 12kHz. However, it looks like it still worked even with the static.

message_0200_pcm.raw
message_0203_pcm.raw
message_020B_pcm.raw
message_0230_pcm.raw
message_0238_pcm.raw
message_023B_pcm.raw

The results were processed with the following command:

/home/elazary/radio/digital/gmsk/gmskmodem_dstar_raw/gmskmodem/gmskmodem -format c -nosender -rif wavefile.raw -rof message

Here are the results:

default value: Register 58 set to 0200 : Error: processaudio_codec2: unsupported version id 96
just lpf disabled: Register 58 set to 0230: No errors, but no message received
just hpf disabled: Register 58 set to 0203: Error: processaudio_codec2: unsupported version id 33
lpf with pre/de-emph disabled: Register 58 set to 020B: Error: processaudio_codec2: unsupported version id 19
hpf with pre/de-emph disabled: Register 58 set to 0238: Error: processaudio_codec2: unsupported version id 78
lpf + hpf +  and pre/de-emph disabled: Register 58 set to 023B: Worked very good with two letter errors and a repeat of cat for some reason.

Here is the text interpreted from the the 023B run (errors in bold):

Albert Einstein, about the radio

Albert Einstein, when asked to describe radio, replied: "You see, wire telegraph is a kind of a v%ry, very long cat.
You pull his tail in New York and his head is meowing in Los Angeles. Do you understand this? And radio operates exactly the same way: you$send signals here, they receive them there. The only difference is that there is no cat."
cat.

 

 

So it looks like we need to turn off the lpf,hpf and the pre/de-emphasis for the gmsk to work. However, I think the baud rate on this d-start code is 4800 baud (I found this by looking at the code). So I am still trying to find a program which will generate 9600 baud GMSK data ...

 

 

 

 

Last Updated on Monday, 25 February 2013 06:41