The hosts files that are distributed with DStar Commander, and those which are obtained when performing an update (by sending the HOSTUPDT command in your URCall field), are set up ONLY to connect to reflectors, including all the known XRF, DCS, and REF reflectors.
If you want to connect to the internet gateway on a particular repeater (if, for example it is not normally connected to a reflector), or to a non-public reflector, then you will need to add the gateway to the hosts files yourself. Note that if the target repeater is normally connected to a reflector, it's considered poor form to use the repeater's own gateway rather than the reflector, as most repeater internet gateways have far less bandwidth than most reflectors, and they need to pass internode backbone traffic across that link as well. In other words, if the repeater is connected to a reflector, then it's best to connect your Raspberry Pi gateway there. A number of repeaters are also set up to refuse connections from user nodes directly to the internet gateway.
To add a gateway to your DStar Commander image, it's best to do this in the /root directory...if a hosts file is present there, it is seen and processed first, and if you lock an entry in this top-level hosts file, then it trumps all other hosts sources, including the default hosts files in /usr/local/etc and the online callsign servers. The hosts file in /root is also never bothered by the automatic RF-triggered hosts file updates (those triggered with the HOSTUPDT command). By contrast, if you add entries to the default hosts files in /usr/local/etc, the next time you run the HOSTUPDT command, the hosts file you modified will be overwritten by the new hosts file downloaded from the servers, and you would lose the changes you made (the old file is saved to a .bak file).
For repeaters and both XRF/REF reflectors, you want to place the additional entry or entries into /root/DPlus_Hosts.txt -- note that in Linux, upper/lower case always matters in file names, so DPlus_Hosts.txt is *not* the same as dplus_hosts.txt Run nano or another editor with superuser priveleges (i.e. with "sudo nano" command) to edit the file (if the file doesn't already exist, you will open the editor and then create the file when you save it at the end). The file is a list of gateways, one per line, with the name of the gateway (all caps) followed by a tab or at least one space, followed by the TCP/IP address of the gateway, and optionally followed by a space and an upper-case "L" if the entry is to be locked. Entries for additional gateways go on subsequent lines. For example:
W0ABC 123.45.678.90 L W1CDH 18.104.22.168 XRF666 beelzebub.net L
In the example above, with these lines added to the /root/DPlus_Hosts.txt file, repeater gateways are defined for the W0ABC and W1CDH repeaters, and the W0ABC entry is locked, meaning that if an entry for W0ABC appears in the default hosts file or on the online callsign server, it will be ignored in favor of your entry. An additional nonpublic XReflector, XRF666, is also defined and locked. The locking feature is particularly useful when a repeater or reflector has recently had its IP address changed and the change is not yet reflected on the hosts file servers and/or the online callsign servers.
Note also that, because the /root level hosts file(s) are not touched by the update process, if you make an entry there and lock it, and then that data later changes, you will need to make the correction in the /root level file yourself.
Hello, I am also unable to link with the repeaters. I use DStar Commander v2.01 and DPlus host files are enabled. I have created DPlus_Hosts.txt file via leafpad, copied in repeater (callsigns/ip numbers/port numbers) then saved the file into /root directory. Required ports on my router are open. Everytime DStar Commander is started I can see in the log that system doesn't upload repeater data from the file. Can someone recommend a solution please?
I have deleted port numbers in DPlus_Hosts.txt and saved the file to both directories /root and /usr/local/etc . Restarted DStar Commander to find it still does not link with repeaters. DPlus is Enabled in Gateway Config, DPlus. The file content is not being uploaded during the start as the Log window shows reflectors upload only. Any ideas what elese can I do to fix the problem please?
I just tested DStar Commander V2.01 with the W0CDS repeater definition placed in /root/DPlus_Hosts.txt and it processed the host file entry as it should.
A few possibilities: first, ensure the file is in /root and not the drive's root directory--root and /root are different.
Make sure the filename is exact in spelling, capitalization, and punctuation: e.g. DPlus_Hosts.txt and not Dplus_Hosts.txt, DPLus_Host.txt, DPlus-Hosts.txt etc
Ensure the correct permissions are set on the hosts file, especially if you used an editor external to the pi. At the terminal prompt: sudo chmod 644 /root/DPlus_Hosts.txt Also, make sure your editor respects the Unix linefeed convention, which is different than PC/Windows.
Callsigns must in standard form and be no more than 6 chars...if any of your repeater callsigns are exotic (7+ char or some odd constructions) ircDDBGateway may not recognize it as a valid callsign.
Try putting the lock directive (space "L") at the end of the repeater line...that will force ircDDBGateway to show that the repeater was processed in the ircDDBGateway log file in /var/log. If there's a problem with the host name, it should be apparent in the log then. If it's processed OK, it will show the entry was processed and locked. If it's not there at all, it's likely a permissions or filename problem (see above).
Bob (W6KD) Colorado Springs, CO D*STAR Hangouts: XRF555A (persistently linked to XRF002A) XRF720C (Colorado Front Range reflector)
Hi trying to use root terminal to edit or make a file DExtra_Hosts.txt teminal requires a password tried the normal one raspberry and doesn't work. X terminal reports permission denied.Any help would be welcome Regards Malcolm
Last Edit: Nov 4, 2016 4:48:32 GMT -7 by g4vlz: tried another terminal and still same reply
I am trying to create a static entry for a Fusion YSF. My problem is the PI-Star repeater is on the same external WAN as my YSF Reflector and the outside router wont allow loop back. I want to make an entry for the local LAN IP. I see the method of changing/adding a YSFHosts.txt file in the root directory and I did create that file, my question is in what format is the entry. I have tried modifying what is in the YSFHost.txt file in /usr/local/etc but with no luck.