The CC1021 chip in this thing talks over two interfaces to the processor. The SPI interface is used to configure the chip, but the data in and out is over a separate digital interface. And that interface doesn't seem to be brought out to the expansion connector at the back of the unit. Oh, bother. So if I want to sniff the data back and forth between the CPU and the wireless chip, I can't do it from the expansion connector. And if it takes hacking the hell out of this thing to get that data, then it isn't something I want to do. So I can spend some time deciphering the register configuration while I wait for my IM-ME to arrive and pick the data up without using the console at all.
But there is more than one way to skin a cat. I had a suspicion that the Weatherlink Module you can buy from Davis for $100 simply passes the commands from the host PC to the processor in the VP2. I mentioned a while back that two serial ports are brought out on the expansion port. Here is a diagram of that port, by the way.
I used my new scope to see if any data was spewing out on either serial port or on PB4, PE2, PE3, or PC4. Nothing. But that didn't mean much. Nothing was asking for data, so nothing was coming out. And this thing tries to conserve power whenever it can. So just for grins, let's open up the VP2 firmware that Davis makes available on their web site in a hex editor.
This, of course, is an easy problem to solve, as most people who have played with an Arduino could tell you. I have one of these, strapped to work at 3.3V instead of the +5V it comes configured to by default. If you don't have one already, you can buy this one instead. It is already set up for 3.3V I/O.
|From the Good Guys at Sparkfun|
Next, I had to wire it up to one of the serial ports exposed on the expansion connector, but which one? Who knows? I guessed and started off with Serial Port 0. Here's the hookup.
WARNING: IF YOU SCREW THIS UP BY WIRING IT WRONG, FORGETTING TO SET 3.3V I/O ON THE FTDI ADAPTER, ZAPPING IT WITH STATIC, OR SOMETHING ELSE BONEHEADED, DON'T COME CRYING TO ME.
So that covers the hardware. Now what about software? All you need is a terminal program. If you are on Windows (sucka!), something like Hyperterm will work. On Linux, I used minicom, crap software that it is. I guessed that the settings I would need would be the same as that they recommend for the Weatherlink adapter: 19.2 kbaud and 8N1. Start googling now if you use minicom, because it is so stinking user unfriendly. Specifically, you'll want to know how to set the port it communicates out of (minicom -s as root, if I remember right). Remember, dmesg is your friend. There are two other things you want to do.
- Turn on your Caps Lock key. Commands to the Weatherlink dongle are all upper case, and it doesn't seem like it wants to make your life easy and convert for you.
- Turn on Local Echo in your terminal program, or whatever option it is that echos back the characters that you type. The Weatherlink dongle doesn't do this, so you'll be typing blind otherwise.
You are now in complete control of this thing.
Try a few other simple commands. VER prints a version date code, NVER is the version string. Again, refer to this document for more coolness. I'm a big fan of STRMON. Just follow it up at some point with STRMOFF or it will print this stuff forever.
This is the raw data coming from the outdoor unit, and it shows up every two seconds. The "7" on Row 1 is the wind speed in miles per hour (it is hex, so a windspeed of 'a' is 10 mph). Haven't figured out the rest of it yet, but it hardly matters. The serial protocol document linked just above the picture tells you how to get all the processed data out of the thing you could ever want. And today I just tripped over these Perl scripts that should do all the lifting for you. They are written to talk to the Weatherlink dongle, but most if not all of that script should work talking to the unit directly. Come to think of it, there's a lot of weather station software out there written by enthusiasts that should "just work" with this. If you try this out, drop a note in the comments.
So there we have it. No longer do you need to spend $100 on some Weatherlink software that you don't want to get the dongle you do. All you need is a cheap USB to serial converter, and the rest is up to you. I still intend to get wireless reception directly from the remote going once my IM-ME shows up in the mail, but that is probably going to take a little time. Enjoy this for now.