This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python3 | |
# Provides "fast" waveform and spectrum visualization for SDR signals using pyqtgraph. | |
# The idea is that you change the get_samples() function for whatever you need to | |
# obtain you own data for analisys. | |
# Hopefully this can be useful, of at least, fun for someone else ;) | |
# TODO: | |
# * Command line args / UI Selection for Plot parameters | |
# * Grid and legend on the "Digital fosphor display" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import iio | |
import struct | |
import numpy as np | |
import matplotlib.pyplot as plt | |
#initalize the iio device and read samples from the channel voltage0 | |
ctx = iio.Context("ip:192.168.2.1") | |
dev = ctx.find_device('cf-ad9361-lpc') | |
ch0 = dev.find_channel('voltage0', False) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# All credits to https://coderwall.com/p/fasnya/add-git-branch-name-to-bash-prompt | |
parse_git_branch() { | |
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/ (\1)/' | |
} | |
export PS1="${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\\[\033[33m\]\$(parse_git_branch)\[\033[00m\]\$ " #ubuntu way | |
force_color_prompt=yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=iperf3 server | |
After=syslog.target network.target auditd.service | |
[Service] | |
ExecStart=/usr/bin/iperf3 -s | |
[Install] | |
WantedBy=multi-user.target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=Start NI USRP RIO | |
[Service] | |
User=root | |
Type=oneshot | |
RemainAfterExit=yes | |
ExecStart=/usr/local/bin/niusrprio_pcie start | |
ExecStop=/usr/local/bin/niusrprio_pcie stop |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Adds a tun interface for a point to point link in nmcli and sets the MTU to 9000 bytes | |
# the created inteface belongs to the group 27 (sudo in Ubuntu 18.04) | |
# You need to run only once, as the interface is permanent | |
nmcli connection add type tun mode tun group 27 ifname radiotun0 con-name radiotun0 eth.mtu 9000 ip4 10.0.0.3/29 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
USRP AGC Control | |
This block is a PI controller to the gain of the USRP based on the | |
received signal. This particular implementation uses the peak of | |
the signal, but other metrics, such as variance, os standard deviation | |
can be employed. The gain is controled in 0.5 steps and an hysteresis | |
can be set. | |
The main goal of such block is to avoid saturation at the ADC or | |
analog frontent. |