How To Configure IRLP To Return To A Designated Reflector (Home Base)
Have you ever wanted your IRLP node to “camp” out on a specific reflector but also allow users to use the node elsewhere AND automatically return to home base if the user forgets to bring it back?
Would you also like your node to return to the specified reflector after power outages?
Do you also have occasional issues with your PiRLP node getting knocked off the reflector because of the pesky PTTLOCK bug while using the IRLP repeater controller?
If you follow these simple steps, it’s easy! You don’t need any overly-elaborate and invasive scripts to do this. The functionality already exists on every IRLP node, you just have to take a few steps to enable it. This can be used as a work-around which returns your node to the reflector after a PTTLOCK event.
Before beginning you may wish to backup your IRLP installation (or clone the entire SD card) so you can easily restore your node if you screw it up. Since this is a relatively non-intrusive feature, we don’t anticipate any issues.
First, using WINSCP, Putty, nano, or your favorite file editor, open:
Look for: export REFLECT_TIMEOUT_VALUE=1200
Change 1200 to whatever number of seconds you wish the timeout for “user” reflector connections to be. Once set, save the file and close it. The reflector time-out feature will determine how long to stay on the user-selected reflector if there is no local activity.
Change the number in that file (defaults to 1200) to the number of seconds the node should stay connected to other IRLP nodes during a period of inactivity. If you changed the number, be sure to save the file.
Next, we are going to create a bash script that will be called by cron that checks whether there is an active connection or not.
Create a new file called /home/irlp/scripts/go_home owned by repeater with permissions 750.
Inside this file copy and paste the following:
if ls /home/irlp/local/active > /dev/null 2>&1; then
echo Connection is active
/home/irlp/scripts/connect_to_reflector ref9335 notimeout
In the above example, change ref9335 to whatever reflector is your home base, and save the file.
Next, you need to add an entry to /home/irlp/custom/custom.crons (or create custom.crons if it does not exist):
*/10 * * * * (/home/irlp/scripts/go_home &> /dev/null 2>&1)
This cron job runs every 10 minutes and runs the go_home script, which checks for an active connection. You can change it to whatever value you wish, changing it to 2 minutes would get it back to the home reflector more quickly. Be mindful that running it every 1 minute might tax the older Pi nodes a little too much. Be sure to save the file.
Next, from the node’s command line (as user repeater), drop any active connection and run ‘update‘ to refresh the cron list, then use ‘crontab -l‘ to verify the new cron entry.
The above method has been working flawlessly on stn7552 since 6/2/2016.
Written by Justin Reed, NV8Q