A Quick Look At Editing DMR-id Contact Lists For The RT-4D
Note that the RT-4D has 3 display lines that can
each display 18 characters maximum. The goal is to take the full
DMR-ID Contact List and shrink it in file size so that it can fit
into the RT-4D while also formatting the data so that it will
correctly display a DMR-ID contact's record as long as that record
is formatted correctly in the database. Lots of records in the
databases we download are NOT formatted correctly but there is not
much we can do about that except to make sure the badly formatted
contacts don't make too much of a mess when the radio tries to
display what is there. The best CSV editor I have found is called
"CSVed" and it is a free download at many sites. I downloaded the
latest v2.5.7 at Major Geeks: https://www.majorgeeks.com/files/details/csved.html.
Another important tool is Notepad++ which is also a free utility.
I use it to abbreviate long country names using its "Replace All"
function. It can be downloaded here: https://notepad-plus-plus.org/
It takes less than 20 minutes to take a raw database and modify it
to fit and display nicely in the RT-4D. Here are the basic steps
that I use:
First, download a full dmr-id contact list. I grab the free daily
"data dump" at the https://www.radioid.net/
website. On the menu at the top of the page click on Data
Dumps in the Database dropdown menu and download the user.csv
file near the bottom of the page.
The RT-4D has three display lines that can display only 18
characters on each display line. It assigns the columns to be
displayed like this:
Display Line 1: RADIO_ID || CALLSIGN
Display Line 2: FIRST_NAME || LAST_NAME
Display Line 3: CITY || STATE
|| COUNTRY
So far so good, but unfortunately, the raw databases we download
are like the wild west as far as formatting goes. Our little RT-4D
has to take a deep breath to handle an entry like this one (Actual
ID and callsign blocked out)
XXXXXXX,X8XXX,Central Michigan Emergency Network,Central Michigan
Emergency Network,Fenton,Michigan,United States
So... the strategy is to JOIN the FIRST_NAME and LAST_NAME columns
to make Line 2 format more neatly with an inserted space between
the first and last name. Then
we use CSVed to limit the number of characters to be displayed
by column 3 to 18 characters. Then DELETE the city
column to eliminate data since it will not fit anyway. Then we add
two empty columns back into the database and MOVE one into the
column 4 position. Then we MOVE the state and country columns to
the left so they occupy columns 5 and 6. Next, we rename columns
as needed to restore the names in the order that the RT-4D is
looking for. This will leave you with an empty LAST_NAME and
COUNTRY column with the state and country data in the "wrong" CITY
and STATE columns. This is by plan since the radio does not care
what data is in the columns. The firmware places an embedded comma
between columns 5 and 6 and we take advantage of that to separate
the state and country with that comma. It looks fine that way and
in my opinion is preferable to having a floating embedded comma at
the beginning of display line 3. Next we use CSVed to limit
column 5 to 14 characters for the state/province name. This
reserves up to 4 characters for the country when the
state/province name is long. These measures save lots of data
space and optimize the display formatting. Finally, use the
Notepad++ utility to very quickly and easily abbreviate long
country names with 2 or 3 letter country codes to eliminate more
data and assure readability. This is all easily done with the two
free software utilities. I would also mention that it is wise to
save your work at the completion of each step. If you save with a
different database name after each step you can go back a step if
you somehow make a mistake. At any rate, the step-by-step
explanation below is what I do when re-formatting a raw dmr-id
contact list.
Open the downloaded user.csv file
with CSVed and follow the steps below:
1. Be sure the column names are formatted as seen below to what
the RT-4D expects: RADIO_ID -- CALLSIGN -- FIRST_NAME
-- LAST_NAME -- CITY -- STATE -- COUNTRY. Do this by right
clicking on the highlighted line shown in the screenshot below.
This will bring up an editing form which can be seen in step 8
below. When they are correctly edited, APPLY the changes and then
click on READY and your edits will appear in CSVed. If your
downloaded user.csv database has extra columns beyond the 7 shown
below you can use the Delete Columns tool that can be seen in the
screenshot at step 4.

