Friday, November 7, 2014

Multi-Beacon Test using Beaglebone Black & HackRF One

I wanted to just do a simple loop test using hackrf_transfer and two beacon frequencies.  One was on 50 Mhz and the other was on 144 Mhz, and the bash script just looped back and forth between both bands.  The script had a few little hiccups, I added a 2sec sleep between transmissions which helped a bit, but hackrf_transfer running on Beaglebone Black appears to randomly stop returning to the command prompt.  THIS COULD JUST BE, RF getting into the BBB as it seemed to happen on 144 Mhz transmissions only.  Anyway, it wasn't terrible.  For a simple IQ recording that was made on 50 Mhz. 

I also tested running this on all bands from 80m to 23cm!  LOL worked just fine for the most part.




Here is are the commands I used:

You can basically record on any frequency and it appears any mode.  I believe this is just capturing the IQ.  Once that's been capture you can retransmit whatever it was you recorded to file.  In this case it was just USB-CW centered on 50.075.2 Mhz.  On the Beaglebone Black I had to really drop the sample-rate down (-s) and I used -n 30,000,000 samples to stop it automatically around 15 seconds total was recorded in this time.

I used my FTDX-5000 to generate the signal I was recording.  The message sent was "DE NW0W NW0W EM47 EM47 DE NWOW EM47 K" (or something close to that anyway)

hackrf_transfer -r /tmp/nw0w_bcn -n 30000000 -f 50075200 -l 32 -g 28 -b 1000000 -s 2000000 

I found if I set the -s <sample rate> too fast it would chop the CW badly in places (randomly) even with nothing else running on the Beaglebone Black at the time.  It really doesn't matter a ton, since 2Msps is more than enough to get a really nice recorded IQ message.

========================================================================
My RX cabability Ends about 1.7 Ghz - I couldn't test any higher at than this point
========================================================================
-- below here I verified with an RTL Dongle and SDR# --
1296 Ghz: hackrf_transfer -t /tmp/nw0w_bcn -f 1296848550 -x 20 -b 1000000 -s 2000000 (found @ 1296.850 Mhz) 
903  Mhz: hackrf_transfer -t /tmp/nw0w_bcn -f 903949050  -x 10 -b 1000000 -s 2000000 (found @  903.950 Mhz)
432  Mhz: hackrf_transfer -t /tmp/nw0w_bcn -f 432300965  -x 10 -b 1000000 -s 2000000 (found @  432.301 Mhz)
222  Mhz: hackrf_transfer -t /tmp/nw0w_bcn -f 222059350  -x 10 -b 1000000 -s 2000000 (found @  222.059 Mhz)
144  Mhz: hackrf_transfer -t /tmp/nw0w_bcn -f 144275590  -x 10 -b 1000000 -s 2000000 (found @  144.275 Mhz)
-- below here I verified with FTDX-5000 --
50   Mhz: hackrf_transfer -t /tmp/nw0w_bcn -f 50075350   -x 30 -b 1000000 -s 2000000 (found @   50.072.2 Mhz)
28   Mhz: hackrf_transfer -t /tmp/nw0w_bcn -f 28276390   -x 0  -b 1000000 -s 2000000 (found @   28.276.0 Mhz)
21   Mhz: hackrf_transfer -t /tmp/nw0w_bcn -f 21172430   -x 0  -b 1000000 -s 2000000 (found @   21.172.0 Mhz)
18   Mhz: hackrf_transfer -t /tmp/nw0w_bcn -f 18110470   -x 20 -b 1000000 -s 2000000 (found @   18.110.0 Mhz)
14   Mhz: hackrf_transfer -t /tmp/nw0w_bcn -f 14100510   -x 10 -b 1000000 -s 2000000 (found @   14.100.0 Mhz)
10   Mhz: hackrf_transfer -t /tmp/nw0w_bcn -f 10130550   -x 10 -b 1000000 -s 2000000 (found @   10.130.0 Mhz)
7    Mhz: hackrf_transfer -t /tmp/nw0w_bcn -f 7025590    -x 10 -b 1000000 -s 2000000 (found @    7.256.0 Mhz)
3.5  Mhz: hackrf_transfer -t /tmp/nw0w_bcn -f 3579610    -x 20 -b 1000000 -s 2000000 (found @    3.579.0 Mhz)

====================================================================
1.8 Mhz (NOT ENOUGH RF-OUT That I could measure)
====================================================================

So All you'd really have to do to make this work on all frequencies would be create a script that loop the commands above as one finshed to just loops to the next band to send the beacon msg.  Since the msg I recorded takes 15 seconds it would take 180 seconds to rotate back around to transmit again on the same band.  Of course a 10 second msg would take 120 seconds to rotate back around to the same band (so 2 minutes or 3 minutes).  On HF that's fine.  On >=50 Mhz that's probably way to long.

I haven't seen it be possible to transmit two signals at the same time.  I haven't really tried to be honest.  I suspect this would be problematic, and at the very least would cut the 32mw in half.  Not to mention possible Intermod issues.

If you really shortened the message to something like "DE NW0W/B EM47" you could probably rotate around fairly quickly if you sent at 20wpm+.  Which should be fine for something like CW skimmer to detect.

BASH SCRIPT I USED ON BEAGLEBONE BLACK:

#!/bin/bash

for (( c=1; c<=10; c++ ))
do
   sleep 2;
   if [ $((c%2)) -eq 0 ];
   then
      echo "6m bcn running...\n";
      hackrf_transfer -t /home/ubuntu/nw0w_bcn/nw0w_bcn_short -f 50075350 -x 0 -b 1000000 -s 2500000
      echo "6m bcn done.\n";
   else 
      echo "2m bcn running...\n";
      hackrf_transfer -t /home/ubuntu/nw0w_bcn/nw0w_bcn_short -f 144275590 -x 15 -b 1000000 -s 2500000
      echo "2m bcn done.\n";
   fi

done