Tag Archives: security

VM167 Prototype experiments – SMS on Open

For some reason I decided today to make a system to drop me a text message when the door of my bedroom is opened.  I started off thinking about how this could be done – I didn’t fancy hacking a mobile to send a text particularly, I wanted more of a computer controlled solution. While I was thinking about the more complicated aspects of my sudden unexplained desire to make my room high security I did the more boring task  of laying 10 meters of alarm cable neatly and invisibly around the perimeter of my room.

With this done, I had formulated the solution in my head – here’s how it works:

The VM167 Prototype Experiment board created by the good people at Velleman has an ample number of digital inputs to do this.  I basically hooked up the reed switch on my door (Read: a type of switch that closes when it’s placed in a magnetic field that is strong enough and opens when it isn’t) to the VM167 on the other side of the room.  From there, I hooked the VM167 up to the lovely netbook I got as one of our teams prizes at the Microsoft UK Imagine Cup 2011 finals.  I then wrote a quick application in C# that accesses the Mediaburst SMS API to send SMS messages for a nice low fee.

The VM167 Prototype board

The VM167 Prototype board

The little black taped-up thing in the picture above is just a small Lithium battery – the board doesn’t react to open/closed circuit as an alarm-geek like myself might expect, it actually expects a potential difference between 1 and 5 volts to set the input to high.  A minute amount of current is drawn so this little Lithium cell placed in-line works a treat.

And the result? Works like a charm.  The program I wrote is really simple – it just provides a 15 second timer to “escape” the room and get the door shut.  Once the door is opened, a text message is dispatched instantly and the program waits for the user to reset it to avoid spamming hundreds of texts if the door is just blowing around or something).

A text message letting me know the door is open.

A text message letting me know the door is open.

I doubt I’ll ever have any use for it, but it got me using the VM167 prototype that Velleman sent me, and I might even develop something for iOS later down the line if Apple can stop people stealing my work.

Anyway, to finish off here’s a little preview of how silly my UI design is:

Honestly, this was rushed...

Honestly, this was rushed...

Stay tuned for some posts from NYC!

Scantronic 9651 keypad/PC interface idea

One of the various bits of rubbish I’ve got hanging around is an old Scantronic 9651 keypad (actually a Scantronic 930).  For the uninitiated: Scantronic is a range of security alarms manufactured by Cooper Safety. In the security installers industry, they tend to be branded by individual companies that do the actual install jobs; for example, my control keypad is branded by ADT.

Long story short, I’d like to hook this up to my Mac so I could write some kind of emulation software or otherwise use it as a control device.  “Why?” I hear you ask, and I retort: “If you are still asking `Why?` at this point, why are you still reading my blog?”.  Onwards with the geekery…

The Scantronic Keypad - Branded by ADT

It is my understanding that these keypads function as serial terminals that send keystrokes to, and receive screen updates from the main controller board.  Up to 5 keypads can be connected to one controller board to allow control of the system from several different locations around a site.  They are to be connected in a daisy-chain or star configuration (I.e. in parallel).  This information is quite readily available in the form of the various manuals that Cooper release with their products.  The protocol that dictates how the keystrokes and screen updates are communicated is however, a more closely guarded secret.

The headers that I think are associated with the serial communication between the keypad and the controller board are labelled “SIG” and “SRQ”.  My initial thought was that the “SIG” pin would convey 1s and 0s as high and low voltage values with the 0V pin.  A check with the oscilloscope shows that this isn’t the case.  Further investigation shows that during key presses when the keypad is powered up, all the pins maintain their voltages as usual, with no variation at all.  Curious.

I investigated the behaviour of the keypad without messing with the headers at all.  Internally, there are two DIP-style switches that are labelled “PROG” and “TEST”.  The “PROG” switch places the keypad in a programming mode (a rudimentary interface allowing the enabling and disabling of the backlight and sounder, as well as the modification of the keypad address).  The “TEST” switch places the keypad in a testing mode, flashing all the LEDs in a sequential manner and testing the LCD display.  When the keypad is in it’s “normal” mode (I.e. with both the internal switches set to off), it seems to accept 16 keystrokes after powering up, then starts beeping with each keystroke in a way that suggests the keystroke was declined.  This behaviour gives me the impression that there is some kind of buffer in effect here.  Curiouser.

As a continuation of this thought, perhaps the “SRQ” pin comes in to this.  I would theorise that the controller board sends some kind of identifiable pulse unique to each keypad address on a regular basis on the “SRQ” pin - say, every 5 seconds each of the 5 possible keypad addresses are “polled” by the controller board.  This would mean that each keypad has 1 second to dump its buffer of keystrokes on the “SIG” pin in a TDMA-style arrangement whereby up to 5 keypads may share one communication medium (in this case, the “SIG” pin).  Though of course, there is always the possibility that I am wrong.  Another possibility is of course that this keypad is fried.  The time in my cupboard under a load of electronic rubbish and quality time with our good friend Mr. Electrostatic discharge might well have finished this guy off.  After all, it IS nearly as old as me…

Nearly as old as me

This thing is like... way old!

I have an ace up my sleeve here however.  I have just won a wonderful like-new Scantronic 9651 Controller board with an additional 930 keypad!  Hopefully I will be able to inspect the behaviour of the controller boards respective “SIG” and “SRQ” pins and crack this whole thing wide open, at which point I will of course publish a wonderful blog post detailing all the geeky goodness.

Until then, play safe!