├── root ├── luaradio │ ├── examples │ │ ├── README │ │ ├── iqfile_converter.lua │ │ ├── wavfile_ssb_modulator.lua │ │ ├── rtlsdr_nbfm.lua │ │ ├── rtlsdr_am_envelope.lua │ │ ├── rtlsdr_wbfm_mono.lua │ │ ├── rtlsdr_ax25.lua │ │ ├── rtlsdr_ssb.lua │ │ ├── rtlsdr_pocsag.lua │ │ ├── rtlsdr_am_synchronous.lua │ │ ├── rtlsdr_rds.lua │ │ └── rtlsdr_wbfm_stereo.lua │ ├── lplot10.lua │ ├── lplot20.lua │ ├── embed │ │ ├── tests │ │ │ ├── test.h │ │ │ └── test_api.c │ │ ├── examples │ │ │ ├── fm-radio.c │ │ │ └── rds-timesync.c │ │ ├── luaradio.h │ │ ├── Makefile │ │ └── luaradio.c │ ├── lplot50.lua │ ├── wav2iq.lua │ ├── am_envelope_pluto.lua │ ├── nbfm_pluto.lua │ ├── wbfm_mono_pluto.lua │ ├── noaa_pluto.lua │ ├── am_synchronous_pluto.lua │ ├── ax25_pluto.lua │ ├── pocsag_pluto.lua │ ├── luaradio │ └── README.md ├── plot20.sh ├── plot50.sh ├── usb-drive.sh ├── pplot10.sh ├── pplot20.sh ├── pplot50.sh ├── rx_tools │ └── wbfm_rx.sh ├── plot10.sh ├── iio_attr │ ├── samples.gnu │ └── iio_samples.sh ├── plot-wav.sh ├── DATV │ ├── mpeg4-download.sh │ ├── datv-test.sh │ ├── mpeg2-download.sh │ ├── datv-tx-mpeg4.sh │ ├── datv-tx-test.sh │ ├── datv-tx-mpeg2.sh │ └── datv-rx-leandvb.sh ├── openwebrx.sh ├── nbfm-rx.sh ├── multimon-ng │ └── csv_png.gnu ├── wbfm-rx.sh ├── usr │ └── share │ │ └── gnuplot │ │ └── 5.0 │ │ └── gnuplotrc ├── rtl_power.gnu ├── status.sh ├── signal.sh ├── python │ ├── iio_pluto.py │ ├── test_soapy.py │ ├── iio_info.py │ └── siggen.py └── CW-pluto.py ├── rtl_433 ├── libjq.so ├── jq.pluto.v030 ├── rtl_433.pluto.v030 ├── rtl_listen.sh ├── plot_id.sh ├── temp.gnu └── readme.md ├── USB-drive ├── img │ ├── ez.png │ ├── li.png │ ├── sw.png │ ├── tw.png │ ├── favicon.ico │ ├── PlutoSDR.png │ ├── download.png │ ├── ADI_Logo_AWP.png │ ├── GNURadio_logo.jpg │ ├── index_br.html │ ├── mathworks_logo.png │ ├── index_cn.html │ ├── index_jp.html │ ├── index_ru.html │ ├── version.js │ ├── style.css │ ├── index_es.html │ ├── index_de.html │ └── index_fr.html ├── rpidatv.ts ├── video-samples.txt ├── config.txt ├── runme0.sh ├── cgi-bin │ └── leantrx │ │ └── dvbrx.cgi ├── leantrx │ ├── README.md │ ├── index.html │ └── perso.html ├── gnuradio │ └── dvbs_tx.py ├── info.html └── README.txt ├── timems ├── timems_v0.30 ├── timems.c └── readme.md ├── pluto_power ├── plot.sh ├── plot.gnu ├── README.md └── mini_sna.sh └── pluto_cli ├── readme.txt └── pluto_cli.sh /root/luaradio/examples/README: -------------------------------------------------------------------------------- 1 | # Examples 2 | 3 | http://luaradio.io/examples/ 4 | -------------------------------------------------------------------------------- /rtl_433/libjq.so: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/rtl_433/libjq.so -------------------------------------------------------------------------------- /USB-drive/img/ez.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/USB-drive/img/ez.png -------------------------------------------------------------------------------- /USB-drive/img/li.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/USB-drive/img/li.png -------------------------------------------------------------------------------- /USB-drive/img/sw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/USB-drive/img/sw.png -------------------------------------------------------------------------------- /USB-drive/img/tw.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/USB-drive/img/tw.png -------------------------------------------------------------------------------- /USB-drive/rpidatv.ts: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/USB-drive/rpidatv.ts -------------------------------------------------------------------------------- /timems/timems_v0.30: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/timems/timems_v0.30 -------------------------------------------------------------------------------- /rtl_433/jq.pluto.v030: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/rtl_433/jq.pluto.v030 -------------------------------------------------------------------------------- /USB-drive/img/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/USB-drive/img/favicon.ico -------------------------------------------------------------------------------- /USB-drive/img/PlutoSDR.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/USB-drive/img/PlutoSDR.png -------------------------------------------------------------------------------- /USB-drive/img/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/USB-drive/img/download.png -------------------------------------------------------------------------------- /root/plot20.sh: -------------------------------------------------------------------------------- 1 | cd /root/luaradio 2 | /root/luaradio/luaradio /root/luaradio/lplot20.lua $1 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /root/plot50.sh: -------------------------------------------------------------------------------- 1 | cd /root/luaradio 2 | /root/luaradio/luaradio /root/luaradio/lplot50.lua $1 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /rtl_433/rtl_433.pluto.v030: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/rtl_433/rtl_433.pluto.v030 -------------------------------------------------------------------------------- /USB-drive/img/ADI_Logo_AWP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/USB-drive/img/ADI_Logo_AWP.png -------------------------------------------------------------------------------- /root/usb-drive.sh: -------------------------------------------------------------------------------- 1 | 2 | #!/bin/bash 3 | losetup /dev/loop7 /opt/vfat.img -o 512 4 | mount /dev/loop7 /gadget 5 | 6 | -------------------------------------------------------------------------------- /USB-drive/img/GNURadio_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/USB-drive/img/GNURadio_logo.jpg -------------------------------------------------------------------------------- /USB-drive/img/index_br.html: -------------------------------------------------------------------------------- 1 | você gostaria de ajudar com a tradução? 2 | Por favor, envie um github.com um pedido pull 3 | -------------------------------------------------------------------------------- /USB-drive/img/mathworks_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/LamaBleu/plutoscripts/HEAD/USB-drive/img/mathworks_logo.png -------------------------------------------------------------------------------- /root/pplot10.sh: -------------------------------------------------------------------------------- 1 | echo "Press CTRL-C to stop" 2 | while true 3 | do 4 | /root/plot10.sh ${1} 5 | sleep 1 6 | done 7 | 8 | -------------------------------------------------------------------------------- /root/pplot20.sh: -------------------------------------------------------------------------------- 1 | echo "Press CTRL-C to stop" 2 | while true 3 | do 4 | /root/plot20.sh ${1} 5 | sleep 1 6 | done 7 | 8 | -------------------------------------------------------------------------------- /root/pplot50.sh: -------------------------------------------------------------------------------- 1 | echo "Press CTRL-C to stop" 2 | while true 3 | do 4 | /root/plot50.sh ${1} 5 | sleep 1 6 | done 7 | 8 | -------------------------------------------------------------------------------- /USB-drive/img/index_cn.html: -------------------------------------------------------------------------------- 1 | 2 | 你想帮忙翻译吗? 3 | 请向github提交一个请求 4 | Nǐ xiǎng bāngmáng fānyì ma? 5 | Qǐng xiàng github tíjiāo yīgè qǐngqiú 6 | -------------------------------------------------------------------------------- /root/rx_tools/wbfm_rx.sh: -------------------------------------------------------------------------------- 1 | 2 | rx_fm -f 105.1M -M wbfm -s 170k -r 48k -A fast -l 0 -E deemp -g 70 | sox -t raw -e signed -c 1 -b 16 -r 48000 - /www/record.wav 3 | -------------------------------------------------------------------------------- /USB-drive/img/index_jp.html: -------------------------------------------------------------------------------- 1 | 2 | 翻訳を手伝いたいですか? 3 | プルリクエストをgithub.comに送信してください 4 | Hon'yaku o tetsudaitaidesu ka? Pururikuesuto o github. Komu ni sōshin shite kudasai 5 | -------------------------------------------------------------------------------- /root/plot10.sh: -------------------------------------------------------------------------------- 1 | cd /root/luaradio 2 | #sed "s/98000/$1/g" /root/luaradio/lplot10.lua > /tmp/plot.lua 3 | /root/luaradio/luaradio /root/luaradio/lplot10.lua $1 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /USB-drive/img/index_ru.html: -------------------------------------------------------------------------------- 1 | вы хотите помочь с переводом? 2 | Отправьте запрос github.com на запрос 3 | vy khotite pomoch' s perevodom? 4 | Otprav'te zapros github.com na zapros 5 | -------------------------------------------------------------------------------- /rtl_433/rtl_listen.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | cp /remote/overlay/rtl.txt /www/rtl.txt 3 | chmod 666 /www/rtl.txt 4 | sleep 2 5 | rtl_433 -d driver=plutosdr,uri=local: -l 110 -g 69 -C si -F json:/www/rtl.txt 6 | 7 | -------------------------------------------------------------------------------- /root/iio_attr/samples.gnu: -------------------------------------------------------------------------------- 1 | set term png size 1200 500 2 | set output '/www/plot.png' 3 | plot 'samples.bin' binary format='%short%short' using 1 with lines, 'samples.bin' binary format='%short%short' using 2 with lines 4 | 5 | -------------------------------------------------------------------------------- /root/plot-wav.sh: -------------------------------------------------------------------------------- 1 | echo "Converting /www/record.wav to /www/record.csv... wait ..." 2 | multimon-ng -q -t wav -a DUMPCSV /www/record.wav > /www/record.csv 3 | gnuplot -e "plot_data_file='/www/record'" /root/multimon-ng/csv_png.gnu 4 | 5 | 6 | -------------------------------------------------------------------------------- /root/DATV/mpeg4-download.sh: -------------------------------------------------------------------------------- 1 | if [ ! -f /gadget/config.txt ]; then 2 | losetup /dev/loop7 /opt/vfat.img -o 512 3 | mount /dev/loop7 /gadget 4 | fi 5 | wget https://github.com/LamaBleu/Pluto-DATV-test/raw/master/samples/MPEG4-rpidatv.ts -o /gadget/rpidatv.ts 6 | 7 | -------------------------------------------------------------------------------- /root/DATV/datv-test.sh: -------------------------------------------------------------------------------- 1 | if [ ! -f /gadget/config.txt ]; then 2 | losetup /dev/loop7 /opt/vfat.img -o 512 3 | mount /dev/loop7 /gadget 4 | fi 5 | leandvbtx --cr 1/2 --s16 < /gadget/rpidatv.ts | leaniiotx -f 435000000 --bufsize 32768 --nbufs 32 --bw 3e6 -s 1e6 -v 6 | -------------------------------------------------------------------------------- /root/DATV/mpeg2-download.sh: -------------------------------------------------------------------------------- 1 | if [ ! -f /gadget/config.txt ]; then 2 | losetup /dev/loop7 /opt/vfat.img -o 512 3 | mount /dev/loop7 /gadget 4 | fi 5 | wget https://github.com/LamaBleu/Pluto-DATV-test/raw/master/samples/MPEG2-lalinea.ts -o /gadget/MPEG2-lalinea.ts 6 | 7 | -------------------------------------------------------------------------------- /root/openwebrx.sh: -------------------------------------------------------------------------------- 1 | cd /openwebrx 2 | 3 | if [ "$#" -eq "0" ] 4 | then 5 | echo "" 6 | else 7 | echo "New frequency : " $1 8 | sed -i "/center_freq = /c\center_freq = $1" /openwebrx/config_webrx.py 9 | fi 10 | python /openwebrx/openwebrx.py 11 | 12 | 13 | -------------------------------------------------------------------------------- /root/DATV/datv-tx-mpeg4.sh: -------------------------------------------------------------------------------- 1 | echo "Sending rpidatv.ts : 435MHz 500kS/s FEC:7/8" 2 | if [ ! -f /gadget/config.txt ]; then 3 | losetup /dev/loop7 /opt/vfat.img -o 512 4 | mount /dev/loop7 /gadget 5 | fi 6 | leandvbtx --cr 7/8 --s16 < /gadget/rpidatv.ts | leaniiotx -f 435000000 --bufsize 32768 --nbufs 32 --bw 3e6 -s 1e6 -v 7 | -------------------------------------------------------------------------------- /root/DATV/datv-tx-test.sh: -------------------------------------------------------------------------------- 1 | echo "Sending rpidatv.ts : 435MHz 500kS/s FEC:7/8" 2 | if [ ! -f /gadget/config.txt ]; then 3 | losetup /dev/loop7 /opt/vfat.img -o 512 4 | mount /dev/loop7 /gadget 5 | fi 6 | leandvbtx --cr 7/8 --s16 < /gadget/rpidatv.ts | leaniiotx -f 435000000 --bufsize 32768 --nbufs 32 --bw 3e6 -s 1e6 -v 7 | -------------------------------------------------------------------------------- /rtl_433/plot_id.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | id=$1 3 | eval "jq -jr '.time, \",\", .id==$id, \",\", .temperature_C , \",\", .humidity, \"\n\"' /www/rtl.txt | grep true > rtl_433.csv" 4 | gnuplot -e "id=$id" /root/rtl_433/temp.gnu 2>/dev/null 5 | echo "Full PNG plot : http://pluto.local/plot.png or http://192.168.2.1/plot.png" 6 | 7 | 8 | -------------------------------------------------------------------------------- /timems/timems.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | void main (void){ 4 | long ms; 5 | time_t s; 6 | 7 | struct timespec spec; 8 | clock_gettime(CLOCK_REALTIME, &spec); 9 | s = spec.tv_sec; 10 | ms = (spec.tv_nsec / 1.0e6); 11 | printf("%d.%03d\n", s, ms); 12 | return 0; 13 | } 14 | 15 | -------------------------------------------------------------------------------- /USB-drive/video-samples.txt: -------------------------------------------------------------------------------- 1 | Video samples : 2 | 3 | - MPEG4-TS : rpidatv.ts (courtesy @F5OEOEvariste) 4 | can also be downloaded from here : https://github.com/LamaBleu/Pluto-DATV-test/raw/master/samples/MPEG4-rpidatv.ts 5 | - MPEG2-TS is also available here : https://github.com/LamaBleu/Pluto-DATV-test/raw/master/samples/MPEG2-lalinea.ts 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /pluto_power/plot.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Will display a plot from example.csv file 4 | # and save the plot as example-1.png 5 | # CSVfile : freq(Hz) level(dB) 6 | #fstart=tail -1 ./test.csv | awk '{print $1}') 7 | 8 | fstart=$(tail -1 ./test.csv | awk '{print $1}') 9 | fend=$(head -1 test.csv | awk '{print $1}') 10 | #echo $fstart $fend 11 | gnuplot -persist -e "fmax=$fstart;f0=$fend" ./plot.gnu 12 | -------------------------------------------------------------------------------- /root/DATV/datv-tx-mpeg2.sh: -------------------------------------------------------------------------------- 1 | echo "Sending MPEG2-lalinea.ts : 970MHz 1000kS/s FEC:7/8" 2 | if [ ! -f /gadget/config.txt ]; then 3 | losetup /dev/loop7 /opt/vfat.img -o 512 4 | mount /dev/loop7 /gadget 5 | fi 6 | if [ ! -f /gadget/MPEG2-lalinea.ts ]; then 7 | wget https://github.com/LamaBleu/Pluto-DATV-test/raw/master/samples/MPEG2-lalinea.ts -O /gadget/MPEG2-lalinea.ts 8 | fi 9 | leandvbtx --cr 7/8 --s16 < /gadget/MPEG2-lalinea.ts | leaniiotx -f 970000000 --bufsize 32768 --nbufs 32 --bw 3e6 -s 1.6e6 -v 10 | -------------------------------------------------------------------------------- /root/DATV/datv-rx-leandvb.sh: -------------------------------------------------------------------------------- 1 | echo "Receive DATV on 435MHz, SR 333kS/s, FEC 7/8" 2 | echo "Forward TS stream to 192.168.2.1 4444 using nmux" 3 | echo "From your computer use 'nc 192.168.2.1 4444 | cvlc -'" 4 | echo 5 | echo 6 | leaniiorx --bufsize 131072 --nbufs 32 -f 435e6 -s 2e6 --bw 333e3 -v | leansdrserv --info3-httpd 8003 leandvb --s16 -f 2e6 --tune 0 --sr 333e3 --sampler rrc --rrc-rej 20 --const QPSK --standard DVB-S --cr 7/8 -v --json --anf 0 --fd-info 3 --fd-const 3 --fd-spectrum 3 | nmux -a 192.168.2.1 -p 4444 -n 64 7 | -------------------------------------------------------------------------------- /root/nbfm-rx.sh: -------------------------------------------------------------------------------- 1 | echo "Usage : nbfm-rx - example : nbfm-rx.sh 466208000 72 " 2 | echo "NBFM stream : http://192.168.2.1 (48000Hz)" 3 | echo "Listen audio stream : nc 192.168.2.1 4444 | mplayer -cache 1024 -quiet -rawaudio samplesize=2:channels=1:rate=48000 -demuxer rawaudio - " 4 | 5 | rx_sdr -F CF32 -s 2400000 -f $1 -g $2 - | csdr fir_decimate_cc 50 0.005 HAMMING | csdr fmdemod_quadri_cf | csdr limit_ff | csdr deemphasis_nfm_ff 48000 | csdr fastagc_ff | csdr convert_f_i16 | nmux -p 4444 -a 192.168.2.1 6 | 7 | 8 | -------------------------------------------------------------------------------- /USB-drive/config.txt: -------------------------------------------------------------------------------- 1 | # Device Configuration File 2 | # Edit, Save and then Eject the USB Drive 3 | 4 | [NETWORK] 5 | hostname = pluto 6 | ipaddr = 10.40.0.155 7 | ipaddr_host = 10.42.0.1 8 | netmask = 255.0.0.0 9 | 10 | [WLAN] 11 | ssid_wlan = 12 | pwd_wlan = 13 | ipaddr_wlan = 14 | 15 | [USB_ETHERNET] 16 | ipaddr_eth = 17 | netmask_eth = 255.255.255.0 18 | 19 | [SYSTEM] 20 | xo_correction = 39999769 21 | udc_handle_suspend = 0 22 | 23 | [ACTIONS] 24 | diagnostic_report = 0 25 | dfu = 0 26 | reset = 0 27 | calibrate = 0 28 | 29 | -------------------------------------------------------------------------------- /root/multimon-ng/csv_png.gnu: -------------------------------------------------------------------------------- 1 | set terminal png size 2600,500 2 | #set terminal png size 1920,500 3 | #set terminal png size 800,150 4 | set datafile separator "," 5 | set xlabel "Time (ms)" 6 | set ylabel "Arbitrary Power (dB?)" 7 | set grid 8 | #show mxtics 9 | set xtics 0.5 rotate 10 | set mxtics 10 11 | set key off 12 | set pointsize 0.5 13 | 14 | name=plot_data_file 15 | 16 | set title name." multimon-ng dump" 17 | # name=system("echo $plot_data_file") 18 | 19 | set output "/www/plot.png" 20 | 21 | plot name.".csv" using 1:2 with linespoints pt 6 lc 3 22 | 23 | -------------------------------------------------------------------------------- /root/luaradio/lplot10.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | N = arg[1] 3 | os.execute("echo manual > /sys/bus/iio/devices/iio:device1/in_voltage0_gain_control_mode") 4 | local src = radio.SoapySDRSource("driver=plutosdr", arg[1]*1000, 10000000, {bandwidth=12e6}) 5 | local throttle = radio.ThrottleBlock() 6 | local plot = radio.GnuplotSpectrumSink(4096*4, arg[1] .. "KHz" , {overlap_fraction = 0.1}) 7 | local top = radio.CompositeBlock() 8 | top:connect(src, plot) 9 | top:start() 10 | if top:status().running then 11 | os.execute("sleep 4") 12 | end 13 | top:stop() 14 | 15 | -------------------------------------------------------------------------------- /root/luaradio/lplot20.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | N = arg[1] 3 | os.execute("echo manual > /sys/bus/iio/devices/iio:device1/in_voltage0_gain_control_mode") 4 | local src = radio.SoapySDRSource("driver=plutosdr", arg[1]*1000, 20000000, {bandwidth=22e6}) 5 | local throttle = radio.ThrottleBlock() 6 | local plot = radio.GnuplotSpectrumSink(4096*4, arg[1] .. "KHz" , {overlap_fraction = 0.1}) 7 | local top = radio.CompositeBlock() 8 | top:connect(src, plot) 9 | top:start() 10 | if top:status().running then 11 | os.execute("sleep 4") 12 | end 13 | top:stop() 14 | 15 | -------------------------------------------------------------------------------- /root/wbfm-rx.sh: -------------------------------------------------------------------------------- 1 | echo "Usage : wbfm-rx.sh - example : wbfm-rx.sh 105.1 72" 2 | echo "WBFM stream : http://192.168.2.1:4444 (48000Hz)" 3 | echo "Listen audio stream : nc 192.168.2.1 4444 | mplayer -cache 1024 -quiet -rawaudio samplesize=2:channels=1:rate=48000 -demuxer rawaudio -" 4 | echo "or : nc 192.168.2.1 4444 | aplay -r 96k -f dat -c 1" 5 | rx_sdr -F CF32 -s 3000000 -f ${1}M -g $2 - | csdr fir_decimate_cc 12 0.06 HAMMING | csdr fmdemod_quadri_cf | csdr fractional_decimator_ff 5 | csdr deemphasis_wfm_ff 48000 60e-6 | csdr convert_f_i16 | nmux -a 192.168.2.1 -p 4444 6 | 7 | -------------------------------------------------------------------------------- /root/usr/share/gnuplot/5.0/gnuplotrc: -------------------------------------------------------------------------------- 1 | set terminal png size 1600 700 2 | set output '/www/plot.png' 3 | #xp = f/1000 4 | set format x "%1.1f" 5 | set timestamp 6 | set xtics ("-24M" -24000000,"-22M" -22000000,"-20M" -20000000,"-18M" -18000000,"-16M" -16000000, \ 7 | "-14M" -14000000,"-12M" -12000000,"-10M" -10000000,"-8M" -8000000,"-6M" -6000000,"-4M" -4000000,"-2M" -2000000, \ 8 | "0" 0,"+2M" 2000000,"+4M" 4000000,"+6M" 6000000,"+8M" 8000000,"+10M" 10000000,"+12M" 12000000,"+14M" 14000000, \ 9 | "+16M" 16000000,"+18M" 18000000,"+20M" 20000000,"+22M" 22000000,"+24M" 24000000) 10 | -------------------------------------------------------------------------------- /root/luaradio/embed/tests/test.h: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | 4 | #define STR_OK "[\x1b[1;32m OK \x1b[0m]" 5 | #define STR_FAIL "[\x1b[1;31mFAIL\x1b[0m]" 6 | 7 | #define passert(c) \ 8 | do { \ 9 | int r = (c); \ 10 | if (r) \ 11 | fprintf(stderr, " " STR_OK " %s %s():%d %s\n", __FILE__, __func__, __LINE__, #c); \ 12 | else \ 13 | fprintf(stderr, " " STR_FAIL " %s %s():%d %s\n", __FILE__, __func__, __LINE__, #c); \ 14 | assert(r); \ 15 | } while(0) 16 | 17 | #define ptest() \ 18 | fprintf(stderr, "\nStarting test %s():%d\n", __func__, __LINE__) 19 | 20 | -------------------------------------------------------------------------------- /root/luaradio/lplot50.lua: -------------------------------------------------------------------------------- 1 | os.execute("echo manual > /sys/bus/iio/devices/iio:device1/in_voltage0_gain_control_mode") 2 | local radio = require('radio') 3 | N = arg[1] 4 | os.execute("iio_attr -q -a -c -i ad9361-phy voltage0 rf_bandwidth 54000000") 5 | local src = radio.SoapySDRSource("driver=plutosdr", arg[1]*1000, 50000000, {bandwidth=50e6}) 6 | local throttle = radio.ThrottleBlock() 7 | local plot = radio.GnuplotSpectrumSink(4096*4, "Freq. : " .. arg[1] .. " KHz" , {overlap_fraction = 0.1}) 8 | local top = radio.CompositeBlock() 9 | top:connect(src, plot) 10 | top:start() 11 | if top:status().running then 12 | os.execute("sleep 8") 13 | end 14 | top:stop() 15 | 16 | -------------------------------------------------------------------------------- /root/luaradio/examples/iqfile_converter.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 4 then 4 | io.stderr:write("Usage: " .. arg[0] .. 5 | " \n") 6 | io.stderr:write("\nSupported formats:\n" .. 7 | " s8, u8,\n" .. 8 | " u16le, u16be, s16le, s16be,\n" .. 9 | " u32le, u32be, s32le, s32be,\n" .. 10 | " f32le, f32be, f64le, f64be\n") 11 | os.exit(1) 12 | end 13 | 14 | radio.CompositeBlock():connect( 15 | radio.IQFileSource(arg[1], arg[2], 0), 16 | radio.IQFileSink(arg[3], arg[4]) 17 | ):run() 18 | -------------------------------------------------------------------------------- /root/luaradio/wav2iq.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | 6 | 7 | -- assert(arg[4] == "usb" or arg[4] == "lsb", "Sideband should be 'lsb' or 'usb'.") 8 | 9 | local bandwidth = tonumber(arg[1]) 10 | 11 | -- Blocks 12 | local source = radio.WAVFileSource('/tmp/send.png.wav', 1) 13 | local af_filter = radio.LowpassFilterBlock(128, bandwidth) 14 | local hilbert = radio.HilbertTransformBlock(129) 15 | local sb_filter = radio.ComplexBandpassFilterBlock(129, {0, bandwidth}) 16 | local sink = radio.IQFileSink('/tmp/send.png.iq', 'f32le') 17 | -- Connections 18 | local top = radio.CompositeBlock() 19 | top:connect(source, af_filter, hilbert, sb_filter, sink) 20 | 21 | top:run() 22 | 23 | -------------------------------------------------------------------------------- /root/rtl_power.gnu: -------------------------------------------------------------------------------- 1 | # 2 | # LamaBleu - Dec 2018 3 | # 4 | N = floor(system("wc -l fm.csv")) 5 | #N = floor(system("wc -l fm.csv")/100.) 6 | set terminal dumb 7 | fspan=fstop-fstart 8 | set xlabel "freq. [MHz]" 9 | set title " Fstart : " . sprintf("%06.3f", fstart) . " MHz - Fstop " . sprintf("%06.3f", fstop) . " MHz" 10 | set format x "%1.1f" 11 | set xrange[0: 100*ceil(N/100.0)] 12 | set xtics (sprintf("%02.3f", fstart) 0, sprintf("%02.3f", fstart+fspan*0.25) 0.25*N, sprintf("%02.3f", fstart+fspan*0.5) 0.5*N, sprintf("%02.3f", fstart+fspan*0.75) 0.75*N, sprintf("%02.3f", fstop) N) 13 | set lmargin 6 14 | unset ytics 15 | plot "fm.csv" 16 | set terminal png size 1600 600 17 | set output '/www/plot.png' 18 | plot "fm.csv" using ($1) with lines lc rgb "#FF0000" title "" 19 | 20 | 21 | -------------------------------------------------------------------------------- /rtl_433/temp.gnu: -------------------------------------------------------------------------------- 1 | 2 | 3 | set term png size 1300 600 4 | set datafile separator "," 5 | set output "/www/plot.png" 6 | set xdata time 7 | set timefmt "%Y-%m-%d %H:%M:%S" 8 | set format x "%H:%M:%S% \n %d/%m " 9 | set title "id : " . sprintf("%d", id) 10 | set autoscale 11 | set timestamp 12 | set grid 13 | 14 | set y2range [40:100] 15 | set y2tics border tc lt 2 16 | set y2label 'Humidity' tc rgb "#009e73" 17 | set ylabel 'Temp degC' tc rgb "#bf000a" 18 | set ytics nomirror tc rgb "#bf000a" 19 | set y2tics nomirror 20 | 21 | plot './rtl_433.csv' using 1:3 lc rgb '#bf000a' title 'temperature_C id : ' . sprintf("%d", id), \ 22 | './rtl_433.csv' using 1:3 s b lc rgb '#2e4053' title 'average (degC)', \ 23 | './rtl_433.csv' using 1:4 s b lc rgb '#00CC00' axes x1y2 title 'humidity (%)' 24 | 25 | 26 | -------------------------------------------------------------------------------- /root/status.sh: -------------------------------------------------------------------------------- 1 | cd /sys/bus/iio/devices/iio\:device1 2 | while : 3 | do 4 | reset 5 | echo " ****** RX ******" 6 | echo "Freq : " $(cat out_altvoltage0_RX_LO_frequency) 7 | echo "Samplerate : " $(cat in_voltage_sampling_frequency) 8 | echo "BW : " $(cat in_voltage_rf_bandwidth) 9 | echo "Gain : " $(cat in_voltage0_hardwaregain) " ("$(cat in_voltage0_gain_control_mode)" mode)" 10 | echo "RSSI : " $(cat in_voltage0_rssi) 11 | echo 12 | echo 13 | echo " ****** TX ******" 14 | echo "Freq : " $(cat out_altvoltage1_TX_LO_frequency) 15 | echo "Samplerate : " $(cat out_voltage_sampling_frequency) 16 | echo "BW : " $(cat out_voltage_rf_bandwidth) 17 | echo "Att. : " $(cat out_voltage0_hardwaregain) 18 | sleep 3 19 | 20 | done 21 | 22 | -------------------------------------------------------------------------------- /timems/readme.md: -------------------------------------------------------------------------------- 1 | Guess why timems tool? 2 | 3 | 4 | Just curious, playing with timestamps under bash, found that millisecond accuracy is not available on pluto. 5 | It's OK from python or using adjtimex (which is not implemented by default) 6 | 7 | 8 | # date 9 | Sat Aug 17 20:37:57 UTC 2019 10 | # date +%s 11 | 1566074294 12 | # date +%s%N 13 | 1566074300%N 14 | # date +%s%m (0.01 second) 15 | 156607430508 16 | 17 | 18 | 19 | 20 | So I compiled timems.c, result : 21 | 22 | # timems 23 | 1566073573.926 24 | 25 | 26 | Another workaround is to enable : CONFIG_FEATURE_DATE_NANO=y for busybox config before compiling firmware 27 | 28 | # date +%s.%N 29 | 1566073581.999486578 30 | 31 | 32 | For lazy plutoers, timems executable for v0.30 is provided here. 33 | -------------------------------------------------------------------------------- /root/iio_attr/iio_samples.sh: -------------------------------------------------------------------------------- 1 | # Trying to reproduce - so far no luck. 2 | # https://wiki.analog.com/resources/tools-software/linux-software/libiio/iio_readdev 3 | # 4 | iio_attr -u local: -D loopback 1 5 | iio_attr -c cf-ad9361-dds-core-lpc altvoltage0 frequency 5000 6 | iio_attr -c cf-ad9361-dds-core-lpc altvoltage1 frequency 5000 7 | iio_attr -c cf-ad9361-dds-core-lpc altvoltage2 frequency 5000 8 | iio_attr -c cf-ad9361-dds-core-lpc altvoltage3 frequency 5000 9 | 10 | iio_attr -c cf-ad9361-dds-core-lpc altvoltage3 scale 0.4 11 | iio_attr -c cf-ad9361-dds-core-lpc altvoltage2 scale 0.4 12 | iio_attr -c cf-ad9361-dds-core-lpc altvoltage0 scale 0.4 13 | iio_attr -c cf-ad9361-dds-core-lpc altvoltage1 scale 0.4 14 | sleep 1 15 | iio_readdev -u local: -b 256 -s 1024 cf-ad9361-lpc > samples.bin 16 | sleep 0.5 17 | echo 18 | hexdump -x -n 128 ./samples.bin 19 | echo 20 | wc -c samples.bin 21 | sleep 5 22 | gnuplot ./samples.gnu 23 | -------------------------------------------------------------------------------- /root/luaradio/am_envelope_pluto.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local tune_offset = -100e3 10 | local bandwidth = 5e3 11 | 12 | -- Blocks 13 | -- local source = radio.RtlSdrSource(frequency + tune_offset, 1102500) 14 | local source = radio.SoapySDRSource("driver=plutosdr",frequency + tune_offset, 2400000, {rf_gain=73}) 15 | local tuner = radio.TunerBlock(tune_offset, 2*bandwidth, 50) 16 | local am_demod = radio.ComplexMagnitudeBlock() 17 | local dcr_filter = radio.SinglepoleHighpassFilterBlock(100) 18 | local af_filter = radio.LowpassFilterBlock(128, bandwidth) 19 | local af_gain = radio.AGCBlock('slow') 20 | local sink = radio.WAVFileSink('/www/record.wav', 1,16) 21 | 22 | -- Connections 23 | local top = radio.CompositeBlock() 24 | top:connect(source, tuner, am_demod, dcr_filter, af_filter, af_gain, sink) 25 | top:run() 26 | 27 | -------------------------------------------------------------------------------- /root/luaradio/nbfm_pluto.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local tune_offset = -100e3 10 | local deviation = 5e3 11 | local bandwidth = 4e3 12 | 13 | -- Blocks 14 | -- local source = radio.RtlSdrSource(frequency + tune_offset, 1102500) 15 | local source = radio.SoapySDRSource("driver=plutosdr",frequency + tune_offset, 1200000, {rf_gain = 72}) 16 | local tuner = radio.TunerBlock(tune_offset, 2*(deviation+bandwidth), 50) 17 | local fm_demod = radio.FrequencyDiscriminatorBlock(deviation/bandwidth) 18 | local af_filter = radio.LowpassFilterBlock(128, bandwidth) 19 | local af_downsampler = radio.DownsamplerBlock(0.5) -- Need 48000 as output rate 20 | local sink = radio.WAVFileSink('/www/record.wav',1,16) 21 | 22 | -- Connections 23 | local top = radio.CompositeBlock() 24 | top:connect(source, tuner, fm_demod, af_filter, af_downsampler, sink) 25 | io.stderr:write("Recording from " .. frequency / 1e6 .. " to /www/record.wav \n") 26 | top:run() 27 | 28 | -------------------------------------------------------------------------------- /pluto_power/plot.gnu: -------------------------------------------------------------------------------- 1 | # Quick plot level/vs freq - Pluto miniSNA 2 | # LamaBleu 12/2019 3 | # 4 | # CSV input file format (space separator) : 5 | # freq(Hz) level 6 | # comments at the end of file only 7 | # 8 | # 9 | # 10 | # 11 | set terminal png size 1200 400 12 | set output '/www/plot.png' 13 | set title "Fstart : " . sprintf("%09.3f", f0/1000) . " kHz - Fstop " . sprintf("%09.3f", fmax/1000) . " kHz" 14 | set xlabel "freq. [MHz]" 15 | #set yrange [90:0] 16 | set ylabel "level [dB]" 17 | set format x "%1.3f" 18 | set xrange [f0/1000000:fmax/1000000] 19 | set timestamp 20 | set key at graph 0.95, 0.95 21 | #set size 0.95,0.95 22 | plot '/root/miniSNA/test.csv' using ($1)/1000000:($2) with lines lc rgb '#bf000a' title 'pow.c calculation', \ 23 | '/root/miniSNA/test.csv' using ($1)/1000000:($2) s b lc rgb '#2e4053' title 'average' 24 | set term dumb 25 | plot './root/miniSNA/test.csv' 26 | #set term qt 1 27 | # RSSI (sent by IIO) 28 | #plot '/root/miniSNA/test.csv' using ($1)/1000000:($3)*-1 with lines lc rgb '#2e4053' title 'RSSI (IIO data)' 29 | #set term qt 2 30 | #plot '/root/miniSNA/test.csv' using ($1)/1000000:($3)*-1 with lines lc rgb '#444053' title 'Inverted RSSI' 31 | # 32 | -------------------------------------------------------------------------------- /root/luaradio/wbfm_mono_pluto.lua: -------------------------------------------------------------------------------- 1 | -- record the wav file to /www/wbfm.wav (http://192.168.2.1/record.wav) 2 | -- listen : mplayer -cache 1024 -quiet -rawaudio samplesize=2:channels=1:rate=48000 -demuxer -rawaudio http://192.168.2.1/record.wav 3 | 4 | 5 | local radio = require('radio') 6 | 7 | if #arg < 1 then 8 | io.stderr:write("Usage: " .. arg[0] .. " \n") 9 | os.exit(1) 10 | end 11 | local frequency = tonumber(arg[1]) 12 | local tune_offset = -250e3 13 | 14 | -- Blocks 15 | -- local source = radio.RtlSdrSource(frequency + tune_offset, 1102500) 16 | local source = radio.SoapySDRSource("driver=plutosdr",frequency + tune_offset, 2400000, {rf_gain = 72}) 17 | local tuner = radio.TunerBlock(tune_offset, 200e3, 5) 18 | local fm_demod = radio.FrequencyDiscriminatorBlock(1.25) 19 | local af_filter = radio.LowpassFilterBlock(128, 15e3) 20 | local af_deemphasis = radio.FMDeemphasisFilterBlock(75e-6) 21 | local af_downsampler = radio.DownsamplerBlock(10) 22 | local sink = radio.WAVFileSink('/www/record.wav',1,16) 23 | 24 | 25 | -- Connections 26 | local top = radio.CompositeBlock() 27 | top:connect(source, tuner, fm_demod, af_filter, af_deemphasis, af_downsampler, sink) 28 | top:run() 29 | 30 | -------------------------------------------------------------------------------- /root/luaradio/examples/wavfile_ssb_modulator.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 4 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | assert(arg[4] == "usb" or arg[4] == "lsb", "Sideband should be 'lsb' or 'usb'.") 9 | 10 | local wav_filepath = arg[1] 11 | local iq_filepath = arg[2] 12 | local bandwidth = tonumber(arg[3]) 13 | local sideband = arg[4] 14 | 15 | -- Blocks 16 | local source = radio.WAVFileSource(wav_filepath, 1) 17 | local af_filter = radio.LowpassFilterBlock(128, bandwidth) 18 | local hilbert = radio.HilbertTransformBlock(129) 19 | local conjugate = radio.ComplexConjugateBlock() 20 | local sb_filter = radio.ComplexBandpassFilterBlock(129, (sideband == "lsb") and {-bandwidth, 0} 21 | or {0, bandwidth}) 22 | local sink = radio.IQFileSink(iq_filepath, 'f32le') 23 | 24 | -- Connections 25 | local top = radio.CompositeBlock() 26 | if sideband == "lsb" then 27 | top:connect(source, af_filter, hilbert, conjugate, sb_filter, sink) 28 | else 29 | top:connect(source, af_filter, hilbert, sb_filter, sink) 30 | end 31 | 32 | top:run() 33 | -------------------------------------------------------------------------------- /root/signal.sh: -------------------------------------------------------------------------------- 1 | # Quick CSV convert for rx_power (one pass) 2 | # 3 | # Usage : signal.sh Fstart(MHz) Fend(MHz) Step(Hz) [gain] 4 | # signal.sh 1400 2600 25 70 <--- 1400MHz to 2600MHz, 25 kHz step, gain 70 [0:73] 5 | # 6 | # use rx_power with -1 option only (one pass) 7 | # adapt path! 8 | 9 | iio_attr -q -c ad9361-phy voltage0 gain_control_mode slow_attack 10 | cd /root 11 | 12 | mv /root/.gnuplot /root/gnuplot.conf 13 | rm fm.* 2>/dev/null 14 | fstart=$1 15 | fstop=$2 16 | fstep=$3 17 | 18 | if [ "$4" = "" ]; then 19 | rxgain=70 20 | else 21 | rxgain=$4 22 | fi 23 | echo "rxgain:" $rxgain 24 | 25 | 26 | rx_power -d driver=plutosdr -c 0.3 -1 -g ${rxgain} -f ${fstart}M:${fstop}M:${fstep}k -F CF32 fm.csv 27 | 28 | #head -6 fm.csv > fm.data 29 | awk -F, '{getline f1 <"file2" ;print f1,$1,$2,$3,$4,$5}' IFS=, fm.csv > fm.dat 30 | cut -f7- -d',' fm.csv > fm.tmp 31 | tr , '\n' < fm.tmp > fm.plt 32 | 33 | 34 | 35 | cp fm.plt fm.csv 36 | echo "# Date Time Fstart Fend Step(Hz)" >> fm.csv 37 | sed 's/^/#/' fm.dat >> fm.csv 38 | gnuplot -e "fstart=$fstart;fstop=$fstop;fstep=$fstep" rtl_power.gnu 39 | echo "Full PNG plot : http://pluto.local/plot.png or http://192.168.2.1/plot.png" 40 | mv /root/gnuplot.conf /root/.gnuplot 41 | rm fm.plt fm.tmp fm.dat 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /root/luaradio/examples/rtlsdr_nbfm.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local tune_offset = -100e3 10 | local deviation = 5e3 11 | local bandwidth = 4e3 12 | 13 | -- Blocks 14 | local source = radio.RtlSdrSource(frequency + tune_offset, 1102500) 15 | local tuner = radio.TunerBlock(tune_offset, 2*(deviation+bandwidth), 50) 16 | local fm_demod = radio.FrequencyDiscriminatorBlock(deviation/bandwidth) 17 | local af_filter = radio.LowpassFilterBlock(128, bandwidth) 18 | local sink = os.getenv('DISPLAY') and radio.PulseAudioSink(1) or radio.WAVFileSink('nbfm.wav', 1) 19 | 20 | -- Plotting sinks 21 | local plot1 = radio.GnuplotSpectrumSink(2048, 'RF Spectrum', {yrange = {-120, -40}}) 22 | local plot2 = radio.GnuplotSpectrumSink(2048, 'AF Spectrum', {yrange = {-120, -40}, 23 | xrange = {0, bandwidth}, 24 | update_time = 0.05}) 25 | 26 | -- Connections 27 | local top = radio.CompositeBlock() 28 | top:connect(source, tuner, fm_demod, af_filter, sink) 29 | if os.getenv('DISPLAY') then 30 | top:connect(tuner, plot1) 31 | top:connect(af_filter, plot2) 32 | end 33 | 34 | top:run() 35 | -------------------------------------------------------------------------------- /root/luaradio/examples/rtlsdr_am_envelope.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local tune_offset = -100e3 10 | local bandwidth = 5e3 11 | 12 | -- Blocks 13 | local source = radio.RtlSdrSource(frequency + tune_offset, 1102500) 14 | local tuner = radio.TunerBlock(tune_offset, 2*bandwidth, 50) 15 | local am_demod = radio.ComplexMagnitudeBlock() 16 | local dcr_filter = radio.SinglepoleHighpassFilterBlock(100) 17 | local af_filter = radio.LowpassFilterBlock(128, bandwidth) 18 | local af_gain = radio.AGCBlock('slow') 19 | local sink = os.getenv('DISPLAY') and radio.PulseAudioSink(1) or radio.WAVFileSink('am_envelope.wav', 1) 20 | 21 | -- Plotting sinks 22 | local plot1 = radio.GnuplotSpectrumSink(2048, 'RF Spectrum', {yrange = {-120, -40}}) 23 | local plot2 = radio.GnuplotSpectrumSink(2048, 'AF Spectrum', {yrange = {-120, -40}, 24 | xrange = {0, bandwidth}, 25 | update_time = 0.05}) 26 | 27 | -- Connections 28 | local top = radio.CompositeBlock() 29 | top:connect(source, tuner, am_demod, dcr_filter, af_filter, af_gain, sink) 30 | if os.getenv('DISPLAY') then 31 | top:connect(tuner, plot1) 32 | top:connect(af_gain, plot2) 33 | end 34 | 35 | top:run() 36 | -------------------------------------------------------------------------------- /root/luaradio/noaa_pluto.lua: -------------------------------------------------------------------------------- 1 | -- Example usage: luaradio rtlsdr_noaa_apt.lua 137.62e6 /www/record.wav 2 | -- Replay from computer : play -r 11050 -t raw -e s -b 16 -c 1 -V1 http://192.168.2.1/record.wav 3 | 4 | 5 | local radio = require('radio') 6 | outputfile 7 | if #arg < 2 then 8 | io.stderr:write("Usage: " .. arg[0] .. " \n") 9 | os.exit(1) 10 | end 11 | 12 | local frequency = tonumber(arg[1]) 13 | -- local output_file = tostring(arg[2]) 14 | local tune_offset = -250e3 15 | local if_bandwidth = 45e3 16 | local af_bandwidth = 5e3 17 | 18 | io.stderr:write("Frequency " .. frequency .. "\n") 19 | 20 | -- Blocks 21 | local source = radio.SoapySDRSource("driver=plutosdr",frequency + tune_offset, 1102500, {rf_gain = 72}) 22 | local tuner = radio.TunerBlock(tune_offset, if_bandwidth, 10) 23 | local fm_demod = radio.FrequencyDiscriminatorBlock(0.85) 24 | local af_filter = radio.LowpassFilterBlock(128, af_bandwidth) 25 | local af_downsampler = radio.DownsamplerBlock(10) -- Need 11025 as output rate 26 | local wav_sink = radio.WAVFileSink(output_file,1,16) -- Single channel, 16 bit samples 27 | 28 | 29 | -- Connections 30 | local top = radio.CompositeBlock() 31 | top:connect(source, tuner, fm_demod, af_filter, af_downsampler, wav_sink) 32 | 33 | 34 | -- Let's go 35 | io.stderr:write("Recording from " .. frequency / 1e6 .. " to " .. output_file .. "\n") 36 | top:run() 37 | 38 | 39 | -------------------------------------------------------------------------------- /USB-drive/runme0.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # the default directory the script runs in is /dev, so change to the drive 3 | # reference : https://archive.fosdem.org/2018/schedule/event/plutosdr/attachments/slides/2503/export/events/attachments/plutosdr/slides/2503/pluto_stupid_tricks.pdf 4 | # pages 29 to 31 5 | cd /tmp 6 | # create a file 7 | touch foobar.txt 8 | echo default-on > /sys/class/leds/led0:green/trigger >> foobar.txt 9 | # Set the LO up 10 | /usr/bin/iio_attr -a -c ad9361-phy TX_LO frequency 435000000 >> foobar.txt 11 | # Set the Sample frequency up, tone will appear at sampling_frequency/32 12 | /usr/bin/iio_attr -a -c -o ad9361-phy voltage0 sampling_frequency 32000000 >> foobar.txt 13 | # Turn the attenuation down 14 | /usr/bin/iio_attr -a -c -o ad9361-phy voltage0 hardwaregain 0 >> foobar.txt 15 | # https://wiki.analog.com/resources/tools-software/linux-drivers/iio-transceiver/ad9361#bist_tone 16 | # Inject 0dBFS tone at Fsample/32 into TX (all channels enabled) 17 | /usr/bin/iio_attr -a -D ad9361-phy bist_tone "1 0 0 0" >> foobar.txt 18 | sleep 30 19 | /usr/bin/iio_attr -a -c -o ad9361-phy voltage0 hardwaregain -89 >> foobar.txt 20 | sleep 2 21 | /usr/bin/iio_attr -a -c -o ad9361-phy voltage0 hardwaregain 0 >> foobar.txt 22 | sleep 5 23 | /usr/bin/iio_attr -a -c -o ad9361-phy voltage0 hardwaregain -89 >> foobar.txt 24 | cp /tmp/foobar.txt /media/sda1/result.txt 25 | cd /root 26 | ACTION=remove_all /lib/mdev/automounter.sh 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /root/luaradio/examples/rtlsdr_wbfm_mono.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local tune_offset = -250e3 10 | 11 | -- Blocks 12 | local source = radio.RtlSdrSource(frequency + tune_offset, 1102500) 13 | local tuner = radio.TunerBlock(tune_offset, 200e3, 5) 14 | local fm_demod = radio.FrequencyDiscriminatorBlock(1.25) 15 | local af_filter = radio.LowpassFilterBlock(128, 15e3) 16 | local af_deemphasis = radio.FMDeemphasisFilterBlock(75e-6) 17 | local af_downsampler = radio.DownsamplerBlock(5) 18 | local sink = os.getenv('DISPLAY') and radio.PulseAudioSink(1) or radio.WAVFileSink('wbfm_mono.wav', 1) 19 | 20 | -- Plotting sinks 21 | local plot1 = radio.GnuplotSpectrumSink(2048, 'Demodulated FM Spectrum', {yrange = {-120, -40}}) 22 | local plot2 = radio.GnuplotSpectrumSink(2048, 'L+R AF Spectrum', {yrange = {-120, -40}, 23 | xrange = {0, 15e3}, 24 | update_time = 0.05}) 25 | 26 | -- Connections 27 | local top = radio.CompositeBlock() 28 | top:connect(source, tuner, fm_demod, af_filter, af_deemphasis, af_downsampler, sink) 29 | if os.getenv('DISPLAY') then 30 | top:connect(fm_demod, plot1) 31 | top:connect(af_deemphasis, plot2) 32 | end 33 | 34 | top:run() 35 | -------------------------------------------------------------------------------- /root/luaradio/am_synchronous_pluto.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local ifreq = 50e3 10 | local bandwidth = 5e3 11 | 12 | -- Blocks 13 | --local source = radio.RtlSdrSource(frequency - ifreq, 1102500) 14 | local source = radio.SoapySDRSource("driver=plutosdr",frequency - ifreq, 2400000, {rf_gain=73}) 15 | local rf_decimator = radio.DecimatorBlock(5) 16 | local if_filter = radio.ComplexBandpassFilterBlock(129, {ifreq - bandwidth, ifreq + bandwidth}) 17 | local pll = radio.PLLBlock(1000, ifreq - 100, ifreq + 100) 18 | local mixer = radio.MultiplyConjugateBlock() 19 | local am_demod = radio.ComplexToRealBlock() 20 | local dcr_filter = radio.SinglepoleHighpassFilterBlock(100) 21 | local af_filter = radio.LowpassFilterBlock(128, bandwidth) 22 | local af_downsampler = radio.DownsamplerBlock(10) 23 | local af_gain = radio.AGCBlock('slow') 24 | local sink = radio.WAVFileSink('/www/record.wav', 1) 25 | 26 | -- Connections 27 | local top = radio.CompositeBlock() 28 | top:connect(source, rf_decimator, if_filter) 29 | top:connect(if_filter, pll) 30 | top:connect(if_filter, 'out', mixer, 'in1') 31 | top:connect(pll, 'out', mixer, 'in2') 32 | top:connect(mixer, am_demod, dcr_filter, af_filter, af_downsampler, af_gain, sink) 33 | io.stderr:write("Recording from " .. frequency / 1e6 .. " to /www/record.wav \n") 34 | top:run() 35 | -------------------------------------------------------------------------------- /pluto_power/README.md: -------------------------------------------------------------------------------- 1 | MiniSNA for pluto, using pow tool and gnuplot 2 | ============================================= 3 | 4 | 5 | pow is a simple tool to get signal level from pluto at a specific frequency. 6 | It returns frequency (Hz), signal level (dB), RSSI gathered through IIO (dB) 7 | 8 | Large part of the code is coming from [power.c by ADI](https://github.com/analogdevicesinc/plutosdr_scripts/blob/master/power.c) 9 | 10 | Note: another more sophisticated SNA is available here : https://github.com/LamaBleu/limeSNA/tree/plutosdr 11 | Still using pow tool, adapted from the nice work of [@nepeee](https://github.com/nepeee/limeSNA) 12 | 13 | Build pow tool : 14 | ================ 15 | 16 | gcc -std=gnu99 -g -o pow pow.c -liio -lm -Wall -Wextra 17 | 18 | Test : 19 | ./pow -l 430600000 -g 40 -f 3 20 | 21 | result : 430600000 2.49 95.75 22 | units : freq (Hz), signal (dB), RSSI (dB) 23 | 24 | 25 | Test a filter : 26 | =============== 27 | 28 | - pre-requisite: gnuplot gnuplot-qt packages 29 | - use mini_sna.sh 30 | - launch mini_sna.sh. --> parameters : fstart fend step RXgain (freq in kHz) 31 | example : ./mini_sna.sh 410000 470000 500 50 32 | - result file is test.csv 33 | - launch plot.sh to draw plot. 34 | 35 | 36 | You can also edit mini-sna.sh to change samplerate (-f) for pow tool. 37 | Bandwidth is set to 200kHz. 38 | 39 | 40 | ![image](https://user-images.githubusercontent.com/26578895/57102867-b1c15b00-6d24-11e9-85f3-18c58e0aae65.png) 41 | -------------------------------------------------------------------------------- /root/luaradio/ax25_pluto.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local tune_offset = -100e3 10 | local baudrate = 1200 11 | 12 | -- Blocks 13 | local source = radio.SoapySDRSource("driver=plutosdr",frequency + tune_offset, 1000000) 14 | local tuner = radio.TunerBlock(tune_offset, 12e3, 80) 15 | local nbfm_demod = radio.NBFMDemodulator(3e3, 3e3) 16 | local hilbert = radio.HilbertTransformBlock(129) 17 | local translator = radio.FrequencyTranslatorBlock(-1700) 18 | local afsk_filter = radio.LowpassFilterBlock(128, 750) 19 | local afsk_demod = radio.FrequencyDiscriminatorBlock(1.25) 20 | local data_filter = radio.LowpassFilterBlock(128, baudrate) 21 | local clock_recoverer = radio.ZeroCrossingClockRecoveryBlock(baudrate) 22 | local sampler = radio.SamplerBlock() 23 | local bit_slicer = radio.SlicerBlock() 24 | local bit_decoder = radio.DifferentialDecoderBlock(true) 25 | local framer = radio.AX25FramerBlock() 26 | local sink = radio.JSONSink() 27 | 28 | 29 | -- Connections 30 | local top = radio.CompositeBlock() 31 | top:connect(source, tuner, nbfm_demod) 32 | top:connect(nbfm_demod, hilbert, translator, afsk_filter, afsk_demod, data_filter, clock_recoverer) 33 | top:connect(data_filter, 'out', sampler, 'data') 34 | top:connect(clock_recoverer, 'out', sampler, 'clock') 35 | top:connect(sampler, bit_slicer, bit_decoder, framer, sink) 36 | if os.getenv('DISPLAY') then 37 | top:connect(tuner, plot1) 38 | top:connect(data_filter, plot2) 39 | end 40 | 41 | top:run() 42 | -------------------------------------------------------------------------------- /USB-drive/cgi-bin/leantrx/dvbrx.cgi: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | # This file is part of LeanTRX (c) . 4 | # See the toplevel README for more information. 5 | 6 | . ./cgiutils.sh 7 | 8 | cat <&1 14 | 15 | param_standard=DVB-S 16 | param_symbrate=2000e3 17 | param_cstln=QPSK 18 | param_cr=1/2 19 | 20 | param_source=leaniiorx 21 | param_devindex=0 22 | param_freq=2449e6 23 | param_samprate=4e6 24 | param_bufsize=$((1024*1024)) 25 | param_nbufs=32 26 | 27 | param_tune=0 28 | param_sampler=nearest 29 | param_rrc_rej=10 30 | param_viterbi=off 31 | param_fastlock=off 32 | param_drift=off 33 | param_satmodem=off 34 | 35 | param_udp=0 36 | param_udpaddr=0 37 | param_udpport=0 38 | param_rtp=0 39 | param_rtpaddr=0 40 | param_rtpport=0 41 | param_httpd=0 42 | param_httpdport=81 43 | param_file_output=0 44 | 45 | parse_query_string 46 | 47 | killprocs 48 | 49 | if [ "$param_file_output" = on ]; then 50 | FILE_OUTPUT="| tee $RECORDINGS/$(date +%Y%m%d-%H%M%S%z).ts" 51 | fi 52 | 53 | command="leaniiorx --bufsize $param_bufsize --nbufs $param_nbufs -f $param_freq -s $param_samprate --bw $param_symbrate -v \ 54 | | leansdrserv --info3-httpd 8003 \ 55 | leandvb --s16 -f $param_samprate --tune $param_tune --sr $param_symbrate --sampler $param_sampler --rrc-rej $param_rrc_rej --const $param_cstln --standard $param_standard --cr $param_cr $(flagparam $param_viterbi --viterbi) $(flagparam $param_fastlock --fastlock) -v --json --anf 0 --fd-info 3 --fd-const 3 --fd-spectrum 3 $FILE_OUTPUT | nmux -a 192.168.2.1 -p 4444 -n 64" 56 | 57 | echo $command 58 | eval $command 59 | -------------------------------------------------------------------------------- /rtl_433/readme.md: -------------------------------------------------------------------------------- 1 | Scripts : 2 | 3 | These scripts are intended to be run directly on PlutoSDR (ADALM-Pluto). 4 | Need 'jq' package (JSON parser) and gnuplot. 5 | However porting to PC should be an easy task. Using CSV format is probably better suited for gnuplot ! 6 | 7 | 8 | 9 | 10 | #### rtl_listen.sh 11 | 12 | - Open a terminal console, start rtl_listen and keep it running. 13 | - will create a /www/rtl.txt file (JSON format) 14 | - /www/rtl.txt file is available at : http://192.168.2.1/rtl.txt 15 | 16 | 17 | Example : 18 | 19 | {"time" : "2019-06-30 16:37:48", "model" : "Nexus Temperature/Humidity", "id" : 197, "channel" : 2, "battery" : "OK", "temperature_C" : 23.300, "humidity" : 68} 20 | {"time" : "2019-06-30 16:37:49", "brand" : "OS", "model" : "THGR122N", "id" : 161, "channel" : 1, "battery" : "LOW", "temperature_C" : 24.000, "humidity" : 62} 21 | 22 | 23 | 24 | 25 | 26 | #### plot_id.sh 27 | 28 | - plot_id.sh will filter data from in /www/rtl.txt, then plot temperature and humidity graphs for the selected device. 29 | - plot is available at : http://192.168.2.1/plot.png 30 | 31 | 32 | 33 | #### Storing previous rtl_433 captures: 34 | Copy /www/rtl.txt to /remote if you are using NFS share. 35 | Add a line to /remote/myscript.sh : cp /remote/rtl.txt /www/rtl.txt 36 | rtl_listen.sh will then append new frames to existing rtl.txt file. 37 | 38 | 39 | #### Known issue : 40 | - /www/rtl.txt not updating --> chmod 666 /www/rtl.txt 41 | 42 | 43 | ![image](https://user-images.githubusercontent.com/26578895/60450395-149e7800-9c2a-11e9-993c-c5600ed4106d.png) 44 | -------------------------------------------------------------------------------- /root/luaradio/embed/examples/fm-radio.c: -------------------------------------------------------------------------------- 1 | #include 2 | #include 3 | #include 4 | 5 | #include 6 | 7 | const char *script_template = 8 | "local frequency = %f\n" 9 | "return radio.CompositeBlock():connect(" 10 | " radio.RtlSdrSource(frequency - 250e3, 1102500)," 11 | " radio.TunerBlock(-250e3, 200e3, 5)," 12 | " radio.WBFMMonoDemodulator()," 13 | " radio.DownsamplerBlock(5)," 14 | " radio.PulseAudioSink(1)" 15 | ")"; 16 | 17 | int main(int argc, char *argv[]) { 18 | luaradio_t *radio; 19 | char script[512]; 20 | 21 | if (argc < 2) { 22 | fprintf(stderr, "Usage: %s \n", argv[0]); 23 | return -1; 24 | } 25 | 26 | /* Substitute station frequency in script template */ 27 | snprintf(script, sizeof(script), script_template, atof(argv[1])); 28 | 29 | /* Create context */ 30 | if ((radio = luaradio_new()) == NULL) { 31 | perror("Allocating memory"); 32 | return -1; 33 | } 34 | 35 | /* Load flow graph */ 36 | if (luaradio_load(radio, script) < 0) { 37 | fprintf(stderr, "Error loading flow graph: %s\n", luaradio_strerror(radio)); 38 | return -1; 39 | } 40 | 41 | /* Start flow graph */ 42 | if (luaradio_start(radio) < 0) { 43 | fprintf(stderr, "Error starting flow graph: %s\n", luaradio_strerror(radio)); 44 | return -1; 45 | } 46 | 47 | /* Wait until completion */ 48 | if (luaradio_wait(radio) < 0) { 49 | fprintf(stderr, "Error waiting for flow graph: %s\n", luaradio_strerror(radio)); 50 | return -1; 51 | } 52 | 53 | /* Free context */ 54 | luaradio_free(radio); 55 | 56 | return 0; 57 | } 58 | -------------------------------------------------------------------------------- /root/luaradio/examples/rtlsdr_ax25.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local tune_offset = -100e3 10 | local baudrate = 1200 11 | 12 | -- Blocks 13 | local source = radio.RtlSdrSource(frequency + tune_offset, 1000000) 14 | local tuner = radio.TunerBlock(tune_offset, 12e3, 80) 15 | local nbfm_demod = radio.NBFMDemodulator(3e3, 3e3) 16 | local hilbert = radio.HilbertTransformBlock(129) 17 | local translator = radio.FrequencyTranslatorBlock(-1700) 18 | local afsk_filter = radio.LowpassFilterBlock(128, 750) 19 | local afsk_demod = radio.FrequencyDiscriminatorBlock(1.25) 20 | local data_filter = radio.LowpassFilterBlock(128, baudrate) 21 | local clock_recoverer = radio.ZeroCrossingClockRecoveryBlock(baudrate) 22 | local sampler = radio.SamplerBlock() 23 | local bit_slicer = radio.SlicerBlock() 24 | local bit_decoder = radio.DifferentialDecoderBlock(true) 25 | local framer = radio.AX25FramerBlock() 26 | local sink = radio.JSONSink() 27 | 28 | -- Plotting sinks 29 | local plot1 = radio.GnuplotSpectrumSink(2048, 'RF Spectrum', {yrange = {-120, -60}}) 30 | local plot2 = radio.GnuplotPlotSink(2048, 'Demodulated Bitstream', {yrange = {-0.15, 0.15}}) 31 | 32 | -- Connections 33 | local top = radio.CompositeBlock() 34 | top:connect(source, tuner, nbfm_demod) 35 | top:connect(nbfm_demod, hilbert, translator, afsk_filter, afsk_demod, data_filter, clock_recoverer) 36 | top:connect(data_filter, 'out', sampler, 'data') 37 | top:connect(clock_recoverer, 'out', sampler, 'clock') 38 | top:connect(sampler, bit_slicer, bit_decoder, framer, sink) 39 | if os.getenv('DISPLAY') then 40 | top:connect(tuner, plot1) 41 | top:connect(data_filter, plot2) 42 | end 43 | 44 | top:run() 45 | -------------------------------------------------------------------------------- /root/luaradio/examples/rtlsdr_ssb.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 2 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | assert(arg[2] == "usb" or arg[2] == "lsb", "Sideband should be 'lsb' or 'usb'.") 9 | 10 | local frequency = tonumber(arg[1]) 11 | local sideband = arg[2] 12 | local tune_offset = -100e3 13 | local bandwidth = 3e3 14 | 15 | -- Blocks 16 | local source = radio.RtlSdrSource(frequency + tune_offset, 1102500) 17 | local tuner = radio.TunerBlock(tune_offset, 2*bandwidth, 50) 18 | local sb_filter = radio.ComplexBandpassFilterBlock(129, (sideband == "lsb") and {0, -bandwidth} 19 | or {0, bandwidth}) 20 | local am_demod = radio.ComplexToRealBlock() 21 | local af_filter = radio.LowpassFilterBlock(128, bandwidth) 22 | local af_gain = radio.AGCBlock('fast') 23 | local sink = os.getenv('DISPLAY') and radio.PulseAudioSink(1) or radio.WAVFileSink('ssb.wav', 1) 24 | 25 | -- Plotting sinks 26 | local plot1 = radio.GnuplotSpectrumSink(2048, 'RF Spectrum', {xrange = {-3100, 27 | 3100}, 28 | yrange = {-120, -40}}) 29 | local plot2 = radio.GnuplotSpectrumSink(2048, 'AF Spectrum', {yrange = {-120, -40}, 30 | xrange = {0, bandwidth}, 31 | update_time = 0.05}) 32 | 33 | -- Connections 34 | local top = radio.CompositeBlock() 35 | top:connect(source, tuner, sb_filter, am_demod, af_filter, af_gain, sink) 36 | if os.getenv('DISPLAY') then 37 | top:connect(tuner, plot1) 38 | top:connect(af_gain, plot2) 39 | end 40 | 41 | top:run() 42 | -------------------------------------------------------------------------------- /root/luaradio/pocsag_pluto.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local tune_offset = -100e3 10 | local baudrate = 1200 11 | 12 | -- Blocks 13 | local source = radio.SoapySDRSource("driver=plutosdr",frequency + tune_offset, 1000000) 14 | -- local source = radio.RtlSdrSource(frequency + tune_offset, 1000000) 15 | local tuner = radio.TunerBlock(tune_offset, 12e3, 80) 16 | local space_filter = radio.ComplexBandpassFilterBlock(129, {3500, 5500}) 17 | local space_magnitude = radio.ComplexMagnitudeBlock() 18 | local mark_filter = radio.ComplexBandpassFilterBlock(129, {-5500, -3500}) 19 | local mark_magnitude = radio.ComplexMagnitudeBlock() 20 | local subtractor = radio.SubtractBlock() 21 | local data_filter = radio.LowpassFilterBlock(128, baudrate) 22 | local clock_recoverer = radio.ZeroCrossingClockRecoveryBlock(baudrate) 23 | local sampler = radio.SamplerBlock() 24 | local bit_slicer = radio.SlicerBlock() 25 | local framer = radio.POCSAGFramerBlock() 26 | local decoder = radio.POCSAGDecoderBlock() 27 | local sink = radio.JSONSink() 28 | 29 | -- Connections 30 | local top = radio.CompositeBlock() 31 | top:connect(source, tuner) 32 | top:connect(tuner, space_filter, space_magnitude) 33 | top:connect(tuner, mark_filter, mark_magnitude) 34 | top:connect(mark_magnitude, 'out', subtractor, 'in1') 35 | top:connect(space_magnitude, 'out', subtractor, 'in2') 36 | top:connect(subtractor, data_filter, clock_recoverer) 37 | top:connect(data_filter, 'out', sampler, 'data') 38 | top:connect(clock_recoverer, 'out', sampler, 'clock') 39 | top:connect(sampler, bit_slicer, framer, decoder, sink) 40 | if os.getenv('DISPLAY') then 41 | top:connect(tuner, plot1) 42 | top:connect(data_filter, plot2) 43 | end 44 | 45 | top:run() 46 | -------------------------------------------------------------------------------- /root/luaradio/examples/rtlsdr_pocsag.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local tune_offset = -100e3 10 | local baudrate = 1200 11 | 12 | -- Blocks 13 | local source = radio.RtlSdrSource(frequency + tune_offset, 1000000) 14 | local tuner = radio.TunerBlock(tune_offset, 12e3, 80) 15 | local space_filter = radio.ComplexBandpassFilterBlock(129, {3500, 5500}) 16 | local space_magnitude = radio.ComplexMagnitudeBlock() 17 | local mark_filter = radio.ComplexBandpassFilterBlock(129, {-5500, -3500}) 18 | local mark_magnitude = radio.ComplexMagnitudeBlock() 19 | local subtractor = radio.SubtractBlock() 20 | local data_filter = radio.LowpassFilterBlock(128, baudrate) 21 | local clock_recoverer = radio.ZeroCrossingClockRecoveryBlock(baudrate) 22 | local sampler = radio.SamplerBlock() 23 | local bit_slicer = radio.SlicerBlock() 24 | local framer = radio.POCSAGFramerBlock() 25 | local decoder = radio.POCSAGDecoderBlock() 26 | local sink = radio.JSONSink() 27 | 28 | -- Plotting sinks 29 | local plot1 = radio.GnuplotSpectrumSink(2048, 'RF Spectrum', {yrange = {-120, -40}}) 30 | local plot2 = radio.GnuplotPlotSink(2048, 'Demodulated Bitstream') 31 | 32 | -- Connections 33 | local top = radio.CompositeBlock() 34 | top:connect(source, tuner) 35 | top:connect(tuner, space_filter, space_magnitude) 36 | top:connect(tuner, mark_filter, mark_magnitude) 37 | top:connect(mark_magnitude, 'out', subtractor, 'in1') 38 | top:connect(space_magnitude, 'out', subtractor, 'in2') 39 | top:connect(subtractor, data_filter, clock_recoverer) 40 | top:connect(data_filter, 'out', sampler, 'data') 41 | top:connect(clock_recoverer, 'out', sampler, 'clock') 42 | top:connect(sampler, bit_slicer, framer, decoder, sink) 43 | if os.getenv('DISPLAY') then 44 | top:connect(tuner, plot1) 45 | top:connect(data_filter, plot2) 46 | end 47 | 48 | top:run() 49 | -------------------------------------------------------------------------------- /USB-drive/leantrx/README.md: -------------------------------------------------------------------------------- 1 | LeanTRX: a web interface for LeanSDR on embedded SDR platforms. 2 | 3 | # Documentation 4 | 5 | See http://www.pabr.org/radio/leantrx/ 6 | 7 | My LEANTRX perso.html homepage (WBFM optimized for Pluto) 8 | 9 | ![perso_html](https://user-images.githubusercontent.com/26578895/63322696-55f6fe00-c324-11e9-8e0b-9dc85d45e42e.png) 10 | 11 | # Development 12 | 13 | https://www.github.com/pabr/leantrx (web interface) 14 | https://www.github.com/pabr/leansdr (SDR functions) 15 | 16 | # LeanTRX license 17 | 18 | Copyright (c) 2018 19 | 20 | > This program is free software: you can redistribute it and/or modify 21 | > it under the terms of the GNU General Public License as published by 22 | > the Free Software Foundation, either version 3 of the License, or 23 | > (at your option) any later version. 24 | > 25 | > This program is distributed in the hope that it will be useful, 26 | > but WITHOUT ANY WARRANTY; without even the implied warranty of 27 | > MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 28 | > GNU General Public License for more details. 29 | > 30 | > You should have received a copy of the GNU General Public License 31 | > along with this program. If not, see . 32 | 33 | # Third-party licenses 34 | 35 | If you have received a pre-compiled version of this software, the 36 | following notices are applicable on some platforms: 37 | 38 | - leantrx/bsp/plutosdr/*/{cdc_ether.ko,rndis_host.ko} are compiled 39 | from http://github.com/analogdevicesinc/linux after enabling 40 | CONFIG_USB_NET_CDCETHER=m and CONFIG_USB_NET_RNDIS_HOST=m. 41 | cdc_ether.c and rndis_host.c are GPL2+. 42 | 43 | - Most binaries under leantrx/bin/ are compiled from LeanSDR (GPL3+). 44 | 45 | - leantrx/bin/*/leanmlmrx may be statically linked against 46 | libfftw3f (GPL2+). 47 | 48 | - leantrx/bin/*/leaniio{rx,tx} may be statically linked against 49 | http://github.com/analogdevicesinc/libiio (GPL2.1+). 50 | -------------------------------------------------------------------------------- /root/luaradio/examples/rtlsdr_am_synchronous.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local ifreq = 50e3 10 | local bandwidth = 5e3 11 | 12 | -- Blocks 13 | local source = radio.RtlSdrSource(frequency - ifreq, 1102500) 14 | local rf_decimator = radio.DecimatorBlock(5) 15 | local if_filter = radio.ComplexBandpassFilterBlock(129, {ifreq - bandwidth, ifreq + bandwidth}) 16 | local pll = radio.PLLBlock(1000, ifreq - 100, ifreq + 100) 17 | local mixer = radio.MultiplyConjugateBlock() 18 | local am_demod = radio.ComplexToRealBlock() 19 | local dcr_filter = radio.SinglepoleHighpassFilterBlock(100) 20 | local af_filter = radio.LowpassFilterBlock(128, bandwidth) 21 | local af_downsampler = radio.DownsamplerBlock(10) 22 | local af_gain = radio.AGCBlock('slow') 23 | local sink = os.getenv('DISPLAY') and radio.PulseAudioSink(1) or radio.WAVFileSink('am_synchronous.wav', 1) 24 | 25 | -- Plotting sinks 26 | local plot1 = radio.GnuplotSpectrumSink(2048, 'RF Spectrum', {xrange = {ifreq - 3*bandwidth, 27 | ifreq + 3*bandwidth}, 28 | yrange = {-120, -40}}) 29 | local plot2 = radio.GnuplotSpectrumSink(2048, 'AF Spectrum', {yrange = {-120, -40}, 30 | xrange = {0, bandwidth}, 31 | update_time = 0.05}) 32 | 33 | -- Connections 34 | local top = radio.CompositeBlock() 35 | top:connect(source, rf_decimator, if_filter) 36 | top:connect(if_filter, pll) 37 | top:connect(if_filter, 'out', mixer, 'in1') 38 | top:connect(pll, 'out', mixer, 'in2') 39 | top:connect(mixer, am_demod, dcr_filter, af_filter, af_downsampler, af_gain, sink) 40 | if os.getenv('DISPLAY') then 41 | top:connect(rf_decimator, plot1) 42 | top:connect(af_downsampler, plot2) 43 | end 44 | 45 | top:run() 46 | -------------------------------------------------------------------------------- /USB-drive/img/version.js: -------------------------------------------------------------------------------- 1 | function OnTheWeb() { 2 | window.location.assign("https://wiki.analog.com/university/tools/pluto") 3 | } 4 | 5 | function versionCompare(v1, v2) { 6 | var v1parts = ("" + v1).replace(/[a-zA-Z]/g, "").replace("-", ".").split("."), 7 | v2parts = ("" + v2).replace(/[a-zA-Z]/g, "").replace("-", ".").split("."), 8 | minLength = Math.min(v1parts.length, v2parts.length), 9 | p1, p2, i; 10 | console.log(v1parts + " || " + v2parts); 11 | for(i = 0; i < minLength; i++) { 12 | p1 = parseInt(v1parts[i], 10); 13 | p2 = parseInt(v2parts[i], 10); 14 | if (isNaN(p1)){ p1 = v1parts[i]; } 15 | if (isNaN(p2)){ p2 = v2parts[i]; } 16 | if (p1 == p2) { 17 | continue; 18 | }else if (p1 > p2) { 19 | return 1; 20 | }else if (p1 < p2) { 21 | return -1; 22 | } 23 | return NaN; 24 | } 25 | if (v1parts.length === v2parts.length) { 26 | return 0; 27 | } 28 | return (v1parts.length < v2parts.length) ? -1 : 1; 29 | } 30 | 31 | function CheckFrmVersion() { 32 | var req = jQuery.getJSON("https://api.github.com/repos/analogdevicesinc/plutosdr-fw/releases"); 33 | req.done(function(response) { 34 | var VerOnGithub = response[0].name 35 | console.log(VerOnGithub) 36 | var res = versionCompare("v0.29-1-g2e94-dirty", VerOnGithub); 37 | if (res < 0) { 38 | var message = "Newer version available online (Version " + VerOnGithub + " )"; 39 | document.getElementById('versionsection').className = "download"; 40 | } else if (res > 0) { 41 | var message = "Wow! Your Pluto Firmware Version v0.29-1-g2e94-dirty is newer than (" + VerOnGithub + ") on Github."; 42 | document.getElementById('versionsection').className = ""; 43 | document.getElementById('plutsdr-fw-download').style.visibility = "hidden"; 44 | } else if (res == 0) { 45 | var message = "Pluto is using the same version as latest release!"; 46 | document.getElementById('versionsection').className = ""; 47 | document.getElementById('plutsdr-fw-download').style.visibility = "hidden"; 48 | } else { 49 | var message = "Failure in checking version, check manually"; 50 | document.getElementById('versionsection').className = ""; 51 | } 52 | document.getElementById('versiontest').innerHTML = message; 53 | jQuery('#plutsdr-fw-download').attr ('href', response[0].assets[0].browser_download_url); 54 | }); 55 | } 56 | 57 | window.onload = CheckFrmVersion; 58 | -------------------------------------------------------------------------------- /pluto_cli/readme.txt: -------------------------------------------------------------------------------- 1 | 2 | This is a simple CLI to control basic settings of your pluto. 3 | Inspired from https://github.com/LamaBleu/moRFeus_listener. 4 | 5 | You can control your pluto from shell, or access CLI from the LAN, by using socat or redirecting ports from the host computer to/from pluto. 6 | 7 | Quick setup : 8 | - Copy pluto_cli.sh script to your pluto on /usr/bin folder, then run "pluto_cli.sh" from pluto terminal console. 9 | 10 | Main menu should appear, displaying available commands and status. 11 | 12 | 13 | Local access (from terminal console, connected to pluto) : 14 | 15 | # pluto_cli.sh 16 | 17 | *** ADALM-Pluto remote control 18 | *** LamaBleu 05/2019 19 | 20 | Pluto listener commands : 21 | ----------------------- 22 | 23 | F 123456789 : set frequency (RX/TX) 24 | BW : set Bandwidth (RX/TX) 25 | SR : set Samplerate (RX/TX) 26 | TXF : set TX frequency 27 | TXBW : set TX bandwidth 28 | TXATT [-89:0] : set TX attenuation ( 0 = max power) 29 | RXF : set RX frequency 30 | RXBW : set RX bandwidth 31 | RXGAIN [0-73]: set RX gain 32 | S : display status 33 | H : display commands list 34 | X or Q : disconnect 35 | KK : disconnect and KILL server 36 | 37 | ****** RX ****** 38 | Freq : 739509998 39 | Samplerate : 2083336 40 | BW : 900000 41 | Gain : 73.000000 dB (manual mode) 42 | RSSI : 126.75 dB 43 | 44 | 45 | ****** TX ****** 46 | Freq : 2440000000 47 | Samplerate : 2083336 48 | BW : 20000000 49 | Att. : -10.000000 dB 50 | 51 | 52 | Command : 53 | 54 | 55 | 56 | ==================================================================== 57 | 58 | - Access from network : 59 | 60 | !!!!!! WARNING !!!!! 61 | Exposing your pluto ports to internet is a big error, and security threat for your LAN. 62 | You should avoid all risk regarding external connections taking control of your Pluto. 63 | You are resposible if someone use your pluto to transmit. 64 | 65 | By applying following steps, ensure your pluto is only open to well-known computers over your LAN ONLY. 66 | Once said : 67 | 68 | 1. Run following command on pluto command-line to give LAN access for pluto_cli.sh script: 69 | socat -t 2 TCP4-LISTEN:7777,fork,crlf,reuseaddr EXEC:/usr/bin/pluto_cli.sh,pty,stderr,echo=0 70 | 71 | 2. If the pluto is connected using wifi, juste use nc or telnet to access pluto_cli. 72 | nc 192.168.40.13 7778 73 | 74 | 3. From host computer use "nc 192.168.2.1 7777" , or "nc pluto.local 7777" (or telnet also working) 75 | 76 | 4. If you want to grant access to all computers on the LAN you have to redirect adequate ports on the computer hosting the Pluto. 77 | 78 | 79 | LamaBleu (@fonera_cork) 06/2019 80 | 81 | -------------------------------------------------------------------------------- /pluto_power/mini_sna.sh: -------------------------------------------------------------------------------- 1 | # 2 | # LamaBleu 12/2019 3 | # Usage : signal.sh Fstart Fend Step RXgain TXgain 4 | # : ./signal.sh 405000 460000 500 30 -40 5 | # (frequencies in kHz) 6 | # Do not use TXrun greater than -10dB (stay between -89 to -10)! 7 | # To protect RX stage use RF attenuators ! 8 | # Default TXgain is set -30 (if not specified) 9 | 10 | cd /root/miniSNA 11 | rm /root/miniSNA/test.csv 2>/dev/null 12 | mv /root/.gnuplot /root/gnuplot.conf 2>/dev/null 13 | 14 | fstart=$(($1*1000)) 15 | fend=$(($2*1000)) 16 | step=$(($3*1000)) 17 | rxgain=$4 18 | txgain=${5:-30} 19 | echo "FStart: $fstart - Fend: $fend - Steps: $step Hz" 20 | echo "Pluto RXGAIN $rxgain, TXGAIN $txgain" 21 | # TX : Pluto 22 | /usr/bin/iio_attr -a -q -c -o ad9361-phy voltage0 hardwaregain $txgain 1>/dev/null 23 | /usr/bin/iio_attr -a -q -c -o ad9361-phy voltage0 sampling_frequency 1600000 1>/dev/null 24 | /usr/bin/iio_attr -a -q -D ad9361-phy bist_prbs 0 1>/dev/null 25 | /usr/bin/iio_attr -a -q -D ad9361-phy bist_tone "1 1 0 0" 1>/dev/null 26 | 27 | for freq in $(seq $((fstart)) $((step)) $((fend))) 28 | do 29 | 30 | # Pluto by default. 31 | # moRFeus : uncomment right section, comment pluto section. 32 | 33 | # TX : Pluto BIST MODE 34 | # 35 | # 36 | fbist=$(($freq-100000)) 37 | #fbist=$((freq)) 38 | /usr/bin/iio_attr -u local: -q -c ad9361-phy TX_LO frequency ${fbist} 1>/dev/null 39 | 40 | 41 | 42 | # or TX : send freq to remote moRFeus via TCP 43 | # (using https://github.com/LamaBleu/moRFeus_listener) 44 | # adapt IP and uncomment 45 | # 46 | #exec 3<>/dev/tcp/192.168.40.13/7778 && echo "F ${freq}" 1>&3 47 | 48 | # or TX : using local moRFeus (need morfeus-tool from Othernet) 49 | # download link : https://archive.othernet.is/morfeus_tool_v1.6/ 50 | # "sudo" workaround : https://archive.othernet.is/morfeus_tool_v1.6/morfeus.udev.rules 51 | # 52 | #./morfeus_tool setFrequency ${freq} 53 | #sleep 0.3 54 | 55 | 56 | # RX: get signal level 57 | # -f 4 = sample rate. Increase up to 50 for a quicker sweep but less accurate. 58 | pow_pluto -l ${freq} -g ${rxgain} -f 4 >> /root/miniSNA/test.csv 59 | sleep 0.1 60 | tail -n 1 /root/miniSNA/test.csv 61 | done 62 | 63 | # Pluto : stop bist mode 64 | /usr/bin/iio_attr -u local: -D 9361-phy bist_tone "0 0 0 0" 2>/dev/null 65 | 66 | # Plot 67 | 68 | fstart=$(tail -1 /root/miniSNA/test.csv | awk '{print $1}') 69 | fend=$(head -1 /root/miniSNA/test.csv | awk '{print $1}') 70 | #echo $fstart $fend 71 | /usr/bin/gnuplot -persist -e "fmax=$fstart;f0=$fend" /root/miniSNA/plot.gnu 2>/dev/null 72 | echo "Full PNG plot : http://pluto.local/plot.png or http://192.168.2.1/plot.png" 73 | echo " : saved to /www/plot.png" 74 | mv /root/gnuplot.conf /root/.gnuplot 2>/dev/null 75 | -------------------------------------------------------------------------------- /root/luaradio/examples/rtlsdr_rds.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local tune_offset = -250e3 10 | 11 | -- Blocks 12 | local source = radio.RtlSdrSource(frequency + tune_offset, 1102500) 13 | local tuner = radio.TunerBlock(tune_offset, 200e3, 5) 14 | local fm_demod = radio.FrequencyDiscriminatorBlock(1.25) 15 | local hilbert = radio.HilbertTransformBlock(129) 16 | local mixer_delay = radio.DelayBlock(129) 17 | local pilot_filter = radio.ComplexBandpassFilterBlock(129, {18e3, 20e3}) 18 | local pll_baseband = radio.PLLBlock(1500.0, 19e3-100, 19e3+100, 3.0) 19 | local mixer = radio.MultiplyConjugateBlock() 20 | local baseband_filter = radio.LowpassFilterBlock(128, 4e3) 21 | local baseband_rrc = radio.RootRaisedCosineFilterBlock(101, 1, 1187.5) 22 | local phase_corrector = radio.BinaryPhaseCorrectorBlock(8000) 23 | local clock_demod = radio.ComplexToRealBlock() 24 | local clock_recoverer = radio.ZeroCrossingClockRecoveryBlock(1187.5*2) 25 | local sampler = radio.SamplerBlock() 26 | local bit_demod = radio.ComplexToRealBlock() 27 | local bit_slicer = radio.SlicerBlock() 28 | local bit_decoder = radio.ManchesterDecoderBlock() 29 | local bit_diff_decoder = radio.DifferentialDecoderBlock() 30 | local framer = radio.RDSFramerBlock() 31 | local decoder = radio.RDSDecoderBlock() 32 | local sink = radio.JSONSink() 33 | 34 | -- Plotting sinks 35 | local plot1 = radio.GnuplotSpectrumSink(2048, 'Demodulated FM Spectrum', {yrange = {-120, -40}}) 36 | local plot2 = radio.GnuplotSpectrumSink(2048, 'BPSK Spectrum', {yrange = {-130, -60}, 37 | xrange = {-8000, 8000}}) 38 | local plot3 = radio.GnuplotXYPlotSink(1024, 'BPSK Constellation', {complex = true, 39 | yrange = {-0.02, 0.02}, 40 | xrange = {-0.02, 0.02}}) 41 | 42 | -- Connections 43 | local top = radio.CompositeBlock() 44 | top:connect(source, tuner, fm_demod, hilbert, mixer_delay) 45 | top:connect(hilbert, pilot_filter, pll_baseband) 46 | top:connect(mixer_delay, 'out', mixer, 'in1') 47 | top:connect(pll_baseband, 'out', mixer, 'in2') 48 | top:connect(mixer, baseband_filter, baseband_rrc, phase_corrector) 49 | top:connect(phase_corrector, clock_demod, clock_recoverer) 50 | top:connect(phase_corrector, 'out', sampler, 'data') 51 | top:connect(clock_recoverer, 'out', sampler, 'clock') 52 | top:connect(sampler, bit_demod, bit_slicer, bit_decoder, bit_diff_decoder, framer, decoder, sink) 53 | if os.getenv('DISPLAY') then 54 | top:connect(fm_demod, plot1) 55 | top:connect(baseband_rrc, plot2) 56 | top:connect(sampler, plot3) 57 | end 58 | 59 | top:run() 60 | -------------------------------------------------------------------------------- /USB-drive/img/style.css: -------------------------------------------------------------------------------- 1 | body{ 2 | font-family: "Helvetica Neue", sans-serif; 3 | font-size: 16px; 4 | font-weight: normal; 5 | line-height: 1.5em; 6 | color: #636363; 7 | padding: 0 20px 0; 8 | max-width: 1024px; 9 | } 10 | hr{ 11 | color: #ccc; 12 | margin: 10px 0 20px; 13 | } 14 | h1, h3{ 15 | font-family: "Arial Regular", sans-serif; 16 | font-weight: bold; 17 | } 18 | h1{ 19 | font-size: 32px; 20 | color: #1e4056; 21 | margin-bottom: 40px; 22 | } 23 | h3{ 24 | font-size: 24px; 25 | } 26 | header{ 27 | margin-bottom: 20px; 28 | } 29 | header img{ 30 | margin-top: 10px; 31 | width: 175px; 32 | } 33 | nav{ 34 | margin-bottom: 20px; 35 | } 36 | ul{ 37 | padding-left: 20px; 38 | } 39 | table{ 40 | width: 100%; 41 | } 42 | th{ 43 | background-color: #33b3ca; 44 | color: #fff; 45 | font-weight: normal; 46 | padding: 10px; 47 | text-align: left; 48 | } 49 | td{ 50 | background-color: #f5f5f5; 51 | font-size: 14px; 52 | padding: 5px 10px; 53 | } 54 | th:first-of-type, 55 | td:first-of-type{ 56 | width: 25%; 57 | font-weight: bold; 58 | } 59 | #versiontest{ 60 | color: #27B34F; 61 | } 62 | a{ 63 | color: #33b3ca; 64 | text-decoration: none; 65 | } 66 | .button{ 67 | background-color: #33b3ca; 68 | border-radius: 15px; 69 | color: #ffffff; 70 | margin: 0 20px 20px 0; 71 | padding: 5px 15px; 72 | cursor: pointer; 73 | } 74 | .download{ 75 | background-image: url("download.png"); 76 | padding: 1em 1em .5em 70px; 77 | margin-bottom: 1.5em; 78 | min-height: 68px; 79 | background-position: 10px 50%; 80 | background-repeat: no-repeat; 81 | color: #000; 82 | overflow: hidden; 83 | box-sizing: border-box; 84 | background-color: #d6efc2; 85 | border-radius: 1.4em; 86 | } 87 | .quicklinks{ 88 | float: right; 89 | -webkit-column-count: 2; /* Chrome, Safari, Opera */ 90 | -moz-column-count: 2; /* Firefox */ 91 | column-count: 2; 92 | -webkit-column-gap: 20px; /* Chrome, Safari, Opera */ 93 | -moz-column-gap: 20px; /* Firefox */ 94 | column-gap: 20px; 95 | -webkit-column-rule: 1px solid lightblue; /* Chrome, Safari, Opera */ 96 | -moz-column-rule: 1px solid lightblue; /* Firefox */ 97 | column-rule: 1px solid lightblue; 98 | list-style: none; 99 | list-style-type: none; 100 | list-style-image: none; 101 | list-style-position: outside; 102 | font-size: 12px; 103 | line-height: 18px; 104 | font-family: Helvetica,Arial,sans-serif; 105 | margin-top: 10; 106 | margin-bottom: 10; 107 | } 108 | .colLeft, .colRight{ 109 | float: left; 110 | } 111 | .colLeft{ 112 | width: 60%; 113 | } 114 | .colRight{ 115 | width: 40%; 116 | text-align: center; 117 | } 118 | .anchor{ 119 | float: right; 120 | } 121 | .boxed { 122 | box-sizing: border-box; 123 | padding: 10px; 124 | border: 1px solid; 125 | border-color: #636363; 126 | border-radius: 5px; 127 | } 128 | -------------------------------------------------------------------------------- /root/python/iio_pluto.py: -------------------------------------------------------------------------------- 1 | # cat pluto.py 2 | #!/usr/bin/env python 3 | # 4 | # Copyright (C) 2018 Analog Devices, Inc. 5 | # Author: Travis Collins 6 | # 7 | # Licensed under the GPL-2. 8 | 9 | import sys 10 | try: 11 | import iio 12 | except: 13 | # By default the iio python bindings are not in path 14 | sys.path.append('/usr/lib/python2.7/site-packages/') 15 | import iio 16 | 17 | import numpy as np 18 | import math 19 | 20 | # User configurable 21 | TXLO = 1000000000 22 | TXBW = 5000000 23 | TXFS = 3000000 24 | RXLO = TXLO 25 | RXBW = TXBW 26 | RXFS = TXFS 27 | 28 | # Setup contexts 29 | try: 30 | ctx = iio.Context('local:') 31 | except: 32 | print("No device found") 33 | sys.exit(0) 34 | 35 | ctrl = ctx.find_device("ad9361-phy") 36 | txdac = ctx.find_device("cf-ad9361-dds-core-lpc") 37 | rxadc = ctx.find_device("cf-ad9361-lpc") 38 | 39 | # Configure transceiver settings 40 | rxLO = ctrl.find_channel("altvoltage0", True) 41 | rxLO.attrs["frequency"].value = str(int(RXLO)) 42 | txLO = ctrl.find_channel("altvoltage1", True) 43 | txLO.attrs["frequency"].value = str(int(TXLO)) 44 | 45 | tx = ctrl.find_channel("voltage0",True) 46 | tx.attrs["rf_bandwidth"].value = str(int(RXBW)) 47 | tx.attrs["sampling_frequency"].value = str(int(RXFS)) 48 | tx.attrs['hardwaregain'].value = '-30' 49 | 50 | rx = ctrl.find_channel("voltage0") 51 | rx.attrs["rf_bandwidth"].value = str(int(TXBW)) 52 | rx.attrs["sampling_frequency"].value = str(int(TXFS)) 53 | rx.attrs['gain_control_mode'].value = 'slow_attack' 54 | 55 | # Enable all IQ channels 56 | v0 = rxadc.find_channel("voltage0") 57 | v1 = rxadc.find_channel("voltage1") 58 | v0.enabled = True 59 | v1.enabled = True 60 | 61 | # Create buffer for RX data 62 | rxbuf = iio.Buffer(rxadc, 2**15, False) 63 | 64 | # Enable single tone DDS 65 | dds0 = txdac.find_channel('altvoltage0',True) 66 | dds2 = txdac.find_channel('altvoltage2',True) 67 | dds0.attrs['raw'].value = str(1) 68 | dds0.attrs['frequency'].value = str(100000) 69 | dds0.attrs['scale'].value = str(0.9) 70 | dds0.attrs['phase'].value = str(90000) 71 | dds2.attrs['raw'].value = str(1) 72 | dds2.attrs['frequency'].value = str(100000) 73 | dds2.attrs['scale'].value = str(0.9) 74 | dds2.attrs['phase'].value = str(0) 75 | 76 | # Collect data 77 | #reals = np.array([]) 78 | #imags = np.array([]) 79 | 80 | for i in range(10): 81 | N=131072 82 | rxbuf.refill() 83 | samples = rxbuf.read() 84 | # x = np.frombuffer(data,dtype=np.int16) 85 | # reals = np.real(data) 86 | # imags = np.imag(data) 87 | # reals = np.append(reals,x[::2]) 88 | # imags = np.append(imags,x[1::2]) 89 | # print("REAL:") 90 | # print(reals,imags) 91 | wav_samples = np.zeros((N, 2), dtype=np.float16) 92 | wav_samples[...,0] = np.real(samples) 93 | wav_samples[...,1] = np.imag(samples) 94 | # db = 10 * math.log10((reals**2)+(imags**2)) 95 | print(wav_samples) 96 | -------------------------------------------------------------------------------- /root/python/test_soapy.py: -------------------------------------------------------------------------------- 1 | import SoapySDR 2 | from SoapySDR import * #SOAPY_SDR_ constants 3 | import numpy #use numpy for buffers 4 | import math 5 | import numpy, random 6 | import sys 7 | 8 | 9 | 10 | #enumerate devices 11 | results = SoapySDR.Device.enumerate() 12 | for result in results: print(result) 13 | 14 | #create device instance 15 | #args can be user defined or from the enumeration result 16 | args = dict(driver="plutosdr") 17 | sdr = SoapySDR.Device(args) 18 | 19 | #query device info 20 | print(sdr.listAntennas(SOAPY_SDR_RX, 0)) 21 | print(sdr.listGains(SOAPY_SDR_RX, 0)) 22 | freqs = sdr.getFrequencyRange(SOAPY_SDR_RX, 0) 23 | for freqRange in freqs: print(freqRange) 24 | 25 | #apply settings 26 | sdr.setSampleRate(SOAPY_SDR_RX, 0, 4e6) 27 | sdr.setFrequency(SOAPY_SDR_RX, 0, 93e6) 28 | 29 | #setup a stream (complex floats) 30 | rxStream = sdr.setupStream(SOAPY_SDR_RX, SOAPY_SDR_CF32) 31 | sdr.activateStream(rxStream) #start streaming 32 | 33 | #create a re-usable buffer for rx samples 34 | buff = numpy.array([0]*1024, numpy.complex64) 35 | 36 | sr = sdr.readStream(rxStream, [buff], len(buff)/4) 37 | 38 | #receive some samples 39 | for i in range(1): 40 | sr = sdr.readStream(rxStream, [buff], len(buff)) 41 | print(sr.ret) #num samples or error code 42 | print(sr.flags) #flags set by receive operation 43 | print(sr.timeNs) #timestamp for receive buffer 44 | 45 | if len(buff) != sr.ret: 46 | raise Exception('receive fail - captured samples %d out of %d'%(len(sr.ret), len(buff))) 47 | print(' OK - captured samples %d out of %d'%(sr.ret, len(buff))) 48 | print " I/Q:" 49 | print buff[:16] 50 | data = buff 51 | # savebuff = buff 52 | # savebuff = numpy.array(buff, numpy.complex64) 53 | # numpy.save('samples.txt', buff) 54 | 55 | 56 | 57 | 58 | #shutdown the stream 59 | sdr.deactivateStream(rxStream) #stop streaming 60 | sdr.closeStream(rxStream) 61 | 62 | #ivalue = numpy.real 63 | ivalue = numpy.real(buff[0::]) 64 | qvalue = numpy.imag(buff[0::]) 65 | 66 | print('I :') 67 | print(ivalue[:15]) 68 | print ('J : ') 69 | print(qvalue[:15]) 70 | 71 | # Save 72 | 73 | f= open("samples.bin","w+") 74 | f.write(buff) 75 | 76 | 77 | #print(ivalue[0]),(numpy.power(ivalue[0],2)) 78 | #print(qvalue[0]),(numpy.power(qvalue[0],2)) 79 | #dbpower = numpy.power(reals+imags,0.5) 80 | 81 | #print(dbpower) 82 | 83 | 84 | 85 | # Compute : dbpower1 = 10 * math.log10((ivalue**2)+(qvalue**2)) 86 | 87 | reals = (numpy.power(ivalue[0],2)) 88 | imags = (numpy.power(qvalue[0],2)) 89 | dbpower1 = 10 * math.log10(reals+imags) 90 | 91 | print(10*dbpower1) 92 | 93 | 94 | 95 | reals = numpy.append(reals,buff[::2]) 96 | imags = numpy.append(imags,buff[1::2]) 97 | 98 | 99 | #numpy.power((numpy.power(reals,2)+numpy.power(imags,2)),0.5) = diib 100 | #print(diib) 101 | 102 | 103 | 104 | frame_array = numpy.fromstring(buff, dtype=numpy.float16) 105 | print(frame_array.size) 106 | 107 | -------------------------------------------------------------------------------- /root/luaradio/examples/rtlsdr_wbfm_stereo.lua: -------------------------------------------------------------------------------- 1 | local radio = require('radio') 2 | 3 | if #arg < 1 then 4 | io.stderr:write("Usage: " .. arg[0] .. " \n") 5 | os.exit(1) 6 | end 7 | 8 | local frequency = tonumber(arg[1]) 9 | local tune_offset = -250e3 10 | 11 | -- Blocks 12 | local source = radio.RtlSdrSource(frequency + tune_offset, 1102500) 13 | local tuner = radio.TunerBlock(tune_offset, 200e3, 5) 14 | local fm_demod = radio.FrequencyDiscriminatorBlock(1.25) 15 | local hilbert = radio.HilbertTransformBlock(129) 16 | local delay = radio.DelayBlock(129) 17 | local pilot_filter = radio.ComplexBandpassFilterBlock(129, {18e3, 20e3}) 18 | local pilot_pll = radio.PLLBlock(100, 19e3-50, 19e3+50, 2) 19 | local mixer = radio.MultiplyConjugateBlock() 20 | -- L+R 21 | local lpr_filter = radio.LowpassFilterBlock(128, 15e3) 22 | local lpr_am_demod = radio.ComplexToRealBlock() 23 | -- L-R 24 | local lmr_filter = radio.LowpassFilterBlock(128, 15e3) 25 | local lmr_am_demod = radio.ComplexToRealBlock() 26 | -- L 27 | local l_summer = radio.AddBlock() 28 | local l_af_deemphasis = radio.FMDeemphasisFilterBlock(75e-6) 29 | local l_downsampler = radio.DownsamplerBlock(5) 30 | -- R 31 | local r_subtractor = radio.SubtractBlock() 32 | local r_af_deemphasis = radio.FMDeemphasisFilterBlock(75e-6) 33 | local r_downsampler = radio.DownsamplerBlock(5) 34 | -- Sink 35 | local sink = os.getenv('DISPLAY') and radio.PulseAudioSink(2) or radio.WAVFileSink('wbfm_stereo.wav', 2) 36 | 37 | -- Plotting sinks 38 | local plot1 = radio.GnuplotSpectrumSink(2048, 'Demodulated FM Spectrum', {yrange = {-120, -40}}) 39 | local plot2 = radio.GnuplotSpectrumSink(2048, 'L+R AF Spectrum', {yrange = {-120, -40}, 40 | xrange = {0, 15e3}, 41 | update_time = 0.05}) 42 | local plot3 = radio.GnuplotSpectrumSink(2048, 'L-R AF Spectrum', {yrange = {-120, -40}, 43 | xrange = {0, 15e3}, 44 | update_time = 0.05}) 45 | 46 | -- Connections 47 | local top = radio.CompositeBlock() 48 | top:connect(source, tuner, fm_demod, hilbert, delay) 49 | top:connect(hilbert, pilot_filter, pilot_pll) 50 | top:connect(delay, 'out', mixer, 'in1') 51 | top:connect(pilot_pll, 'out', mixer, 'in2') 52 | top:connect(delay, lpr_filter, lpr_am_demod) 53 | top:connect(mixer, lmr_filter, lmr_am_demod) 54 | top:connect(lpr_am_demod, 'out', l_summer, 'in1') 55 | top:connect(lmr_am_demod, 'out', l_summer, 'in2') 56 | top:connect(lpr_am_demod, 'out', r_subtractor, 'in1') 57 | top:connect(lmr_am_demod, 'out', r_subtractor, 'in2') 58 | top:connect(l_summer, l_af_deemphasis, l_downsampler) 59 | top:connect(r_subtractor, r_af_deemphasis, r_downsampler) 60 | top:connect(l_downsampler, 'out', sink, 'in1') 61 | top:connect(r_downsampler, 'out', sink, 'in2') 62 | if os.getenv('DISPLAY') then 63 | top:connect(fm_demod, plot1) 64 | top:connect(lpr_am_demod, plot2) 65 | top:connect(lmr_am_demod, plot3) 66 | end 67 | 68 | top:run() 69 | -------------------------------------------------------------------------------- /root/python/iio_info.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # 3 | # Copyright (C) 2015 Analog Devices, Inc. 4 | # Author: Paul Cercueil 5 | # 6 | # This library is free software; you can redistribute it and/or 7 | # modify it under the terms of the GNU Lesser General Public 8 | # License as published by the Free Software Foundation; either 9 | # version 2.1 of the License, or (at your option) any later version. 10 | # 11 | # This library is distributed in the hope that it will be useful, 12 | # but WITHOUT ANY WARRANTY; without even the implied warranty of 13 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 14 | # Lesser General Public License for more details. 15 | 16 | import iio 17 | from sys import argv 18 | 19 | def main(): 20 | print('Library version: %u.%u (git tag: %s)' % iio.version) 21 | 22 | if len(argv) == 3 and argv[1] == '--uri': 23 | uri = argv[2] 24 | else: 25 | contexts = iio.scan_contexts() 26 | if len(contexts) > 1: 27 | print('Multiple contexts found. Please select one using --uri:') 28 | for index, each in enumerate(contexts): 29 | print('\t%d: %s [%s]' % (index, contexts[each], each)) 30 | return 31 | 32 | uri = next(iter(contexts), None) 33 | 34 | ctx = iio.Context(uri) 35 | 36 | if uri is not None: 37 | print('Using auto-detected IIO context at URI \"%s\"' % uri) 38 | 39 | print('IIO context created: ' + ctx.name) 40 | print('Backend version: %u.%u (git tag: %s)' % ctx.version) 41 | print('Backend description string: ' + ctx.description) 42 | 43 | if len(ctx.attrs) > 0: 44 | print('IIO context has %u attributes:' % len(ctx.attrs)) 45 | for attr, value in ctx.attrs.items(): 46 | print('\t' + attr + ': ' + value) 47 | 48 | print('IIO context has %u devices:' % len(ctx.devices)) 49 | 50 | for dev in ctx.devices: 51 | print('\t' + dev.id + ': ' + dev.name) 52 | 53 | if dev is iio.Trigger: 54 | print('Found trigger! Rate: %u Hz' % dev.frequency) 55 | 56 | print('\t\t%u channels found:' % len(dev.channels)) 57 | 58 | for chn in dev.channels: 59 | print('\t\t\t%s: %s (%s)' % (chn.id, chn.name or "", 'output' if chn.output else 'input')) 60 | 61 | if len(chn.attrs) != 0: 62 | print('\t\t\t%u channel-specific attributes found:' % len(chn.attrs)) 63 | 64 | for attr in chn.attrs: 65 | try: 66 | print('\t\t\t\t' + attr + ', value: ' + chn.attrs[attr].value) 67 | except OSError as e: 68 | print('Unable to read ' + attr + ': ' + e.strerror) 69 | 70 | if len(dev.attrs) != 0: 71 | print('\t\t%u device-specific attributes found:' % len(dev.attrs)) 72 | 73 | for attr in dev.attrs: 74 | try: 75 | print('\t\t\t' + attr + ', value: ' + dev.attrs[attr].value) 76 | except OSError as e: 77 | print('Unable to read ' + attr + ': ' + e.strerror) 78 | 79 | if len(dev.debug_attrs) != 0: 80 | print('\t\t%u debug attributes found:' % len(dev.debug_attrs)) 81 | 82 | for attr in dev.debug_attrs: 83 | try: 84 | print('\t\t\t' + attr + ', value: ' + dev.debug_attrs[attr].value) 85 | except OSError as e: 86 | print('Unable to read ' + attr + ': ' + e.strerror) 87 | 88 | if __name__ == '__main__': 89 | main() 90 | -------------------------------------------------------------------------------- /root/CW-pluto.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python 2 | # 3 | ## Python CW beacon for ADALM-Pluto 4 | # 5 | # Original morse processing made by Bertrand FG8OJ (https://github.com/fg8oj/cwkeyer) 6 | # Adapted to Pluto : LamaBleu - 01/2019 7 | # Using a smooth mix of iio-python, bash-iio, and iio_attr... 8 | 9 | import os 10 | import iio 11 | import time 12 | import sys, getopt 13 | import signal 14 | def main(argv): 15 | wpm=10 16 | frequency=433750000 17 | text='' 18 | try: 19 | text=argv[len(argv)-1] 20 | opts, args = getopt.getopt(sys.argv[1:],"f:w:",["frequency=","wpm="]) 21 | except getopt.GetoptError: 22 | print "test.py -f frequency -w wpm TEXTTOSEND" 23 | usage() 24 | sys.exit(2) 25 | for opt, arg in opts: 26 | if opt in ("-f", "--frequency"): 27 | frequency=int(arg)-250000 28 | elif opt in ("-w","--wpm"): 29 | wpm=int(arg) 30 | else: 31 | text=arg 32 | 33 | send(wpm,text,frequency) 34 | os.system("echo 0 440 0 0 > /sys/kernel/debug/iio/iio:\device1/bist_tone") 35 | sys.exit(2) 36 | 37 | 38 | class SIGINT_handler(): 39 | def __init__(self): 40 | self.SIGINT = False 41 | 42 | def signal_handler(self, signal, frame): 43 | print('\nYou pressed Ctrl+C!\n\n') 44 | self.SIGINT = True 45 | 46 | 47 | handler = SIGINT_handler() 48 | signal.signal(signal.SIGINT, handler.signal_handler) 49 | 50 | 51 | def send(wpm,text,frequency): 52 | ctx = iio.Context('local:') 53 | ctrl = ctx.find_device("ad9361-phy") 54 | txLO = ctrl.find_channel("altvoltage1", True) 55 | Fs = int(str(txLO.attrs["frequency"].value)) 56 | os.system("iio_attr -q -c ad9361-phy voltage0 sampling_frequency 2000000 >/dev/null 2>&1") 57 | os.system("iio_attr -q -c ad9361-phy altvoltage1 frequency " + str(frequency) + " >/dev/null 2>&1") 58 | print "\n\n\n\n !! Pluto TX freq is 250kHz below CW carrier !!" 59 | print "TX LO : actual freq: " , Fs , " - new freq: " , frequency 60 | print "\nCW frequency : " , frequency+250000 , " (= TX_LO + 250000) \n" 61 | 62 | coef=10 63 | CODE = {'A': '.-', 'B': '-...', 'C': '-.-.', 64 | 'D': '-..', 'E': '.', 'F': '..-.', 65 | 'G': '--.', 'H': '....', 'I': '..', 66 | 'J': '.---', 'K': '-.-', 'L': '.-..', 67 | 'M': '--', 'N': '-.', 'O': '---', 68 | 'P': '.--.', 'Q': '--.-', 'R': '.-.', 69 | 'S': '...', 'T': '-', 'U': '..-', 70 | 'V': '...-', 'W': '.--', 'X': '-..-', 71 | 'Y': '-.--', 'Z': '--..', 72 | 73 | '0': '-----', '1': '.----', '2': '..---', 74 | '3': '...--', '4': '....-', '5': '.....', 75 | '6': '-....', '7': '--...', '8': '---..', 76 | '9': '----.',' ':'*' 77 | } 78 | print "speed=",wpm 79 | print "text=",text, "\n\n\n" 80 | for letter in text: 81 | letter=letter.upper() 82 | for sign in CODE[letter]: 83 | if sign=="*": 84 | time.sleep(0.3/wpm*coef) 85 | else: 86 | os.system("echo 1 440 0 0 > /sys/kernel/debug/iio/iio\:device1/bist_tone") 87 | time.sleep(0.1/wpm*coef) 88 | if sign=="-": 89 | time.sleep(0.2/wpm*coef) 90 | os.system("echo 0 440 0 0 > /sys/kernel/debug/iio/iio\:device1/bist_tone") 91 | time.sleep(0.1/wpm*coef) 92 | time.sleep(0.3/wpm*coef) 93 | if handler.SIGINT: 94 | break 95 | return 96 | 97 | if __name__ == "__main__": 98 | main(sys.argv) 99 | 100 | -------------------------------------------------------------------------------- /root/luaradio/luaradio: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env luajit 2 | 3 | -------------------------------------------------------------------------------- 4 | -- Load radio package 5 | -------------------------------------------------------------------------------- 6 | 7 | -- Add ./?/init.lua to package path to support loading the package locally 8 | -- (e.g. when running directly from the repository) 9 | package.path = "./?/init.lua;" .. package.path 10 | 11 | -- Preload the radio package 12 | -- Possible package paths: 13 | -- Local package: e.g. ./radio/init.lua 14 | -- Lua package: e.g. /usr/share/lua/5.1/radio/init.lua 15 | -- Local C package: e.g. ./radio.so 16 | -- C package: e.g. /usr/lib/lua/5.1/radio.so 17 | package.preload['radio'] = require('radio') 18 | 19 | local radio = require('radio') 20 | 21 | -------------------------------------------------------------------------------- 22 | -- Option handlers 23 | -------------------------------------------------------------------------------- 24 | 25 | local function print_usage() 26 | local usage = 27 | "Usage: %s [options] 229 | 230 | 231 | 232 | 233 | -------------------------------------------------------------------------------- /USB-drive/img/index_es.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ADALM-PLUTO Documentación integrada 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 |
23 | 24 | Analog Devices logo 25 | 26 |
27 | English | 28 | Deutsche | 29 | Français | 30 | Español | 31 | Português | 32 | 简体中文 | 33 | 日本語 | 34 | Руccкий 35 |
36 |
37 | 38 | 47 |
48 |
49 |

