Author Topic: 2021-05-02 - DMRGateway-4 Replaced by DMRGateway-5  (Read 3526 times)

0 Members and 1 Guest are viewing this topic.

Offline VE3RD

  • Newbie
  • *
  • Posts: 31
  • Karma: +0/-0

  • Total Badges: 16
    Badges: (View All)
    Level 4 Fifth year Anniversary Fourth year Anniversary
2021-05-02 - DMRGateway-4 Replaced by DMRGateway-5
« on: May 01, 2021, 02:48:34 pm »

DMRGateway-4 by VE3RD

( This file should be used for reference and installation instructions ONLY 
Please install DMRGateway-5
Comments are welcome addressed to ve3zrd@gmai.com)

This software is for use on amateur radio networks only and is to be used for educational purposes only.
Its use on commercial networks is strictly prohibited.
Copyright(C) 2017-2020 by Jonathan Naylor, G4KLX and others
Network 6 added, and 8 digit isolation Code added by VE3RD
---------------------------------------------------------------------------------------
Note added 2023-03-07

DMRGateway-4 will not work on a duplex hotspot in duplex mode. It will work fine in simplex mode. TS1/TS2 can not be used to switch networks but will allow two tg's on the same network.

The primary reason for using DMRGateway-4 is network isolation. Once a network and tg is selected, only that network & tg will be heard.

The pi-star DMRGateway has no network isolation such that if you activate Network 1, 3 4  and 5 then they will compete for access to the radio and you will get mutiple channel switching whenever breaks are heard on the respective talk groups(ie network scanning). The most common solution is to use the 4000 disconnect or switch the network to an unused TG (TGIF 4000), before leaving the network.

Menu for the DMRGateway configuration script (GWConfig)

   1 "Create/Edit the DMRGateway Password File"
   2 "Install DMRGateway & Update /etc/dmrgateway - Basic Mode"
   3 "Install DMRGateway & Update /etc/dmrgateway - 8 Digit Translation Mode"
    4 "Install DMRGateway & Update /etc/dmrgateway - 7 Digit Translation Mode"
    5 "Install DMRGateway NO Config File Update"
    6 "Restore Original DMRGateway Binary File"
    7  "Quit")

  BASIC INSTRUCTIONS
   
  Item 1:
   This will create and/or edit a password file. (Required for a new Install)
   This is used to enable desired networks and allow an off line repostory for
   the Network security codes
   
  Item 2, 3 and 4 Common:
   This will overwrite the /etc/dmrgateway file with a default version and
   will compile a new Binary if required and
   will install the New Binary DMRGateway File
   
  Item 2
   will proceed with a limited configuration Using Basic Mode
   In the Radio CPS use basic 31665 for 31665 on the Server
   Key on Tg 9001 to 9006 to select Network 1 to 6
   This will allow the use of 7 digit talk groups
   
  Item 3
   will proceed with a limited configuration Using 8 Digit Translation Mode
   In the Radio CPS use 14031665 for TG 31665 on Network 4 etc.
   This will allow the use of 7 digit talk groups.
   
  Item 4
   will proceed with a limited configuration Using 7 Digit Translation Mode
   In the Radio CPS use 4031665 for TG 31665 on Network 4 etc.
   This is the same as the default Pi-Star gateway but will not allow
   the use of 7 digit talk groups
   
  Item 5:
   will Ignore the existing Configuration File and
   will Compile a new Binary if Required and 
   will Install the Binary File
   
  Item 6:
   will Restore the Original DMRGateway from /usr/local/bin/DMRGateway.orig
   ( If it exists )
   
  CAUTION: This script can not possibly handle all users special situations
  Use nano /etc/dmrgateway to check and configure what the script misses
   -------------------------------------------------------------------------------------
Note 2021-06-19
The Pi-Star update dated June 17, 2021 overwrites the DMRGateway Binary file with a Pi-Star Default.
Re-Running the ./binupdate.sh script in the DMRGatewa-4 directory will re-install DMRGateway-4 Binary

