DCE Whisperer

From LinuxMCE
Revision as of 11:43, 9 July 2011 by Marie.o (Talk | contribs) (Create the Device Template)

Jump to: navigation, search

How to write a DCE Whisperer Bash Device Template

Prerequisits for being able to run it

Install the dce-whisperer and shell-io packages

Create the Device Template

  • Create a regular GSD device template in Web admin.
  • The Command line contains a call to Generic_Serial_Devices for a regular GSD device. For the whisperer based template, you put the filename of the bash script.
  • The device template bash script looks very similar to a ruby device template. The easiest way to start, get the DenonAmp script.

How to use a DCE Whisperer Bash Device Template

A DCE device based on the whisperer must be added the same way any other device is added to the system. If the device template has a detection script, it should get added automatically.

Notes on DCE Whisperer

<Uplink_> in SVN, under /branches/LinuxMCE-0810/src/DCE-Whisperer
<Uplink_> it was committed at revision 22089
<Uplink_> if you have a SVN checkout, look in src/DCE-Whisperer
<Uplink_> there, you have a self-contained deb package that you can build
<Uplink_> dpkg-buildpackage -rfakeroot -b -us -uc -tc
<Uplink_> and you get a deb
<K0K05> Stop right there. Do not let me waste more of your time. I'm putting together a new VirtualBox development installation
<Uplink_> if you install that deb, then you can read the script Test231.sh to get an idea of how to write a DCE device with it
<K0K05> That was crystal clear
<Uplink_> put this in a text file or something :)
<Uplink_> when you get the hang of it, write a Wiki page too
<K0K05> I promise to do that
<K0K05> And is it obvious how to write a device for TCP/IP ?
<Uplink_> it should be
<Uplink_> there a function at the top of the file, called Configure, and it has all the communication parameters that you need to set for any application
<Uplink_> basically, you say DeviceConnection_Type=inet
<Uplink_> and then find the relevant variables to set the IP address and port, below, in the same function
<Uplink_> everything that the device sends will be passed to the ProcessDeviceStream function (which is below Configure)
<Uplink_> also in configure, you can set some pre-processing parameters if you like
<Uplink_> for example, if the protocol is all text, and all the messages end up with the same character (\r for example), you can tell the framework that
<Uplink_> and it will split it at the terminator into lines before calling ProcessDeviceStream

The package shell-io in src/shell-io needs to be build as well.

The packages have been build are available from possy: