Hacking Ademco BiDirectional Protocol

October 25th, 2008

I want to interface into my Ademco alarm system, and the easiest way to do it is to intercept serial commands from the RF recieve module to the main unit.  Here’s what a waveform looks like..

From the looks of it, the duration of each packet is the same, so each bit should represent the same unit of time.  The first three transitions are the same for all packets, and the third transition is 2.5 bits long, so I would assume that’s a preable.  The rest of the data are in multiples of 420us.  I wrote a script to decode packets, and here’s a dump of a random capture.  Each line represents one message, like the one above…

1000000001001010111010001111110110001110101010001101101010001
1000000001001000011010001010101011001101111011001110011010001
1111110110001111111111001101111110001111011110001111111111111
1100000000001110111000001011011010001001101011001011111011001
1000000001001101101010001010011011001010111010001110111011001
1000000001001010010111001111101011001101100011001010110011001
1000000001001001100010001001100010001111110110001101010110001
1000000001001111110110001100111010001011011010001101101010001
1000000001001010111010001111110110001110101010001101101010001
1000000001001000011010001010101011001101111011001110011010001

Next I get to try to find some sort of pattern to the above mess, and hopefully the data is not encrypted — which I doubt it would be.. If anyone has any ideas, please let me know!

Electronics , , ,

FINALLY – the MSP430x2xx new serial module sucks! Finally got I2C working.

October 20th, 2008

It took a solid 25+ hours of work, but I finally got the MSP430F2618 to talk to the AD5933 via I2C.  The TIs documentation sucks, their module sucks, and I’m angry.  But it works now.  A hit to those that might be stuck: The USCIABxTX_ISR() interrupt vector should be called the Master interrupt vector, and their USCIABxRX_ISR() interrupt vector should be the Slave interrupt vector.  In master mode, both the TX and RX interrupt enables results in the TX_ISR() vector being called.

Other issues include that the SDA line gets stuck latched low and will persist through a power cycle and a reprogramming.  You expicitley have to pull the line high in software to reset it.

A bunch of other issues later, I got it working..  I ended up picking up a new logic analyzer because of it’s improved interface than my USBee unit.  $150, and it ROCKS.  Joe makes them locally, and I recommend you pick one up for your toolbox.

data read from ad5933

data read from ad5933

Electronics

Migrating to new hosting

October 16th, 2008

So I’m migrating to a new hosting provider. I’ve always hated godaddy, but have been too lazy to migrate till now.  I’m also looking at migrating all my content from boom.net, and working on a 4th gen version of my photoalbum code.

Personal

Rancilio Silvia PID Conversion

October 14th, 2008

img_0018.jpgI’ve finally reached a point where 50% of my pulled shots no longer suck, so I thought I would go ahead with the PID conversion for my espresso machine.  I actually had everything for the conversion in my office, except for the enclosure which I picked up from Newark for $18 (Hammond enclosure).

I followed the steps from http://www.murphyslawonline.com/silvia.html for the most part, and also found http://www.gumbrell.com/archives/2005/02/pidd-silvia-uk.html useful.

The deviations were mostly with regards to the thermocouple mount.  I had a bare bone thermocouple, put a gob of thermal conductive paste on it, and stuck it underneath one of the screws on the boiler.  It seems to work OK.

I used velcro to mount the enclosure, but it doesn’t look very stable, so I’m going to have to figure out something else.  Otherwise, we shall see how it influences my shots.

More photos here.

Electronics, Personal

BioImpedence Success

August 26th, 2008

img_3649.jpgStephan from VG Bio came over for a visit and we spent the day debugging the BioImpedence circuit based on the AD5933 IC.  It consists of a voltage to current converter, a differential amplifier, and the AD5933 IC (as well as a number of passives).  Using the development software, we were able to graphically visualize Stephan’s breathing.  Pretty cool.

Look here for more photos.

Electronics, HealthMonitor

dosfs.c bugfix — FAT filesystem for embedded systems

August 24th, 2008

I’ve not been maintaining my web pages, especially given that CMSMS’s bugfix resulted in my friend’s computer being hacked by A) some IRC people who installed bot software and B) some people that tried to use my friend’s computer to hack into some FBI site.  *grumble*

The worst part is that I followed the upgrade instructions as documented in trying to fix the hole, but there was no mention of removing the depreciated file with the vulnerability.  Shame on you CMSMS.  That’s when attack B happened.  *grumble some more*

Anyhow,  I just wanted to post this to save some people the headaches that I suffered about a year ago when we fixed some bugs in dosfs.  Although I submitted the bugfix to him about a year ago, and again a month ago, he seems to have stopped maintaining the code.  So, here’s the fix.  It’s mostly based on initializing variables and (more importantly) a fix in the seek() code by John Canny, my advisor.   Anyhow, here’s the patch.

				

Software

Vista is Lame — ECN Stupidity & southwest.com

June 15th, 2008

For some reason, I was no longer able to connect to southwest’s website from my Vista machine, though I could reach it without a problem from my other linux boxes.  Now, I’m somewhat technical savvy, but it was quite a challenge to find the problem and come up with a solution.

First, the problem: I could no longer browse http://www.southwest.com/ from my vista machine.  It worked from my unix boxes.  I investigated a number of roblems ranging from viruses on my box to a corrupted hosts table.  Nothing worked.  Odder still, southwest.com is DNS round robin’ed to two different IP – and I experienced the same thing on both IPs.

The solution:  After trying a lot of things over multiple days, I managed to install tcpdump on my linksys router (running DD-WRT).  I noticed a small diference in the packets going from my vista machine and from my linux box. 


01:14:39.667122 IP 76-191-215-90.dsl.dynamic.sonic.net.49913 > www.southwest.com.www: SWE 212965372:212965372(0) win 8192
01:14:42.665436 IP 76-191-215-90.dsl.dynamic.sonic.net.49913 > www.southwest.com.www: SWE 212965372:212965372(0) win 8192


01:14:50.994221 IP 76-191-215-90.dsl.dynamic.sonic.net.40063 > www.southwest.com.www: S 3059118406:3059118406(0) win 5840
01:14:51.047515 IP www.southwest.com.www > 76-191-215-90.dsl.dynamic.sonic.net.40063: S 2964067491:2964067491(0) ack 3059118407 win 5792

The blue is the vista box and the red is the linux box.  If you notice, the vista box has flags ‘SWE’ set and the unix box only has the ‘S’ flag set.  I forwarded this to two of my smart friends, and one replied…

wtf? Those are some fucked up flags..

S = SYN ( that’s fine )
W = ECN CWR (Explicit Congestion Notification – Congestion Window Reduced)
E = ECN-Echo (telling the sender it received a CE packet)

wtf is Vista trying to do??

The ECN shit is all from RFC 3268… read up on it if you want… I don’t
know too much about it, sorry.

Fucking Microsoft needs to die in a fire, regardless.

So I googled Vista and ECN, and found a command to turn of ECN…

C:\Users\reza.slut>netsh interface tcp set global ecncapability=disabled

And sure enough, that command turned it off, and now I can go to http://southwest.com/ from my vista box.  My only question is — how is a layman supposed to be able to figure that out?  God, there are many people at microsoft that deserve to be shot.

Uncategorized

Tricoder v6 assembled

May 15th, 2008

I’m very excited; the latest version of the Berkeley Tricorder has been assembled, and is en route back here.  I’m expecting to get them in early next week.  Yay!

cardiac6-final2.jpgcardiac6-final1.jpg

Electronics, HealthMonitor

Iron Man Rules!

May 4th, 2008

Oh my!  What a thrill to have the movie industry juggernaut actually release a good movie!!! It’s unheard of.  I drove home way too fast after watching the flick, got home, and started pacing back and forth… It took about 20 minutes before I could sit down.  I will be seeing it again in the next couple days.  And I must say that they did such a great job casting the characters.

I will add that one of the reasons I loved the movie was that it was internally totally logically consistent.  I hate how movies try to pretend that they are somewhat realistic by throwing some refernces to real technologies, then utilizing that technology in an unrealisitic way.  Please, why not start out with a ficticious but internally consistent technology, then utilize that technolog as the author sees fit.

The only problem now is trying to figure out how to go to sleep after that rush.

Personal

Tricorder v6 off to assembly

April 22nd, 2008

A long time in the works, but this version adds full pulse oximetry support, includes a mini-B usb connector for interfacing and battery charging, and a lot of RF filtering to help make the ECG signal more stable in noisy environments.      cardiac6.png

EDIT: Forgot to mention, we’re also switching to the LIS302DL accelerometer, same one as in the iPhone, and we’ve switched our reference voltage amp to the AD8644 to help with the SP02 stuff.  The new design frees up some A2Ds which we’re using to monitor battery voltage and bringing out the other unused channels to the big connector on the bottom.

Electronics, HealthMonitor