Bienvenidos en el ADALM-PLUTO - Modulo de Aprendizaje Activo

50 | ADI Professor 51 |

Gracias por su compra del Modulo de Aprendizaje Activo ADALM-PLUTO (PlutoSDR). 52 | El ADALM-PLUTO tiene por vocación la iniciación de los estudiantes y futuros ingenieros de électronica a los fundamentos de la radio software (Software-Defined Radio / SDR) y de las telecomunicaciones. 53 | Diseñado para estudiantes de tódos los niveles y tódas las formaciones, ADALM-PLUTO puede ser usado en clase y durante trabajos prácticos, en la universidad o en casa, para asimilar las bases 54 | de las telecomunicaciones radio-frecuencia, en las cual se podrán apoyar durante sus carreras científicas o tecnológicas.

55 |

Diseñado alrededor del chip AD9363, PlutoSDR ofrece dos canales independientes de recepción y transmisión, que operan en paralelo (full duplex). 56 | Puede generar o adquirir señales radio-frecuencia analógicos entre 325 MHz y 3800 MHz, con una frecuencia de muestreo hasta 61,44 miliones de muestreos por segundo (61.44 MSPS). 57 | Pequeño y conveniente, capaz de caber en un bolsillo, PlutoSDR con su software por defecto es un sistema independiente, alimentado por USB. 58 | Gracias a una arquitectura basada alrededor de libiio, PlutoSDR funciona con OSX®, Windows® y Linux®, lo que permite a los estudiantes explorar y aprender usando la plataforma de su elección.

