Date   

ASL to DMR Bridge...reading talkgroups

Gregory Heinrichs
 

I can change the talkgroup via code below, i was wondering it there is a way to read it as well?
[code]
_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
cmd = struct.pack("BB", 0x05, len(cmd))[0:2] + cmd
# Set the second value below to match the rxPort in the [AMBE_AUDIO] stanza of Analog_Bridge.ini
_sock.sendto(cmd, ('127.0.0.1', 31100))
_sock.close()
[/code]


Re: XLX 2 XLX Connection

Florian Wolters
 

Hi David,

why don't you use the built-in XLX interlink protocol?

vy73 de Florian DF2ET


Am 15.11.18 um 17:32 schrieb david bencini ik5xmk:

Hello, sorry if I'm possibly mistaken group. Can you tell me the
procedure to activate, if possible, a connection (I suppose using
MMDVM_Bridge) between two XLX (example module B) but using a native
DSTAR protocol, such as DEXTRA or DCS? The comparison is with the old
XRF which for many reasons is no longer advisable to use it.
 
Thank you, 73
David IK5XMK


XLX 2 XLX Connection

david bencini ik5xmk
 

Hello, sorry if I'm possibly mistaken group. Can you tell me the procedure to activate, if possible, a connection (I suppose using MMDVM_Bridge) between two XLX (example module B) but using a native DSTAR protocol, such as DEXTRA or DCS? The comparison is with the old XRF which for many reasons is no longer advisable to use it.
 
Thank you, 73
David IK5XMK


Re: ASL to DMR Bridge...changing talkgroups

Steve N4IRS
 
Edited

OK,
Now we have a script to change TG "on the fly" Let's make it available to DTMF and Allmon.
First we need ASL to execute the script from within. There is more then one way to do this. I'll use the internal command.
Lets assume you placed the script in /usr/local/sbin and called it tune.sh
You can run the program from the Linux command prompt with /usr/local/sbin/tune.sh 1234 to tune to TG 1234

Let's add it to rpt.conf
To run a external script the ASL command is:
4321=cmd,/usr/local/sbin/tune.sh 1234 (This ASSUMES 4321 is not in use nor is 43 or 432) 
When a user on the node sends *4321 ASL will execute the script /usr/local/sbin/tune.sh with a parameter of  1234

So far so good? Now let's add it to Allmon2
in the allmon directory is a file, controlpanel.ini in that file as a example you will find:

labels[] = "Say Time of Day (local only) the TT way"
cmds[] = "rpt fun %node% *74"
 
Lets add a command. Copy and edit above:
labels[] = "Tune DMR to Talk Group 1234"
cmds[] = "rpt fun %node% *4321"

Poof! you have added a command to Allmon2 which will tell ASL to execute the script.
Clear as mud?

73, Steve N4IRS 
 


Re: Multiple private nodes connected to different talkgroups

 

Perfect, I think that will give me plenty of homework.... I'll give it a try after the holidays! 

Thanks so much for all your help and support! 

Appreciate all you do for this hobby!

On Wed, Nov 14, 2018, 2:02 PM Steve N4IRS <szingman@... wrote:
systemctl enable analog_bridge enables the systemd unit analog_bridge.service in /lib/systemd/system. It is a test file and can be copied / edited.
It's job is the setup the environment for the program and start / stop the program
I have bolded the places you will need to change.
 
root@stn2600:~# cat /lib/systemd/system/analog_bridge.service
[Unit]
Description=Analog_Bridge for AMBE Service
# Description=Place this file in /lib/systemd/system
# Description=N4IRS 04/20/2018

# The device name should point to the
# port the mmdvm is plugged into.
# For USB ports (Arduino Due)
# BindTo=dev-ttyACM0.device
#
# To make the network-online.target available
# systemctl enable systemd-networkd-wait-online.service

After=network-online.target syslog.target netcheck.service
Wants=network-online.target

[Service]
Type=simple
StandardOutput=null
WorkingDirectory=/opt/Analog_Bridge
Environment=AnalogBridgeLogDir=/var/log/dvswitch/Analog_Bridge
# Environment=LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Restart=always
RestartSec=3
ExecStart=/opt/Analog_Bridge/Analog_Bridge /opt/Analog_Bridge/Analog_Bridge.ini
ExecReload=/bin/kill -2 $MAINPID
KillMode=process

[Install]
WantedBy=multi-user.target

Simply copy analog_bridge.service to blabla.service in the same directory and edit to taste.
You can then:
systemctl status blabla
systemctl enable blabla
systemctl start blabla
systemctl stop blabla

The private node stanza [1999] for rpt.conf is at the top of the document https://docs.google.com/document/d/1eN50Csr29eAprBu7eKA0Bfa2XUcsXw5iktY1Ey-Qjkg/edit

