Friday, January 2, 2015

Importing a Radio ID listing into your HP Series Scanner Favorite List

Yesterday I showed how you can export a list of Radio ID's from Unitrunker.  Today I will show how you import those into your Home Patrol Favorite list.

If you do not have Unitrunker, but want to import the ID's, you can always download my list (which is updated several times a week) from here:
https://www.dropbox.com/sh/4rxgywkd7xe6fch/AAAxFoNA-CToO9WxjT2iLqJka?dl=0

Again, you will need access to a bash shell to follow my instructions.  Again I suggest installing cygwin on the same computer where you have your Uniden software installed.

I should also point out that since I have so many radio id's in my NJSP and NJICS systems, each one has their own favorite list.  This will probably not work if you have multiple systems in the favorite list you want to import ID's to.

I will say this again, BACK UP Everything before attempting this.  If you do not back up and render your favorite list un-usable, you are out of luck.  I managed to break mine several times before I got the process right.

First thing you need to do is determine which file you need to copy.  Usually the folder in is your Documents, Uniden, BCDx36HP or HomePatrol, FavoriteLists.

You will find a bunch of files similar to f_000001.hpd or favorites_000001.hpd.  look for a f_list.cfg or favorites_lists.config file.  Open it with notepad and you can figure out which list you need to edit.

Because there are hidden control characters in the favorite lists, we need to take the radio ID list I exported from Unitrunker and reformat it.  Also, the Home Patrol list is formatted somewhat different than the BCDx36 lists.

This file with the ID's is 700ids.txt, and the favorite list is f_000011.hpd

First step is to process the radio id list and create a new list that can be imported into Sentinel (BCDx36 lists only).  Also, if you are planning on importing the ID's into multiple favorite lists, you only have to perform this step once.

rm rid.out
cat 700ids.txt | while read line
do
a=$(echo $line)
echo -e "UnitIds\t\t\t"$a"\tOff\tAuto\tOff\tOn" >> rid.out
done

If you are doing this for a Home Patrol 1, replace the echo line with this:
echo -e "UnitIds\t\t\t"$a"\tOff\tAuto" >> rid.out


This may take over 5 minutes to run, however if you are working with multiple favorite lists, it will save time in the long run.

The next step is to cut the top and bottom of the favorite list (the id's are in the center)
sed -n '/UnitIds/q;p' f_000011.hpd > top.out
sed -n '/Site/,$p' f_000011.hpd > bottom.out

Now we put it all back together again
cat top.out > f_000011.out
cat rid.out >> f_000011.out
cat bottom.out >> f_000011.out

Finally, we need to run the unix2dos command, otherwise the software will not read the file properly and it will not work.

unix2dos -n f_000011.out f_000011.hpd

If you did everything properly, it should have worked.  Because everyone's setup is different, it would be impossible to a simple script for everyone to use.  Since I have several favorite lists, I setup a script that copies all the favorites over, creates the new radio ID section, updates all the lists and copies them all back.   I also incorporated the Unitrunker export from yesterdays blog, so I can accomplish all this in 1 step.

Finally, I do not have a Home Patrol-2, so I have no way of knowing if this will work on that.  If someone wants to provide me a favorite list from one (Trunk System with Radio ID's), I can look at it and I will update the instructions.

Remember, if you are going to try this...BACK UP EVERYTHING FIRST, and make sure your backup works.



No comments:

Post a Comment