Stupid Pluto Tricks With The ADALM-PLUTO FOSDEM 2018: Robin Getz Michael Hennerich
Stupid Pluto Tricks With The ADALM-PLUTO FOSDEM 2018: Robin Getz Michael Hennerich
FOSDEM 2018
ROBIN GETZ
MICHAEL HENNERICH
02/04/2018
Agenda
Static Time varying Impedance Frequency Mechatronics / Network High Frequency &
Voltage/Current signals Measurements Domain Controls Analysis Specialized
► Sends them to PC
for processing over
USB2
4 02/04/2018
Inside the ADALM-PLUTO
AD9363
ZYNQ DDR3L
USB Phy
FLASH
ADALM-PLUTO Design
6 02/04/2018
Regulation? (FCC is local, but most countries have similar organizations)
AD9361: 2 Rx + 2 Tx
AD9364: 1 Rx + 1 Tx
AD9363: 2 Rx + 2 Tx
Major sections:
RF input/output paths
RF PLL/LO
Clock generation
ADC/DAC
Digital filters
Digital interface
Enable state machine
RX Gain (AGC)
TX Attenuation
Aux DAC/ADC and
GPOs
Analog and Digital
Correction/Calibration
Performance Data (meets or exceeds AD9363 specs)
► Tx: ► Rx:
EVM (64 QAM, LTE10) of -46dB @ 800MHz EVM (64 QAM, LTE10) of -43 dB @ 800MHz
Waveform created with MathWorks LTE Toolbox, played out the ADALM- Waveform created with MathWorks LTE Toolbox, played out Keysight
PLUTO, connected to Keysight PXA 9030A via SMA cable, and analyzed Arbitrary waveform generator connected to the ADALM-PLUTO via SMA
with Keysight Signal Studio. cable, and then analyzed with Keysight Signal Studio.
It’s a learning tool, for educational settings
Just like the dwarf planet, ADALM-PLUTO is the dwarf SDR
RF Shielding
None
RF Filtering
None
Output power
0dBm (CW), varies with frequency
ADALM-PLUTO software stack
11
ADALM-PLUTO possible use cases include IoT!
Connect to host USB Thumb Drive USB LAN USB WiFi USB Audio
eLinux
12 02/04/2018
ADALM-PLUTO with IIO Oscilloscope
13 02/04/2018
GNU Radio
► GR fosphor
► GNU Radio
GNU Radio block for RTSA-like spectrum
Open-source software development toolkit that
visualization using OpenCL and OpenGL
provides signal processing blocks to implement
acceleration
software radios.
14 02/04/2018
Gqrx SDR
► gqrx
Gqrx is an open source software defined radio
receiver (SDR) powered by the GNU Radio and the
Qt graphical toolkit.
Change frequency, gain and apply various
corrections (frequency, I/Q balance).
AM, SSB, CW, FM-N and FM-W (mono and stereo)
demodulators.
Special FM mode for NOAA APT.
Variable band pass filter.
AGC, squelch and noise blankers.
FFT plot and waterfall.
Record and playback audio to / from WAV file.
Record and playback raw baseband data.
Spectrum analyzer mode where all signal
processing is disabled.
15 02/04/2018
SDRangel
https://github.com/f4exb/sdrangel
► SDRangel is an Open
Source Qt5 / OpenGL
3.0+ SDR and signal
analyzer frontend to
various hardware
(including Pluto)
► C, C++
► Decoders built in
► Linux, Windows
MATLAB
https://www.mathworks.com/adi-pluto
17
The most important thing in education : TextBooks and Labs
18
ADALM-PLUTO runs embedded Linux!
► U-Boot
Boot process
► Linux 4.6.0 kernel U-Boot boots from SPI flash
Checks button,
Root password: if pressed DFU flash mode
“analog”
Checks boot mode
Previous kernel can tell U-Boot to go into different modes
► buildroot
# device_reboot
Usage: /usr/sbin/device_reboot {ram|sf|reset|verbose|break}
Busybox
sf : Reboot and enter Serial Flash DFU mode
ram : Reboot and enter RAM DFU mode
reset : Reboot
► ~2 second boot time
verbose: Reboot and start serial console Verbose
break : Reboot and HALT in u-boot
DFU ram mode – loads image into RAM and boots it – great for testing
► 32Mbytes of Flash
Default load U-Boot FIT image, and check CRC, then boot it
► Build Instructions:
git clone --recursive https://github.com/analogdevicesinc/plutosdr-fw.git
cd plutosdr-fw
export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
export PATH=$PATH:/opt/Xilinx/SDK/2016.2/gnu/arm/lin/bin
export VIVADO_SETTINGS=/opt/Xilinx/Vivado/2016.2/settings64.sh
make
► Results in
File Comment
pluto.frm Main PlutoSDR firmware file used with the USB Mass
Storage Device
plutosdr-jtag-bootstrap-vX.XX.zip ZIP archive containg u-boot and Vivao TCL used for
JATG bootstrapping
Building the firmware images
Download and install Xilinx FPGA Tools
Vivado HLx 2016.4: WebPACK and Editions - Linux Self Extracting Web Installer
During installation check under design tools Software Development Kit (SDK)
Under devices SoC make sure Zynq-7000 is selected
Xilinx gcc tools are distributed as 32-bit binaries you may need to add 32-bit libs
michael@HAL9000:~/devel$ dpkg –add-architecture i386
michael@HAL9000:~/devel$ apt-get update
michael@HAL9000:~/devel$ sudo apt-get install libc6:i386 libstdc++6:i386
Install other build dependencies
michael@HAL9000:~/devel$ sudo apt-get install git build-essential fakeroot libncurses5-dev libssl-dev ccache
michael@HAL9000:~/devel$ sudo apt-get install dfu-util u-boot-tools device-tree-compiler libssl1.0-dev mtools
Clone and build the Firmware image
michael@HAL9000:~/devel$ git clone --recursive https://github.com/analogdevicesinc/plutosdr-fw.git
michael@HAL9000:~/devel$ cd plutosdr-fw
michael@HAL9000:~/devel/plutosdr-fw$ export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
michael@HAL9000:~/devel/plutosdr-fw$ export PATH=$PATH:/opt/Xilinx/SDK/2016.4/gnu/arm/lin/bin
michael@HAL9000:~/devel/plutosdr-fw$ export VIVADO_SETTINGS=/opt/Xilinx/Vivado/2016.4/settings64.sh
michael@HAL9000:~/devel/plutosdr-fw$ make
21 02/04/2018
Customizing the PlutoSDR filesystem
22 02/04/2018
Customizing the PlutoSDR filesystem
Adding files
► For temporary modifications
Modify the target filesystem directly and then rebuild the image
► For permanent additions
Post-build scripts
Are shell scripts called after Buildroot builds all the selected software, but before the
rootfs images are assembled.
michael@HAL9000:~/devel/plutosdr-fw$ cp ~/foobar.sh buildroot/output/target/sbin/
michael@HAL9000:~/devel/plutosdr-fw$ make
► Filesystem overlays
A tree of files that is copied directly over the target filesystem after it has been built.
23 02/04/2018
Cross-compiling external applications using sysroot
► Along with each PlutoSDR firmware release we also provide the buildroot generated sysroot.
► This allows you to later compile dynamically linked applications that can be executed on the
PlutoSDR.
24 02/04/2018
Cross platform
► Runs on Windows
26 02/04/2018
ADALM-PLUTO Support Model
buy.analog.com
► Buy ADALM-PLUTO • digikey.com
• mouser.com
• arrow.com
► AD9363 Design Files
www.analog.com
► AD9363 Datasheet
► Documentation
► PCB Schematics, Gerbers, BOM wiki.analog.com
https://ez.analog.com/community/university-program
ADALM-PLUTO users
https://ez.analog.com/community/fpga
FPGA Developers
https://ez.analog.com/community/linux-device-drivers/linux-software-drivers
libiio users and developers
Driver users and developers
28 02/04/2018
Stupid Tricks
# the default directory the script runs in is /dev, so change to the drive
cd /media/sda1/
# create a file
touch foobar
ACTION=remove_all /lib/mdev/automounter.sh
29 02/04/2018
Replace the input-event-daemon .conf file
Default file:
#
# /etc/input-event-daemon.conf
#
[Global]
listen = /dev/input/event0
[Keys]
BTN_0 = ACTION=remove_all /lib/mdev/automounter.sh
Replace it with one from USB drive, which plays back pre-recorded files, record waveforms, or runs
custom application, and then restart input-event-daemon
30 02/04/2018
Play a CW at 908,460,000 Hz
#!/bin/sh
# the default directory the script runs in is /dev, so change to the drive
cd /media/sda1/
# create a file
touch foobar.txt
# Set the LO up
/usr/bin/iio_attr -a -c ad9361-phy TX_LO frequency 908460000 >> foobar.txt
# https://wiki.analog.com/resources/tools-software/linux-drivers/iio-transceiver/ad9361#bist_tone
# Inject 0dBFS tone at Fsample/32 into TX (all channels enabled)
/usr/bin/iio_attr -a -D ad9361-phy bist_tone "1 0 0 0" >> foobar.txt
cd /root
This Handheld Selectable 8 band All Cell Phone Signal Jammer & WiFi GPS L1 All in
one Jammer High-capacity (USA Version) suit for USA, against 4G LTE networks 3G
GSM cellphone signals, and blocking WIFIand GPS L1.And it great use for office,
school,home to blocks internet browse,cellphone conversation and GPS signal, one
device to coverage all 4G 3G GSM WIFI GPS frequencies,no need any other device to
suppress wireless signal in your office,home,school.
The use of "cell jammers" or similar devices designed to intentionally block, jam, or interfere
with authorized radio communications (signal blockers, GPS jammers, or text stoppers,
etc.) is a violation of federal law. Also, it is unlawful to advertise, sell, distribute, or otherwise
market these devices to consumers in the United States. These devices pose serious risks
to critical public safety communications, and can prevent you and others from making 9-1-1
and other emergency calls. Jammers can also interfere with law enforcement
communications. Operation of a jammer in the United States may subject you to substantial
monetary penalties, seizure of the unlawful equipment, and criminal sanctions including
imprisonment.
32 02/04/2018
Record files in the cell phone bands to look for CW
34 02/04/2018
Thanks
► Questions?
35 02/04/2018