59 |
60 |
61 |
62 | Vuelta al inicio 63 |

Primeros pasos

64 |

La documentación en línea contiene las instrucciones de instalación del software necesario al uso correcto de su Modulo de Aprendizaje Activo ADALM-PLUTO.

65 | 70 |

71 | Una documentación detallada se puede encontrar en la siguiente página: Documentación (inglés). 72 | La información relativa a las instrucciones de seguridad y de cumplimiento de regulación se puede encontrar en línea (inglés).

73 |
74 |
75 |
76 | Vuelta al inicio 77 |

Firmware

78 |

79 | El firmware del Modulo de Aprendizaje Activo ADALM-PLUTO contiene la configuración del FPGA, el nucleo Linux, los controladores de dispositivos y la capa aplicativa que trae la communicación USB. 80 | Ése firmware posee un número de versión que le identifica. Para información sobre la actualisación del firmware, consulta la documentación en línea (inglés).

81 |
82 |

Estatus del firmware del PlutoSDR:

83 |

JavaScript es necesario a la verificación. Oops.

84 |

Obtener la versión más reciente 85 |

86 |
87 |

Información de versión:

88 |

Cada componente del firmware posee su propio número de versión:

89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 |
ModeloAnalog Devices PlutoSDR Rev.B (Z7010-AD9363)
N° de serie104400b8399100151500080041ef64d7bc
Versión firmwarev0.29-1-g2e94-dirty
LinuxLinux pluto 4.9.0-g2398d50 #15 SMP PREEMPT Wed Jan 9 14:06:46 CET 2019 armv7l GNU-Linux
U-BootU-Boot PlutoSDR v0.20-PlutoSDR-00043-gefdb9e8 (Apr 24 2018 - 16:16:28 +0200)
FPGA2018_r1-1-gd79ca2
Root FSv0.20-8405-g04dce-dirty
IIOLibrary version: 0.16 (git tag: v0.16)
127 |

