06.1.18

Google Earth KML Generator for Radio Networks

One thing that really bothers me sometimes is having the same data in multiple places, and having to manually update the same data more than once.  So I was bothered when a colleague recently spent a few days creating a google earth file for our communications network (>150 nodes), even though we had a spreadsheet of all the locations of each node already.  So, in a couple of hours I came up with this program which converts a spreadsheet or csv file into a kml file which can be imported into google earth.

Take the following data (this is not a real network, I just picked a bunch of random points):

Drop the spreadsheet onto the CsvToKml program, and it spits out a kml file, which looks like this in Google Earth:

Now every time we update the spreadsheet all we need to do is feed it to CsvToKml and we get a new google earth file.

| Posted in Software | No Comments »
03.6.18

Crosswire Webclient

Crosswire is a dispatch platform that is compatible with SIP, analog and digital radio.  It comes with a Java client which you pay for per instance, but there are occasions where you may want additional people to be able to listen in.  To this end I have developed a web client that watches the crosswire mysql database and plays out the audio in semi real time.  By this, I mean that you have to wait for each call to be persisted to disk before you can listen to it which creates a delay of at least the length of the call before you can listen to it.  It is written in ASP (C# Razor), source is here.

| Posted in Software | No Comments »
02.13.18

Adapting ospf-visualiser for use with RuggedCom RX1500

A handy thing to see in an OSPF network is a visual view of the active paths and costs.  There are a couple of expensive tools around that can do this very well, but there isn't much around that can do it for free.  One such free tool is ospf-visualiser which can take output from quagga and print out a pretty picture of the network.  If you have telnet enabled on a machine with quagga then you can telnet to it and everything is supposed to work, but it isn't compatible with RuggedCom devices out of the box.

Therefore I have extended ospf-visualiser so that it can SSH to a RuggedCom ROXII device, log in using the given credentials and extract the required data to build the model.  Rather than write a new parser for the RuggedCom ospf command output, I have opted to log in to the maintenance shell and run the quagga commands directly so the existing data parser can be used, which means that the total amount of code changed is actually quite small.

New SSH options for source data

New SSH options for source data

Output for example RuggedCom network

Output for example RuggedCom network

The next step will be to enable live listening to LSA packets so that the visualisation is truly live, but for now the source and binaries are on Github

02.1.18

The ArchestrA Attribute Wrangler

One frustration that I often have with ArchestrA is wanting to do bulk updates to attributes on one or more objects.  Things such as,

  • Updating a the description on an attribute that has a typo for all objects descending from a template
  • Change all the alarm priorities on objects hosted in a particular area
  • Changing the IO references for all objects using a particular topic name


Read the rest of this entry »

| Posted in SCADA, Software | 12 Comments »
08.30.15

CoApp for Visual Studio 2015

Some time ago when CoApp was making its first releases, I helped out as a packager for many open source packages.  Unfortunately CoApp seems to be all but dead, although it seems a few people are still using it.  The latest official CoApp release has a couple of issues, one being a lack of support for Visual Studio 2015.  Over the last couple of days I have made an effort to get my head around the somewhat messy codebase that makes up the CoApp project and get it working for the latest build tools.

Short Version

Grab my (unofficial) updated CoApp release that supports VS2015 here.

Long Version

My fork of CoApp.Powershell is based on the .net 4.5 and the Visual Studio 2015 tool chain, so you will need these installed to build it.  You will also need the Sysinternals Suite added to your path, and WiX 3.9 installed. I built it on Windows 10 with the Windows 10 SDK installed, I'm not sure how things will go on other operating systems (if anyone tries let me know!).  You also need to set the powershell execution policy to unrestricted.

I have setup two example repositories that build and create nuget packages, zlib and libpng (forked from the original CoApp repositories).  My NuGet package feed that has these packages is https://www.myget.org/F/raggles/api/v2, note that I haven't actually tried to use them for anything meaningful so if something doesn't work, again please leave a comment.

A couple of notes:

  1. When compiling and debugging your own builds, be sure that the default value of HKLM\Software\Outercurve\CoApp.Powershell\etc\ is set appropriately.
  2. If you want to debug the powershell scripts, instead of attaching the debugger to a powershell process, start powershell from visual studio by setting the project debug action to run C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe  and use noexit -command "& { import-module -name 'E:\coapp.powershell\output\v45\AnyCPU\Release\bin\coapp.powershell.dll'}" as the argument (set for your build location obviously).

| Posted in Software | 2 Comments »
05.7.15

SEL3505-3 USB-Ethernet Driver on Windows 8.1 x64

I recently acquired a SEL 3505-3 RTU for testing, and to configure it one must connect to it via the USB port. The USB port in question is actually a virtual ethernet interface, and according to the documentation in the manual for the 3505 the driver should have been installed automatically. However, for me it simply didn't work. I had a wee look in device manager and tried to install the driver manually to be greeted with this:

sel350533505-driver1 Read the rest of this entry »

| Posted in Software | No Comments »
04.28.15

com0com Fork

I've been using com0com a bit lately and it's proved to be very useful. However the source doesn't appear to have been touched in quite a long time, and it still uses make and other gross stuff from way back. I have forked com0com (including com2tcp and hu4com) and made nice shiny new Visual Studio 2013 projects for everything (including the kernel mode drivers) and put everything on GitHub for all to enjoy.  I have even gone to the trouble of purchasing an Authenticode Certificate and have published signed binaries.  Hopefully I'll get round to creating a nice WiX installer but I remember the last time I did battle with WiX I came out a shell of a human.

| Posted in Software | No Comments »
04.17.15

Virtual Serial Ports, com0com, RFC2217, and Radio

Tunneling com ports over tcp, and in particular over low bandwidth radio links can be a tricky business. Even more so if you are on windows and want to use free or preferably open source software. Recent work I've been involved in has required that many devices with different and proprietary protocols (all serial in nature) be tunneled over a udp radio connection from a Windows server to the client device.  The image below demonstrates the conecpt.

com0com1
Read the rest of this entry »

10.29.14

Autolisp part II - convert drawing to grayscale skeleton

For my second Autolisp job, I was tasked to convert a drawing to a grayscale skeleton so that it could be used as a background for additional drawings.  This is typical of floor plans that are developed by one company, then another company overlays electrical, air conditioning or other building services over top of the floor plan.

acadpartii
Read the rest of this entry »

| Posted in Software | 1 Comment »
07.12.14

A foray into AutoLISP

I was recently asked by a friend to write a couple of AutoLISP routines that would offset a polyline in both directions, and change a few styles along the way. The problem is easiest defined visually:

autocad-lisp

This was to be my second experience writing lisp (after my experience with GIMP scripts), so I knew the language concepts and syntax already.  Initially I tried to get away with command macros; unfortunately these have no ability to store objects (as far as I could tell) and if you can't do what you want by running a sequence of AutoCAD commands it seems you're pretty much out of luck.

The entire function is as follows:

;;double offset with offset line style change
(defun C:doffset(/ pickEnts pickEnt offset i n)
  (vl-load-com)
  (if (setq pickEnts (ssget '((0 . "LWPOLYLINE"))))       ;select polylines
   (progn                                             
    (setq offset(getreal "\n Offset: "))                  ;store offset
    (setq i 0 n (sslength pickEnts))
    (while (< i n)
     (setq  pickEnt (ssname pickEnts i))                  ;get the next polyline from the selection
     (setq i (1+ i))
     (setq pickObj (vlax-EName->vla-Object pickEnt))   ;convert entity to object
     (vla-Offset pickObj offset)                          ;offset in one direction
     (command "_change" "l" "" "p" "LT" "ZIGZAG" "")
     (vla-Offset pickObj (- offset))                      ;offset in the other direction
     (command "_change" "l" "" "p" "LT" "ZIGZAG" "")
     (command "_change" pickEnt "" "p" "LT" "ACAD_ISO07w100" "")
     (command "_pedit" pickEnt "w" (* offset 2) "")       ;change the pline width (twice the original offset)
    )
   )                                                      ;progn
   (princ "No object selected!\n")                      
  )                                                       ;endif
  (princ)                                                 ;clean exit (supresses echo)
)

All in all this lisp business seems to be a quick and easy way to automate some of the more tedious AutoCAD jobs.

| Posted in Software | No Comments »