Commit 6cf156be authored by Khaytsus's avatar Khaytsus

Initial checkin with a codeplug and script to get last heard IDs and readme

parent c7fbd9a4
# gd77
Radioddity GD-77 related data, scripts, tools
\ No newline at end of file
Small repository of tools and data for the Radioddity GD-77
# codeplugs
Under the codeplugs directory, there are some sample codeplugs. They are made for my use, but I an putting them here in case they are useful to anyone else. They should be named basically of a format of area-cpsversion-date.dat
I am using the GD-77 Community Edition editor for all of my codeplug work as it gives me some more flexability. The codeplugs in the above directory likely will not be compatable with the standard Radioddity CPS.
It can be gotten from
# bin
Scripts, generally useful in Linux but could work in other similar environments, for doing useful things.
This script pulls data from for a number of defined areas to get the Last Heard information and builds a DMR ID csv file out of it which is ready to import into the Radioddity CPS "ActiveClient" DMR ID tool to upload to the radio.
And just to remind myself to read or wtite DMR ID data press SK2+Menu+# key at the same time and turn on radio.
\ No newline at end of file
# Update these three variables as needed
# Change this to where you want your data to be kept
# Array of id,name which the script iterates over to get data, update for your needs
# Here I am getting all US (averages to about a week worth of contacts fwhen limited
# to 500) plus some targeted states I'm interested in which pulls in a lot more calls
# per those states
ids=(310,us310 311,us311 312,us312 313,us313 314,us314 315,us315 316,us316 \
317,us317 318,us318 319,us319 320,us320 3121,ky 3117,il 3118,in 3139,oh 3147,tn )
# Radio holds 10920, but I left this at 10900. If this changes in the future, update
# Max per area
# Generic Last heard count (add additional World Wide last-heard users)
# Shouldn't need to touch below here
ts=`date +"%Y-%m-%d"`
cd ${datapath}
# Download each csv file
for i in ${ids[@]}; do
id=`echo $i | cut -f 1 -d ','`
name=`echo $i | cut -f 2 -d ','`
curl -s -o ${name}-${id}.csv "${id}&cnt=${count}"
# Pull last heard from all around the world, with the genericcount limiting how many
# 5000 is about 6 days worth give or take
curl -s -o lh-0000.csv "${genericcount}"
# Combine all of them into a single file formatted for import
awk 'BEGIN { FS=";"; OFS=","; } {print $3,$2,$4,",,,,<br/>"}' *-???.csv *-????.csv | sort | uniq | grep -v 'dmrid,callsign' >${output}
# Check to see if we exceeded the maximum this radio allows
lines=`wc -l ${output} | cut -f 1 -d " "`
if [ ${lines} -gt ${max} ]; then
echo "Warning: CSV contains more than ${max} lines"
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment