Friday, May 24, 2024

Immich-distribution (snap) and external libraries

 I installed immich-distribution via snap (based on Immich, the self-hosted photo gallery) on my desktop running Ubuntu 22.04.4. I eventually determined that this was running on port 3001. I got VNC working again on my desktop, and in a browser, navigated to http://localhost:3001 . I then struggled to configure an External Library to use the existing files on my desktop. Eventually I had success by setting up a bind-mount:

sudo snap stop immich-distribution
cd /var/snap/immich-distribution/common
sudo mkdir my-local-directory-name
sudo mount --bind /path/to/pictures ./my-local-directory-name
sudo snap start immich-distribution

Then within Immich, I went to Administration, External Libraries. For my previously configured library (which previously wasn't able to find any photos), I clicked the three dots, Edit Import Paths, and used:

/var/snap/immich-distribution/common/my-local-directory-name

Sunday, February 20, 2022

Winlink over the Mesh

 ** General **
Keep track of messages on ICS-309.

** Connect mesh node to mesh (CH 179 seems like a good one to start with) **

** Winlink Express **
Open session: Telnet P2P

Add station
Name: person's callsign or name
Password: leave blank
IP Address: IP address of the recipient (from Windows' ipconfig or Linux's ifconfig)

Compose a new message
Select Template
Standard templates
ICS USA Forms
ICS213.txt
Include message number at start of subject

Can leave "Telnet P2P" session running and listening while drafting a new message. Will need to close session to switch to Winlink Post Office (on the mesh) session.

** Pat **
pat configure
listen: ["telnet"]
telnet, listen port: ":8774"

Will automatically listen once pat webserver is started with pat http

Action: Compose
Template/form
ICS USA Forms
ICS213
Include message number at start of subject

Action: Connect
transport: telnet
target: wl2k
address: <yourcall>:CMSTelnet@<IP address of recipient>:8774
Radio only: unchecked
Alias or pat connect <URL> uses URL: telnet://<yourcall>:CMSTelnet@<ip>:8774/wl2k



Saturday, February 12, 2022

Portable HF kit

When I go backpacking, I try to bring an HF station for SOTA or general fun. My equipment tends to include:
  1. MTR-3B transceiver (20/30/40m, CW only, 5W)
  2. QRPGuys No-Tune EFHW (end fed half wave) antenna (see construction notes below) with accessories:
    1. 5x Tent stakes
    2. Fishing pole
    3. Pole guying kit (homemade)
  3. 3 Ah Bioenno 12V LiFePO4 battery with:
    1. Power cable for MTR-3B with powerpole connectors
  4. WhiteRook MK-64 mini paddles with:
    1. 3.5mm TRS audio cable for paddles
  5. Headphones with inline volume adjust slider
  6. 50' paracord (for lashing the pole to a fence post) with:
    1. Small zippered bag for rocks (for throwing over a tree branch)
  7. Tiny notebook for recording what I hear
  8. ARRL Minilog for recording confirmed contacts with:
    1. (2) pens
  9. 25' coax cable with BNC ends
  10. Mini portable mono speaker with:
    1. Included 3.5mm audio/charge cable
Center/top of antenna includes a 3D printed 1.5mm assembly: https://www.tinkercad.com/things/gWuzJ9P9X1z-telescopic-pole-holder-15mm-hole

Pole guying includes a 3D printed 10.5mm assembly: https://www.tinkercad.com/things/eVDi0VG4UBt-telescopic-pole-holder-105mm-hole

Monday, August 23, 2021

AREDN Mesh Node

My portable node includes these major components:

  1. Microtik hAP AC with power transformer from Isaac
  2. Ubiquiti Nanostation M5 from Isaac
  3. Cisco SPA525G VoIP (Voice over IP) phone from Isaac
  4. Sercomm V-RC8061 PT IP camera from Marni
Minor and ancillary components:
  1. Powerpole splitter (at least 3-port)
  2. USB car charger (at least 2-port)
  3. Homemade 12VDC power cable (barrel connector for Microtik to powerpole)
  4. Homemade 12VDC power cable (car accessory female socket to powerpole)
  5. 2x homemade 5VDC power cables (barrel connector for phone and camera to USB)
  6. Bioenno 3Ah LiFePO4 12VDC battery with powerpole connectors (may switch to sealed lead acid or higher capacity)
  7. Windows computer with USB NIC (network interface card) to give it an Ethernet port
  8. 2 Ethernet cables (Cat 5e, I think)
  9. Cheap 60" camera tripod ($20 used on eBay, equal to $40 new from BestBuy: https://www.bestbuy.com/site/dynex-60-universal-tripod-silver/8241048.p?skuId=8241048)
  10. Cell phone
  11. Ziplock bags, zippered bag with handle, and 3 large reusable zip-ties

Major steps included:
  1. Flash firmware to hAP: https://www.arednmesh.org/content/installation-instructions-mikrotik-devices
  2. Configure hAP
    1. Name: KJ6LDJ-HAP
    2. Mesh RF disabled
    3. Tx power 22 dBm, distance to farthest neighbor 35 km
    4. LAN Mode 5 host Direct, DCHP server checked
    5. LAN Access Point enabled; AP band 2GHz; SSID: sfwem; password: standard sfwem password
    6. WAN Wifi Client configured to home network for tunnel while home
  3. Enable PoE passthrough on hAP (in Setup, Advanced Configuration)
  4. Flash firmware to NSM5 (Isaac did this part)
  5. Configure NSM5
    1. Name: KJ6LDJ-InnerRichmond-SECTOR
    2. Mesh RF enabled with IP 10.106.70.188, netmask 255.0.0.0, SSID AREDN (-10-v3 automatically appended), channel 179 (5895), width 10 MHz
    3. Tx power 27 dBm, auto distance
    4. LAN Mode 5 host Direct, DHCP server checked
    5. WAN protocol DHCP, DNS's 8.8.8.8, 8.8.4.4, both advanced WAN access options unchecked
  6. Attach everything to the tripod
  7. Connect battery to hAP to NSM5
  8. Set up tripod and aim NSM5 roughly at where existing nodes are located
  9. Connect phone over wifi to hAP's "sfwem" network configured in 2.e, above
  10. Open phone's browser to kj6ldj-hap.local.mesh:8080
  11. Open Charts, enable Sound, aim for max SNR, then click "Quit"
  12. Mesh Status, open various Services hosted but other nodes, and use them!
Next iteration may be to take aspects from Jeffrey KI6SGV's setup: https://github.com/italic-r/AREDN-PAN

Action shot of my first connection, from the Presidio Golf Course:

Friday, February 12, 2021

Math of Transformers

Purpose: To understand briefly the math of the forces at work in a transformer, especially an impedance transformer for RF antenna systems.

Scope: AC circuits only, including 50 Hz power, 5 GHz microwave, and everything in between.

Math:

Ohm's law:

    V = I R

    I = V / R

Generalized to complex domain (for alternating currents with reactance) becomes:

    V̇ = Z İ ₍₁₎

    İ =  V̇ / Z ₍₁₎

Faraday's law: A changing magnetic field (ΔΦ/Δt) induces a voltage (Emf = V), and a changing voltage induces a magnetic field based on the number of turns on the ferrite core (N):

    V = -N ΔΦ / Δt (2)

Electrical power:

    P = I V

Combined with Ohm's law:

    P = V² / Z

The magnetic field induced on the ferrite core by the input in turn induces a voltage on the output (see caveats):

    ΔΦ1 /Δt = ΔΦ2 / Δt

Insert Faraday's law:

    -V1 / N1 = -V2 / N2

    V2 =  (N2 / N1) * V1   <-- This is the critical equation for a voltage transformer

Because energy is conserved and transformers are (by design) efficient (with efficiency η):

    η P1 = P2

Insert Ohms law:

    η V1² / Z1 = V2² / Z2

And if you substitute the voltage transformer equation:

    η V1² / Z1 = ((N2 / N1) * V1)² / Z2

    η V1² / Z1 = (N2 / N1)² * V1² / Z2

    η / Z1 = (N2 / N1)² / Z2

    Z2 = (N2 / N1)² * Z1 / η   <-- This is the critical equation for an impedance transformer

Both voltage and impedance transformations occur, but usually only one equation is important for the specific application.

Caveats: Saturation and efficiency of the toroid core are dependent on its size and chemistry and the frequency and amplitude (power) of the driving signal. Saturation is when f1 no longer equals f2.

Example 1: A perfectly efficient (η=1) transformer with 3 primary windings (N1) and 21 secondary windings (N2) has an output voltage that is 7 times the input voltage and an output impedance 49 times the input impedance. If the desired output impedance is 50Ω, the target input impedance is 2450Ω.

Example 2: If the transformer is 95% efficient (η=0.95) with the same setup as Example 1 and an input impedance of 2450Ω, the resulting output impedance will be 52.6Ω.

Tuesday, December 29, 2020

Packet Radio

Minimum physical setup for connecting to the SF ACS setup is a 2m radio, TNC (physical/hardware or software), and terminal or packet software. "Standard" ACS setup is FT-2400, Kantronics KPC-3Plus TNC, and a Windows computer running Outpost. Tons of alternatives in each category are possible. One example is KE6JJJ's setup: https://www.reddit.com/r/amateurradio/comments/64skvj/packet_bbs_in_san_francisco/

Some prefer software TNCs (free, cross-platform, and fully functioning so long as the computer doesn't go to sleep) like Direwolf, AGWPE, or UZ7HO. Many folks like using a software TNC combined with a SignalLink (USB bidirectional audio card) to avoid tying up the primary system speakers/mic with packet. For a hardware TNC, I personally have an AEA PK-88, which has fewer functions than the KPC-3P, but does fine enough for me (especially for the price I got it). Some radios (e.g. Kenwood TM-D710G) have built-in hardware TNCs, which eliminates one of the biggest hurdles: connecting the TNC to the transceiver.

Instead of Outpost, I prefer running a serial terminal with automatic logging (Putty on Windows or Minicom in Linux).

A monoband radio isn't necessarily ideal. It depends on whether or not you want to devote a radio to packet. I personally prefer to have only dualband radios (or better) to conserve desk space, ideally true dual-channel radios (e.g. Kenwood TM-V71A), allowing voice and data at the same time. I don't necessarily leave packet running all day, unless it's part of an activation.

The cable between the computer and TNC is typically just a USB to DB9 straight-through (not null) serial cable, possibly with a DB9 to DB25 adapter, depending on your TNC.

As mentioned above, the hardest (or most annoying) part of it all is to make (or buy) the cable between the TNC (or computer, if using a software TNC) and the transceiver. The cables may be able to be found by searching online, or fabricated by combining the right connectors (e.g. from Digikey) and soldering them according to the TNC's and radio's operating manuals. (Debugging can be a pain, and depending on your soldering skills, may require periodic repair when solder joints break.)

To debug, check each of the 4 lines (Gnd, Rx, PTT, Tx) with an ohmmeter, then test each of the operation of each of the 3 functions (Rx, PTT, Tx) individually. (The AEA PK-88 manual has decent instructions how to do this, which are applicable to nearly any TNC.) To test Rx, turn the radio's squelch off, and the TNC's decode (DCD) light should illuminate. You may need to adjust a gain setting on the radio. To test PTT, put the TNC in CONVERSE mode and send a test string (e.g. "TEST TEST TEST TEST DE KJ6LDJ"). Be sure to push Enter at the end of the string to trigger the TNC to start sending. You should see the TNC's SEND light illuminate and the radio key up. To test Tx, do the same as the PTT test, but have a second radio on the same frequency. You should hear the beeps and boops. As with Rx, you may need to adjust a gain setting in the transceiver.

Once the hardware is all set up, the software is generally not as complicated for simple connection to the BBS. With a hardware TNC using Putty or Minicom, simply connect to the serial (COM) port where your serial cable is connected to your TNC and follow the TNC's instructions on how to initialize it. I use 9600 baud to communicate between computer and TNC. Remember that hardware TNC's are generally old! Be gentle!

TNC's generally have 3 operating modes, COMMAND (COM), CONVERSE (CONV), and TRANSPARENT (TRANS). COM and CONV are the only ones I typically use. When you're in COM, stuff you type into Putty is interpreted by the TNC as commands. When you're in CONV, stuff you type into Putty is transmitted (either to all stations "unproto" or to the station you are connected with, with the headers automatically added by the TNC). Typing "CONV" or successfully initiating a connection to another station typically gets you from COM to CONV, and "Ctrl+C" typically gets you from CONV back to COM.

To connect to another station (such as a BBS), run "CONNECT KK6SF-1" (for the ACS BBS, or substitute whatever the desired BBS callsign and SSID is). The "-1" in this case is important to identify the BBS as opposed to other functions that may be available on that TNC; other BBS's may have other SSID's. Generally an SSID of 0 can be omitted (i.e. KJ6LDJ-0 is the same thing as KJ6LDJ). Once connected, send "H" and the BBS will send instructions for its commands. They are typically pretty consistent between BBSs (LM or LB to list my or bulletin messages, SP <callsign> or SB <callsign> to send a private or bulliten message, B for bye to disconnect, etc.).