FInally got a HB9CV antenna, a BNC cable and a corresponding adapter to my RTL-SDR. I've put the antenna onto a servo and 3d printed an adapter, the whole setup looks like this:
The beacon was quickly wired on a breadboard. The antenna does not have the correct length, but this was enough to receive a signal in a first test:
On the software side the beacon simply transmits "MO" in Morse code every 5s with currently 50ms for a dit and 150ms for a dah. I have to speed it up later. The first reception was done with multimon-ng. Minimum frequency of the transmitter is 433.82MHz, maximum is 434.02MHz, so I used the center frequency of 433.92MHz with a bandwidth of 200kHz. Gain was set to maximum and everything piped to multimon-ng:
rtl_fm -g 19 -f 433.92e6 -M am -s 200e3 -r 22050 - | multimon-ng -a MORSE_CW -t raw /dev/stdin
After verifying that multimon-ng prints "MO" every 5s I wrote a small python script to decode the same output of rtl_fm. The data is sampled 45 times a second as short int:
SAMPLING_RATE=22050/45 frames = sys.stdin.read(SAMPLING_RATE*2) # Two bytes per value data = np.array(struct.unpack("<%dh" % (len(frames)/2), frames))
and then the average is used to detect if this is a high or low level:
avg = np.average(data) cur_level = avg > HIGH_THRES
With help of the Internet decoding the morse code was very. In the end every time I detected a "MO" I printed the average high level on the terminal.
Using the average level I placed the beacon every 30° around the antenna with a distance of 1.5m to a get a radiation pattern of the antenna. My setup was not very accurate but it does give a first idea:
As one can see the maximum is not quite in front of the antenna, it does squint about 30°. But the decrease of values to 0° and 60° degree is clearly visible. The exact values in this area need more investigation.