I have added a script in the DMRGateway-4 directory called GWConfig.sh That will help to install the DMRGateway and
Configure it according to information found in /etc/mmdvmhost.

Follow the instruction indicated below titled INSTALLATION of DMRGateway-4

Log Into Pi-Star via putty and SSH, then issue the following 4 commands
rpi-rw
sudo su
cd DMRGateway-4
./GWConfig #
//Where # is a digit from 0 to 9   representing a hotspot number
You will see a basic instruction page. Press any key to get the actual Menu

 BASIC INSTRUCTIONS

 Item 1:        This will create and/or edit a password file. (Required for a new Install)

 Item 2:        This will overwrite the /etc/dmrgateway file with a default version and will proceed with a limited configuration and
                    will compile a new Binary if required and will install the Binary DMRGateway File

 Item 3:        This will Ignore the existing Configuration File and will Compile a new Binary if Required and will Install the Binary File

--------------------------------------------------------------------------------------
NOTE: 2021-06-09 This DMRGateway has been completely rewritten.
If you are using a previous version the you must update as follows
Log in pi-star via SSH and type the commands as follows
rpi-rw
sudo su
cd DMRGateway-4
make clean
git pull
make clean
make
./binupdate.sh
// Say No to update /etc /dmrgateway
reboot
-------------------------------------------------------------------------------------

The Pi-Star DMRGateway Rules are explained at https://github.com/g4klx/DMRGateway/wiki/Rewrite-Rules

Note 1: READ EVERYTHING BEFORE DOING ANYTHING

Note 2: Unless you have a duplex hotspot running in duplex mode, DO NOT use TS1 in any rules.
MMDVMHOST will change TS1 to TS2 and you WILL have conflicting rules.

Note 3: Start with the Bare Basics Mode.  Get any 2 Networks working and expand it in small Steps

Note 4: 7 Digit mode WILL NOT handle 7 digit talk Groups. Raw Mode and 8 Digit will handle 7 digit Talk Groups. (see below for 8 Digit Rule Set)

Basic: Basic mode requires the control codes 9001-9006 to select Basic Mode and the desired Network.This mode  does not translate the TG Numbers. Ie: 31665 in the radio is sent to the server as 31665 and the return to the radio is also on 31665. The network  is selected by keying up on TG 9001 to 9006 where 9001 selects Network 1 and 9004 selects Network 4. Therefore, to use Network 4, TG31665.  Key up on 9004 then switch to 31665 and key up. This works much the same as the profiles in the Openspot. This mode will handle the 7 digit regular and personal talk group numbers

TRANSLATION: Translation Mode is selected by assigning an eight digit TG Number in your Radio begining with 11 to 16 to select the Network. This mode uses 8 digit TG numbers in the radio and the ReWrite rules translate the the 8 digit TG to a regular or basic TG . Ie: 14031665 in the radio will be translated to 31665 on Network 4 and sent to the server associated with Network 4. The server will respond on 31665 Network 4 and the ReWrite rules will translate it back to 14031665 to the Radio. This mode will normally only handle up to and including 6 digit talk group numbers. 7 Digit talk groups are handled with the following rule. Note: The 14 in 14031665 locks the gateway in to Network 4 so that this rule will work with 7 digit talk groups as follows

TGRewrite1=2,1000001,2,1000001,5599999
Translates as follows
Rewrite RF: 2:TG1000001-TG6599999 -> 2:TG1000001-TG6599999

TGRewrite0=2,1,2,1,9999999      ## in Basic Mode becomes
TGRewrite1=2,14000001,2,1,999999     ## in 8 Digit Translation Mode
Rewrite RF: 2:TG14000001-TG14999999 -> 2:TG1-TG999999

Note 5: When running the DMRGateway DO NOT make changes in the Pi-Star Configuration Page. It will very likely wipe out /etc/dmrgateway and replace it with a generic version. ALWAYS maintain a copy of /etc/dmrgateway