Ajustes de configuración:

128 |

Algunos ajustes permiten cambiar la configuración por defecto. La configuración actual es:

129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 |
Nombre de hostpluto
Dirección IP (PLUTO)10.40.0.155
Dirección IP (PC)10.42.0.1
Máscara de red255.0.0.0
Dirección MAC (PLUTO)00:05:f7:ca:7c:68
Dirección MAC (PC)00:e0:22:4a:02:ac
157 | 158 |

WiFi

159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 |
SSID
Contraseña WPA-PSK********
Dirección IP
176 | 177 |

Wired Ethernet using a USB Ethernet adapter

178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 |
IP Address
Netmask255.255.255.0
191 | 192 |

Para cambiar esos ajustes, consultar la documentación en línea (inglés).

193 |
194 |
195 |
196 | Vuelta al inicio 197 |

Ayuda y soporte

198 |

Ayuda y soporte se ofrecen exclusivamente en línea (inglés).

199 |
200 |
201 |
202 |
203 | 213 |
214 |

Acerca de Analog Devices

215 |
216 |

Conectar de manera inteligente el mundo analógico al mundo digital requiere la ayuda de la tecnología, y del conocimiento. 217 | Ofrecemos artículos de blog, 218 | revistas técnicas y otros recursos de la comunidad 219 | a tódos los ingenieros, científicos, técnicos y estudiantes que quieren aprender y/o compartir conocimientos.

