Saturday, September 21, 2024

AREDN mesh firmware flashing and troubleshooting

 We ran into a lot of issues attempting to flash the AREDN firmware onto Mikrotik hAP ac3's and Ubiquiti Nanobeam 5AC Gen2's, but ultimately prevailed:

hAP ac3

  1. Downloaded TinyPXE Server from http://labalec.fr/erwan/?page_id=958
  2. Downloaded hAP stable firmware (Kernel and Sysupgrade) from https://downloads.arednmesh.org/afs/www/
  3. Left laptop's ethernet adapater to automatic IP address via DHCP
  4. Connected laptop to router (not its WAN port)
  5. Configured simple router:
    1. Disabled wireless (to decrease boot time)
    2. Programmed router's IP address to 192.168.1.253
    3. Programmed router's DHCP server IP pool for 192.168.1.2 to 192.168.1.100
  6. Without power to the hAP, connected the hAP's WAN port (port 1) to the router (not its WAN port)
  7. Confirmed TinyPXE Server's config.ini, [dhcp] section includes "rfc951=1"
  8. Copied the hAP's Kernel file into TinyPXE Server's files/rb.elf
    1. Mistake: I initially copied in the hAP aclite Kernel file instead, as I was updating my personal node. In a later step, flashing fails, as the hAP ac3 knows that it is incompatible with the aclite firmware.
  9. Ran TinyPXE Server and configured per AREDN configuration instructions:
    1. In Option 54 (DHCP Server), selected the IP address of my laptop's Ethernet adapter (192.168.1.2)
    2. Checked "Bind IP"
    3. Boot file, used the file picker to select "files/rb.elf"
    4. Boot file, unchecked "Filename if user-class=gPXE or iPXE"
    5. Clicked "Online"
  10. Held the ac3's Reset button and plugged it into its power supply. Released the Reset button once the "TFTPd: DoReadFile: rb.elf" message was displayed in TinyPXE.
    1. Waited until the messages stopped, including 2 ACKs.
  11. Disconnected the ac3 and laptop from the router. Plugged the laptop into the ac3 (not its WAN port this time).
  12. Navigated in Chrome to the ac3's webpage at http://localnode.local.mesh
  13. Fed it the Sysupgrade file, allowing it to upload to the ac3, reboot twice, and then return to http://localnode.local.mesh
  14. Set the node name (e.g., KK6SF-KIT01-HAP) and admin password
    1. Mistake, maybe: Save and reboot
    2. Correct move: Configure other settings (disable mesh RF, configure LAN access point) as well, save; Advanced Config, enable PoE passthrough, save; then reboot
    3. Bruce thought prior Cache was getting in the way. Earlier, setting changes weren't taking. After entering them and clicking Save, I would get a "site cannot be reached" error. Running in Incognito mode was successful though.

Nanobeam

  1. Confirmed that SCP and SSH were installed.
  2. Download the NanoBeam AC Gen2 (not the XC version) Factory file from https://downloads.arednmesh.org/afs/www/
    1. Issue: Had issues with the stable 3.24.6.0 version, so switched to the 20240921 nightly. Might not have been an issue with the version, and more of the process, in hindsight.
  3. Connected laptop to router (not its WAN port)
  4. Router was configured the same as for the ac3
  5. Connected the router (not its WAN port) to PoE injector's Ethernet port
  6. Connected the PoE injector's PoE Out port to the nanobeam, port 1
  7. Powered on the PoE injector, and thereby the nanobeam
  8. Mistake: attempted to flash the nanobeam via TFTP. It's not necessary and is the incorrect method.
  9. Navigated in Chrome to the nanobeam's webpage at http://192.168.1.20
    1. Confirmed location (United States) and language (English), and agreed to EULA.
    2. Set an admin username and password
    3. Mistake: Attempted to directly upload the AREDN firmware (initially stable 3.24.6.0, then 3.24.4.0, then nightly 20240921) via the Ubiquiti web UI within Setup
    4. Unnecessary: Downloaded updated Ubiquiti firmware 8.7.4 from https://ui.com/download/software/nbe-5ac-gen2 and updated from 8.7.1 via the Ubiquiti web UI within Setup
  10. Copied the AREDEN Factory file to the nanobeam via SCP
    1. Open Command Prompt
    2. Navigate to directory with AREDN firmware in it
    3. Run "scp aredn...factory.bin <user>@192.168.1.20:/tmp/factory.bin
    4. Accepted the identity fingerprint
    5. Mistake: For all but the first nanobeam, I had to delete the entry in "%HOMEPATH%\.ssh\known_hosts" before SCP
    6. Mistake: I configured the username as "root" on the nanobeam's webpage and then used username "admin" on SCP. They need to match, naturally.
    7. Mistake: I once forgot the ":/tmp/factory.bin" and SCP just copied the factory file within my local computer.
  11. Disabled the firmrware checksum and flashed the AREDN firmware
    1. Ran "ssh <user>@192.168.1.20
    2. Ran the sketchy hexdump per AREDN instructions
      1. hexdump -Cv /bin/ubntbox | sed 's/14 40 fe 27/00 00 00 00/g' | hexdump -R > /tmp/fwupdate.real
      2. chmod +x /tmp/fwupdate.real
      3. /tmp/fwupdate.real -m /tmp/factory.bin
    3. Mistake: I started typing in the "hexdump" instruction, but there was too much opportunity for a mistake, so I copied and pasted directly from Chrome into SSH instead.
    4. Wait until "Done" indication
  12. Unplug router from PoE injector, unplug laptop from router, and plug router into PoE injector's Ethernet port.
  13. Navigated in Chrome to http://localnode.local.mesh
  14. Set the node name (e.g., KK6SF-KIT01-DISH1) and admin password
    1. Configured other settings (disabled mesh RF, configured LAN access point, enabled PoE passthrough)
    2. Saved
    3. Rebooted the nanobeam

Amateur radio vanity callsign

 I don't know why the available instructions are so unhelpful to get a personal vanity callsign. The ARRL's guidance (https://www.arrl.org/applying-for-a-vanity-call) isn't too bad. Here are simplified instructions that worked for me:

  1. Go to the FCC License Manager https://wireless2.fcc.gov/UlsEntry/licManager/applicationsSummary.jsp?frnKey=0020294591&newSearchInd=true
  2. Log in
  3. On the right side, click "Apply for a Vanity Callsign"
  4. License type is typically "Primary License."
  5. Complete personal information.
  6. Proceed to and complete certification, with title, "Wireless Operator."
  7. Proceed to CORES to pay.
  8. Log into CORES.
  9. Select applicable FRN.
  10. View/Pay, Awaiting Payment Completion.
  11. Complete the self-explanatory prompts to pay (recommend debit/credit card).

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Ω.