Note 6: The main reason for creating this version of the DMRGateway was to create the isolation between networks. This version will NOT allow any data to go to the radio that is not on the selected Network. Only one network can be active at anytime unlike the stock pi-star gateway that will allow multiple networks to send RF data at any given time and the radio can switch networks in the middle of a conversation.

Note 7: Please avoid the use of Network 3 of the DMRGateway-3  unless you are using one of the DMR2xxx crossovers.

Note 8: The Pi-Star Configuration Script that runs when you hit Apply Changes currently has over 4718 lines of code. This script is looking for BM on Net 1, DMR+ on Net2, HBLink or DMR2xx Crossovers on Net3. Any other use of these first 3 networks is just begging for trouble.

Note 8: An interesting effect that was not really planned but works just fine. If you want to use Basic Mode, you have two options to switch networks. Say you want to select network 4, You can
   a) Select TG 9004 and key-up the switch to your desired TG
   b) Select ANY 8 digit translation Mode TG, key-up, then switch to your basic mode TG
Networks are switched with the application of any tg 9001-9006, or any 8 digit TG

Note 9: Unlike the previous update on DMRGateway-3,  This version handles the Basic and Translation Modes on a single configuration file.

Note 10:These two modes can be used independently using the appropriate Rewrite rule below.  These modes can be used together with the addition  of a Receiver Group for the low TG Number added to the higher TG Channel. For Every 8 Digit TG you program into your radio, put the equivalent basic mode TG into a Receiver Group in the higher numbered TG of the pair. ie for 14031665, program a receiver group of 31665 and program it into the channel for 14031665

Note 11: Some times when you load the /etc/dmrgateway file into the nano editor, you may see a reference at the bottom that it is loading a DOS file. This file has hidden line feeds and will not work correctly. You can fix this issue as follows
Press CTRL-X to save the file.   Answer Y to the prompt then
Press ALT-D and enter and the file will be save without the hidden formatting characters

Note 12: It is highly recommended that this Install should all be done in an ssh session using putty. Especially due to Note 11 and cut and paste from here using a windows machine.

Note 13 If you want to run Brandmeister and/or DMR+, Set them up in the Pi-Star Configuration page before installing the DMRGateway and set The DMR Master server to DMRGateway.

--------------------------------------------------------------------------------------------------
INSTALLATION of DMRGateway-4 (NEW INSTALL)

1) Log into Pi-Star with an SSH Session, preferably putty.
2) Issue the following commands
   rpi-rw   
   sudo su
   git clone https://github.com/ve3rd/DMRGateway-4
   cd DMRGateway-4
   make clean
   make
3) make will compile all the components of the gateway and create a single binary file   DMRGateway
4) Install the new Binary by running the following script. The ./ are important
   ./binupdate.sh
5) Say Yes to the prompt to update /etc/dmrgateway. This will copy the default ./DMRGateway.ini file into the working file /etc/dmrgateway
6) the binupdate.sh script will stop the DMRGateway and replace the binary file in /usr/local/bin/
7) Edit /etc/dmrgateway with your pertinent information

--------------------------------------------------------------------------------------------------
UPDATE: Check for and Update Your DMRGateway-4 Version
1) Log into Pi-Star with an SSH Session, preferably putty.
2) Issue the following commands
   rpi-rw   
   sudo su
   cd DMRGateway-4
   make clean
   git pull
3) This last command will either tell you that you are up to date or will download the newer version
4) If a newer version is downloaded you MUST issue the following commands to install it, this will not re-install or modify your config files
   make clean
   make
   ./binupdate.sh
5) Say No to the prompt to update /etc/dmrgateway
--------------------------------------------------------------------------------------------------

BARE BASICS

Note if this is a new install, most of this will have been done for you, All you need to do is modify the /etc/dmrgateway file with your parameters, ie:
Radio frequencies, digital Id's, passwords and personal information

If you are modifying a stock Pi-Star DMRGateway, then most of the following will need to be performed

