IRLP.StationTracking

IRLP.StationTracking gives you ability to get email notifications about status changes of your favorite IRLP stations.
The program reads data from this site: http://status.irlp.net/index.php?PSTART=9

Contact me if you have feature request or use Git and create your enhancements and merge them back in.

I recommend using Windows Task Scheduler to kick the program off on about a 5-10 minute interval.

Once you download, edit the .config file that’s along side the executable as needed (you won’t need to copy the config on future releases unless there is a structure change).
There are comments in the file that tells you how to format the entries. Here is the example file:

<?xml version="1.0" encoding="utf-8" ?&gt;
<configuration&gt;
    <startup&gt; 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /&gt;
    </startup&gt;
    <appSettings&gt;
        <!--use commas with no spaces to add more--&gt;
        <add key="Callsigns" value="KV4S"/&gt;
        <!--"Y" or "N" values--&gt;
        <!--If you run this as a job or don't need to see the output then make Unattended Yes--&gt;
        <add key="Unattended" value="N"/&gt;
        <add key="EmailError" value="Y"/&gt;
        <add key="StatusEmails" value="Y"/&gt;

      <!--Email Parameters - Gmail example--&gt;
      <dd key="EmailFrom" value="example@gmail.com"/&gt;
      <add key="SMTPHost" value="smtp.gmail.com"/&gt;
      <add key="SMTPPort" value="587"/&gt;
      <add key="SMTPUser" value="example@gmail.com"/&gt;
      <add key="SMTPPassword" value="Password"/&gt;
    </appSettings&gt;
</configuration&gt;

DMR.UserDB.RadioConverter

https://github.com/Russell-KV4S/DMR.UserDB.RadioConverter


DMR.UserDB.RadioConverter is an application to download the DMR User Database from RadioID.net and Convert it to a CSV file for import into a DMR Radio.

Contact me if you would like to add more and have the file specs or use Git and create your own and merge them back in.

Other than simply executing the Application you can control what CSV files are created for the type(s) of radio you have. Simple edit the .config file located with the executable and use Y/N to manipulate the application.

<?xml version="1.0" encoding="utf-8" ?&gt;
<configuration&gt;
    <startup&gt; 
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /&gt;
    </startup&gt;
  <appSettings&gt;
    <add key="URL" value="https://www.radioid.net/static/users.json"/&gt;
    <!--Set this to "Y" if you are scheduling this to run and don't need the console window to stay open.--&gt;
    <add key="Unattended" value="N"/&gt;
    <!--Y/N value only--&gt;
    <add key="AnyTone" value="Y"/&gt;
    <add key="TYT-UV" value="Y"/&gt;
    <!--Manually filter your csv to just under 10k until I or someone builds something for filtering.--&gt;
    <add key="GD-77" value="Y"/&gt;
  </appSettings&gt;
</configuration&gt;

Since this is a console application you can use Windows Task Scheduler to run this in the backgroud on a schedule of your choosing.

The CSV files are writen to the same location as the executable named:

AnyTone_Users.csv
GD-77_Users.csv
TYT-UV_Users.csv

Use your radios CPS to import and write to your radio.

Tip: Use C# to Stop a Windows Service and force kill its processes on a remote computer (LAN)

I hope this tip will save someone some time as I has spent a good deal of time trying to get this to work they way I wanted. Online findings were only partial solutions to my problem.

Recently, situations cropped up where certain Windows Services were getting stuck in a “StopPending” state and would not resolve no matter how much time was given.

About a year ago I needed a way to monitor windows services in case they went down and send out email notifications so, I wrote it.

I had a UI with a SQL Server back end that would allow me to control turning off and on windows services. I also wrote a monitoring service that ran on a server that would read the table and change the flags and actually do the work of turning off an on the services based on the flags. During that project I also needed the ability to change the StartupType of the service. I wanted it to be set as Manual when it was off and Auto when it was Running.

I found a DLL on Code Project for controlling the StartupType it was simply called ServiceControllerEx.
However, it did not work for a remote computer (another computer on the LAN not on the Internet). I was able to modify the code to connect to remote computers this way:
“\\\\” + this.MachineName + “\\root\\cimv2:Win32_Service.Name='” + this.ServiceName + “‘”

After that it worked great on a remote and the local servers just fine.

Now, back to the “StopPending” problems.

I needed my monitor in some situations to not only try to stop the service but stop any processes owned by the service.

I quickly found out that using Process.Kill() only works on the local machine. If you try to use this on a remote machine it says “Feature is not supported for remote machines.”  Researching that message brought me to this blog but did not fully cover the situation I was experiencing. While this would remotely kill the processes on a remote computer it did not cover how to limit it to only processes owned by a specific service.

Note: You also needed to use this method because it allowed you to use a Service Account with the appropriate permissions to control the processes on a remote machine.

I was finally able to solve this my adding a new method to the ServiceControllerEx class that would kill a services processes like this:
KillServiceProcessesEssentially, you can use ManagementObjectSearcher to do it all.

First, define the scope which is the machine name and the service account credentials.

Second, select the ProcessID of the service.

Third, iterate through all the processes on that machine and compare the ParentProcessID to the ProcessID and call the kill command if they match.

Good luck!!
-Russell

 

Tip: Setting up a Developer Machine w/ Visual Studio 2008 and SQL Server

I ran into an issue when setting up a new machine with Visual Studio 2008 and SQL Server 2005 Developer Edition.

The Management Studio was not installed??? with some digging on the internet there is basically an issue when you install sql express before the developer editon. Express is loaded with Visual Studio.

My solution was to completly remove sql server and visual studio.

For future reference I’m going to get SQL Server installed and patched before loading Visual Studio.

I hope this helps someone in the future (including myself).

Of coarse next is to work on SQL Server 2008 and Visual Studio 2010. let’s hope that goes better!

UPDATE: I think you can also do a custom Install with VS and just not install SQL Express. I’m not going to test that right now though. 🙂