Re: ASL to DMR Bridge...changing talkgroups
we are behind in documenting a LOT of what the different programs
will do. mea culpa
toggle quoted message
Show quoted text
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! |
|