73, Steve N4IRS
 
On 11/14/2018 2:45 PM, Russell, KV4S wrote:
very much so, thanks Steve.

Next question, what will these statements look like? 
systemctl enable analog_bridge
systemctl start analog_bridge
because if you copy contents the program has the same name? how does the service know which is which or maybe on linux it doesn't matter?
:/opt/Analog_Bridge$ dir 
Analog_Bridge Analog_Bridge.ini

Can you point me in the right direction for setting up a private node? do I just copy my main node stanza and make it a number like 1999, 1998 ect? Seems like there was one there but i think i overwrote it.

On Wed, Nov 14, 2018 at 10:39 AM Steve N4IRS <szingman@...> wrote:
Russell,
As per usual there is more then one way to do this. He is a simple one:
Create 4 subdirectories:
mkdir MMDVM_Bridge_TG_1234
mkdir  MMDVM_Bridge_TG_9876
mkdir Analog_Bridge_TG_1234
mkdir Analog_Bridge_TG_9876

Copy the contents of /opt/MMDVM_Bridge into the new MMDVM_Bridge directories.
Copy the contents of /opt/Analog_Bridge into the new Analog_Bridge directories.
Setup MMDVM_Bridge_TG_1234 to connect to TG 1234 on BM as normal
Setup Analog_Bridge_TG_1234 to connect to TG 1234 as normal and point it at Private node 1234

The assumption is you used the default port numbers Check your work.
Now come the change, You can not reuse the port numbers you chose for TG 1234 so:
In the MMDVM_Bridge_TG_9876 directory edit DVSwitch.ini to change the port numbers in the [DMR] stanza
Make it easy to see the change
[DMR]
Address = 127.0.0.1             ; Address to send AMBE TLV frames to (export)
TXPort = 36100                     ; Port to send AMBE TLV frames to (export)
RXPort = 36103                     ; Port to listen on (import)
Slot = 2                                   ; Export slot

In the Analog_Bridge_TG_9876 directory edit Analog_Bridge.ini to change the port numbers in the [AMBE_AUDIO] stanza
Match the ports use in DVSwitch.ini
[AMBE_AUDIO]
address = 127.0.0.1                     ; IP address of xx_Bridge
txPort = 36103                          ; Transmit TLV frames to partner on this port
rxPort = 36100                          ; Listen for TLV frames from partner on this port

As with MMDVM_Bridge <-> Analog_Bridge where you can not reuse the port numbers, It's the same for Analog_Bridge <-> ASL.
In the Analog_Bridge_TG_9876 directory edit Analog_Bridge.ini to change the port numbers in the [USRP] stanza
[USRP]
address = 127.0.0.1                     ; IP address of USRP partner (Allstar/Asterisk or another Analog_Bridge)
txPort = 38001                          ; Transmit USRP frames on this port
rxPort = 39001                          ; Listen for USRP frames on this port

Match the above port numbers for private node 9876 in rpt.conf

Does that help?

73, Steve N4IRS

On 11/14/2018 11:18 AM, Russell, KV4S wrote:
I don't have a lot of experience with private nodes but I've been working on a personal hub that is working fine with DVSwitch.

What I envision is having multiple instances of the DVSwitch (Analog/MMDVM/DVSwitch) with each instance using a different talk group. I would dedicate a private node to the different talk groups then use the main hub (public) to connect to the private nodes on the fly using  Allmon to link up the different private nodes. I would need to move the existing TG from the public hub to a private so by default nothing is linked unless I tell it to in Allmon.

I also do know how to setup multiple instances of DVSwich.

Any guidance on this?



Re: ASL to DMR Bridge...changing talkgroups

Steve N4IRS
 

we are behind in documenting a LOT of what the different programs will do. mea culpa

Here is a shell script for changing TGs on the fly when using Analog_Bridge and MMDVM bridge connected to BM.

#!/bin/bash

# /*
#  * Copyright (C) 2018 N4IRR
#  *
#  * Permission to use, copy, modify, and/or distribute this software for any
#  * purpose with or without fee is hereby granted, provided that the above
#  * copyright notice and this permission notice appear in all copies.
#  *
#  * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
#  * REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
#  * AND FITNESS.  IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
#  * INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
#  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
#  * OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
#  * PERFORMANCE OF THIS SOFTWARE.
#  */

function tune() {
python - <<END
#!/usr/bin/env python

import sys
import socket
import struct

cmd = "txTg=$1"
_sock = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
cmd = struct.pack("BB", 0x05, len(cmd))[0:2] + cmd
# Set the second value below to match the rxPort in the [AMBE_AUDIO] stanza of Analog_Bridge.ini
_sock.sendto(cmd, ('127.0.0.1', 31100))
_sock.close()

END
}

