From 18a271fcdc6cca0a756d1c03cf49541a66eaee81 Mon Sep 17 00:00:00 2001 From: drowe67 Date: Sun, 11 Mar 2018 21:57:00 +0000 Subject: [PATCH] added usage notes git-svn-id: https://svn.code.sf.net/p/freetel/code@3407 01035d8c-6547-0410-b346-abe4f91aad63 --- codec2-dev/octave/nf_from_stdio.m | 32 ++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/codec2-dev/octave/nf_from_stdio.m b/codec2-dev/octave/nf_from_stdio.m index 13aabf87..d18fdb4d 100644 --- a/codec2-dev/octave/nf_from_stdio.m +++ b/codec2-dev/octave/nf_from_stdio.m @@ -5,11 +5,28 @@ Calculate NF in real time from 16 bit real samples from stdin - 1/ When used with UDP feature of gqrx in USB mode: - - $ nc -ul 7355 | octave --no-gui -qf nf_from_stdio.m + 1/ Using gqrx: + + gqrx setup: + Configure I/O devices: + To switch on LNA bias for HackRF, in Configure I/O devices menu set: + Device String: hackrf,bias=1 + To switch on LNA bias for airspy run for a few seconds this before starting gqrx: + $ airspy_rx -r /dev/null -f 435 -b 1 + I used a sample rate of 250000 for Airspy R2, 3000000 for Airspy Mini + Input options...: start with set all gain sliders set to maximum + FFT Setting.....: freq Zoom to max + Receiver Options: On spectrum display, drag filter width until it's about 12k + Filter Shape Normal + Mode USB + Tune until tone is between 2 and 4 k + Press UDP button + + Then in a Linux Term: + + $ nc -ul 7355 | octave --no-gui -qf nf_from_stdio.m 48000 - 2/ Using command line tools: + 2/ Using command line tools. Compile airspy tools and csdr from source: a) Airspy: @@ -17,6 +34,8 @@ csdr convert_s16_f | csdr fir_decimate_cc 50 | csdr convert_f_s16 | \ octave --no-gui -qf ~/codec2-dev/octave/nf_from_stdio.m 120000 complex + Note: we tuned a few kHz down to put the test tone in the 2000 to 4000 Hz range. + a) HackRF: Term 1: @@ -28,7 +47,10 @@ $ hackrf_transfer -r - -f 434995000 -s 4000000 -a 1 -p 1 -l 40 -g 32 | \ csdr convert_s8_f | csdr fir_decimate_cc 50 | csdr convert_f_s16 | \ nc localhost -u 735 - + + Note: HackRF needed a bit of tuning to get test tone in 2000 to 4000 Hz range. This + can be tricky with the command line method, easier with gqrx. + TODO: [ ] work out why noise power st bounces around so much, signal power seems stable [ ] reduce CPU load, in particular of plotting -- 2.25.1