1) Cut and paste the following into your etc/dmrgateway file
item 1) above is optional Optional - It may Not be required for DMRGateway-4 as the Installation script (binupdate.sh) will create the file with most of the default settings. You should only need to edit /etc/dmrgateway for  RF Frequency, Digital ID, Passwords and Personal Information.

2) Replace the ****** code with your own parameters.

3) Remove the comment lines that are marked ####


[General]
RptAddress=127.0.0.1
RptPort=62032
LocalAddress=127.0.0.1
LocalPort=62031
RuleTrace=1
#### The following StartNet rule is NEW and sets the Network you want to be on when the DMRGateway starts
StartNet=4
#### The following NetMode rule is NEW and sets the Mode you wish to Start in(0,7,8)
NetMode=0
Daemon=1
Debug=1
RFTimeout=5
NetTimeout=5

[Log]
DisplayLevel=0
FileLevel=2
FilePath=/var/log/pi-star
FileRoot=DMRGateway

[Voice]
Enabled=0
Language=en_US
Directory=/usr/local/etc/DMR_Audio

[Info]
Latitude=****
Longitude=******
Location=******
Description="CA"
URL=https://www.qrz.com/db/****
RXFrequency=******
TXFrequency=*******
Enabled=1
Power=1
Height=0

[XLX Network]
Enabled=0
Id=*****
Startup=000
File=/usr/local/etc/XLXHosts.txt
Port=62030
Password=passw0rd
ReloadTime=60
Slot=2
TG=6
Base=64000
Relink=60
Debug=0
UserControl=1

[DMR Network 1]
Enabled=1
Name=****** Your Selected BM Server
Id=*******01
Address=******  Your selected BM Server IP Address
Password=******
# This TGRewrite0 handles all tg's up to and including 7 digit  (7x9's)
TGRewrite0=2,1,2,1,9999999
# This TGRewrite1 handles the 8 Digit control code TG;s to switch to this network (6x9's)
TGRewrite1=2,11000001,2,1,999999
PCRewrite0=2,11009990,2,9990,1
PCRewrite1=2,9990,2,9990,1
SrcRewrite0=2,9990,2,****,1     
## Where **** is the call sign in your Radio
Port=62031
Local=62035
Location=0
Debug=0

[DMR Network 2]
Enabled=0
Name=DMR+_IPSC2-CAN-TRBO
Id=**********
Address=209.226.17.178
Password="PASSWORD"
Port=55555
# Basic Mode - Seven Digit TG's = seven 9's
TGRewrite0=2,1,2,1,9999999
# This TGRewrite0 handles the 8 Digit control code TG;s to switch to this network    Six 9's
TGRewrite1=2,12000001,2,1,999999

[DMR Network 3]
Enabled=0
Name=HBLink


[DMR Network 4]
Enabled=1
Name=TGIF_Network
Address=tgif.network
Port=62031
Local=62038
Id=*******04
Password=**********
# Basic Mode handles tg 1 to 9999999 Seven 9's
TGRewrite0=2,1,2,1,9999999
# This TGRewrite1 handles the 8 Digit control code TG;s to switch to this network and up to 6 digit tg"s 1-999999 (Six 9's)
TGRewrite1=2,14000001,2,1,999999
TGRewrite2=2,1,2,1,9999999                  ### Use this rule in 8digit mode to handle 7 digit tg's
PCRewrite0=2,9990,2,9990,1
PCRewrite1=2,14009990,2,9990,1
SrcRewrite0=2,9990,2,YourCall,1
Location=0
Debug=1


######  Leave This disabled until you get Network 1 and 4 Running
[DMR Network 5]
Enabled=0
Name=MNet_Network
Address=mnet.hopto.org
Port=62031
Local=62039
# Basic Mode -7 Digit TG;s  Seven 9's
TGRewrite0=2,1,2,1,9999999
# This TGRewrite1 handles the 8 Digit control code TG;s to switch to this network (Six 9's)
TGRewrite1=2,15000001,2,1,999999
PCRewrite0=2,15009990,2,9990,1
SrcRewrite0=2,9990,2,YourCall,1
Password=*************
Id=*******05
Location=0
Debug=1