tune $1

Don't forget to mark the script executable chmod +x tune.sh
Assuming the script is named tune.sh and the rxPort is set to 31100 in Analog_bridge.ini start the program with:
./tune.sh 1234
Where the desired TG is 1234
Send a quick PTT on the analog side and you will be tuned to TG 1234

There is quite a list of possible commands available. Some are dependent on the mode. Along with the other 1001 things we need to do we will try to get the info out.

Steve N4IRS

On 11/13/2018 5:08 PM, Michael Weaver wrote:
I didn't get Mike Z's code working out of the box and haven't had time to troubleshoot his yet.  My setup allows you to enter *8711 and then the talkgroup number you want to connect to.  the extenstions.conf will strip off the leading 1 and pass the variable into tg_connect.py.  The python script will read the ini, update txTg, write the ini file(side effect of removing all comments), and restart the analog bridge.  Backup your ini file first!

rpt.conf
871 = autopatchup,context=command_radio,noct=1,farenddisconnect=1,dialtime=20000,quiet=1

extensions.conf
[command_radio]
exten => _1X.,1,SayDigits(${EXTEN:1})
exten => _1X.,n,System(/scripts/tg_connect.py ${EXTEN:1})
exten => _1X.,n,Wait(2)
exten => _1X.,n,Hangup()

tg_connect.py
#!/usr/bin/env python
 
import sys
import socket
import struct
import os

#import parser
from ConfigParser import SafeConfigParser

#store cmd line arg
new_txTg = sys.argv[1]

#strip off first character
#new_txTg = new_txTg[1:]

#read config file
parser = SafeConfigParser()
parser.read('/opt/Analog_Bridge/Analog_Bridge.ini')
print "Existing talkgroup is: " + parser.get('AMBE_AUDIO', 'txTg')
print "Desired talkgroup is: " + new_txTg
 
#set config file
parser.set('AMBE_AUDIO', 'txTg', new_txTg)
 
#writing our configuration file to
with open('/opt/Analog_Bridge/Analog_Bridge.ini', 'wb') as configfile:
    parser.write(configfile)

#verify
parser.read('/opt/Analog_Bridge/Analog_Bridge.ini')
print "New talkgroup is: " + parser.get('AMBE_AUDIO', 'txTg')

#restart bridge
os.system('systemctl restart analog_bridge')


Re: Multiple private nodes connected to different talkgroups

Steve N4IRS
 

systemctl enable analog_bridge enables the systemd unit analog_bridge.service in /lib/systemd/system. It is a test file and can be copied / edited.
It's job is the setup the environment for the program and start / stop the program
I have bolded the places you will need to change.
 
root@stn2600:~# cat /lib/systemd/system/analog_bridge.service
[Unit]
Description=Analog_Bridge for AMBE Service
# Description=Place this file in /lib/systemd/system
# Description=N4IRS 04/20/2018

# The device name should point to the
# port the mmdvm is plugged into.
# For USB ports (Arduino Due)
# BindTo=dev-ttyACM0.device
#
# To make the network-online.target available
# systemctl enable systemd-networkd-wait-online.service

After=network-online.target syslog.target netcheck.service
Wants=network-online.target

[Service]
Type=simple
StandardOutput=null
WorkingDirectory=/opt/Analog_Bridge
Environment=AnalogBridgeLogDir=/var/log/dvswitch/Analog_Bridge
# Environment=LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
Restart=always
RestartSec=3
ExecStart=/opt/Analog_Bridge/Analog_Bridge /opt/Analog_Bridge/Analog_Bridge.ini
ExecReload=/bin/kill -2 $MAINPID
KillMode=process

[Install]
WantedBy=multi-user.target

Simply copy analog_bridge.service to blabla.service in the same directory and edit to taste.
You can then:
systemctl status blabla
systemctl enable blabla
systemctl start blabla
systemctl stop blabla

The private node stanza [1999] for rpt.conf is at the top of the document https://docs.google.com/document/d/1eN50Csr29eAprBu7eKA0Bfa2XUcsXw5iktY1Ey-Qjkg/edit

73, Steve N4IRS
 

On 11/14/2018 2:45 PM, Russell, KV4S wrote:
very much so, thanks Steve.

Next question, what will these statements look like? 
systemctl enable analog_bridge
systemctl start analog_bridge
because if you copy contents the program has the same name? how does the service know which is which or maybe on linux it doesn't matter?
:/opt/Analog_Bridge$ dir 
Analog_Bridge Analog_Bridge.ini

Can you point me in the right direction for setting up a private node? do I just copy my main node stanza and make it a number like 1999, 1998 ect? Seems like there was one there but i think i overwrote it.

On Wed, Nov 14, 2018 at 10:39 AM Steve N4IRS <szingman@...> wrote:
Russell,
As per usual there is more then one way to do this. He is a simple one:
Create 4 subdirectories:
mkdir MMDVM_Bridge_TG_1234
mkdir  MMDVM_Bridge_TG_9876
mkdir Analog_Bridge_TG_1234
mkdir Analog_Bridge_TG_9876

Copy the contents of /opt/MMDVM_Bridge into the new MMDVM_Bridge directories.
Copy the contents of /opt/Analog_Bridge into the new Analog_Bridge directories.
Setup MMDVM_Bridge_TG_1234 to connect to TG 1234 on BM as normal
Setup Analog_Bridge_TG_1234 to connect to TG 1234 as normal and point it at Private node 1234

The assumption is you used the default port numbers Check your work.
Now come the change, You can not reuse the port numbers you chose for TG 1234 so:
In the MMDVM_Bridge_TG_9876 directory edit DVSwitch.ini to change the port numbers in the [DMR] stanza
Make it easy to see the change
[DMR]
Address = 127.0.0.1             ; Address to send AMBE TLV frames to (export)
TXPort = 36100                     ; Port to send AMBE TLV frames to (export)
RXPort = 36103                     ; Port to listen on (import)
Slot = 2                                   ; Export slot

In the Analog_Bridge_TG_9876 directory edit Analog_Bridge.ini to change the port numbers in the [AMBE_AUDIO] stanza
Match the ports use in DVSwitch.ini
[AMBE_AUDIO]
address = 127.0.0.1                     ; IP address of xx_Bridge
txPort = 36103                          ; Transmit TLV frames to partner on this port
rxPort = 36100                          ; Listen for TLV frames from partner on this port

As with MMDVM_Bridge <-> Analog_Bridge where you can not reuse the port numbers, It's the same for Analog_Bridge <-> ASL.
In the Analog_Bridge_TG_9876 directory edit Analog_Bridge.ini to change the port numbers in the [USRP] stanza
[USRP]
address = 127.0.0.1                     ; IP address of USRP partner (Allstar/Asterisk or another Analog_Bridge)
txPort = 38001                          ; Transmit USRP frames on this port
rxPort = 39001                          ; Listen for USRP frames on this port

Match the above port numbers for private node 9876 in rpt.conf

Does that help?

73, Steve N4IRS

On 11/14/2018 11:18 AM, Russell, KV4S wrote:
I don't have a lot of experience with private nodes but I've been working on a personal hub that is working fine with DVSwitch.

What I envision is having multiple instances of the DVSwitch (Analog/MMDVM/DVSwitch) with each instance using a different talk group. I would dedicate a private node to the different talk groups then use the main hub (public) to connect to the private nodes on the fly using  Allmon to link up the different private nodes. I would need to move the existing TG from the public hub to a private so by default nothing is linked unless I tell it to in Allmon.

I also do know how to setup multiple instances of DVSwich.

Any guidance on this?



Re: Multiple private nodes connected to different talkgroups

 

very much so, thanks Steve.

Next question, what will these statements look like? 
systemctl enable analog_bridge
systemctl start analog_bridge

because if you copy contents the program has the same name? how does the service know which is which or maybe on linux it doesn't matter?
:/opt/Analog_Bridge$ dir 
Analog_Bridge Analog_Bridge.ini

Can you point me in the right direction for setting up a private node? do I just copy my main node stanza and make it a number like 1999, 1998 ect? Seems like there was one there but i think i overwrote it.


On Wed, Nov 14, 2018 at 10:39 AM Steve N4IRS <szingman@...> wrote:
Russell,
As per usual there is more then one way to do this. He is a simple one:
Create 4 subdirectories:
mkdir MMDVM_Bridge_TG_1234
mkdir  MMDVM_Bridge_TG_9876
mkdir Analog_Bridge_TG_1234
mkdir Analog_Bridge_TG_9876

Copy the contents of /opt/MMDVM_Bridge into the new MMDVM_Bridge directories.
Copy the contents of /opt/Analog_Bridge into the new Analog_Bridge directories.
Setup MMDVM_Bridge_TG_1234 to connect to TG 1234 on BM as normal
Setup Analog_Bridge_TG_1234 to connect to TG 1234 as normal and point it at Private node 1234

The assumption is you used the default port numbers Check your work.
Now come the change, You can not reuse the port numbers you chose for TG 1234 so:
In the MMDVM_Bridge_TG_9876 directory edit DVSwitch.ini to change the port numbers in the [DMR] stanza
Make it easy to see the change
[DMR]
Address = 127.0.0.1             ; Address to send AMBE TLV frames to (export)
TXPort = 36100                     ; Port to send AMBE TLV frames to (export)
RXPort = 36103                     ; Port to listen on (import)
Slot = 2                                   ; Export slot

