Categories
HAM

AllStar Hotspot Scheduled Node Connections

⏰ Make connecting to scheduled nets easier on your Allstar node

I'm running ASL3 on a raspberry pi 4 (setup guide) using a knock-off Shari PiHat. Some commands are different in other versions of ASL.
Please test with local monitor commands before connecting with transceive so you're not causing unintended problems with nodes.

Software

You'll need an SSH client to connect to your node
I use OpenSSH in a win11 terminal. You can install this with the command below then run ssh <username>@<ip address> in a terminal. Putty works too. You could also do this in the node's admin page.

Add-WindowsCapability -Online -Name OpenSSH.Client~~~~0.0.1.0

Test Commands

SSH to your node and run a test command below.

sudo asterisk -rx "rpt cmd <node ID> status 12"

You should hear a local time announcement on your radio if everything worked.

Connect Script

Run sudo nano /usr/local/bin/asl-connect-node.sh to create the script. You can use a differnet name just make sure to change in the cron job below.

sudo nano /usr/local/bin/asl-connect-node.sh

A few notes on the script:

  • Change <your_node_id> to your node number before using the script. Do not change $MY_NODE or $TARGET_NODE
  • There are two commands in this script. One will connect in local monitor only mode and the other will connect in transceive mode. Make sure to test for a few weeks/days before using transceive mode.
  • You can remove the # from # sudo /usr/sbin/asterisk -rx "rpt cmd $MY_NODE ilink 3 $TARGET_NODE" to enable transceive mode. Remember to also remove (or add # in the beginning to comment out) the local monitor command.
#!/bin/bash
# Usage: asl-connect-node.net <target_node>

MY_NODE=<your_node_id>

TARGET_NODE=$1

# Disconnect all current links
sudo /usr/sbin/asterisk -rx "rpt cmd $MY_NODE ilink 6"

# Wait 30 seconds
sleep 30

# Connect to target node

# Local monitor only (testing) - delete this when done testing
sudo /usr/sbin/asterisk -rx "rpt cmd $MY_NODE ilink 8 $TARGET_NODE"

# Transceive (live) - uncomment when done testing 
# sudo /usr/sbin/asterisk -rx "rpt cmd $MY_NODE ilink 3 $TARGET_NODE"

Here's a copy of the script on github

Press ctrl+x then Y then enter to save and exit.

Make the script executable with sudo chmod +x /usr/local/bin/asl-connect-node.sh

sudo chmod +x /usr/local/bin/asl-connect-node.sh

Test the command by running sudo /usr/local/bin/asl-connect-node.sh <test node ID>

sudo /usr/local/bin/asl-connect-node.sh <test node ID>

Your node will disconnect from any nodes, wait 30 seconds, then connect to the test node ID.
The command may appear to freeze while it's sleeping for 30 seconds between disconnect and connect commands

Schedule connections

You can use cron to run this script on a schedule to automatically connect to nodes for nets.

Run sudo crontab -e to edit cron jobs.

sudo crontab -e

You may see the prompt below asking to select an editor. Press enter to use nano unless you have a preference.

no crontab for root - using an empty one
Select an editor. To change later, run select-editor again.
1. /usr/bin/vim.nox
2. /bin/nano <---- easiest 3. /usr/bin/vim.tiny 4. /bin/ed Choose 1-4 [2]:

Scroll to the bottom of the file and create an entry for the script you created above.
For example, if you wanted to connect to node 1234 everyday at 8PM you'd use
0 20 * * * /usr/local/bin/asl-connect-node.sh 1234

You can use crontab.guru for help with the time format.

Press ctrl+x then y then enter to save and exit.


allstarnets.org has a good list of scheduled nets

Happy Allstaring!

73
AA0AF