2. Join Column 3 and Column 4 to make it easy to restrain Display
Line 2 to only 18 characters. Be sure to put a check mark in "Add
Text Between" and put a space in the field just above that option.
This will assure that the first name and last name are separated
by a space.

3. Set the column 3 data width to a maximum of 18 characters. This
prevents Display Line 2 from spilling into Display Line 3 and
corrupting how it formats.

4. Add new blank columns 6 and 7.

5. Delete column 4. This will delete the CITY column
and move column 5 and 6 to the left.

6. Move column 5 to column 6.

7. Then move move column 4 to column 5.

8. Edit column names to the Radtel RT-4D format
shown in the Edit Record form below. Access this by right-clicking
on the column name row in the CSVed screen. Save your work and
exit CSVed.

9. Open your saved csv file with Notepad++. Click
the Search menu at the top and select the Replace function. Type
United States into the first field and then USA in the second
field. Click on Replace All. This takes about 15 seconds and then
it will report the number of records that are changed from United
States to USA. Repeat this with every country that has a long name
to make it easy to see the data on the little RT-4D screen.

10. When USA is done repeat this for all countries with long
names.

I replaced the countries in the list below as a
start. I might have missed some other long ones though!
United States USA
Netherlands NLD
Czech Republic CZE
United Kingdom UK or GBR (Contradicting
sources say both are fine but I now use UK)
Germany DEU
Korea Republic of ROK
Australia AUS
Philippines PHL
New Zealand NZL
Argentina Republic ARG
Slovenia SVN
Bosnia and Hercegovina BIH
Greece GRC
Belgium BEL
France FRA
Denmark DNK
Portugal PRT
Türkiye TUR
11. Save your work in Notepad++ and open up CSVed. Set the max
data width of column 5 to 14 characters. This preserves space for
the embedded comma and 3 characters for the country name. Save
your work and at this point, you can click on "Tools" in the menu
at the top of CSVed and use the "Check CSV File" option to uncover
any errors. If CSVed finds any errors in your file, use the
"Repair CSV File" tool and it will fix it. This assures that you
will never get the dreaded "INVALID CSV" warning in the RT-4D CPS
when you import your file. When you are done at this step save
your work in CSVed and close it up.

12. Test your edited csv file by importing it into
the Address Book of the RT-4D CPS program. The maximum allowed
size is 12,289 in the Address Book. My compiled databases are
averaging around 11,600 as shown in the screenshot below. The CPS
checks the integrity of your database and as long as you do not
get an "Invalid CSV" report it will work perfectly. All it takes
is one missing or extra comma in the database and it will be
invalid so pay attention as you go along! If your re-formatted
database is less than 12,289 it will fit fine and you can go ahead
and press "Write" after connecting up your radio with its
programming cable and selecting the appropriate COM PORT.

That's all there is to it. Using the steps above
will assure that a DMR-ID contact record that is properly entered
in the Radio-ID daily database will display correctly on the RT-4D
screen. Note that if your own personal contact record does not
display the way you want it to, you can log into the radioid.net
web site and edit your own record in the ACCOUNT PROFILE form. If
you have not created a profile yet, it is free and easy to do so.
Note that there are lots of database contact records that have
missing STATE/PROVINCE information and when you receive such a
station it will display with a leading comma on LINE 3. There are
also database contact records with first and last names entered in
the FIRST_NAME column and then the last name is repeated again in
the LAST_NAME column. This makes a bit of a mess but the 18
character limit that we impose on LINE 2 just cuts it off when 18
characters are reached. All we can do is take steps to make sure
properly entered contact records are displayed properly. Don't be
afraid to use the information above to customize your RT-4D
display lines to show information in a way that is most useful to
you. Some have reported that after joining the FIRST_NAME and
LAST_NAME columns into column 3, they are using the empty column 4
to display something else in the record they want to see.
Experimentation is part of the fun! Good Luck!