In the Analog_Bridge_TG_9876 directory edit Analog_Bridge.ini to change the port numbers in the [AMBE_AUDIO] stanza
Match the ports use in DVSwitch.ini
[AMBE_AUDIO]
address = 127.0.0.1                     ; IP address of xx_Bridge
txPort = 36103                          ; Transmit TLV frames to partner on this port
rxPort = 36100                          ; Listen for TLV frames from partner on this port

As with MMDVM_Bridge <-> Analog_Bridge where you can not reuse the port numbers, It's the same for Analog_Bridge <-> ASL.
In the Analog_Bridge_TG_9876 directory edit Analog_Bridge.ini to change the port numbers in the [USRP] stanza
[USRP]
address = 127.0.0.1                     ; IP address of USRP partner (Allstar/Asterisk or another Analog_Bridge)
txPort = 38001                          ; Transmit USRP frames on this port
rxPort = 39001                          ; Listen for USRP frames on this port

Match the above port numbers for private node 9876 in rpt.conf

Does that help?

73, Steve N4IRS

On 11/14/2018 11:18 AM, Russell, KV4S wrote:
I don't have a lot of experience with private nodes but I've been working on a personal hub that is working fine with DVSwitch.

What I envision is having multiple instances of the DVSwitch (Analog/MMDVM/DVSwitch) with each instance using a different talk group. I would dedicate a private node to the different talk groups then use the main hub (public) to connect to the private nodes on the fly using  Allmon to link up the different private nodes. I would need to move the existing TG from the public hub to a private so by default nothing is linked unless I tell it to in Allmon.

I also do know how to setup multiple instances of DVSwich.

Any guidance on this?


Re: Multiple private nodes connected to different talkgroups

Steve N4IRS
 

Russell,
As per usual there is more then one way to do this. He is a simple one:
Create 4 subdirectories:
mkdir MMDVM_Bridge_TG_1234
mkdir  MMDVM_Bridge_TG_9876
mkdir Analog_Bridge_TG_1234
mkdir Analog_Bridge_TG_9876

Copy the contents of /opt/MMDVM_Bridge into the new MMDVM_Bridge directories.
Copy the contents of /opt/Analog_Bridge into the new Analog_Bridge directories.
Setup MMDVM_Bridge_TG_1234 to connect to TG 1234 on BM as normal
Setup Analog_Bridge_TG_1234 to connect to TG 1234 as normal and point it at Private node 1234

The assumption is you used the default port numbers Check your work.
Now come the change, You can not reuse the port numbers you chose for TG 1234 so:
In the MMDVM_Bridge_TG_9876 directory edit DVSwitch.ini to change the port numbers in the [DMR] stanza
Make it easy to see the change
[DMR]
Address = 127.0.0.1             ; Address to send AMBE TLV frames to (export)
TXPort = 36100                     ; Port to send AMBE TLV frames to (export)
RXPort = 36103                     ; Port to listen on (import)
Slot = 2                                   ; Export slot

In the Analog_Bridge_TG_9876 directory edit Analog_Bridge.ini to change the port numbers in the [AMBE_AUDIO] stanza
Match the ports use in DVSwitch.ini
[AMBE_AUDIO]
address = 127.0.0.1                     ; IP address of xx_Bridge
txPort = 36103                          ; Transmit TLV frames to partner on this port
rxPort = 36100                          ; Listen for TLV frames from partner on this port

As with MMDVM_Bridge <-> Analog_Bridge where you can not reuse the port numbers, It's the same for Analog_Bridge <-> ASL.
In the Analog_Bridge_TG_9876 directory edit Analog_Bridge.ini to change the port numbers in the [USRP] stanza
[USRP]
address = 127.0.0.1                     ; IP address of USRP partner (Allstar/Asterisk or another Analog_Bridge)
txPort = 38001                          ; Transmit USRP frames on this port
rxPort = 39001                          ; Listen for USRP frames on this port

Match the above port numbers for private node 9876 in rpt.conf

Does that help?

73, Steve N4IRS

On 11/14/2018 11:18 AM, Russell, KV4S wrote:
I don't have a lot of experience with private nodes but I've been working on a personal hub that is working fine with DVSwitch.

What I envision is having multiple instances of the DVSwitch (Analog/MMDVM/DVSwitch) with each instance using a different talk group. I would dedicate a private node to the different talk groups then use the main hub (public) to connect to the private nodes on the fly using  Allmon to link up the different private nodes. I would need to move the existing TG from the public hub to a private so by default nothing is linked unless I tell it to in Allmon.

I also do know how to setup multiple instances of DVSwich.