#### The following Network 6 is ONLY available in the DMRGateway-4 by VE3RD
[DMR Network 6]
Enabled=0
Name=TGIF_Network
Address=tgif.network
Port=62031
Local=62037
Id=302395444
#Basic Mode  Seven 9's This will handle up to 7 digit tg's from 1 to 9999999
TGRewrite0=2,1,2,1,9999999
#Translation Mode - Six 9's This will only handle tg;s from 1 to  approximately 77600 depending on your radio
#The maximum theoretical TG number is 2^24=16777216 but some radios's won't go quite this high
TGRewrite0=2,16000001,2,1,999999
PCRewrite0=2,9990,2,9990,1
PCRewrite0=2,16009990,2,9990,1
SrcRewrite0=2,9990,2,YourCall,1
Password=passw0rd
Location=0
Debug=1

[GPSD]
Enable=0
Address=127.0.0.1
Port=2947

[APRS]
Enable=1
Address=127.0.0.1
Port=8673
Description=APRS for DMRGateway
Suffix=DMR

[Dynamic TG Control]
Enabled=1
Port=3769


___________________________________________________________
Special Instructions to handle 7 digit talk groups from a radio that will NOT Handle 7 Digits Using Basic Mode

Some radio's will not allow you to use 7 digit talk groups. ie: TYT MD420
In basic Mode use something like this to access a seven digit tg like 3023954
TGRewrite0=2,4354,2,3023954,1
This rule will translate TG4354 in the radio to 3023954 at the server and the response on 3023954 will come back to TG4354 in the radio.
This use of TG 4354 is strictly between your radio and hotspot, it will not affect any real world tg on 4354.
Just make sure that you do not use a number that corresponds to a real TG that you may plan to use in the future.
Check the server list and find a number that is not used

------------------------------------------------------------------------------------
PARROT   ( May Not be Implemented Yet on the New TGIF Server )

The call to the parrot on TGIF  will be any of the following
Private or Group Call to 9990.
Private or Group Call to 31000
If you use a private call, make sure that is registered as a private call in your Contact List
If you use Translation mode the full 8 digit tg must be registered as a private call
The DMRGateway (Translation Mode) will convert the Radio Private Call on 14009990 to a Private Call on 9990 and send it to the server
The SrcRewrite Rule will trap the Private Call coming from the Server on 9990 send it to the radio via the call sign or digital ID assigned in the Radio
This works in both modes

On MNET, the Parrot uses a Group Call to 9999

-----------------------------------------------------------------------------------------
INSTRUCTION to Restart the Gateway After Configuration changes

If for any reason you need to modify the /etc/dmrgateway configuration file for the DMRGateway you must issue the following command
sudo dmrgateway.service restart ; mmdvmhost.service restart
You can watch the log file as it starts up with the following command.
   tail -f -n 100 /var/log/pi-star/DMRGateway-2021-04-27.log    This is a date named file name that changes at midnight UTC. Replace the date with the current date file,

You can exit the log file with a ctrl-c
------------------------------------------------------------------------------------------
Contact Information

Phil VE3RD
ve3zrd@gmail.com

--------------------------------------------------------------------------------------------
If you have just read this file for the FIRST Time,   READ IT AGAIN
« Last Edit: November 23, 2023, 08:41:17 pm by VE3RD »

Offline KK4VOB

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
  • Call Sign: KK4VOB

  • Total Badges: 4
    Badges: (View All)
    First Post Level 1 Search
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #1 on: May 04, 2021, 08:31:28 pm »
So far so good, It appears to be working fantastically! Thanks for this. :)

Offline Curt-KU8L

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
  • Call Sign: KU8L

  • Total Badges: 4
    Badges: (View All)
    Search First Post Level 1
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #2 on: May 06, 2021, 10:38:05 am »
Took a couple of reads because I don't use Linux often enough.  Got it all entered and it worked perfectly so far.  There is so much stale or plain incorrect info out there regarding the gateway, none of the samples worked for me--continued getting routine disconnects.  I am convinced it was all because the samples I used contained mismatched port assignments on 127.0.0.1 and they all had TS1 translation lines.  All seems to be good now....thanks Phil.


