Vista ICM Panel Development

From LinuxMCE
Revision as of 01:59, 29 March 2009 by Tschak909 (Talk | contribs) (Installation of a basic development environment: Initial content.)

Jump to: navigation, search

This page details the development of the Vista ICM device driver for compatible security panels from Honeywell/Ademco. It intends to show the overview of the development process for the interested developers who wish to create new device support for LinuxMCE.

Initial Research

Initially, you need any specifications that you can retrieve to tell about the device you wish to implement. These can be gotten from a variety of sources, including:

  • Manufacturer's website
  • Various google searches on the web (try the following search words: protocol specification, rs-232, technical reference, and custom installer specification along with the name and model of your intended device.)
  • Existing literature that you may have, check the appendices.

In our case, the following web link proved especially useful: http://bliny.net/blog/post/HoneywellAdemco-Vista-ICM-network.aspx

Consideration: C++ or Generic Serial Device ?

This link provided a reverse engineered protocol specification of a device that provides:

  • 1 TCP port for sending commands using the HTTP protocol
  • 1 UDP port for retrieving panel status information, that is sent to the global broadcast address of the network (INADDR_ANY)

There were two other ports exposed, but were deemed not to be useful for the implementation of this device.

This brings up two very important points:

Because we failed both criteria, the device was written as a C++ device.

Installation of a basic development environment

A basic development environment was set up on the target machine. Since we were not dependent on sql2cpp changes common in other plugins such as the Media Plugin, we chose a very quick and simple method for setting up a development environment that entailed:

  • Installing SVN
  • Getting the SVN checkout.
  • Installing enough of the builder to get the build dependencies needed.
  • Installing DCEGen
  • Installing Sql2cpp

NOTE: This method is ONLY meant for device driver development of a single device! For anything more complex, such as plugin development, or working on existing code, YOU SHOULD INSTALL A FULL BUILDER, AND HAVE IT CREATE PACKAGES FOR YOU.

Installing SVN

SVN can be installed using apt.

apt-get install subversion

Getting the SVN Checkout

At the time of this writing, the SVN checkout of the latest dev code can be retrieved here.

sudo -i
mkdir /home/src
cd /home/src
svn co http://svn.linuxmce.org/branches/LinuxMCE-0810

Wait for the checkout to complete.

Installing enough of the builder to get the necessary build dependencies

You can then install enough of the builder so that the necessary packages to build everything is installed.

cd /home/src/LinuxMCE-0810/src/Ubuntu_Helpers_NoHardcode
./install.sh
cd /usr/local/lmce-build
prepare-scripts/install-build-pkgs.sh

Let this complete. Lots of packages need to be installed, and this will take a while.

Installing DCEGen

Install DCEGen by doing the command:

apt-get install pluto-dcegen

Installing Sql2cpp

Install SQL2cpp by doing the command:

apt-get install pluto-sql2cpp

You now have everything needed to do device driver development.

Device Template

Code Development

Running DCEGen

Running Sql2cpp

Implementing code

Testing

Sending it all In

Sending in the Patch

Creating the Package Definition

Checking in the sqlCVS changes anonymously

You should be done at this point. The driver will now be built as part of our release process, and will become part of the autobuilds, so that you can either do your own builder as described in Building LinuxMCE 0810 or you can wait for the build process to produce packages for your new driver.