Any guidance on this?


Re: ASL to DMR Bridge...changing talkgroups

 

is it possible to make this work with Allmon2 vs DTMF?


On Tue, Nov 13, 2018 at 4:08 PM Michael Weaver <mchlwvr614@...> wrote:
I didn't get Mike Z's code working out of the box and haven't had time to troubleshoot his yet.  My setup allows you to enter *8711 and then the talkgroup number you want to connect to.  the extenstions.conf will strip off the leading 1 and pass the variable into tg_connect.py.  The python script will read the ini, update txTg, write the ini file(side effect of removing all comments), and restart the analog bridge.  Backup your ini file first!

rpt.conf
871 = autopatchup,context=command_radio,noct=1,farenddisconnect=1,dialtime=20000,quiet=1

extensions.conf
[command_radio]
exten => _1X.,1,SayDigits(${EXTEN:1})
exten => _1X.,n,System(/scripts/tg_connect.py ${EXTEN:1})
exten => _1X.,n,Wait(2)
exten => _1X.,n,Hangup()

tg_connect.py
#!/usr/bin/env python
 
import sys
import socket
import struct
import os

#import parser
from ConfigParser import SafeConfigParser

#store cmd line arg
new_txTg = sys.argv[1]

#strip off first character
#new_txTg = new_txTg[1:]

#read config file
parser = SafeConfigParser()
parser.read('/opt/Analog_Bridge/Analog_Bridge.ini')
print "Existing talkgroup is: " + parser.get('AMBE_AUDIO', 'txTg')
print "Desired talkgroup is: " + new_txTg
 
#set config file
parser.set('AMBE_AUDIO', 'txTg', new_txTg)
 
#writing our configuration file to
with open('/opt/Analog_Bridge/Analog_Bridge.ini', 'wb') as configfile:
    parser.write(configfile)

#verify
parser.read('/opt/Analog_Bridge/Analog_Bridge.ini')
print "New talkgroup is: " + parser.get('AMBE_AUDIO', 'txTg')

#restart bridge
os.system('systemctl restart analog_bridge')


Multiple private nodes connected to different talkgroups

 

I don't have a lot of experience with private nodes but I've been working on a personal hub that is working fine with DVSwitch.

What I envision is having multiple instances of the DVSwitch (Analog/MMDVM/DVSwitch) with each instance using a different talk group. I would dedicate a private node to the different talk groups then use the main hub (public) to connect to the private nodes on the fly using  Allmon to link up the different private nodes. I would need to move the existing TG from the public hub to a private so by default nothing is linked unless I tell it to in Allmon.

I also do know how to setup multiple instances of DVSwich.

Any guidance on this?


Re: ASL to DMR Bridge...changing talkgroups

Steve N4IRS
 

Neil,
The purpose of this list it to exchange information. Moving information exchange off list defeats that purpose.

Steve N4IRS

On 11/14/2018 11:08 AM, Neil k8it wrote:
Could you please send me off list your python program and your modifying extensions . Conf. Thank you
73 Neil k8it
K8it@...


On Nov 13, 2018, at 5:08 PM, Michael Weaver <mchlwvr614@...> wrote:

I didn't get Mike Z's code working out of the box and haven't had time to troubleshoot his yet.  My setup allows you to enter *8711 and then the talkgroup number you want to connect to.  the extenstions.conf will strip off the leading 1 and pass the variable into tg_connect.py.  The python script will read the ini, update txTg, write the ini file(side effect of removing all comments), and restart the analog bridge.  Backup your ini file first!

rpt.conf
871 = autopatchup,context=command_radio,noct=1,farenddisconnect=1,dialtime=20000,quiet=1

extensions.conf
[command_radio]
exten => _1X.,1,SayDigits(${EXTEN:1})
exten => _1X.,n,System(/scripts/tg_connect.py ${EXTEN:1})
exten => _1X.,n,Wait(2)
exten => _1X.,n,Hangup()

tg_connect.py
#!/usr/bin/env python
 
import sys
import socket
import struct
import os

#import parser
from ConfigParser import SafeConfigParser

#store cmd line arg
new_txTg = sys.argv[1]

#strip off first character
#new_txTg = new_txTg[1:]

#read config file
parser = SafeConfigParser()
parser.read('/opt/Analog_Bridge/Analog_Bridge.ini')
print "Existing talkgroup is: " + parser.get('AMBE_AUDIO', 'txTg')
print "Desired talkgroup is: " + new_txTg
 
#set config file
parser.set('AMBE_AUDIO', 'txTg', new_txTg)
 
#writing our configuration file to
with open('/opt/Analog_Bridge/Analog_Bridge.ini', 'wb') as configfile:
    parser.write(configfile)