220 |

Sigue Analog Devices en sus redes sociales favoritos:

221 |
222 |
223 |

EngineerZone logo 224 | FaceBook Logo 225 | Twitter Logo 226 | Google+ Logo 227 | LinkedIn Logo 228 | YouTube Logo 229 | Sina Weibo Logo 230 | SlideShare Logo 231 |

232 |
233 |
234 |
235 |
236 |

© 2017 ANALOG DEVICES, INC. TODOS DERECHOS RESERVADOS.

237 |
238 | 239 | 240 | 241 | 242 | 243 | -------------------------------------------------------------------------------- /USB-drive/img/index_de.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ADALM-PLUTO On-board documenation 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 |
23 | 24 | Analog Devices logo 25 | 26 |
27 | English | 28 | Deutsch | 29 | Français | 30 | Español | 31 | Português | 32 | 简体中文 | 33 | 日本語 | 34 | Руccкий 35 |
36 |
37 | 38 | 47 |
48 |
49 |

Willkommen im ADALM-PLUTO Aktiv-Lernmodul

50 | ADI Professor 51 |

Vielen Dank für den Kauf des 52 | ADALM-PLUTO Aktiv-Lernmoduls (PlutoSDR). Das einfach zu bedienende ADALM-PLUTO-Aktiv-Lernmodul 53 | hilft Studierenden der Elektrotechnik bei der Einführung in die Grundlagen des 54 | Software-definiertem Radios (SDR), der Hochfrequenztechnik  (RF) und der drahtlosen 55 | Kommunikation. Entworfen für Studenten auf allen Bildungsebenen und aus allen Fachrichtungen, 56 | kann das Modul sowohl für Lehrer-geführtes als auch für das Lernen in Eigenregie 57 | verwendet werden. Dabei wird den Studierenden während des wissenschaftlich 58 | technischen Studiums geholfen, eine Grundlage in realer Hochfrequenztechnik und 59 | Kommunikation zu entwickeln, oder vorhandenes Wissen zu vertiefen

60 |

Basierend auf dem AD9363 bietet das 61 | PlutoSDR unabhängige Empfangs- und Sendekanäle, die in Vollduplex betrieben 62 | werden können. Das aktive Lernmodul kann im Hochfrequenzbereich von 325 MHz bis 63 | 3800 MHz analoge Radiosignale mit einer Abtastrate von bis zu 61,44 64 | Megasamples pro Sekunde (MSPS) erzeugen oder erfassen. Klein genug, um in eine 65 | Hemdtasche zu passen, ist das PlutoSDR mit seiner Standard-Firmware ein völlig eigenständiges 66 | über USB betriebenes Gerät. Da PlutoSDR von LibIIO-Treibern betrieben wird, ist 67 | es OS X®, Windows® und Linux® unterstützt. Dies ermöglicht es Studierenden, auf 68 | einer Vielzahl von PC-Plattformen zu lernen und zu forschen.

69 |
70 |
71 |
72 | Nach oben 73 |

Erste Schritte

74 |

Die PlutoSDR Online-Dokumentation enthält Anleitungen zum 75 | Einrichten der Software auf Ihrem Host-PC und um das ADALM-PLUTO 76 | Aktiv-Lernmodul in Betrieb zu nehmen.

77 | 82 |

Detaillierte Dokumentation finden Sie auf der Hauptdokumentationsseite Informationen über die Einhaltung von Vorschriften und Sicherheitshinweise 83 | finden Sie online.

