SkillAgentSearch skills...

Plutoscripts

Scripts for ADALM-Pluto device

Install / Use

/learn @LamaBleu/Plutoscripts
About this skill

Quality Score

0/100

Supported Platforms

Universal

README

Some scripts I'm using for the Pluto. Should work on every Pluto if corresponding applications are installed. Adapt to your needs and correct my mistakes.

Full doc, once flashed see USB-drive/README.txt or : https://github.com/LamaBleu/plutoscripts/tree/master/USB-drive

Screenshots, firmware including the scripts and apps, download link : https://mega.nz/#F!C8hgFASK!C9DfCjU7ou46mG-LNWQTrQ

*** Update 15/03/2019

  • Added NFS filesystem support (under NFS subfolder).
    You can now mount remote shares using NFS through USB or Wifi, save records and scripts.
    Use "nfs_server=" parameter in config.txt to set the remote share to connect.
    At mount a script is run to allow you customize your pluto.

  • It's also possible to mount a remote directory as root filesystem, however this is full of bugs, experimental.
    As example I provide 2 filesystems sample, a classic one (mirror of the firmware), and another big one (BFR-filesystem) containing lot of application we can't fit together on the internal flash of Pluto.

  • Added delaycmd in config.txt to start commands one minute after boot.

More details in the NFS-readme.txt file.

*** Update 27/01/2019

  • wifi is back. Most of tested wifi dongles are supported. However it seems Pluto is not able to connect wifi network containing spaces or special characters in SSID name.

  • Added utilities : jq socat sox pv and more

  • Added global variables CALLSIGN LOCATOR FREQUENCY you can use for scripting (example : CW-pluto.py $FREQUENCY "CQ CQ DE $CALLSIGN"). Set correct values in config.txt file, [HAMRADIO] section (eject then reboot).

  • DATV improved.

  • Many many thanks to @F5OEO_Evariste for sharing his exprience on DATV and RPi ! --> it's now possible to use webcam on RPi, send videostream to Pluto and transmit via DATV using Pluto.. All mobile. see details on DATV section

