Avahi mDNS allows connecting to the Raspberry Pi and other Avahi-enabled host devices without knowing the host IP address.
The default /etc/avahi/avahi-daemon.conf puts mDNS on all active interfaces–including WiFi.
Be sure to open the Raspberry Pi ufw firewall port.
Port 22 (or other SSH port assigned in /etc/ssh/sshd_config on the Raspberry Pi) should be seen in:
Use SSH Public Key Authentication with ED25519 keys.
Raspberry Pi is trivial to hack like any other device on any operating system if proper cybersecurity is not used.
Why do you care if someone hacks your Pi?
The hacker can use the Pi’s relatively powerful CPU & GPU to stage sophisticated attacks on the rest of your network.
It’s generally much better to use 440 MHz band instead of 144 MHz band for portable hand-held radios (walkie-talkies).
The 440 MHz signal is able to pierce through openings in buildings better.
The interference from computers, LED lights, phone chargers, etc. is generally 20 dB or more less on 440 MHz vs. 144 MHz.
Generally we use “wide” 25 kHz bandwidth, as the performance is about 4 dB better than “narrow” 12.5 kHz spacing due to the nature of FM analog “processing” gain from wider bandwidth.
That is, in the absence of interference, 25 kHz wide modulation performs significantly better than 12.5 kHz narrow modulation.
Most members have analog-only radios at this time, so we kept with analog FM.
In North America, hams generally should not use FM below 442 MHz, as there are other modes coordinated for that frequency range.
Hams should first consider 445.975, 446.0, or 446.025 MHz for FM simplex to be “safe” in most of North America, to not interfere with data links or repeater backbone links.
With modern radios after about year 2000 or so, there isn’t a significant advantage of one PL tone over another.
There is too much bursty interference to run carrier squelch (no PL).
Python packages can make Python scripts callable from any directory, by adding them to system PATH via the <PythonDistroRoot>/bin directory.
On a typical Anaconda Python install, the shortcuts to these scripts are installed in a directory like ~/miniconda3/bin/
Make sure entry points are set up correctly before running pip install, or you will get the VersionConflict error (See Notes at bottom of this article).
Here is a simple example “src/mypkg/adder.py” to run directly from console (in any directory) as
add_two 6.75
to get result 8.75.
Note that the end user doesn’t even know they’re running a Python script.
#!/usr/bin/env python3fromargparseimport ArgumentParser
defadd_two(x: float) -> float:
return x + 2defcli():
p = ArgumentParser(description='adds two to number')
p.add_argument('x', help='number to add two to', type=float)
P = p.parse_args()
print(add_two(P.x))
For each function you wish to have be accessible from anywhere on the system be sure there is a function that handles console arguments as in the example above.
Importing Fortran code in Python just like any other Python module is very straightforward, using F2py.
On any operating system, a Fortran compiler and Numpy are required to use F2py.
If you don’t already have a Fortran compiler, we suggest GNU Gfortran.
macOS / Linux: using Homebrew: brew install gcc
Linux / Windows Subsystem for Linux: apt install gfortran
Windows: use MSYS2pacman -S mingw-w64-ucrt-x86_64-gcc-fortran
f2py does not allow inline comments for COMMON blocks for Fortran 77 .f code.
This is because f2py works more strictly to Fortran specifications than most modern compilers.
Inline comments are not Fortran 77 standard, and will make f2py throw an error.
To fix this problem, just make the inline comment a full-line command with ! in column 1.
Fortran90 .f90 files won’t throw an f2py error due to inline comments on a line with a COMMON block:
goodcomment.f90.
This will manifest itself two different ways, depending on whether you have implicit none or not:
Another solution is to use
Windows Subsystem for Linux
with Anaconda Python.
However, with the techniques below, I’ve always gotten f2py to work on Windows.
Tell Python to use MinGW by creating file ~/pydistutils.cfg containing:
If you have problems using f2py or other development work on Windows, consider
Windows Subsystem for Linux,
which runs at full performance within a terminal window on Windows.
IDL2Matlab
automatically partially converts IDL code to MATLAB / Octave code.
However, this project appears to be abandoned; there haven’t been updates in a few years.
I avoid converting code if possible, because it can introduce subtle errors.
Here are some alternatives to run the unmodified IDL code for free.
Install idl2matlab for Linux: download prereqs and code:
apt install libbison-dev flex
git clone https://github.com/farhi/idl2matlab
cd idl2matlab
Prepare to install in $HOME directory
./configure --prefix=$HOME
Edit Makefile
CFLAGS = -g -fno-stack-protector
Compile and install under $HOME
make && make install
The MATLAB code that idl2matlab produces uses a sort of cumbersome Matlab script that calls its own Matlab functions to do common tasks.
The converted code can be further optimized.
Still, probably easier than doing it all manually.
For any Git remote repo, you can undo (delete from git history) previous commits to eliminate wrong files via git push.
If you only git revert, this leaves the big mess inside the .git directory, slowing down operations and wasting space.
Implicit in this procedure is that those with write access to the remote Git repo can overwrite history, potentially causing permanent file loss.
Remember that Git is a revision tracking system, NOT a backup system.
Restrict Git remote write access: for GitHub, from the repo branches Settings page, Add Rules according to the needs.