DMR IDs
DMR ID's
I've been getting more into amateur DMR and of course you need an ID. Radioid.net is the DB for this of course, but the scheme in use was developed by DMR-MARC. They came up with some convoluted scheme back in the day using Mobile Country Codes as a prefix to segregate the ID's so uses could load only the countries they wish in their contact lists. There is no hierarchical authority (ala DNS) where Radioid.net passes off lookups to country (or lower) levels, and the entire DB stands at under 1mb as text, so this segregation is simply for the users.
Contents
DMR ID
First some words on the DMR ID from the specs. It's simple, a 24 bit number, however certain types of DMR systems only use the first 16 bits (Cap Plus trunking for one). Hams tend to use the entire 24 bit ID, and it's typically represented at decimal.
24 bits = 16,777,215 possible ID's
16 bits = 65,536 possible ID's for cap plus
DMR-MARC scheme
DMR MARC's scheme uses the Mobile Country Code ("MCC") as the first part of the ID in decimal, then one digit for sub-country (State), and 3 decimal digits for the user.
First doing this as decimal means we cannot use any ID over 9,999,999 as MNC cannot begin with a 1, thus we're limited to the 7 decimal digits. This removes 6,777,216 ID's from the scope of use.
Another issue is using a 3 digits for the MCC. There are only 226 MCC's leaving 774 blocks of 10000 ID's unused or 7,740,000 total ID's unable to be used. (actually a bit less than this due to the next issue)
Sub Country level (state/province)
In the MMMSUUU decimal format there is only a possible number of 10 sub country levels. This is an issue for many countries which have more than 10 sub-regions. What is done here is to invent new country codes, and DMR has invented 8 unique codes:
263 - Germany 264 - Germany 313 - USA 314 - USA 315 - USA 317 - USA 535 - USA (Guam) 658 - Ascension Island
In total there are only 170 of the 226 MCCs in use by DMR, even adding in the invalid codes, there's 178. This leaves 822 blocks unused, or 8,220,000 IDs.
Totals
In this DMR-MARC scheme presented there is much waste and having to invent new country codes, thus "shoehorning" the DMR ID into something it was not designed for. Adding up the loss below:
16,777,215 possible IDs in DMR 6,777,216 - IDs over 10,000,000 8,220,000 - Unused MCC IDs 65,535 - CAP Plus ID range ------------- 1,714,464 - Total DMR ID's available for use
This scheme throws out 90% of the available ID space as unusable! There was a total lack of thought put into this in terms of scalability.
Capacity Plus IDs
LCP or Link Capacity Plus is a controller-less trunking system for >16 sites put forth by Motorola and is quite popular. One of the requirements for this is the DMR ID of the subscribers must be 2^16, not 2^24 or > 65,536. In all Motorola radios, the unit ID is set once, it cannot be changed per system. This means if you're an amateur and want to run a common radio on your LCP work system and the ham bands, you need a Capacity Plus ID.
When it was administered by DMR-MARC a person had to have a valid reason (LCP use) for a low ID, but was still assigned as using MCC as the first 3 digits, thus restricting the avialbily further. Knowing hams if there was not a restriction they all would want a "Low ID" and go for this, so it's a valid concern to ensure the availability of this for people who need it.
Now the problem is at some point the Brandmeister DMR network stopped importing the low ID's from radioid.net and has capped the allowed ID's. If you have a CPLUS ID in the Brandmeister network, you're allowed to use it, but they will refuse all new ID's. This presents a problem for new users, as Brandmeister will drop any traffic that doesn't have a "valid" ID, but they refuse to import/update their DB. As Brandmeister provides some of the most popular talkgroups, this can lead to further fracturing of the DMR network, and one-way audio where traffic goes via Brandmeister.
I'd suggest Brandmeister start allowing these CPLUS ID's to be passed and allowed on their network. There's not many in use, under 300 total are registered with radioid.net.
Ideas to fix this mess
I'd propose the following features of any number scheme
- Must be scalable
- group ID's on national/state boundaries to facilitate importing into radios
- support sub-delegation of authority
Proposal
Since we're dealing with a 24 bit (3 byte/octet) binary number, we should dispose with the idea of thinking in decimal. If we think how IANA and the RIR's allocate IP space, we can do the same with DMR ID's.
Looking at the number of DMR IDs in the USA:
awk -F\; '$1 !~ /^1/ && length($1) == 7 && $1 ~ /^31[0-5]/ { print }' dmrid.dat |wc 58574 58574 900443
58574 total ID's for 779626 [1] license amateurs in the US is about 7.5% of all licenses. This is the highest number of DMR ID's of any country.
The UK has the highest number of IDs by percentage, but is still well under the USA in terms of number of ID's in use.
US 7.5% of licenses 58,574 Total IDs UK 17.5% of licenses 13,305 Total IDs Canada 7.1% of licenses 5,000 Total IDs Germany 14.0% of licenses 8,883 Total IDs
The counts for amateur radio operators per controy were taken from Wikipedia [2]
Per this data, if we look at the top 10 countries there are 1,827,613 total hams (and after this the counts drop off where the rest of countries total are under 200k). If we assume 10% of all hams will have a DMR ID, this is ~183,000 DMR ID's or 18k per country of the top 10. Other than the USA, this is indeed the case.
What I'd propose is using a Bit/Mask for allocating blocks of ID's per country, and each country gets a segment that could be further subdivided.
The world is divided into 4 regions:
- Americas (North America, South America, Central America, Caribbean)
- Asia Pacific (Central & South Asia, Northeastern Asia, Southeastern Asia, Australia and Oceania)
- Europe (Northern Europe, Southern Europe, Eastern Europe, Western Europe)
- Middle East/Africa (Middle East, Northern Africa, Southern Africa)
Each region would then allocate a /14 to each country as needed
backup data
awk to process dmrid file
#match DMR ID's not starting with 1 and 7 digits long. awk -F\; '$1 !~ /^1/ && length($1) == 7 { print }' dmrid.dat |wc 184388 184388 2870086 # process the db, and sort into unique country codes. awk -F\; '$1 !~ /^1/ && length($1) == 7 { print substr($1,1,3) }' dmrid.dat | sort | uniq |wc 178 178 712
#Compare the unique MCC from the DMR db and the real MCC file awk -F";" 'NR==FNR{a[$1]=$1;next} {if (a[$1]) ;else print "Invalid MCC", $1;} ' MCC-Valid.txt dmr-mcc-in-use.txt Invalid MCC 263 Invalid MCC 264 Invalid MCC 313 Invalid MCC 314 Invalid MCC 315 Invalid MCC 317 Invalid MCC 535 Invalid MCC 658 |wc
8 24 128
- ↑ ARRL List of number of Hams in USA for 2021
- ↑ number of counts of hams in 2019 per country