Offline Curt-KU8L

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
  • Call Sign: KU8L

  • Total Badges: 4
    Badges: (View All)
    Search First Post Level 1
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #3 on: May 06, 2021, 10:41:22 am »
Newbie question for Phil.

What drove the decision to use two digit Network assignment numbers (11-16) versus the (apparent common)  single digit (1-6) method?

Just curious..

TU

Offline VE3RD

  • Newbie
  • *
  • Posts: 31
  • Karma: +0/-0

  • Total Badges: 16
    Badges: (View All)
    Level 4 Fifth year Anniversary Fourth year Anniversary
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #4 on: May 06, 2021, 04:59:39 pm »
The trigger to go two digit numbers was the use of 7 digit talk groups on tgif. Example I needed to differentiate between a 7 digit tg 3023954 used on Net4 vs 3023954 which was tg 23954 on network 3 14031665 is not used as a TG and 3023954 is caught by the rewrite rule with 9999999 as a 7 digit TG

Offline Curt-KU8L

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
  • Call Sign: KU8L

  • Total Badges: 4
    Badges: (View All)
    Search First Post Level 1
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #5 on: May 06, 2021, 09:02:08 pm »
Thanks Phil..I see
Realized I wasn't quite good to go yet.  As long as I used Translation it seems to work on the simple test I made.

I really need to get the Basic method going since it seems easier for a large number of different TG's across two Networks.

I cannot get the HS to switch networks. 

I noticed a difference in the Net 1 and Net 4 config lines between what was created via the SSH install that I followed and the list posted for cut and paste above.  Much differences in the translation lines.  Perhaps something did not work properly for the SSH install.