#verify
parser.read('/opt/Analog_Bridge/Analog_Bridge.ini')
print "New talkgroup is: " + parser.get('AMBE_AUDIO', 'txTg')

#restart bridge
os.system('systemctl restart analog_bridge')


Re: ASL to DMR Bridge...changing talkgroups

Neil k8it
 

Could you please send me off list your python program and your modifying extensions . Conf. Thank you
73 Neil k8it

On Nov 13, 2018, at 5:08 PM, Michael Weaver <mchlwvr614@...> wrote:

I didn't get Mike Z's code working out of the box and haven't had time to troubleshoot his yet.  My setup allows you to enter *8711 and then the talkgroup number you want to connect to.  the extenstions.conf will strip off the leading 1 and pass the variable into tg_connect.py.  The python script will read the ini, update txTg, write the ini file(side effect of removing all comments), and restart the analog bridge.  Backup your ini file first!

rpt.conf
871 = autopatchup,context=command_radio,noct=1,farenddisconnect=1,dialtime=20000,quiet=1

extensions.conf
[command_radio]
exten => _1X.,1,SayDigits(${EXTEN:1})
exten => _1X.,n,System(/scripts/tg_connect.py ${EXTEN:1})
exten => _1X.,n,Wait(2)
exten => _1X.,n,Hangup()

tg_connect.py
#!/usr/bin/env python
 
import sys
import socket
import struct
import os

#import parser
from ConfigParser import SafeConfigParser

#store cmd line arg
new_txTg = sys.argv[1]

#strip off first character
#new_txTg = new_txTg[1:]

#read config file
parser = SafeConfigParser()
parser.read('/opt/Analog_Bridge/Analog_Bridge.ini')
print "Existing talkgroup is: " + parser.get('AMBE_AUDIO', 'txTg')
print "Desired talkgroup is: " + new_txTg
 
#set config file
parser.set('AMBE_AUDIO', 'txTg', new_txTg)
 
#writing our configuration file to
with open('/opt/Analog_Bridge/Analog_Bridge.ini', 'wb') as configfile:
    parser.write(configfile)

#verify
parser.read('/opt/Analog_Bridge/Analog_Bridge.ini')
print "New talkgroup is: " + parser.get('AMBE_AUDIO', 'txTg')

#restart bridge
os.system('systemctl restart analog_bridge')


Re: ASL to DMR Bridge...changing talkgroups

Michael Weaver - AC2VK
 

I didn't get Mike Z's code working out of the box and haven't had time to troubleshoot his yet.  My setup allows you to enter *8711 and then the talkgroup number you want to connect to.  the extenstions.conf will strip off the leading 1 and pass the variable into tg_connect.py.  The python script will read the ini, update txTg, write the ini file(side effect of removing all comments), and restart the analog bridge.  Backup your ini file first!

rpt.conf
871 = autopatchup,context=command_radio,noct=1,farenddisconnect=1,dialtime=20000,quiet=1

extensions.conf
[command_radio]
exten => _1X.,1,SayDigits(${EXTEN:1})
exten => _1X.,n,System(/scripts/tg_connect.py ${EXTEN:1})
exten => _1X.,n,Wait(2)
exten => _1X.,n,Hangup()

tg_connect.py
#!/usr/bin/env python
 
import sys
import socket
import struct
import os

#import parser
from ConfigParser import SafeConfigParser

#store cmd line arg
new_txTg = sys.argv[1]

#strip off first character
#new_txTg = new_txTg[1:]

#read config file
parser = SafeConfigParser()
parser.read('/opt/Analog_Bridge/Analog_Bridge.ini')
print "Existing talkgroup is: " + parser.get('AMBE_AUDIO', 'txTg')
print "Desired talkgroup is: " + new_txTg
 
#set config file
parser.set('AMBE_AUDIO', 'txTg', new_txTg)
 
#writing our configuration file to
with open('/opt/Analog_Bridge/Analog_Bridge.ini', 'wb') as configfile:
    parser.write(configfile)

#verify
parser.read('/opt/Analog_Bridge/Analog_Bridge.ini')
print "New talkgroup is: " + parser.get('AMBE_AUDIO', 'txTg')

#restart bridge
os.system('systemctl restart analog_bridge')


Re: ASL to DMR Bridge...changing talkgroups

Mike KB8JNM
 

I don't know if you were directing this to me Mike/KB8JNM or not

Your message is to the dvswitch main group @ goups.io

---

Ports do not have to be 'any certain port number' except:

to not conflict with any port number in use &

to match the port number where it is handshaking TO or FROM.

If you look at the HOW2, there is a nice graphic showing the digital flow of ports for dmr to asl.


I use (analog_bridge.ini)

fromDMRPort = 31100                 
toDMRPort = 31103 