84 |
85 |
86 |
87 | Nach oben 88 |

Firmware

89 |

ADALM-PLUTO Firmware bezieht sich auf die FPGA Konfiguration, 90 | den Linux Kernel, die   Gerätetreiber- und Anwendungssoftware. Letztendlich 91 | alle Komponenten welche auf dem PlutoSDR ausgeführt werden, und die Kommunikation 92 | zwischen dem Gerät und dem USB-Host ermöglichen. Diese gebündelte Firmware ist 93 | mit einer spezifischen Versionsnummer versehen. Um Informationen zur 94 | Aktualisierung der Firmware zu aktualisieren, konsultieren Sie die Online-Dokumentation.

95 |
96 |

Status der PlutoSDR Firmware:

97 |

Benötige Javascript-Unterstützung zur Überprüfung

98 |

99 | Überprüfe auf die neueste Version 100 |

101 |
102 |

Versions Information:

103 |

Die verschiedenen Bestandteile der Firmware haben alle ihre eigenen Versionsnummern:

104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 |
ModelAnalog Devices PlutoSDR Rev.B (Z7010-AD9363)
Serial104400b8399100151500080041ef64d7bc
Buildv0.29-1-g2e94-dirty
LinuxLinux pluto 4.9.0-g2398d50 #15 SMP PREEMPT Wed Jan 9 14:06:46 CET 2019 armv7l GNU-Linux
U-BootU-Boot PlutoSDR v0.20-PlutoSDR-00043-gefdb9e8 (Apr 24 2018 - 16:16:28 +0200)
FPGA2018_r1-1-gd79ca2
Root FSv0.20-8405-g04dce-dirty
IIOLibrary version: 0.16 (git tag: v0.16)
142 |

Konfigurationseinstellungen:

143 |

Auf dem Dateisystem gibt es 144 | Einstellungen, über die Sie Standardkonfiguration ändern können. Diese sind 145 | derzeit:

146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 |
Hostnamepluto
IP Address (PLUTO)10.40.0.155
IP Address (HOST)10.42.0.1
Netmask255.0.0.0
MAC Address (PLUTO)00:05:f7:ca:7c:68
MAC Address (HOST)00:e0:22:4a:02:ac
174 | 175 |

WIFI

176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 |
SSID
WPA-PSK Passphrase********
IP Address
193 | 194 |

Wired Ethernet using a USB Ethernet adapter

195 | 196 | 197 | 198 | 199 | 200 | 201 | 202 | 203 | 204 | 205 | 206 | 207 |
IP Address
Netmask255.255.255.0
208 | 209 |

Um diese Einstellungen zu ändern, konsultieren Sie bitte die Online-Dokumentation.

210 |
211 |
212 |
213 | Nach oben 214 |

Hilfe und Unterstützung

215 |

Hilfe und Unterstützung für den ADALM-PLUTO wird online angeboten.

216 |
217 |
218 |
219 | 231 |

Über Analog Devices

232 |
233 |

Das intelligente Verbinden der digitalen und analogen Welten benötigt Wissen als auch Technologie. Wir bieten interessierten Ingenieuren, Wissenschaftlern, Technikern und Studierenden, die helfen und Hilfe teilen wollen eine Vielzahl Blogs, Fachzeitschriften und andere Gemeinschaftsressourcen an.

234 |

Folgen Sie Analog Devices auf Ihrer bevorzugten Social 235 | Media-Website:

236 |
237 |
238 |

EngineerZone logo 239 | FaceBook Logo 240 | Twitter Logo 241 | Google+ Logo 242 | LinkedIn Logo 243 | YouTube Logo 244 | Sina Weibo Logo 245 | SlideShare Logo 246 |

247 |
248 |
249 |
250 |
251 |

© 2017 ANALOG DEVICES, INC. ALL RIGHTS RESERVED.

252 |
253 | 254 | 255 | 256 | 257 | 258 | -------------------------------------------------------------------------------- /USB-drive/img/index_fr.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | ADALM-PLUTO Documentation embarquée 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 20 | 21 | 22 |
23 | 24 | Analog Devices logo 25 | 26 |
27 | English | 28 | Deutsche | 29 | Français | 30 | Español | 31 | Português | 32 | 简体中文 | 33 | 日本語 | 34 | Руccкий 35 |
36 |
37 | 38 | 47 |
48 |
49 |

Bienvenue sur ADALM-PLUTO - Module d'Apprentissage Actif

50 | ADI Professor 51 |

Merci d'avoir acheté le Module d'Apprentissage Actif ADALM-PLUTO (PlutoSDR). 52 | Le ADALM-PLUTO a pour vocation l'initiation des étudiants et futurs ingénieurs en électronique aux fondamentaux de la radio logicielle (Software-Defined Radio / SDR) et des télécommunications. 53 | Conçu pour des étudiants de tous les niveaux et de toutes les formations, ADALM-PLUTO peut être utilisé en cours et lors de travaux pratiques, à l'université ou chez soi, pour assimiler les bases 54 | fondatrices des communications radio-fréquences, sur lesquelles ils pourront s'appuyer lors de leur cursus scientifique ou technologique.

55 |

Conçu autour de la puce AD9363, PlutoSDR offre deux canaux indépendants de réception et transmission, opérant en parallèle (full duplex). 56 | Il peut générer ou acquérir des signaux radio-fréquences analogiques entre 325 MHz et 3800 MHz, à une fréquence d'échantillonage allant jusqu'à 61,44 millions d'échantillons par seconde (61,44 MSPS). 57 | Petit et pratique, pouvant se glisser dans une poche, le PlutoSDR avec son logiciel par défaut est un système à part entière, alimenté en USB. 58 | Grâce à une architecture basée autour de libiio, PlutoSDR fonctionne sous OSX®, Windows® et Linux®, ce qui permet aux étudiants d'explorer et d'apprendre en utilisant la platforme de leur choix.

59 |
60 |
61 |
62 | Retour en haut 63 |

Premiers pas

64 |

La documentation en ligne contient les instructions d'installation des logiciels sur votre ordinateur nécessaires à la bonne utilisation de votre Module d'Apprentissage Actif ADALM-PLUTO.

65 | 70 |

71 | Une documentation détaillée est présente sur la page suivante: Documentation (anglais). 72 | Des informations relatives à la conformité réglementaire et la notice de sécurité peuvent être consultées en ligne (anglais).

73 |
74 |
75 |
76 | Retour en haut 77 |

Micrologiciel

78 |

Le micrologiciel du Module d'Apprentissage Actif ADALM-PLUTO contient la configuration du FPGA, le noyau Linux, les pilotes de périphériques et la couche applicative qui lui apporte la communication par USB. 79 | Ce micrologiciel possède un numéro de version qui l'identifie. Pour des informations relatives à la mise à jour du micrologiciel, consultez la documentation en ligne (anglais).

80 |
81 |

État du micrologiciel du PlutoSDR:

82 |

JavaScript est nécessaire à la vérification. Oops.

83 |

Obtenir la dernière version 84 |

85 |
86 |

Information de version:

87 |

Chaque composant du micrologiciel possède son propre numéro de version:

88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 |
ModèleAnalog Devices PlutoSDR Rev.B (Z7010-AD9363)
N° de série104400b8399100151500080041ef64d7bc
Version micrologicielv0.29-1-g2e94-dirty
LinuxLinux pluto 4.9.0-g2398d50 #15 SMP PREEMPT Wed Jan 9 14:06:46 CET 2019 armv7l GNU-Linux
U-BootU-Boot PlutoSDR v0.20-PlutoSDR-00043-gefdb9e8 (Apr 24 2018 - 16:16:28 +0200)
FPGA2018_r1-1-gd79ca2
Root FSv0.20-8405-g04dce-dirty
IIOLibrary version: 0.16 (git tag: v0.16)
126 |

Paramètres de configuration:

127 |

Certains paramètres vous permettent de modifier la configuration par défaut. La configuration actuelle est:

128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 |
Nom d'hôtepluto
Adresse IP (PLUTO)10.40.0.155
Adresse IP (PC)10.42.0.1
Masque de sous-réseau255.0.0.0
Adresse MAC (PLUTO)00:05:f7:ca:7c:68
Adresse MAC (PC)00:e0:22:4a:02:ac
156 | 157 |

WiFi

158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 |
SSID
Phrase secrète WPA-PSK********
Adresse IP
175 | 176 |

Wired Ethernet using a USB Ethernet adapter

177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 |
IP Address
Netmask255.255.255.0
190 | 191 |

Pour changer ces paramètres, référer à la documentation en ligne (anglais).

