Merge pull request #277 from s-s-s/patch-1

New data to RSSI.dat by RA4NHY for the Motorola GM340UHF radio station
This commit is contained in:
Jonathan Naylor 2017-03-12 18:16:26 +00:00 committed by GitHub
commit 62d340b003
2 changed files with 203 additions and 0 deletions

97
DMRIDUpdateBM.sh Normal file
View file

@ -0,0 +1,97 @@
#! /bin/bash
###############################################################################
#
# DMRIDUpdate.sh
#
# Copyright (C) 2016 by Tony Corbett G0WFV
# edit by R2AJV
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
#
###############################################################################
#
# On a Linux based system, such as a Raspberry Pi, this script will perform all
# the steps required to maintain the DMRIds.dat (or similar) file for you.
#
# It is designed to run from crontab and will download the latest IDs from the
# BM network database and optionally keep a backup of previously
# created files for you.
#
# It will also prune the number of backup files according to a value specified
# by you in the configuration below.
#
# When done, it will restart MMDVMHost to make the ID changes take effect.
#
# To install in root's crontab use the command ...
#
# sudo crontab -e
#
# ... and add the following line to the bottom of the file ...
#
# 0 0 * * * /path/to/script/DMRIDUpdateBM.sh 1>/dev/null 2>&1
#
# ... where /path/to/script/ should be replaced by the path to this script.
#
###############################################################################
#
# CONFIGURATION
#
# Full path to DMR ID file
DMRIDFILE=/path/to/DMR/ID/file/DMRIds.dat
#
# How many DMR ID files do you want backed up (0 = do not keep backups)
DMRFILEBACKUP=1
#
# Command line to restart MMDVMHost
RESTARTCOMMAND="systemctl restart mmdvmhost.service"
# RESTARTCOMMAND="killall MMDVMHost ; /path/to/MMDVMHost/executable/MMDVMHost /path/to/MMDVM/ini/file/MMDVM.ini"
###############################################################################
#
# Do not edit below here
#
###############################################################################
# Check we are root
if [ "$(id -u)" != "0" ]
then
echo "This script must be run as root" 1>&2
exit 1
fi
# Create backup of old file
if [ ${DMRFILEBACKUP} -ne 0 ]
then
cp ${DMRIDFILE} ${DMRIDFILE}.$(date +%d%m%y)
fi
# Prune backups
BACKUPCOUNT=$(ls ${DMRIDFILE}.* | wc -l)
BACKUPSTODELETE=$(expr ${BACKUPCOUNT} - ${DMRFILEBACKUP})
if [ ${BACKUPCOUNT} -gt ${DMRFILEBACKUP} ]
then
for f in $(ls -tr ${DMRIDFILE}.* | head -${BACKUPSTODELETE})
do
rm $f
done
fi
# Generate new file
curl 'http://registry.dstar.su/dmr/DMRIds.php' 2>/dev/null > ${DMRIDFILE}
# Restart MMDVMHost
eval ${RESTARTCOMMAND}

View file

@ -0,0 +1,106 @@
#Data to RSSI.dat by RA4NHY
#Values in the RSSI.dat file are obtained using the MMDVMCal calibration program (S mode), the high-frequency generator and the Motorola GM340UHF radio station.
#For different radio stations, the values are slightly different.
#For example, for those GM340 that I had, the discrepancy is about 10 dB.
#Therefore, it is desirable to carry out calibration for each radio station.
#More about RSSI and a homebrew MMDVM node you can read here https://drive.google.com/file/d/0B_UNZTdPtyZUUjN2d2llV0RtNTQ/view but unfortunately in Russian only
#Ivan, RA4NHY
1045 -43
1043 -46
1042 -47
1041 -48
1039 -49
1036 -50
1030 -51
1024 -52
1017 -53
1009 -54
1003 -55
992 -56
980 -57
967 -58
955 -59
941 -60
929 -61
916 -62
905 -63
893 -64
884 -65
874 -66
865 -67
856 -68
848 -69
839 -70
831 -71
823 -72
815 -73
805 -74
799 -75
789 -76
778 -77
767 -78
757 -79
746 -80
737 -81
727 -82
719 -83
711 -84
704 -85
696 -86
689 -87
682 -88
674 -89
667 -90
659 -91
650 -92
641 -93
630 -94
621 -95
610 -96
598 -97
586 -98
575 -99
564 -100
554 -101
544 -102
535 -103
526 -104
521 -105
512 -106
504 -107
495 -108
486 -109
477 -110
468 -111
458 -112
449 -113
439 -114
431 -115
421 -116
412 -117
404 -118
395 -119
387 -120
381 -121
374 -122
368 -123
363 -124
360 -125
355 -126
352 -127
348 -128
345 -129
344 -130
342 -131
340 -132
339 -133
338 -134
337 -135
336 -136
335 -137
334 -138
333 -139
332 -140
331 -141
330 -142