It must match the port number it interfaces with in

dvswitch.ini

TXPort = 31100                  ; Port to send AMBE TLV frames to (export)
RXPort = 31103                  ; Port to listen on (import)


The port number you use are up to you. But they must match where they are going to or coming from without conflict.

All modes/formats would be they same.

...mike/kb8jnm


On 11/13/2018 12:14 AM, Gregory Heinrichs wrote:
hi Mike, i just wanted to confirm that the port 31000 is in reference to fromDMRPort, so i should change the script to 31100 correct? Below is from my ini.
[AMBE_AUDIO]
server = 127.0.0.1                
fromDMRPort = 31100                
toDMRPort = 31103
.
.
.


Re: ASL to DMR Bridge...changing talkgroups

Gregory Heinrichs
 

hi Mike, i just wanted to confirm that the port 31000 is in reference to fromDMRPort, so i should change the script to 31100 correct? Below is from my ini.
[AMBE_AUDIO]
server = 127.0.0.1                
fromDMRPort = 31100                
toDMRPort = 31103
.
.
.


Re: ASL to DMR Bridge...changing talkgroups

Gregory Heinrichs
 

hi Mike, i just wanted to confirm that the port 31000 is in reference to fromDMRPort, so i should change the script to 31100 correct? Below is from my ini.
[AMBE_AUDIO]
server = 127.0.0.1                
fromDMRPort = 31100                
toDMRPort = 31103
.
.
.


Re: Bridging a P25Reflector and a YSFReflector?

Mike, KI0IK
 

Thanks for the replies.  I'll give MMDVM_Bridge a go and see if I can get it working with my setup.  I'll checkout MMDVM_CM too.  

Thanks
Mike

On Sat, Nov 10, 2018 at 9:33 AM Steve N4IRS <szingman@...> wrote:
That is intended to be used on a hotspot or repeater.
For reflector to reflector, MMDVM_Bridge will do that quite simply. No transcode required.

Steve N4IRS

Sent via smoke signal (AT&T)


From: main@DVSwitch.groups.io <main@DVSwitch.groups.io> on behalf of Alec-N1AJW <alec.wasserman@...>
Sent: Saturday, November 10, 2018 10:27:07 AM
To: main@DVSwitch.groups.io
Subject: Re: [DVSwitch] Bridging a P25Reflector and a YSFReflector?
 
there's a ysf wide to p25 bridge made by Andy iin Chile.  Juribeparada. I have never tried that one.     https://github.com/juribeparada/MMDVM_CM


Re: DMR -> P25 issue

Steve N4IRS
 

Andy,
Thanks for the clarification.

Steve N4IRS

On 11/11/18 5:38 AM, andrew144500@... wrote:
So,
here is a little more information about what is/was going on. 
On October 4 a change to MMDVMHost was pushed to github. The change effected P25. https://github.com/g4klx/MMDVMHost/commit/85bc8357aa1967d692901addd6ebefd89a8f32f6
When Andy at Pi-Star updated the binaries for Pi-Star, he rolled in the changes. Those changes broke P25 RF. When the problem was reported to Pi-Star, Andy reverted to a older version of MMDVMHost.
Here is his announcement: https://forum.pistar.uk/viewtopic.php?f=23&p=4003&sid=ffb1861eab2e15bd078550a906388b6b#p4003

If you are running Pi-Star, updating should fix the issue. If you compile your own MMDVMHost, revert to the above commit.

A little more, more information... 
Actually, we never reverted back to the older version.
We rewrote the broken P25 part of MMDVM host and pushed that out
through the pistar updates, then offered the changes up to MMDVM
and made Jon aware of the problem. 😀
Regards A. 


Re: DMR -> P25 issue

andrew (callsign)
 

So,
here is a little more information about what is/was going on. 
On October 4 a change to MMDVMHost was pushed to github. The change effected P25. https://github.com/g4klx/MMDVMHost/commit/85bc8357aa1967d692901addd6ebefd89a8f32f6
When Andy at Pi-Star updated the binaries for Pi-Star, he rolled in the changes. Those changes broke P25 RF. When the problem was reported to Pi-Star, Andy reverted to a older version of MMDVMHost.
Here is his announcement: https://forum.pistar.uk/viewtopic.php?f=23&p=4003&sid=ffb1861eab2e15bd078550a906388b6b#p4003

If you are running Pi-Star, updating should fix the issue. If you compile your own MMDVMHost, revert to the above commit.

A little more, more information... 
Actually, we never reverted back to the older version.
We rewrote the broken P25 part of MMDVM host and pushed that out
through the pistar updates, then offered the changes up to MMDVM
and made Jon aware of the problem. 😀
Regards A. 

6881 - 6900 of 9288