[Hackrf-dev] RX/TX switching

Gavin Jacobs apriljunkbox at hotmail.com
Thu Apr 12 17:12:27 EDT 2018


Brian,
Attached is a flowgraph which shows how to RX/TX voice. There are several things that need to be explained.
1) My server is in the attic, so I use the network to send/receive the audio to my laptop. The UDP Source and UDP Sink blocks handle that for me, but you could use the GRC Audio Sink/Source blocks.

2) The Select block was written by me to choose which stream to transmit. You will have to use a single stream - probably the Audio Source block, and GUI button to control PTT. Don't try to use

3) The Osmocom Source and Osmocom Sink blocks both use a Device Arguments field of:
soapy=0,driver=hackrf
Using the Soapy driver allows both the source and sink blocks to access the same hackrf device. If there is data available to TX, it switches to Transmit mode; when all the data hase been send, it switches back to Receive. So in my example, the Signal Source and the WAV File source will transmit continuously, while the UDP Source will only transmit when I send voice over UDP from my laptop. But to use the Soapy driver, you have to have Soapy support in Osmocom, which means you probably have to rebuild Osmocom, which means building a bunch of the dependancies; and it's only possible on Linux (as far as I know). It's tough assignment for a beginner - especially if you are used to Windows.

It took several months (off and on) to achieve the above. If I had to start again, and knowing what I know now, I would probably use an SDR for receive, and use the hackrf just for transmit, using two different antennae (or possibly an antenna switch).

Hope that helps.

Jake



________________________________

Kind of a similar question, but instead of TXing from a file, is there a
way to hook up a microphone to a hackRF and transmit mic output (with a
carrier frequency and appropriate modulation), i.e., for ham radio.

Brian

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist9.pair.net/pipermail/hackrf-dev/attachments/20180412/d807ff19/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: nb-fm-voice.grc.png
Type: image/png
Size: 228259 bytes
Desc: nb-fm-voice.grc.png
URL: <https://pairlist9.pair.net/pipermail/hackrf-dev/attachments/20180412/d807ff19/attachment.png>


More information about the HackRF-dev mailing list