192 |
193 |
194 |
195 | Retour en haut 196 |

Aide et Support

197 |

L'aide et le support sont offerts exclusivement en ligne (anglais).

198 |
199 |
200 |
201 | 213 |

À propos de Analog Devices

214 |
215 |

Joindre intelligemment le monde analogique au monde numérique requiert l'aide de la technologie, et des connaissances. 216 | Nous proposons des articles de blog, des 217 | journaux techniques ainsi que d'autres ressources communautaires 218 | aux ingénieurs, scientifiques, techniciens et étudiants qui cherchent à s'instruire et/ou partager leurs connaissances.

219 |

Suivre Analog Devices sur vos réseaux sociaux favoris:

220 |
221 |
222 |

EngineerZone logo 223 | FaceBook Logo 224 | Twitter Logo 225 | Google+ Logo 226 | LinkedIn Logo 227 | YouTube Logo 228 | Sina Weibo Logo 229 | SlideShare Logo 230 |

231 |
232 |
233 |
234 |
235 |

© 2017 ANALOG DEVICES, INC. TOUS DROITS RÉSERVÉS.

236 |
237 | 238 | 239 | 240 | 241 | 242 | -------------------------------------------------------------------------------- /USB-drive/README.txt: -------------------------------------------------------------------------------- 1 | 2 | 3 | LamaBleu 15/01/2018 4 | 5 | 6 | APPLICATIONS 7 | ============= 8 | 9 | - iio tools : iio-info, libiio 0.17 10 | - CW generator (python) (FG8OJ for CW processing code : https://github.com/fg8oj/cwkeyer) 11 | - SoapySDR + SoapyRemote 0.6.1 (Pothosware https://github.com/pothosware/SoapySDR) 12 | - LeanTRX ( + DATV TX scripts) (F4DAV and PABR team http://www.pabr.org/radio/leantrx/leantrx.en.html) 13 | - Python 2.7 + python-numpy, including iio and SoapySDR bindings - with test scripts 14 | - rxtools : rx_sdr, rx_fm, rx_power ( Robert X. Seger https://github.com/rxseger/rx_tools) 15 | - LUAradio (Vanya Sergeev http://luaradio.io) 16 | - csdr ( + nmux) (Simonyi Károly College for Advanced Studies https://github.com/simonyiszk/csdr) 17 | - gnuplot + libpng 18 | - Utilities : sox, socat, netcat, timeout, ntpd and more (at, timeout to perform scheduled tasks or end a task). 19 | - Retrogram (Peter Rakesh https://github.com/r4d10n/retrogram-plutosdr) 20 | - multimon-ng (Elias Önal https://github.com/EliasOenal/multimon-ng/) 21 | - OpenWebRX (András Retzler HA7ILM https://sdr.hu) 22 | 23 | 24 | 25 | - USB mass storage : transfer files to/from pluto. 26 | Hard to explain in few words ! To copy file to/from pluto, you can use the USB Mass Storage from host computer and /gadget on Pluto side. 27 | 28 | Procedure: 29 | - copy files to PlutoSDR drive 30 | - eject (unmount) the drive. Will re-appear few seconds later. 31 | - on the pluto side, from SSH run usb-drive.sh script. 32 | - a copy of PlutoSDR will appear on /gadget folder. 33 | 34 | You have to sync /gadget <--> USB mass storage each time you copy file. 35 | Just to be sure, check files timestamp. 36 | 37 | I agree, this need some training ;) 38 | 39 | 40 | 41 | 42 | CW keyer: 43 | ========= 44 | 45 | The python script comes from Bertrand FG8OJ, adapted for Pluto. It's a smooth mix of libiio, bash-iio and iio_attrib use ;) 46 | Run following python script located in /root : python /root/CW-pluto.py -f 144350000 -w 13 "CQ CQ CQ TEST" 47 | --> frequency -f parameter can be omitted, default frequency is 434 MHz 48 | 49 | LUARADIO : 50 | ========== 51 | 52 | Luaradio is a LUA application to demodulate and process SDR signals. 53 | It works using scripting, easy to understand. 54 | However LUAradio soesn't seems to be maintained anymore. more : http://luaradio.io 55 | (last minute: the author of LUAradio announces a 1.0 version to be released in 2019) 56 | 57 | 58 | It's best to change directory before use (cd /root/luaradio), at least when running examples scripts. 59 | noaa_pluto.lua : rate 11025 60 | nbfm_pluto.lua : rate 48000 61 | wbfm_mono_pluto.lua : rate 48000 62 | 63 | Examples : luaradio nbfm_pluto.lua 466205000 , luaradio wbfm_mono_pluto.lua 105500000 64 | 65 | POCSAG: 66 | luaradio pocsag_pluto.lua 466050000 67 | 68 | 69 | ---- 70 | Record 5 minutes NBFM on 466.205MHz (48000Hz): 71 | 72 | # timeout -t 300 -s SIGINT ./luaradio nbfm_pluto.lua 466205000 73 | Recording from 466.205 to /www/record.wav 74 | [INFO] Auto setting Buffer Size: 262144 75 | 76 | Wav file is copied to http://pluto.local/record.wav 77 | File can be downloaded or played through VLC (open network stream: http://192.168.2.1/record.wav) 78 | or mplayer : mplayer -cache 1024 -quiet -rawaudio http://192.168.2.1/record.wav 79 | 80 | ---- 81 | Record NOAA : 82 | 83 | timeout -t 700 -s SIGINT luaradio noaa_pluto.lua 137100000 /www/noaa.wav 84 | 85 | ---- 86 | 87 | 88 | 89 | 90 | RX_SDR and CSDR 91 | =============== 92 | CSDR (and libcsdr) is a really nice tool dedicated to signal processing on SDR based on piped commands. 93 | libsdr is the main sock of OpenWebRX. nmux is also included. 94 | Refer to libsdr/openwebRX docs. Please take also few minutes to read this long post from HA7LIM : https://blog.sdr.hu/support 95 | 96 | 97 | 98 | All these commands are very long, in one line only, take care ! 99 | 100 | Examples : 101 | 102 | * Record 466.175 NBFM to /www/record.wav (wav file is on /www , or http://192.168.2.1/record.wav): 103 | 104 | rx_sdr -F CF32 -f 466175000 -s 2400000 -g 70 - | csdr fir_decimate_cc 50 0.005 HAMMING | csdr fmdemod_quadri_cf | csdr limit_ff | csdr deemphasis_nfm_ff 48000 | csdr fastagc_ff | csdr convert_f_i16 | sox -t raw -e signed -c 1 -b 16 -r 48000 - /www/record.wav 105 | 106 | 107 | 108 | * Stream audio to 192.168.2.1:4444: 109 | ( use "nc 192.168.2.1 4444 | mplayer -cache 1024 -quiet -rawaudio samplesize=2:channels=1:rate=48000 -demuxer rawaudio -" on the host computer) 110 | 111 | rx_sdr -F CF32 -f 466175000 -s 2400000 -g 70 - | csdr fir_decimate_cc 50 0.005 HAMMING | csdr fmdemod_quadri_cf | csdr limit_ff | csdr deemphasis_nfm_ff 48000 | csdr fastagc_ff | csdr convert_f_i16 | nmux -p 4444 -a 10.40.0.155 112 | 113 | 114 | * Receive POCSAG NBFM 115 | 116 | Pluto : 117 | 118 | rx_sdr -F CF32 -s 2400000 -f 466175000 -g 50 - | csdr fir_decimate_cc 50 0.005 HAMMING | csdr fmdemod_quadri_cf | csdr limit_ff | csdr deemphasis_nfm_ff 48000 | csdr fastagc_ff | csdr convert_f_i16 | netcat -l -p 4444 119 | 120 | Pc-client : 121 | 122 | nc 192.168.2.1 4444 | mplayer -cache 1024 -quiet -rawaudio samplesize=2:channels=1:rate=48000 -demuxer rawaudio - 123 | (using nc, can be remplaced by netcat, or better nmux) 124 | 125 | 126 | 127 | * Receive WBFM using mplayer on the computer side : 128 | A wav file is created on http://192.168.2.1/record.wav 129 | 130 | Pluto : 131 | rx_sdr -F CF32 -s 2400000 -f 105100000 -g 20 - | csdr fir_decimate_cc 10 0.05 HAMMING | csdr fmdemod_quadri_cf | csdr fractional_decimator_ff 5 | csdr deemphasis_wfm_ff 48000 50e-6 | csdr convert_f_i16 > /www/record.wav 132 | 133 | - PC client, get the file at http://192.168.2.1/record.wav or listen : 134 | mplayer -cache 1024 -quiet -rawaudio samplesize=2:channels=1:rate=48000 -demuxer rawaudio http://192.168.2.1/record.wav 135 | 136 | * Variant, using rx_sdr -F CF32 , csdr, nmux or netcat (see nbfm-rx.sh and wbfm-rx.sh scripts): 137 | Audio is streamed to port pluto.local:4444 138 | 139 | Pluto : 140 | (WBFM ) rx_sdr -F CF32 -s 2400000 -f 105100000 -g 70 - | csdr fir_decimate_cc 10 0.05 HAMMING | csdr fmdemod_quadri_cf | csdr fractional_decimator_ff 5 | csdr deemphasis_wfm_ff 48000 50e-6 | csdr convert_f_i16 | nmux -a 192.168.2.1 -p 4444 141 | 142 | /root/nbfm-rx.sh script : 143 | 144 | (NBFM) rx_sdr -F CF32 -s 2400000 -f 466175000 -g 50 - | csdr fir_decimate_cc 50 0.005 HAMMING | csdr fmdemod_quadri_cf | csdr limit_ff | csdr deemphasis_nfm_ff 48000 | csdr fastagc_ff | csdr convert_f_i16 | netcat -l -p 4444 145 | 146 | /root/wbfm-rx.sh script, audio 48000Hz 147 | 3MS/s sample rate : 148 | rx_sdr -F CF32 -s 3000000 -f 105100000 -g 70 - | csdr fir_decimate_cc 12 0.06 HAMMING | csdr fmdemod_quadri_cf | csdr fractional_decimator_ff 5 | csdr deemphasis_wfm_ff 48000 60e-6 | csdr convert_f_i16 | nmux -a 192.168.2.1 -p 4444 149 | 150 | PC: 151 | nc 192.168.2.1 4444 | mplayer -cache 1024 -quiet -rawaudio samplesize=2:channels=1:rate=48000 -demuxer rawaudio - 152 | 153 | 154 | GNUPLOT 155 | ======= 156 | 157 | You can create plots directly from the Pluto 158 | Generated plot is displayed on the console using ASCII-art (vintage !). 159 | and PNG version is available here : http://192.168.2.1/plot.png 160 | 161 | 162 | - Plot RF signal spectrum : use signal.sh 163 | signal.sh 1800 2600 25 55 --> plot from 800 to 2600MHz, spacing 25kHz, gain 55 (from 0 to 73, can be omitted, default 70) 164 | 165 | Notes : signal.sh uses rx_power to get signal value. 166 | At this moment it will only perform one pass ( -1 ) because of CSV file formatting. 167 | A full sweep is performed in less than 10 seconds. Time can be increased to improve result. 168 | Example : https://imgur.com/3K8bRpf https://imgur.com/7FgnFIT 169 | 170 | - Plot audio record coming from /www/record.wav : 171 | Run plot-wav.sh script. 172 | Will draw a plot you can view on http://192.168.2.1/plot.png 173 | Plot processing can take lot of time, be patient. 174 | Example : https://imgur.com/hgIMeWO 175 | 176 | RX_FM 177 | ======= 178 | 179 | rx_fm seems buggy using nfm mode ! But works well using wbfm. TBC .( confirmed !) 180 | Stream to the host computer using nc, netcat, or nmux. 181 | Wav file can also be saved to file, please refer to rx-tools doc. 182 | 183 | Pluto: 184 | 185 | rx_fm -M fm -s 170k -A fast -r 32k -l 0 -E deemp -f 105100000 -g 70 - | nc -l -p 4444 (WBFM) 186 | rx_fm -M nfm -A fast -r 32k -l 0 -E deemp -f 466207000 -g 70 - | nc -l -p 4444 (NFM) 187 | 188 | streaming via nmux : 189 | 190 | rx_fm -M fm -s 170k -A fast -r 32k -l 0 -E deemp -f 105100000 -g 70 - | nmux -a 192.168.2.1 -p 4444 191 | 192 | 193 | Client: 194 | 195 | nc 192.168.2.1 4444 | aplay -r 32k -f S16_LE -t raw -c 1 196 | 197 | nc 192.168.2.1 4444 | mplayer -cache 1024 -quiet -rawaudio samplesize=2:channels=1:rate=32000 -demuxer rawaudio - 198 | 199 | 200 | 201 | 202 | LEANTRX and DATV : 203 | ================= 204 | 205 | LeanTRX home page is available here : http://192.168.2.1/leantrx (or pluto.local/leantrx) 206 | 207 | Scripts : to send DATV have a look to scripts in /root/DATV folder ! Please respect rules/laws regarding RF transmission. 208 | 209 | When receiving DATV using from the DVBRX page(dvbrx.html), the TS stream is now redirected to 192.168.2.1:4444 using nmux. 210 | With a bit of luck it is possible to view the stream using VLC on the host computer running : 211 | nc 192.168.2.1 4444 | cvlc - 212 | 213 | However it doesn't always work, depending on the stream (works well using MPEG4 stream sent from RPiDATV, 333kS/s). 214 | Try replacing cvlc by mplayer. 215 | See another example below, and have a look to /root/datv-rx-leandvb.sh script to get more inspiration. 216 | 217 | 218 | MPEG4-ts sample file is no more provided on USB Mass storage for this light version. 219 | You have to download it and copy to the USB Mass storage. 220 | 221 | Send MPEG2-ts sample file to DVB-S FtA receiver: 222 | - too big to fit on the flash : you have to download it first, using mpeg2-download.sh script or manually : 223 | . link : https://github.com/LamaBleu/Pluto-DATV-test/raw/master/samples/MPEG2-lalinea.ts 224 | . copy the file to the USB Mass Storage THEN eject the USB volume to perform a sync. 225 | . now you can run datv-tx-mpeg2.sh script ( will transmit on 970MHz, 1000kS/s 7/8) 226 | . Use only on interior, for test purposes, short antenna, at your own risk (prohibited freq). 227 | 228 | Send DATV from shell : 229 | leandvbtx < /gadget/rpidatv.ts | leaniiotx -f 970000000 --bufsize 32768 --nbufs 32 --bw 1e6 -v 230 | 231 | 232 | 233 | Receive DATV using LeanTRX and VLC : 234 | 235 | - Send DATV RF signal using RpiDATV : 435MHz 250 kS/s FEC 1:2 236 | - Receive on Pluto side (in one line): 237 | leaniiorx --bufsize 65536 --nbufs 32 -f 435e6 -s 2e6 --bw 250e3 -v | leansdrserv --info3-httpd 8003 leandvb --s16 -f 2e6 --tune 0 --sr 250e3 --sampler rrc --rrc-rej 20 --const QPSK --standard DVB-S --cr 1/2 --fastlock -v --json --anf 0 --fd-info 3 --fd-const 3 --fd-spectrum 3 | nc -l -p 4444 192.168.2.1 238 | - Computer side : nc 192.168.2.1 4444 | cvlc - 239 | 240 | 241 | OPENWEBRX 242 | ========= 243 | Was not on my initial plan to add OpenWebRX on this firmware, but I found 2 MB to fill the flash ;) 244 | Really easy to implement. 245 | Launch manually by running 'openwebrx.sh' script. 246 | By running 'openwebrx.sh 144500000' you will start on 144.5 MHz ... 247 | Frequency can be omitted, will start using the last frequency. 248 | 249 | I DO NOT plan to make it run at boot, or in background sorry. Please install Plutoweb instead ;) 250 | 251 | 252 | 253 | 254 | ***** DEV-CORNER : ACCESS TO PLUTO DEVICE ******** 255 | 256 | 257 | 258 | # iio_info -s 259 | Library version: 0.16 (git tag: v0.16) 260 | Compiled with backends: local xml ip usb serial 261 | Available contexts: 262 | 0: Local devices [local:] 263 | 264 | 265 | NEW URI is local: ! 266 | 267 | status.sh script will show RX status at anytime. 268 | 269 | 270 | 271 | From shell (on pluto): 272 | ====================== 273 | 274 | get RX gain: 275 | cat /sys/bus/iio/devices/iio\:device1/in_voltage0_hardwaregain 276 | 277 | get gain mode: 278 | cat /sys/bus/iio/devices/iio\:device1/in_voltage0_gain_control_mode 279 | 280 | get RX freq: 281 | cat /sys/bus/iio/devices/iio\:device1/out_altvoltage0_RX_LO_frequency 282 | 283 | Set RX gain: 284 | cd /sys/bus/iio/devices/iio:device1 285 | echo "58" > in_voltage0_hardwaregain 286 | 287 | 288 | From shell again but using iio 289 | ============================== 290 | 291 | Change TX freq: 292 | iio_attr -q -c ad9361-phy altvoltage1 frequency 435200000 293 | 294 | Get/set RX freq 295 | iio_attr -q -c ad9361-phy altvoltage0 frequency 296 | iio_attr -q -c ad9361-phy altvoltage0 frequency 435200000 297 | 298 | Use following commands to get more infos on device : 299 | 300 | iio_attr -u local: -B 301 | iio_attr -u local: -c 302 | iio_attr -u local: -c ad9361-phy 303 | 304 | 305 | Python 306 | ====== 307 | 308 | Python test scripts to verify iio and SoapySDR bindings are working : 309 | --> have a look to /root/python folder 310 | Note: on the light-version only, some python scripts invoking numpy module are no more working. 311 | 312 | 313 | 314 | - Run scripts from USB drive. 315 | 316 | Running the pluto powered from the right USB connector, you can connect USB drive (or Wifi dongle) to 317 | the left USB connector. 318 | 319 | It's then possible to run scripts, and save resulting files (WAV captures, CSV files) on USB key. 320 | It's also possible to perform update or add system files to the Pluto. 321 | 322 | Please have a look to pages 29 to 31 of this precious doc : 323 | https://archive.fosdem.org/2018/schedule/event/plutosdr/attachments/slides/2503/export/events/attachments/plutosdr/slides/2503/pluto_stupid_tricks.pdf 324 | 325 | 326 | 327 | 328 | --------------------------------------------------------------------------------