*** Update 19/01/2019

  • added plot10.sh, plot20.sh to plot 10MHZ or 20MHz spectrum using LUAradio
  • added pplot10.sh pplot20.sh, same task running in permanent loop.
  • LUAradio : added AM demodulators, POCSAG OK.
  • Upgraded to libiio 0.17, soapyremote 0.5. SoapySDR still stuck at 0.6.1 :(
  • Most signifiant scripts are now available here : https://github.com/LamaBleu/plutoscripts

PRE-REQUISITE :

Twitter user @5GReady first reported an issue on flashing failing at around 22-23 MB (firmware filesize is 32MB)

Few investigations showed a batch of 1000 Plutos are not able to support flashing firmware file over 22MB size. It's always possible to downgrade back to official 0.29 version using same DFU command, no worries.

***** How to find if your pluto device is coming from the first batch (0) or not (1) :

Type following command : iio_info | grep variant result : hw_model_variant : 1 ---> compatible with this firmware, 0 ---> not compatible (or apply workaround at your own risk).

If you get a "0" result, then do not try to flash firmware with size over 21 MB, wasted time. You can also check on the dmesg log if reported n25q256a (not compatible, or apply workaround to unlock) or n25q512a (compatible) Download the "light-version" instead, compatible with all revB boards.

Workaround exists, be prudent : https://ez.analog.com/university-program/f/q-a/105941/adalm-pluto---firmware-dfu-flashing-fails-at-22-23mb/313815
Read carefully the post before applying the mod. Keep in mind once unlocked you have a risk to brick your pluto if you flash a wrong firmware/partition.

INSTALLED APPLICATIONS

  • iio tools : iio-info, libiio 0.16
  • CW generator (python) (FG8OJ for CW processing code : https://github.com/fg8oj/cwkeyer)
  • SoapySDR + SoapyRemote 0.6 (Pothosware https://github.com/pothosware/SoapySDR)
  • LeanTRX ( + DATV TX scripts) (F4DAV and PABR team http://www.pabr.org/radio/leantrx/leantrx.en.html)
  • rpidatv.ts video sample to send video test stream directly from Pluto (courtesy F5OEO)
  • Python 2.7 (+numpy, also including iio and SoapySDR bindings)
  • rxtools : rx_sdr, rx_fm, rx_power ( Robert X. Seger https://github.com/rxseger/rx_tools)
  • LUAradio (Vanya Sergeev http://luaradio.io)
  • csdr ( + nmux) (Simonyi Károly College for Advanced Studies https://github.com/simonyiszk/csdr)
  • gnuplot + libpng
  • Busybox utilities : netcat, timeout, ntpd and more (at and timeout to perform scheduled tasks or end a task).
  • Retrogram (Peter Rakesh https://github.com/r4d10n/retrogram-plutosdr)
  • multimon-ng (Elias Önal https://github.com/EliasOenal/multimon-ng/)
  • OpenWebRX (András Retzler HA7ILM https://sdr.hu)
  • morfeus_tool
  • SoapySDR note : yes I know it's not the last version, and I know why ;) WIP
  • Cross-compiled apps, except : leantrx
  • nmux note : nmux is a very good TCP listener, allowing several clients at the same time, keeping listener running after disconnection.

FLASHING

Be always prudent when flashing. Pluto seems very robust ! It is better to flash official 0.29 firmware before.

My preference goes to DFU flashing (never failed) - you need to have dfu-utils installed.

  1. Change to the directory you downloaded the firmware

  2. Ask your Pluto to reboot in DFU mode :

    • from SSH enter "device_reboot sf" --> pluto will reboot to DFUI mode (fixed left LED) OR - modify config.txt file on the USB Mass Storage : in [ACTIONS] section change to 'dfu = 1', then eject drive.
  3. Run "dfu-util -a firmware.dfu -D pluto.dfu"

           Copyright 2005-2009 Weston Schmidt, Harald Welte and OpenMoko Inc.
           Copyright 2010-2014 Tormod Volden and Stefan Schmidt
           This program is Free Software and has ABSOLUTELY NO WARRANTY
           Please report bugs to dfu-util@lists.gnumonks.org
    
           Match vendor ID from file: 0456
           Match product ID from file: b673
           Opening DFU capable USB device...
           ID 0456:b674
           Run-time device DFU version 0110
           Claiming USB DFU Interface...
           Setting Alternate Setting #1 ...
           Determining dev ice status: state = dfuIDLE, status = 0
           DFU mode device DFU version 0110
           Device returned transfer size 4096
           Copying data from PC to DFU device
           Download	[=========================] 100%     21353903 bytes
           Download done.
           state(7) = dfuMANIFEST, status(0) = No error condition is present
           state(2) = dfuIDLE, status(0) = No error condition is present
           Done!
    

Reference

  • Internet access.

By default Pluto is set to start network with static IP. Fixed IP adresses are :192.168.2.10 (for host computer) and 192.168.2.1 (pluto) are still valid. Using this configuration, internet access is not possible. You have to switch to DHCP (USB shared connection or WiFi)

Wifi and network settings: update config.txt file on the USB Storage drive, then eject to update settings.

  • NTP time Pluto will try to get current time using ntp from following servers : 192.168.2.10 pool.ntp.org If you choose to run on static IP configuration, Pluto will probably not access internet, but might be able to get current date/time setting if a time server is running on your host computer 192.168.2.10

  • USB mass storage : transfer files to/from pluto. 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.

Procedure:

  • copy files to PlutoSDR drive
  • eject (unmount) the drive. Will re-appear few seconds later.
  • on the pluto side, from SSH run usb-drive.sh
  • a copy of PlutoSDR will appear on /gadget folder.

You have to sync /gadget <--> USB mass storage each time you copy file. Just to be sure, check files timestamp.

I agree, this need some training ;)

CW keyer:

The python script comes from Bertrand FG8OJ, adapted for Pluto. It's a smooth mix of libiio, bash-iio and iio_attrib use ;) Run following python script located in /root : python /root/CW-pluto.py -f 144350000 -w 13 "CQ CQ CQ TEST" --> frequency -f parameter can be omitted, default frequency is 434 MHz

LUARADIO :

Luaradio is a LUA application to demodulate and process SDR signals. It works using scripting, easy to understand. However LUAradio soesn't seems to be maintained anymore. more : http://luaradio.io (last minute: the author of LUAradio announces a 1.0 version to be released in 2019)

It's best to change directory before use (cd /root/luaradio), at least when running examples scripts. noaa_pluto.lua : rate 11025 nbfm_pluto.lua : rate 48000 wbfm_mono_pluto.lua : rate 48000


Record 5 minutes NBFM on 466.205MHz (48000Hz):

timeout -t 300 -s SIGINT ./luaradio nbfm_pluto.lua 466205000

Recording from 466.205 to /www/record.wav [INFO] Auto setting Buffer Size: 262144

Wav file is copied to http://pluto.local/record.wav File can be downloaded or played through VLC (open network stream: http://192.168.2.1/record.wav) or mplayer : mplayer -cache 1024 -quiet -rawaudio http://192.168.2.1/record.wav


Record NOAA :

timeout -t 700 -s SIGINT luaradio noaa_pluto.lua 137100000 /www/noaa.wav


luaradio nbfm_pluto.lua 466205000

luaradio ax25_pluto.lua 144800000

luaradio pocsag_pluto.lua 466050000

RX_SDR and CSDR

CSDR (and libcsdr) is a really nice tool dedicated to signal processing on SDR based on piped commands. libsdr is the main sock of OpenWebRX. nmux is also included. Refer to libsdr/openwebRX docs. Please take also few minutes to read this long post from HA7LIM : https://blog.sdr.hu/support

All these commands are very long, in one line only, take care !

Examples :

  • Record 466.175 NBFM to /www/record.wav (wav file is on /www , or http://192.168.2.1/record.wav):

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 |

Related Skills

View on GitHub
GitHub Stars44
CategoryDevelopment
Updated1mo ago
Forks5

Languages

HTML

Security Score

95/100

Audited on Feb 6, 2026

No findings