Understanding xAP with .Net

by Joshua Harley 24. May 2009 02:42

I am currently writing a .Net application to listen, log and graph the temperatures and fan speeds of my servers using the xAP protocol. I’ll be using SpeedFan to monitor the temperatures and fan speeds of the servers because SpeedFan includes the ability to broadcast the current sensors using xAP. Sounds complicated right? We’ll lets look at the xAP protocol first.

The xAP Home Automation Protocol is a lightweight, ASCII based communication protocol. It’s a simple protocol that takes very little processing power to use and is actually easy to work with. It seems their goal is to work across multiple mediums (ethernet, serial, parallel) and multiple systems (full machine, light embedded systems, and even audrino boards!) while remaining simple and human readable.

xAP protocol message from SpeedFan
xAP-header
{
v=12
hop=1
uid=FF671100
class=PC.status
source=Almico.SpeedFan.NARU
}
temp.1
{
id=Core
curr=48.0
want=40
warn=50
}
temp.2
{
id=CPU Off Die
curr=40.0
want=40
warn=50
}
temp.3
{
id=Motherboard
curr=40.0
want=40
warn=50
}
temp.4
{
id=HD0
curr=48.0
want=40
warn=50
}
fan.1
{
id=Fan1
curr=3342
}

As you can see in the message above you can easily read the following information:

  • The class of the message is the type of PC.Status.
  • The source is from SpeedFan by Almico on the computer Naru.
  • There are 4 temperature sensors and 1 fan sensor on the server as reported by SpeedFan.

xAP over Ethernet uses a UDP broadcast on port 3639. Now, armed with this information, writing a simple .Net console application doesn’t seem too hard does it?

Hopefully by now you can already see a way or two in processing this text-based message. Believe me, it isn’t as hard as it seems! Over the next couple posts we’ll see a method for parsing the message and the incorporation of a few of the newer .Net technologies (some extension methods and lambda expressions)! Stay tuned!

Comments

5/10/2010 12:45:21 PM #

 Bikes Article

Subsequently, after spending many hours on the web at last We have identified a person that genuinely does know what they are discussing thanks a lot a whole lot excellent post.

Bikes Article Serbia

5/10/2010 3:22:29 PM #

 Finance Article

Subsequently, after investing several hours on the internet at last I've discovered an individual that really does understand what they are discussing appreciate it a whole lot really great posting.

Finance Article Brunei Darussalam

5/18/2010 12:23:13 AM #

CFD

Great post, cleared alot up in my mind. Thanks!

CFD Singapore

5/26/2010 4:26:25 AM #

Napoleon Haynam

Howdy there,Terrific blog post dude! i am just Tired of using RSS feeds and do you use twitter?so i can follow you there:D.
PS:Have you thought to be putting video to your blog to keep the visitors more enjoyed?I think it works., Napoleon Haynam

Napoleon Haynam United States

6/16/2010 6:49:13 PM #

Luke Pippen

Please help me get the word out. With all of the recent disasters, the Red Cross needs everyone's support. Please visit RedCross.org and volunteer or donate.

Luke Pippen United States

6/28/2010 9:29:33 AM #

toy drums

This post is very educational stuff and written well for a change. It's nice to see that some people still know how to produce a quality post!

toy drums United States

6/28/2010 10:33:32 PM #

Tinnitus Remedies

Impressive blog post, a bunch of useful knowledge.

Tinnitus Remedies United States

8/5/2010 3:49:24 AM #

ray ban aviator

This is my very first time here, really good looking blog. I discovered a lot of interesting stuff within your blog especially it's discussion. From all the remarks on your posts, it looks like this is really a extremely popular site. Keep up the good work.

ray ban aviator United States

Add comment


(Will show your Gravatar icon)

  Country flag

biuquote
  • Comment
  • Preview
Loading