So I cut and pasted just the two paragraphs for Network 1 and Network 4 where the differences were.  (the file from the ssh instal did not have the conversions for the 9xxx control inputs.

This is still no go.  I can see the radio sending the expected info but the HS wont switch.

Is there a config that needs to be in the pi-star Remote file to make this work???  Also should the 9xxx be group or private calls?   Running a Simplex HS Pi-star v 4.1.4 with latest updates.

If I force the system to switch to BM or TGIF, It seems to OK and I can see and talk with other stations.  The networks are never dropped like before.

Sorry for the perhaps basic questions....it seems so close to working.or your

Thanks Again for your work and help.

Curt  KU8L

Offline n0svc

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
  • Call Sign: n0svc

  • Total Badges: 4
    Badges: (View All)
    First Post Level 1 Search
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #6 on: May 16, 2021, 02:17:56 pm »
Could I get a little clarification? I'm probably missing it your info.

Ok, for an example, my home hotspot is normally connected to 3 BM tg (not very active) on Net 1 and tgif on net 4. I keep my radio in promiscuous mode so I can listen to what ever is active. Sometimes I disconnect tgif so it doesn't interrupt a net on the a BM tg. With your system I could just key up tg 9001 and that would lockout the others. Ok, I think I got that so far. Now, how do I open it up to all networks again, whatever is active?

And kind of in the same area, if I key up an 8 digit tg, ie. 14031665, will that put it on net 4 only? or will that just switch net 4 to 31665 leaving the rest (other nets) active?

Offline N5UNB

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
  • Call Sign: N5UNB

  • Total Badges: 3
    Badges: (View All)
    First Post Level 1 Windows User
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #7 on: May 27, 2021, 07:48:47 pm »
Eureka!!   With shrewd assistance from Phil, this now works on my TGIF 3.5" Hotspot!

The critical step I missed as a newby with DMR was the need to FIRST use the Pi-Star configuration page to set DMRGateway as the DMR Master!  Both TGIF and BM need to show at the bottom of the Pi-Star Dashboard page before all the programming Phil wrote can work.

I needed to do this BEFORE going into Putty and installing the DMRGateway-4 program and configuration files with the commands Phil provided.

Rookie error on my part. 

If you are struggling to get this to work, make sure you have DMRGateway setup as the DMR Master.  Along with your preferred BM Master, also on the Pi-Star configuration page.

Then don't make any changes on the Pi-Star Configuration page after you install DMRGateway-4.

Cheers.  And THANK YOU, Phil!

Offline ve3ny

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0

  • Total Badges: 11
    Badges: (View All)
    Apple User Mobile User Combination
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #8 on: May 29, 2021, 08:46:33 am »
Hello Phil,

Is this the right syntax for the DMR2YSF crossover stanza? I just cut and pasted the stanza from the standard DMRGateway.ini.

Tom VE3NY


[DMR Network 3]
Enabled=0
Name=DMR2YSF_Cross-over
Id=302328403
Address=127.0.0.1
Port=62033
Local=62034
TGRewrite0=2,7000001,2,1,999998
SrcRewrite0=2,1,2,7000001,999998
PCRewrite0=2,7000001,2,1,999998
Password="PASSWORD"
Location=0
Debug=0

Offline VE3RD

  • Newbie
  • *
  • Posts: 31
  • Karma: +0/-0

  • Total Badges: 16
    Badges: (View All)
    Level 4 Fifth year Anniversary Fourth year Anniversary
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #9 on: June 08, 2021, 08:43:54 am »
That looks like the default stanza created by Pi-Star when you set the DMR2YSF Mode
This WILL NOT work with my DMRGateway-4
Try This

[DMR Network 3]
Enabled=1
Name=DMR2YSF_Cross-over
Id=?????????
Address=127.0.0.1
Port=62033
Local=62034
##Translation Mode
TGRewrite0=2,13000001,2,1,999998
Password="PASSWORD"
Location=0
Debug=0

or
##Basic Mode
TGRewrite0=2,1,2,1,999998

« Last Edit: June 08, 2021, 08:55:45 am by VE3RD »

Offline K4DFD

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
  • Call Sign: K4DFD

  • Total Badges: 4
    Badges: (View All)
    First Post Level 1 Search
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #10 on: December 23, 2021, 11:35:54 am »
I have this working for BM and TGIF. I can access all BM and TGIF Talkgroups except for my own TGIF Talkgroup that uses my DMR ID as the Talkgroup ID. I am not sure how to make a rewrite to get access to it since it is seven digits already. Here's my Network-4 info:

[DMR Network 4]
Enabled=1
Name=TGIF_Network
Address=tgif.network
Port=62031
Local=62038
Id=318595601
Password="xxxxxxxx"   
TGRewrite0=2,1,2,1,9999999
TGRewrite1=2,14000001,2,1,999999
PCRewrite0=2,9990,2,9990,1
PCRewrite1=2,14009990,2,9990,1
SrcRewrite0=2,9990,2,K4DFD,1
Location=0
Debug=1


Any suggestions are appreciated.

73's
Chris

Offline WY7JT

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
  • Call Sign: WY7JT

  • Total Badges: 5
    Badges: (View All)
    Linux User Topic Starter First Post
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #11 on: January 03, 2022, 04:41:54 pm »
There are times I want to use Phil's DMRGateway and times I like the original DMRGateway. If you save your main DMRGateway config file and Phil's config file, along with the versions of DMRGateway, you can use a simple bash script to switch between them. The original DMRGateway is good for monitoring multiple networks and talk groups if not too busy as well as having access to XLX reflectors. Phil's can be advantageous for using actual talk group numbers along with isolating networks, using 7 digit personal talk group numbers on TGIF, or if monitoring busy talk groups on mulitple networks and switching between them.

I setup /etc/dmrgateway.old and /etc/dmrgateway.3rd for the DMRGateway config files, which then can be copied to /etc/dmrgateway

Also setup /usr/local/bin/DMRGateway.old and /usr/local/bin/DMRGateway.3rd to be copied to /usr/local/bin/DMRGateway

Bash script to change to Phil's version, file gw4 (chmod +x):
Code: [Select]
#!/bin/bash
systemctl stop mmdvmhost dmrgateway
sleep 1
mount -o remount,rw /
cp /etc/dmrgateway.3rd /etc/dmrgateway
cp /usr/local/bin/DMRGateway.3rd /usr/local/bin/DMRGateway
systemctl restart mmdvmhost dmrgateway
mount -o remount,ro /
echo Installed VE3RD DMRGateway 4 configuration

Bash script to switch back to default DMRGateway, file gw (chmod +x):
Code: [Select]
#!/bin/bash
systemctl stop mmdvmhost dmrgateway
sleep 1
mount -o remount,rw /
cp /etc/dmrgateway.old /etc/dmrgateway
cp /usr/local/bin/DMRGateway.old /usr/local/bin/DMRGateway
systemctl restart mmdvmhost dmrgateway
mount -o remount,ro /
echo Restored original DMRGateway configuration

I just have the files in the /home/Pi-Star directory. Then to execute from the home directory, sudo ./gw4 or sudo ./gw

This also makes restoring the DMRGateway config files easy if Pi-Star wrecks them as it's prone to do. If you use Pi-Star to edit the file, be sure to copy it to the .old or .3rd files to preserve the change. Or just edit those files directly and run the script to install. The bash scripts could be improved but just what I came up with on the fly to switch between them easily. It would be neat if this functionality was built into DMRGateway itself.

Offline n9mfk

  • Newbie
  • *
  • Posts: 3
  • Karma: +0/-0
  • Call Sign: n9mfk

  • Total Badges: 6
    Badges: (View All)
    Level 2 Search Topic Starter
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #12 on: January 14, 2022, 08:44:52 am »
Hi
how can I find an original copy of the  /usr/local/bin/DMRGateway ?
thanks

Offline VE3RD

  • Newbie
  • *
  • Posts: 31
  • Karma: +0/-0

  • Total Badges: 16
    Badges: (View All)
    Level 4 Fifth year Anniversary Fourth year Anniversary
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #13 on: April 18, 2022, 10:50:22 am »
something I forgot to mention
When running my DMRGateway-4, and you send a control TG of 9000, The DMRGateway will turn off all filtering and respond exactly like the original pi-star DMRGateway.
There is no need to manually switch between the original pi-star gateway and my DMRGateway-4.

Offline VE6PLC

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0

  • Total Badges: 6
    Badges: (View All)
    Level 2 Level 1 Second year Anniversary
Re: 2021-05-02 - Brand New DMRGateway-4 Ready Now
« Reply #14 on: April 25, 2022, 02:57:00 pm »
Hi, Phil. I really like your DMRGateway-4! Thanks for it. I am using it in Basic mode and have BM and TGIF working fine. I have DMR2YSF working with YSF TG's but it doesn't seem to like FCS. In the stock DMRGateway, prefix 70 is used for YSF and 71 is used for FCS. Does DMRGateway-4 support FCS? If so, how do I configure it in my radio and do I need to add any special TGrewrite rules to dmrgateway? Here is how I have Network 3 configured:
[DMR Network 3]
Enabled=1
Name=DMR2YSF_Cross-over
Id=302605301
Address=127.0.0.1
Port=62033
Local=62034
TGRewrite0=2,1,2,1,999998
Password="PASSWORD"
Location=0
Debug=0

 

Related Topics

  Subject / Started by Replies Last post
4 Replies
603 Views
Last post June 29, 2021, 10:32:21 am
by WX5OU
1 Replies
4908 Views
Last post December 16, 2021, 08:29:07 am
by ka4udx
6 Replies
506 Views
Last post August 13, 2021, 11:16:36 pm
by WB3IHY
0 Replies
290 Views
Last post May 01, 2022, 01:08:42 pm
by VE3RD
0 Replies
504 Views
Last post June 09, 2023, 05:27:39 pm
by VE3RD

TGIF Network - Thank God It's Friday!