<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Steve's Software Trek</title>
	<atom:link href="http://steve.kargs.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://steve.kargs.net</link>
	<description>Open Source Software Haven</description>
	<lastBuildDate>Fri, 09 Dec 2011 15:49:46 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>BACnet Meeting and Plugfest in Atlanta</title>
		<link>http://steve.kargs.net/bacnet/bacnet-meeting-and-plugfest-in-atlanta/</link>
		<comments>http://steve.kargs.net/bacnet/bacnet-meeting-and-plugfest-in-atlanta/#comments</comments>
		<pubDate>Wed, 30 Nov 2011 03:38:33 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[BACnet]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=258</guid>
		<description><![CDATA[I went to the BACnet meetings in Atlanta in October, 2011. A couple of weeks later in November, 2011, I went to the BACnet Plugfest in Atlanta. Lots of fun! The Lighting Applications working group met for a couple of days, and crafted responses to the public review comments for our Lighting Output object. We [...]]]></description>
			<content:encoded><![CDATA[<p>I went to the BACnet meetings in Atlanta in October, 2011. A couple of weeks later in November, 2011, I went to the BACnet Plugfest in Atlanta. Lots of fun!</p>
<p><a href="http://steve.kargs.net/wp-content/uploads/2011/08/bacnet-working-group-512.jpg"><img class="alignnone size-full wp-image-265" title="bacnet-working-group-512" src="http://steve.kargs.net/wp-content/uploads/2011/08/bacnet-working-group-512.jpg" alt="" width="512" height="128" /></a></p>
<p>The Lighting Applications working group met for a couple of days, and crafted responses to the public review comments for our Lighting Output object. We also got the draft for the next pubic review done, and it should be reviewed with only substantive changes. Good news for this object that has been in the works for many, many years. We also crafted public review responses for the Channel object and the WriteGroup service, and drafted a subsequent review document.</p>
<p><a href="http://steve.kargs.net/wp-content/uploads/2011/08/tin-drum.jpg"><img class="alignnone size-medium wp-image-266" title="tin-drum" src="http://steve.kargs.net/wp-content/uploads/2011/08/tin-drum-300x179.jpg" alt="tin drum for lunch" width="300" height="179" /></a></p>
<p>Coleman, Dave, Dana, Don, and I ate at the Tin Drum restaurant for lunch. Delicious!</p>
<p><a href="http://steve.kargs.net/wp-content/uploads/2011/08/bacnet-meeting-512.jpg"><img class="alignnone size-full wp-image-267" title="bacnet-meeting-512" src="http://steve.kargs.net/wp-content/uploads/2011/08/bacnet-meeting-512.jpg" alt="" width="512" height="171" /></a></p>
<p>The BACnet meetings were again held in the spacious Georgia Tech Technology Square Research Building.</p>
<p><a href="http://steve.kargs.net/wp-content/uploads/2011/11/IMAG0312.jpg"><img class="alignnone size-medium wp-image-270" title="IMAG0312" src="http://steve.kargs.net/wp-content/uploads/2011/11/IMAG0312-300x179.jpg" alt="" width="300" height="179" /></a></p>
<p>I brought a <a title="WattStopper DLM" href="http://wattstopper.com/DLM/" target="_blank">WattStopper DLM</a> setup for the BACnet International Plugfest, held at the Westin hotel in Atlanta.  It&#8217;s always fun to have bright lights controlled by a BACnet universal dimmer!  I presented a workshop on the work that the Lighting Applications working group has been doing, with some tips for developers.  It was titled <a href="http://steve.kargs.net/wp-content/uploads/2011/11/BACnet_Lighting-Steve_Karg.zip">&#8220;New BACnet objects and services have been proposed to support lighting control. What can you do with them? What can you do to prepare your devices?&#8221;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/bacnet/bacnet-meeting-and-plugfest-in-atlanta/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BACnet Leader of the Pack Awards</title>
		<link>http://steve.kargs.net/bacnet/bacnet-leader-of-the-pack-awards/</link>
		<comments>http://steve.kargs.net/bacnet/bacnet-leader-of-the-pack-awards/#comments</comments>
		<pubDate>Sat, 15 Oct 2011 03:19:00 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[BACnet]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=272</guid>
		<description><![CDATA[BACnet International presented its annual &#8220;Leaders of the Pack&#8221; program to recognize the achievements of individuals and companies involved in the BACnet community. The Award Ceremony took place during the 2011 Facility Decisions Conference &#38; Expo on October 11-12, 2011 in Las Vegas, NV. I received one of the awards (although I wasn&#8217;t in Las [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.bacnetinternational.org/" target="_blank">BACnet International</a> presented its annual &#8220;Leaders of the Pack&#8221; program to recognize the achievements of individuals and companies involved in the <a href="http://www.bacnet.org/" target="_blank">BACnet </a>community. The Award Ceremony took place during the 2011 Facility Decisions Conference &amp; Expo on October 11-12, 2011 in Las Vegas, NV.</p>
<p>I received one of the awards (although I wasn&#8217;t in Las Vegas), which was really unexpected.  The full list of recipients is listed on the <a href="http://www.bacnetinternational.org/displaycommon.cfm?an=1&amp;subarticlenbr=206" target="_blank">BACnet International &#8220;Leaders of the Pack&#8221; website press release</a>.</p>
<p><a href="http://steve.kargs.net/wp-content/uploads/2011/11/BACnet-leader-of-the-pack-award.jpg"><img class="alignnone size-medium wp-image-273" title="BACnet-leader-of-the-pack-award" src="http://steve.kargs.net/wp-content/uploads/2011/11/BACnet-leader-of-the-pack-award-179x300.jpg" alt="" width="179" height="300" /></a><a href="http://steve.kargs.net/wp-content/uploads/2011/11/IMAG0175.jpg"><img class="alignnone size-medium wp-image-274" title="IMAG0175" src="http://steve.kargs.net/wp-content/uploads/2011/11/IMAG0175-179x300.jpg" alt="" width="179" height="300" /></a></p>
<p>Pete Baselici was at the awards ceremony, so he received the award for me, and presented it to me when he returned.</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/bacnet/bacnet-leader-of-the-pack-awards/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>BACnet Bill</title>
		<link>http://steve.kargs.net/bacnet/bacnet-bill/</link>
		<comments>http://steve.kargs.net/bacnet/bacnet-bill/#comments</comments>
		<pubDate>Sun, 05 Jun 2011 20:09:10 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[BACnet]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=252</guid>
		<description><![CDATA[I received the news yesterday that my friend, Bill Swan, died after a sudden illness.  I had just seen Bill at the interim BACnet meetings in San Francisco at the beginning of May, 2011.  A week later he was in Germany for a BACnet Plugfest.  Bill became critically ill a week later. I have always [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://steve.kargs.net/wp-content/uploads/2011/06/Bill-Swan-2011-January.jpg"><img class="alignright size-thumbnail wp-image-254" title="Bill-Swan-2011-January" src="http://steve.kargs.net/wp-content/uploads/2011/06/Bill-Swan-2011-January-150x150.jpg" alt="Bill Swan at the January 2011 BACnet meeting in Las Vegas" width="150" height="150" /></a>I received the news yesterday that my friend, Bill Swan, died after a sudden illness.  I had just seen Bill at the interim BACnet meetings in San Francisco at the beginning of May, 2011.  A week later he was in Germany for a BACnet Plugfest.  Bill became critically ill a week later.</p>
<p>I have always enjoyed being around Bill. We had lots of things in common &#8211; photography, BACnet, microcontrollers, politics, family, and religion.  Twice a year we met together at BACnet meetings at the ASHRAE meetings over a weekend, and Bill would always be searching out a local Anglican church to attend, while I sought a Catholic church.  Twice a year we met during the week for BACnet interim meetings, usually in Germantown and Atlanta, and enjoyed the local food. We would compare photography ideas and equipment stories, talk about putting BACnet into tiny devices, and discuss elections and local politics.  We often talked about his family &#8211; his wife Kathy, and his daughters and how they were doing in school.</p>
<p><a href="http://steve.kargs.net/wp-content/uploads/2011/06/Bill-Swan-plugfest-2009.jpg"><img class="alignright size-thumbnail wp-image-255" title="Bill-Swan-plugfest-2009" src="http://steve.kargs.net/wp-content/uploads/2011/06/Bill-Swan-plugfest-2009-150x150.jpg" alt="Bill Swan at the 2009 BACnet Plugfest" width="150" height="150" /></a>Bill was a prolific writer, and wrote the <a href="http://bacnetbill.blogspot.com/" target="_blank">BACnet Bill blog</a> and the <a href="http://continuinghome.blogspot.com/" target="_blank">Continuing Home blog</a>.  He wrote numerous <a href="http://www.bacnet.org/Bibliography/index.html" target="_blank">BACnet tutorials and articles</a>.  He wrote numerous BACnet proposols (at least 89) to create new objects and services, or fix problems in BACnet, and collaborated on many more.  I recall Bill as ever the international collaborator, bringing needs from other countries into our BACnet committee.  I remember when Bill took over the BACnet Chair from Steve Bushby, and how he moved from being a timid leader, to running the BACnet meetings with confidence.</p>
<p>The BACnet committee and working groups are a small bunch of unique individuals, and any single contributor would be missed.  But Bill will be missed not just for his contributions, but for his friendship, creativity, and gentle nature that he brought with him.</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/bacnet/bacnet-bill/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>BACnet Meetings and Embedded Systems Conference</title>
		<link>http://steve.kargs.net/bacnet/bacnet-meetings-and-embedded-systems-conference/</link>
		<comments>http://steve.kargs.net/bacnet/bacnet-meetings-and-embedded-systems-conference/#comments</comments>
		<pubDate>Tue, 24 May 2011 15:47:11 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[BACnet]]></category>
		<category><![CDATA[travel]]></category>
		<category><![CDATA[bacnet]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=229</guid>
		<description><![CDATA[I had BACnet meetings the week of May 2, 2011, in San Francisco. It also happened that the Embedded Systems Conference was the same week in San Jose. I perused my BACnet meeting schedule, and found that I could attend the Embedded Systems Conference on Thursday morning, which would enable me to see the exhibits, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://steve.kargs.net/wp-content/uploads/2011/05/jeri-ellsworth-ESC-2011.jpg"><img class="alignright size-thumbnail wp-image-232" title="jeri-ellsworth-ESC-2011" src="http://steve.kargs.net/wp-content/uploads/2011/05/jeri-ellsworth-ESC-2011-150x150.jpg" alt="" width="150" height="150" /></a>I had <a href="http://www.bacnet.org/" target="_blank">BACnet</a> meetings the week of May 2, 2011, in San Francisco.  It also happened that the Embedded Systems Conference was the same week in <a href="http://en.wikipedia.org/wiki/San_Jose,_California" target="_blank">San Jose</a>.  I perused my BACnet meeting schedule, and found that I could attend the Embedded Systems Conference on Thursday morning, which would enable me to see the exhibits, and also hear the keynote from <a href="http://en.wikipedia.org/wiki/Jeri_Ellsworth" target="_blank">Jeri Ellsworth</a>.</p>
<p>My flight to San Francisco from Birmingham went through Houston.  In Houston, I got to ride the <a href="http://en.wikipedia.org/wiki/TerminaLink" target="_blank">Automated People Mover</a> train between concourses, always a highlight on my trips since I worked on these vehicles at several airport and downtown systems for <a href="http://www.bombardier.com/" target="_blank">Westinghouse Transportation Systems</a> from 1992-1997.   The train performed flawlessly &#8211; perfect programmed stop, smooth acceleration, and very little jerk.  Much to my delight, San Francisco Airport also had <a href="http://en.wikipedia.org/wiki/AirTrain_(SFO)" target="_blank">Automated People Mover</a> trains, and they also worked very well to get me to the rental car garage.</p>
<p><a href="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1031.jpg"><img class="alignnone size-thumbnail wp-image-233" title="IMAG1031" src="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1031-150x150.jpg" alt="" width="150" height="150" /></a><a href="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1032.jpg"><img class="alignnone size-thumbnail wp-image-234" title="IMAG1032" src="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1032-150x150.jpg" alt="Guideway for the Automated People Mover" width="150" height="150" /></a><a href="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1034.jpg"><img class="alignnone size-thumbnail wp-image-235" title="IMAG1034" src="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1034-150x150.jpg" alt="View from Automated People Mover" width="150" height="150" /></a></p>
<p>The BACnet meetings were held at the <a href="http://www.pge.com/pec" target="_blank">The Pacific Energy Center</a> in downtown San Francisco.  We discussed the Property_List property for objects, the Zero Config algorithm for MS/TP MAC addressing, and the You-Are service for address and device ID assignment. More importantly, we celebrated <a href="http://en.wikipedia.org/wiki/Cinco_de_Mayo" target="_blank">Cinqo de Mayo</a> at <a href="http://www.chevys.com/" target="_blank">Chevy&#8217;s</a>.</p>
<p><a href="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1036.jpg"><img class="alignnone size-thumbnail wp-image-239" title="IMAG1036" src="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1036-150x150.jpg" alt="BACnet Meeting at Pacific Energy Center" width="150" height="150" /></a><a href="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1056.jpg"><img class="alignnone size-thumbnail wp-image-240" title="IMAG1056" src="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1056-150x150.jpg" alt="BACnet Meeting at Pacific Energy Center" width="150" height="150" /></a><a href="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1063.jpg"><img class="alignnone size-thumbnail wp-image-241" title="IMAG1063" src="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1063-150x150.jpg" alt="Cinco de Mayo at Chevy's" width="150" height="150" /></a></p>
<p>On Thursday I arrived at the Embedded Systems Conference a little early, and got to meet Jeri in her <a href="http://www.youtube.com/watch?v=RLFLwZ-JGaU" target="_blank">motion activated Light Emitting Dress</a> before her talk.  After the keynote, I toured the exhibits and picked up several new development kits from microcontroller vendors.  The nice surprise was to see my STM32 Challenge contest entry displayed at the STM exhibit.  I didn&#8217;t win, but I had fun.  The S<a href="http://www.stm32challenge.com/detail/422" target="_blank">TM32 Design Challenge entry</a> was just a simple port of my <a href="http://bacnet.sourceforge.net/" target="_blank">BACnet Protocol Stack</a> to the <a href="http://www.st.com/stm32" target="_blank">STM32F103</a> ARM Cortex M3 XL-Density Performance Line microcontroller with 1 MByte of embedded Flash and 96K SRAM.  I also created a printed circuit board to attach to the STM32 Discovery Kit so that I could integrate RS-485, LEDs, and a DIP switch.</p>
<p><a href="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1052.jpg"><img class="alignnone size-thumbnail wp-image-236" title="IMAG1052" src="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1052-150x150.jpg" alt="Jeri Ellsworth keynote presentation at ESC" width="150" height="150" /></a><a href="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1054.jpg"><img class="alignnone size-thumbnail wp-image-237" title="IMAG1054" src="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1054-150x150.jpg" alt="T-Rex at ESC" width="150" height="150" /></a><a href="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1055.jpg"><img class="alignnone size-thumbnail wp-image-238" title="IMAG1055" src="http://steve.kargs.net/wp-content/uploads/2011/05/IMAG1055-150x150.jpg" alt="STM32 Design Challenge Finalists" width="150" height="150" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/bacnet/bacnet-meetings-and-embedded-systems-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Cloudshark &#8211; Wireshark in the Cloud</title>
		<link>http://steve.kargs.net/bacnet/cloudshark-wireshark-in-the-cloud/</link>
		<comments>http://steve.kargs.net/bacnet/cloudshark-wireshark-in-the-cloud/#comments</comments>
		<pubDate>Tue, 07 Dec 2010 17:57:26 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[BACnet]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=224</guid>
		<description><![CDATA[A post on the Wireshark developers mailing list showed up at the beginning of December, 2010, about the Cloudshark.org website.  Cloudshark is a website that allows you to view Wireshark captures online.  The captures can be in any capture format that Wireshark or T-Shark supports.  The site also allows linking to captures by using &#8220;http://cloudshark.org/view?url=&#8221; [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://steve.kargs.net/wp-content/uploads/2010/12/IMG_9824.jpg"><img class="alignright size-thumbnail wp-image-225" title="Clouds from an Airplane" src="http://steve.kargs.net/wp-content/uploads/2010/12/IMG_9824-150x150.jpg" alt="Clouds from an Airplane" width="150" height="150" /></a>A post on the <a href="http://wireshark.org/" target="_blank">Wireshark </a>developers mailing list showed up at the beginning of December, 2010, about the <a href="http://cloudshark.org/" target="_blank">Cloudshark.org</a> website.  Cloudshark is a website that allows you to view Wireshark captures online.  The captures can be in any capture format that Wireshark or <a href="http://www.wireshark.org/docs/man-pages/tshark.html" target="_blank">T-Shark</a> supports.  The site also allows linking to captures by using &#8220;http://cloudshark.org/view?url=&#8221; as the URL.  Here are a couple  captures that I have stored at my <a href="http://kargs.net/captures/" target="_blank">kargs.net/captures/</a> site:</p>
<p><a href=" http://cloudshark.org/view?url=http://kargs.net/captures/mstp_20091014112427.cap" target="_blank">BACnet MS/TP</a></p>
<p><a href="http://cloudshark.org/view?url=http://kargs.net/captures/plugfest-delta-2b.cap" target="_blank">Plugfest with Delta Controls</a></p>
<p><a href="http://cloudshark.org/view?url=http://kargs.net/captures/TimeSync_Decode_Noon.pcap" target="_blank">TimeSync Decode Noon</a></p>
<p><a href="http://cloudshark.org/view?url=http://kargs.net/captures/bacnet-services.cap" target="_blank">BACnet Services</a></p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/bacnet/cloudshark-wireshark-in-the-cloud/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Wireshark on Ubuntu not as root</title>
		<link>http://steve.kargs.net/bacnet/wireshark-on-ubuntu-not-as-root/</link>
		<comments>http://steve.kargs.net/bacnet/wireshark-on-ubuntu-not-as-root/#comments</comments>
		<pubDate>Thu, 21 Oct 2010 21:03:28 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[BACnet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[bacnet]]></category>
		<category><![CDATA[wireshark]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=212</guid>
		<description><![CDATA[I often need to capture BACnet network traffic using Wireshark while I am running Ubuntu Linux. I&#8217;ve always had to run Wireshark as root (usually via gksu or kdesu) in order to capture from any interfaces (i.e. eth0, wlan0).  For awhile, there was an additional Wireshark menu item that included the &#8220;run as root&#8221; option. [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://steve.kargs.net/wp-content/uploads/2010/10/chris-mario-happy.jpg"><img class="alignright size-medium wp-image-220" title="chris-mario-happy" src="http://steve.kargs.net/wp-content/uploads/2010/10/chris-mario-happy-176x300.jpg" alt="" width="176" height="300" /></a>I often need to capture <a href="http://www.bacnet.org/" target="_blank">BACnet</a> network traffic using <a href="http://wireshark.org/" target="_blank">Wireshark</a> while I am running <a href="http://ubuntu.com/" target="_blank">Ubuntu Linux</a>. I&#8217;ve always had to run Wireshark as root (usually via gksu or kdesu) in order to capture from any interfaces (i.e. eth0, wlan0).  For awhile, there was an additional Wireshark menu item that included the &#8220;run as root&#8221; option.  However, running an application &#8220;as root&#8221; has some downsides (like being insecure), and in the latest release of Ubuntu, there is no menu item to run &#8220;as root&#8221;.   The downside of running as root for me was that the capture files saved by default into /root directory, and saved with root group and owner permissions.</p>
<p>Today, after launching the menu and seeing no interfaces (again), I decided to search the Internet and find a better way, and found two things of note.  The first method, which I found posted on <a href="http://start.ubuntuforums.org/showthread.php?p=9903794#post9903794" target="_blank">Ubuntu Forums</a>, is the manual way of configuring Wireshark to run as a normal user (with admin group privileges) by configuring only dumpcap to have the elevated privileges:</p>
<pre>$ sudo apt-get install libcap2-bin wireshark
$ sudo chgrp admin /usr/bin/dumpcap
$ sudo chmod 750 /usr/bin/dumpcap
$ sudo setcap cap_net_raw,cap_net_admin+eip /usr/bin/dumpcap</pre>
<p>The second method was outlined in <a href="https://bugs.launchpad.net/ubuntu/+source/wireshark/+bug/513903" target="_blank">Ubuntu Bug #513903 at Lauchpad</a> and can be done with Ubuntu Lucid and beyond.  It creates a new group &#8220;wireshark&#8221;, configures dumpcap with setcap, and requires the user to manually add themselves to the &#8220;wireshark&#8221; group (then log out and log back in to activate it).</p>
<pre>$ sudo dpkg-reconfigure wireshark-common
$ sudo adduser skarg wireshark
$ exit</pre>
<p>Don&#8217;t do both methods, as they are slightly different solutions.</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/bacnet/wireshark-on-ubuntu-not-as-root/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>BACnet Meeting in Albuquerque</title>
		<link>http://steve.kargs.net/bacnet/bacnet-meeting-in-albuquerque/</link>
		<comments>http://steve.kargs.net/bacnet/bacnet-meeting-in-albuquerque/#comments</comments>
		<pubDate>Sat, 17 Jul 2010 16:40:27 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[BACnet]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=190</guid>
		<description><![CDATA[I attended the recent BACnet meetings in Albuquerque, and in the process, learned to spell the city name!  I participated in the Lighting Applications working group, the Objects and Services working group, the BACnet SSPC, and the MS/TP working group. One of the proposals that started in the MS/TP working group made it through the [...]]]></description>
			<content:encoded><![CDATA[<p>I attended the recent <a href="http://www.bacnet.org/" target="_blank">BACnet</a> meetings in <a href="http://www.cabq.gov/" target="_blank">Albuquerque</a>, and in the process, learned to spell the city name!  I participated in the Lighting Applications working group, the Objects and Services working group, the BACnet SSPC, and the MS/TP working group.</p>
<p><a href="http://steve.kargs.net/wp-content/uploads/2010/07/BACnet_Leaders_2010.jpg"><img class="aligncenter size-large wp-image-197" title="BACnet Leaders 2010" src="http://steve.kargs.net/wp-content/uploads/2010/07/BACnet_Leaders_2010-1024x576.jpg" alt="" width="450" height="253" /></a></p>
<p><a href="http://steve.kargs.net/wp-content/uploads/2010/07/IMG_1182.jpg"><img class="alignnone size-thumbnail wp-image-198" title="BACnet Committee meeting, Albuquerque" src="http://steve.kargs.net/wp-content/uploads/2010/07/IMG_1182-150x150.jpg" alt="" width="150" height="150" /></a><a href="http://steve.kargs.net/wp-content/uploads/2010/07/Carl_Neilson.jpg"><img class="alignnone size-thumbnail wp-image-199" title="Carl Neilson" src="http://steve.kargs.net/wp-content/uploads/2010/07/Carl_Neilson-150x150.jpg" alt="" width="150" height="150" /></a><a href="http://steve.kargs.net/wp-content/uploads/2010/07/IMG_1189.jpg"><img class="alignnone size-thumbnail wp-image-200" title="Coleman, in the orange shirt" src="http://steve.kargs.net/wp-content/uploads/2010/07/IMG_1189-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>One of the proposals that started in the MS/TP working group made it through the public review process, and was voted by our committee to be published!</p>
<h2>The Journey of a Small BACnet Proposal</h2>
<p>In <a href="http://bikeshed.org/" target="_blank">typical bike shed fashion</a>, a small change to the BACnet standard took a very long time to become a standard.  Here is the story.</p>
<p>In November, 2002, I proposed (<a href="http://kargs.net/BACnet/mstp/STK-013-1.pdf" target="_blank">my 13th proposal</a>) to expand the allowable baud rates for MS/TP to include 57600 bps and 115200 bps.  When reviewing MS/TP in Clause 9, I noticed that the baud rates specified in 9.2.3 are rather limited, and the fastest one doesn&#8217;t work well on PC based UARTs (76800 bps).  Since PC based control was becoming more prevalent in 2002, it seemed appropriate to permit fast speeds for PC compatible UARTs.</p>
<p>Someone reviewed the proposal, and asked for some data regarding the maximum length of an RS-485 segment while running at 115,200 bps.  I searched for the best literature I could find on the subject, and ended up with an<a href="http://www.national.com/an/AN/AN-1057.pdf" target="_blank"> Application Note from National Instruments</a> which contained a nice graph of Cable Length vs Data Rate for RS-485.</p>
<p><img class="alignnone" title="RS-485 Cable Length versus Data Rate graph" src="http://kargs.net/BACnet/mstp/rs-485_cable_length_data_rate_graph.png" alt="" width="512" height="331" /></p>
<p>Unfortunately, there was not a table of data along with the graph. I found and quickly learned how to use <a href="http://www.scilab.org/" target="_blank">Scilab, the free platform for  numerical computation.</a> I did some linear interpolation (curve fitting) based on points (red dots) from the graph (<a href="http://kargs.net/BACnet/mstp/rs485-distance.sce" target="_blank">Scilab Script</a>):</p>
<pre>--&gt;// Scilab 3.0
--&gt;// data from the graph
--&gt;// The data is linear, but the graph is logarithmic
--&gt;t = [0.1 0.2 0.4 0.5 0.8 1.0];
--&gt;y = [4000 2000 1000 800 500 400];
--&gt;xyd = [t;y];
--&gt;yi=exp(interpln(log(xyd),log(t)));
--&gt;err = (y-yi)'
err  =
1.0D-12 *
!   0.4547474 !
!   0.2273737 !
!   0.2273737 !
!   0.1136868 !
!   0.1705303 !
!   0.1136868 !
--&gt;tt = [0.1 0.1152 0.2 0.2304 0.4 0.4608 0.5 0.8 1.0];
--&gt;yi=exp(interpln(log(xyd),log(tt)));
--&gt;xyi = [tt ; yi]'
xyi  =
!   0.1       4000.     !
!   0.1152    3472.2222 !
!   0.2       2000.     !
!   0.2304    1736.1111 !
!   0.4      1000.      !
!   0.4608    868.05556 !
!   0.5       800.      !
!   0.8       500.      !
!   1.        400.      !</pre>
<p>Since the graph was logarithmic, the points had to be converted.  Scilab took the points (t,y), created a table (xyd), interpolated (yi), checked the error of the curve for each point (err).  Then I added some standard baud rates to the list of points (tt), and did the same interpolation.  The result is the table (xyi) which includes .1152 (baud rate) at 3472.2222 feet.  I de-rated and used 3280 feet (1000 meters) as a safety margin.</p>
<p>I compiled the information into a <a href="http://kargs.net/BACnet/mstp/STK-013-2.pdf" target="_blank">revised proposal</a>, and submitted the information to the working group in October, 2004.   At the April, 2005 Germantown meeting, the MS/TP working group <a href="http://kargs.net/BACnet/mstp/MSTP001.pdf" target="_blank">voted this proposal</a> up to the BACnet SSPC for review and future publication.</p>
<p>The document was discussed again at a subsequent <a href="http://groups.yahoo.com/group/bacnet-mstpwg/" target="_blank">MS/TP working group</a> meeting in 2006, with concern raised over the reduced distance for the higher baud rate.  A consensus vote decided to eliminate 115,200 bps as a possible rate, leaving 57,000.  I <a href="http://kargs.net/BACnet/mstp/STK-013-3.pdf">revised the proposal</a> to that effect in April, 2006, and it was voted up to the full SSPC BACnet Committee for review and future publication.</p>
<p>In October, 2008, there was a discussion of MS/TP baud rates on<a href="http://www.bacnet.org/Contact/BACnet-L.htm" target="_blank"> BACnet-L</a> mailing list.  Coleman indicated that:</p>
<blockquote><p>I&#8217;d like to get a proposal together that rewords the baud requirements  in clause 9 of 135.  We&#8217;ve discussed 115200 several times in the MS/TP-WG,  but I&#8217;m thinking something a little less contentious like making 38400 the default and making 9600, 19200, 57600, 76800, and 115200 optional.</p></blockquote>
<p><a href="http://coleman.jandasoft.biz/" target="_blank">Coleman</a> sent a note to me indicating that he had modified the proposal again, mandating that 38400 be a default baud rate in addition to 9600.  I checked the venerable &#8220;BACnet Document Status Summary&#8221; which indicated that my proposal was still in MS/TP working group instead of SSPC.  Bummer.  It had been sitting around for years due to some missing communication.</p>
<p>I wrote to Coleman and said that I would prefer to leave my original proposal in the SSPC-135 queue as-is since it is more likely to be adopted sooner than later as it is now 3 years in the queue &#8211; and a case can be made that it has been sitting there awhile.  I suggested that another proposal with the additional mandatory baud rates would be better or could be discussed along with my proposal in the SSPC-135 meeting and added prior to a public review vote by SSPC-135.</p>
<p>My proposal finally made it to the floor of the Atlanta BACnet committee meeting in November, 2009, at the very end of the meeting.  After a short discussion, Coleman&#8217;s proposal was suggested to replace mine.  As meeting time was running out, David Fisher, convener of the MS/TP working group, &#8220;passionately insisted that [Coleman's proposal] will get a due amount of serious discussion time in Orlando. This proposal has been delayed unreasonably for years now.&#8221;</p>
<p><a href="http://kargs.net/BACnet/mstp/CLB-017-2.pdf" target="_blank">Coleman&#8217;s proposal</a> was discussed at the next SSPC meeting in Orlando in January, 2010.  After a brief discussion and a minor revision, the proposal was voted to Publication Public Review as <a href="http://kargs.net/BACnet/mstp/Add-135-2008ab-PPR1-Draft _chair-approved_.pdf" target="_blank">Addendum 135-2008ab</a>. The pubic review period lasted from March 26 to May 10, 2010.  It received 2 comments requiring resolution, and 4 supportive comments (which do not require any action to be resolved).</p>
<p>One of the supportive comments suggested that we consider changing MS/TP timing delays when using the 115,200 baud rate in order to provide the fastest possible throughput when using the new speed.  It was decided to consider this request, and some analysis was done.  When we met in Abuquerque, in June, 2010, the analysis was presented as &#8220;no significant speed improvements could be made by changing the time delays.&#8221;  The BACnet committee voted to approve the public review comment responses, and since there were no substantive changes to the addendum, it is now published as an addendum to the BACnet standard.</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/bacnet/bacnet-meeting-in-albuquerque/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>BACnet and Software Patents</title>
		<link>http://steve.kargs.net/bacnet/bacnet-and-software-patents/</link>
		<comments>http://steve.kargs.net/bacnet/bacnet-and-software-patents/#comments</comments>
		<pubDate>Wed, 18 Nov 2009 20:09:44 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[BACnet]]></category>
		<category><![CDATA[rights]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=175</guid>
		<description><![CDATA[I attended the BACnet Committee and working group meetings in November, 2009, in Atlanta, Georgia.  During the MS/TP working group meeting, it was disclosed that KMC had applied for a patent which invents automatic MAC addressing for MS/TP devices.  It was surprising and disappointing to me, since the BACnet MS/TP working group had been working [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://steve.kargs.net/wp-content/uploads/2009/11/IMG_0947.jpg"><img class="alignright size-thumbnail wp-image-188" title="BACnet_Meeting_Atlanta_2009" src="http://steve.kargs.net/wp-content/uploads/2009/11/IMG_0947-150x150.jpg" alt="" width="150" height="150" /></a>I attended the <a href="http://www.bacnet.org/" target="_blank">BACnet</a> Committee and working group meetings in November, 2009, in Atlanta, Georgia.  During the MS/TP working group meeting, it was disclosed that <a href="http://www.kmccontrols.com/" target="_blank">KMC</a> had applied for a <a href="http://www.google.com/patents/about?id=wH_JAAAAEBAJ&amp;dq=bacnet+mstp" target="_blank">patent which invents automatic MAC addressing for MS/TP devices</a>.  It was surprising and disappointing to me, since the BACnet MS/TP working group had been working on standardizing <a href="http://tech.groups.yahoo.com/group/bacnet-mstpwg/files/CG-005-1-MSTP%20Auto-Addr.doc" target="_blank">several mechanisms to allow automatic MAC addressing</a> since early 2008.</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/bacnet/bacnet-and-software-patents/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Ubuntu Linux on Desktop PC</title>
		<link>http://steve.kargs.net/software/ubuntu-linux-on-desktop-pc/</link>
		<comments>http://steve.kargs.net/software/ubuntu-linux-on-desktop-pc/#comments</comments>
		<pubDate>Wed, 09 Sep 2009 01:47:12 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[applications]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=163</guid>
		<description><![CDATA[I refurbished a couple of PCs for my family to use, and installed the latest Ubuntu Linux on them &#8211; Ubuntu 9.04 Jaunty.  I also updated my dual boot work computer with the latest Ubuntu &#8211; it was running Kubuntu and the latest Kubuntu is just foreign to me. As is usually the case, adding [...]]]></description>
			<content:encoded><![CDATA[<p>I refurbished a couple of PCs for my family to use, and installed the latest Ubuntu Linux on them &#8211; Ubuntu 9.04 Jaunty.  I also updated my dual boot work computer with the latest Ubuntu &#8211; it was running Kubuntu and the latest Kubuntu is just foreign to me.</p>
<p>As is usually the case, adding additional packages is essential to getting the computer working right for me.</p>
<h3>Add Codecs, Java, and other Customizations</h3>
<p>The official way to do this is documented in the Ubuntu Wiki under <a href="https://wiki.ubuntu.com/CommonCustomizations" target="_blank">CommonCustomizations</a>.  There is also a wiki page on <a href="https://wiki.ubuntu.com/EasyCodecInstallation">EasyCodecInstallation</a>.  The official meta package is called “ubuntu-restricted-extras” and this installs:</p>
<ul>
<li>MP3 playback and decoding</li>
<li>Sun Java runtime environment</li>
<li>Flash plugin</li>
<li>DVD playback</li>
<li>LAME (to create MP3 compressed audio files)</li>
<li>msttcorefonts (may be missing in kubuntu extras)</li>
<li>DeCSS script to download and install for DVD viewing</li>
</ul>
<p><code>$ sudo apt-get install ubuntu-restricted-extras</code><br />
<code>$ sudo /usr/share/doc/libdvdread4/install-css.sh</code><br />
<code>$ sudo apt-get install msttcorefonts</code></p>
<h3>Add the ability to compile, edit, and maintain code</h3>
<p>Here are the compilers and their documents<br />
<code>$ sudo apt-get install build-essential subversion-tools  gcc-4.2-doc glibc-doc manpages-dev</code><br />
<code>$ sudo apt-get install mingw32 mingw32-binutils mingw32-runtime</code><br />
I need access to subversion and XSLT ChangeLog tools<br />
<code>$ sudo apt-get install subversion-tools</code><br />
<code>$ sudo apt-get install xsltproc</code><br />
I install a couple of editors, useful for various things.  Kate is already installed.<br />
<code>$ sudo apt-get install scite</code><br />
<code>$ sudo apt-get install vim-full</code><br />
Useful tools for cleaning up code, converting comments and line endings, and code statistics:<br />
<code>$ sudo apt-get install splint</code><br />
<code>$ sudo apt-get install sloccount</code><br />
<code>$ sudo apt-get install indent</code><br />
<code>$ sudo apt-get install liwc</code><br />
<code>$ sudo apt-get install tofrodos</code></p>
<h3>Add favorite online music source and music/video player VLC</h3>
<p><code>$ sudo apt-get install streamtuner</code><br />
<code>$ sudo apt-get install vlc</code></p>
<h3>Add the Adobe Flash Plugin and Sun Java JRE</h3>
<p>A lot of websites use Flash or Java for their user interface, so it seems that they are essential.</p>
<p><code>$ sudo apt-get install adobe-flashplugin</code><code><br />
$ sudo apt-get install sun-java6-jre</code></p>
<h3>Get rid of annoying PC speaker beep</h3>
<p>Using a console, remove the PC Speaker driver from the kernel:<br />
<code>$ sudo modprobe -r pcspkr</code><br />
Create <strong>/etc/modprobe.d/blacklist-user.conf</strong> and add a line to keep the PC Speaker driver from automatically loading:</p>
<p><code># Keep the annoying beep from occurring</code><code><br />
# don't load the PC Speaker driver</code><br />
<code>blacklist pcspkr</code></p>
<h2><a rel="nofollow" href="https://help.ubuntu.com/community/SynapticsTouchpad" target="_blank">SynapticsTouchpad</a></h2>
<p>The laptop has a touchpad, which is really annoying when you also have a USB mouse attached, because the touchpad picks up thumps made by my big fingers and makes the mouse click somewhere that you didn&#8217;t want it to click.  Correcting this in Ubunut Jaunty is as easy as selecting <strong>System &gt; Preferences &gt; Mouse</strong>, under the Touchpad tab. Uncheck the <strong>Enable mouse clicks with touchpad</strong> check box.</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/software/ubuntu-linux-on-desktop-pc/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AVR ISP mkII on Ubuntu Hardy</title>
		<link>http://steve.kargs.net/bacnet/avr-isp-mkii-on-ubuntu-hardy/</link>
		<comments>http://steve.kargs.net/bacnet/avr-isp-mkii-on-ubuntu-hardy/#comments</comments>
		<pubDate>Wed, 13 May 2009 01:10:52 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[BACnet]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=154</guid>
		<description><![CDATA[I created a BACnet Development Kit, compiled the open source BACnet Protocol Stack hosted on SourceForge.net firmware using gcc-avr, and attempted to load the firmware onto the kit using an Atmel AVR ISP mkII USB programmer.  I connected the AVR ISP mkII to my Ubuntu Hardy Linux PC and attached the 2&#215;3 ISP cable to [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://steve.kargs.net/wp-content/uploads/2009/05/bdk-atxx4-mstp.jpg"><img class="size-thumbnail wp-image-156 alignright" title="bdk-atxx4-mstp" src="http://steve.kargs.net/wp-content/uploads/2009/05/bdk-atxx4-mstp-150x150.jpg" alt="BACnet Development Kit" width="150" height="150" /></a></p>
<p>I created a <a href="http://bacnetdevelopmentkit.com/" target="_blank">BACnet Development Kit</a>, compiled the <a href="http://bacnet.sourceforge.net/" target="_blank">open source BACnet Protocol Stack hosted on SourceForge.net</a> firmware using <a href="http://www.avrfreaks.net/AVRGCC/" target="_blank">gcc-avr</a>, and attempted to load the firmware onto the kit using an <a href="http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=3808" target="_blank">Atmel AVR ISP mkII</a> USB programmer.  I connected the AVR ISP mkII to my Ubuntu Hardy Linux PC and attached the 2&#215;3 ISP cable to the development kit board, and attempted to program using <a href="http://www.bsdhome.com/avrdude/" target="_blank">avrdude</a>:</p>
<pre>$ avrdude -c avrispmkII -p m644p -P usb -e -U flash:w:bacnet.hex</pre>
<pre>avrdude: usb_open(): cannot read serial number "error sending..."
avrdude: usb_open(): cannot read product name "error sending..."
avrdude: usbdev_open(): error setting configuration...
avrdude: usbdev_open(): did not find any USB device "usb"</pre>
<p>Wow! That wasn&#8217;t nice.  A search on the Internet turned up <a href="http://www.avrfreaks.net/index.php?name=PNphpBB2&amp;t=58673&amp;start=0" target="_blank">some answers about how to fix the problem</a>, and I modified my /etc/udev/avarice.rules file to look like this:</p>
<pre>SUBSYSTEM!="usb_device", ACTION!="add", GOTO="avarice_end"

# Atmel Corp. JTAG ICE mkII
SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2103", MODE="660", GROUP="dialout"
# Atmel Corp. AVRISP mkII
SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2104", MODE="660", GROUP="dialout"
# Atmel Corp. Dragon
SYSFS{idVendor}=="03eb", SYSFS{idProduct}=="2107", MODE="660", GROUP="dialout"

LABEL="avarice_end"</pre>
<p>I disconnected and reconnected my AVR ISP mkII, and tried again.  I still had the same results.  I checked that I was a member of the dialout group:</p>
<pre>$ groups
skarg adm dialout cdrom floppy audio dip video plugdev users fuse lpadmin admin</pre>
<p>I looked at the symbolic link in the /etc/udev/rules.d/ directory and also consumed the README file.  My file had the following name:</p>
<pre>/etc/udev/rules.d/z60_avarice.rules</pre>
<p>So I changed the filename:</p>
<pre>$ sudo mv /etc/udev/rules.d/z60_avarice.rules /etc/udev/rules.d/60-avarice.rules</pre>
<p>I unplugged the AVR ISP mkII, and plugged it in again.  I tried to run avrdude again:</p>
<pre>avrdude -c avrispmkII   \
     -p m644p -P usb -e        \
     -U flash:w:bacnet.hex

avrdude: AVR device initialized and ready to accept instructions

Reading | ################################################## | 100% 0.01s

avrdude: Device signature = 0x1e960a
avrdude: erasing chip
avrdude: reading input file "bacnet.hex"
avrdude: input file bacnet.hex auto detected as Intel Hex
avrdude: writing flash (57406 bytes):

Writing | ################################################## | 100% 6.31s

avrdude: 57406 bytes of flash written
avrdude: verifying flash memory against bacnet.hex:
avrdude: load data flash data from input file bacnet.hex:
avrdude: input file bacnet.hex auto detected as Intel Hex
avrdude: input file bacnet.hex contains 57406 bytes
avrdude: reading on-chip flash data:

Reading | ################################################## | 100% 5.41s

avrdude: verifying ...
avrdude: 57406 bytes of flash verified

avrdude: safemode: Fuses OK

avrdude done.  Thank you.</pre>
<p>The kit programmed successfully, and began operation.</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/bacnet/avr-isp-mkii-on-ubuntu-hardy/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Wireshark and BACnet MS/TP</title>
		<link>http://steve.kargs.net/bacnet/wireshark-and-bacnet-mstp/</link>
		<comments>http://steve.kargs.net/bacnet/wireshark-and-bacnet-mstp/#comments</comments>
		<pubDate>Fri, 21 Nov 2008 06:26:51 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[BACnet]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=139</guid>
		<description><![CDATA[I wrote an article about Analyzing BACnet with Wireshark for ASHRAE Journal special supplement BACnet Today.  ASHRAE is very particular about endorsing specific company products, and removed some references I had to information about how BACnet MS/TP can be supported on Wireshark by adding an external interface which sends Ethernet SNAP protocol packets.  The external [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://steve.kargs.net/wp-content/uploads/2008/11/wireshark_bacnet_mstp_cimetrics.png"><img class="alignright size-thumbnail wp-image-140" title="wireshark_bacnet_mstp_cimetrics" src="http://steve.kargs.net/wp-content/uploads/2008/11/wireshark_bacnet_mstp_cimetrics-150x150.png" alt="" width="150" height="150" /></a>I wrote an article about <a href="http://www.bacnet.org/Bibliography/BACnet-Today-08/Karg_2008.pdf" target="_blank">Analyzing BACnet with Wireshark</a> for <a href="http://www.ashrae.org/publications/page/540" target="_blank">ASHRAE Journal</a> special supplement BACnet Today.  <a href="http://www.ashrae.org/" target="_blank">ASHRAE</a> is very particular about endorsing specific company products, and removed some references I had to information about how BACnet MS/TP can be supported on Wireshark by adding an external interface which sends Ethernet SNAP protocol packets.  The external interface was originally a <a href="http://cimetrics.com/products/proddetail.php?prod=B2110&amp;cat=1" target="_blank">Cimetrics U+4</a> device which connects BACnet MS/TP via USB to a computer, and uses a special driver to appear as a network interface to <a href="http://wireshark.org/" target="_blank">Wireshark</a>.</p>
<p>In April, 2008, I was informed that the Cimetrics U+4 packets showed up in Wireshark, but were not decoded correctly.  I asked for a sample of the capture, and reverse engineered the header.  I then created the BACnet MS/TP decoding in Wireshark in order to display the MS/TP data, and passed the BACnet Network Layer and Application Layer information along to the existing dissectors.</p>
<p>The beauty of the BACnet protocol is that it is layered.  The NPDU (network layer) and APDU (application layer) encodings are the same regardless of the datalink layer used.  The NDPU layer is decoded by <a href="http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-bacnet.c" target="_blank">packet-bacnet.c</a>, which passes the APDU layer to <a href="http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-bacapp.c" target="_blank">packet-bacapp.c</a>.  The BACnet MS/TP datalink layer is decoded by <a href="http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-mstp.c" target="_blank">packet-mstp.c</a> which I created, and passes the NPDU, if it exists, to <a href="http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-bacnet.c" target="_blank">packet-bacnet.c</a>, for decoding.  The ARCNET, Ethernet, and BACnet/IP (<a href="http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-bvlc.c" target="_blank">packet-bvlc.c</a>) all pass a relevant packet to <a href="http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-bacnet.c" target="_blank">packet-bacnet.c</a> for BACnet decoding.  I created <a href="http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-cimetrics.c" target="_blank">packet-cimetrics.c</a> for the Cimetrics header which passes the BACnet  MS/TP datalink layer to <a href="http://anonsvn.wireshark.org/wireshark/trunk/epan/dissectors/packet-mstp.c" target="_blank">packet-mstp.c</a>.</p>
<p>The BACnet MS/TP patches were accepted into the <a href="http://wireshark.org/" target="_blank">Wireshark </a>repository on May 13, 2008, checked in as SVN 25291.  The SVN 25881 was a fix to the Length decoding.  The BACnet MS/TP decoding eventually made it into the <a href="http://www.wireshark.org/download/" target="_blank">Wireshark 1.1 development release</a>, but is not present in the Wireshark 1.0 stable release.</p>
<p>Wireshark now sees packets with the Cimetrics U+4 signature encapsulated in the SNAP protocol as MS/TP packets, and it is able to open a file that has been saved in PCAP format using the MS/TP WTAP signature.  But I didn&#8217;t have a Cimetrics U+4 device.  So I used a standard RS485 converter, my <a href="http://bacnet.sourceforge.net/" target="_blank">open source BACnet stack</a>, and wrote <a href="http://bacnet.svn.sourceforge.net/viewvc/bacnet/trunk/bacnet-stack/demo/mstpcap/">a simple application to packetize the MS/TP frames</a> and saves them to PCAP format.  I could now capture MS/TP packets and view them!</p>
<p>In August, 2008, I received an email from John in New Zealand.  His intention was &#8220;to use an existing simple VB  application that captures MS/TP traffic from a low cost USB to RS-485 converter,  to send the MS/TP packets using Winsock/UDP to Wireshark for final dissection  and display.&#8221;  I figured that we could do this by making use of the existing <a href="http://en.wikipedia.org/wiki/Subnetwork_Access_Protocol" target="_blank">SNAP protocol</a> dissector that I created for the Cimetrics packets.</p>
<p>I reused the code that I had written to save in PCAP format, and wrote <a href="http://bacnet.svn.sourceforge.net/viewvc/bacnet/trunk/bacnet-stack/ports/linux/mstpsnap.c" target="_blank">a simple application</a> to packetize the MS/TP frames and resend them on Ethernet as the Cimetrics U+4 signature encapsulated in the SNAP protocol.  I got it to work under Linux, but would probably need to use WinPcap to get it to work under Windows.</p>
<p>Sending those <a href="http://en.wikipedia.org/wiki/Subnetwork_Access_Protocol" target="_blank">SNAP protocol</a> packets on Ethernet allows the display of BACnet MS/TP packets in realtime alongside BACnet/IP and BACnet Ethernet.  This makes it very easy to relate traffic going to and from workstations and routers with what is happening on the BACnet MS/TP network.</p>
<p>There are some <a href="http://kargs.net/captures/" target="_blank">sample captures</a> (see <a href="http://kargs.net/captures/cimetrics_mstp.pcap" target="_blank">cimetrics_mstp.pcap</a> and <a href="http://kargs.net/captures/mstp_wtap.cap" target="_blank">mstp_wtap.cap</a>) that demostrate some of the abilities of Wireshark.<a href="http://kargs.net/captures/" target="_blank"><br />
</a></p>
<p>I use a USB to RS-485 converter from SerialGear <a href="http://www.serialgear.com/Industrial-Serial-Adapters-USB-COMi-SI-M.html" target="_blank">USB-COMi-SI-M</a>, and am told that the <a href="http://www.bb-elec.com/bb-elec/literature/USxPTL4-1207ds.pdf" target="_blank">B&amp;B Electronics USOPTL4</a> works very well.  I am also told that the USB to RS-485 adapters that use the FTDI chipset are great for this as they allow the use of 76800 baud which is usually the stumbling block for native MS/TP interfacing with a standard PC serial port.</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/bacnet/wireshark-and-bacnet-mstp/feed/</wfw:commentRss>
		<slash:comments>27</slash:comments>
		</item>
		<item>
		<title>GIMP: Removing Noise from Digital Photos</title>
		<link>http://steve.kargs.net/photography/gimp-removing-noise-from-digital-photos/</link>
		<comments>http://steve.kargs.net/photography/gimp-removing-noise-from-digital-photos/#comments</comments>
		<pubDate>Wed, 29 Oct 2008 15:36:47 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[photography]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=132</guid>
		<description><![CDATA[I shot some low light photography at the youth group Halloween dance using a Casio Exilim point-n-shoot, and some of the photos had digital noise, or grain (as we called it in the days of film). I searched the internet for some assistance in removing the digital noise using the GNU Image Manipulation Program (GIMP), [...]]]></description>
			<content:encoded><![CDATA[<p>I shot some low light photography at the youth group <a href="http://en.wikipedia.org/wiki/Halloween" target="_blank">Halloween</a> dance using a Casio Exilim point-n-shoot, and some of the photos had <a href="http://en.wikipedia.org/wiki/Image_noise" target="_blank">digital noise</a>, or <a href="http://en.wikipedia.org/wiki/Film_grain" target="_blank">grain</a> (as we called it in the days of film).</p>
<p>I searched the internet for some assistance in removing the digital noise using the <a href="http://gimp.org/" target="_blank">GNU Image Manipulation Program (GIMP)</a>, and stumbled upon a well written post about <a href="http://photodoto.com/free-noise-reduction-plugin-for-the-gimp/" target="_blank">how to remove digital noise</a>.  The technique makes use of the <a href="http://cimg.sourceforge.net/greycstoration/" target="_blank">GREYCstoration</a> plugin for the GIMP.</p>
<p>I use the GIMP on <a href="http://www.kubuntu.org/" target="_blank">Kubuntu Linux</a>, and wondered if there was already a package created for GREYCstoration.</p>
<pre>$ apt-cache search greyc
gimp-plugin-registry - A repository of optional extensions for The GIMP</pre>
<p>I found it!  So I installed it:</p>
<pre>$ sudo apt-get install gimp-plugin-registry</pre>
<p>After restarting the GIMP, here are the results:</p>
<div id="attachment_134" class="wp-caption alignleft" style="width: 160px"><a href="http://steve.kargs.net/wp-content/uploads/2008/10/halloweenslowdance.jpg"><img class="size-thumbnail wp-image-134" title="halloweenslowdance" src="http://steve.kargs.net/wp-content/uploads/2008/10/halloweenslowdance-150x150.jpg" alt="Low light photo (scaled)" width="150" height="150" /></a><p class="wp-caption-text">Low light photo (scaled)</p></div>
<div id="attachment_134" class="wp-caption alignright" style="width: 160px"><a href="http://steve.kargs.net/wp-content/uploads/2008/10/halloweenslowdancecropscaled.jpg"><img class="size-thumbnail wp-image-134" title="halloweenslowdancecropscaled" src="http://steve.kargs.net/wp-content/uploads/2008/10/halloweenslowdancecropscaled-150x150.jpg" alt="Low light photo (GREYCstoration, scaled)" width="150" height="150" /></a><p class="wp-caption-text">Low light photo (GREYCstoration, scaled)</p></div>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/photography/gimp-removing-noise-from-digital-photos/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Interrupt Safe Ring Buffer Library</title>
		<link>http://steve.kargs.net/software/interrupt-safe-ring-buffer-library/</link>
		<comments>http://steve.kargs.net/software/interrupt-safe-ring-buffer-library/#comments</comments>
		<pubDate>Sat, 25 Oct 2008 15:35:21 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[software]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=116</guid>
		<description><![CDATA[I created a ring buffer library for embedded systems in C some years ago and have been using it when I need to add a simple queue to my software.  I knew it worked correctly since I created unit tests to validate the code.  However, I noticed that it wasn&#8217;t interrupt safe since one of [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://steve.kargs.net/wp-content/uploads/2008/10/christhoper_circular.jpg"><img class="size-thumbnail wp-image-123 alignright" title="Christoper looks through a circular tube" src="http://steve.kargs.net/wp-content/uploads/2008/10/christhoper_circular-150x150.jpg" alt="Christoper looks through a circular tube" width="150" height="150" /></a></p>
<p>I created a <a href="http://en.wikipedia.org/wiki/Circular_buffer" target="_blank">ring buffer</a> library for embedded systems in C some years ago and have been using it when I need to add a simple queue to my software.  I knew it worked correctly since I <a href="http://kargs.net/docs/simplest_unit_test.pdf" target="_blank">created unit tests</a> to validate the code.  However, I noticed that it wasn&#8217;t interrupt safe since one of the consumer variables is shared by the producer (the count).  This library requires disabling interrupts when consuming.  Not what I wanted.</p>
<p>There are a <a href="http://en.wikipedia.org/wiki/Circular_buffer" target="_blank">number of difficulties</a> when designing ring buffers, mostly dealing with efficiencies of code or data, or the struggle between consumers and producers.  My generic ringbuf library had used a single fill count, but the count had to be updated by the <a href="http://en.wikipedia.org/wiki/Interrupt_handler" target="_blank">interrupt service routine</a> (producer) and by the routine that retrieved the data (consumer).  I tried to use read and write offset indices, but that required that I always keep an element open since the you can&#8217;t tell if the ring is empty or full when the head and tail are the same.</p>
<p>Absolute indices appeared to be interrupt safe, although they require that the buffer length be a power of two.  That seemed to be flexible enough for most embedded work.  I modified and tested my ring buffer library using that method, but my ringbuf, which allowed for a fixed length element,  seemed to be overkill for what I was using it for &#8211; gathering bytes from a serial interrupt service routine.  Its <a href="http://en.wikipedia.org/wiki/API" target="_blank">API</a> also had a slight flaw such that if the consumer retrieved the data (via <a href="http://en.wikipedia.org/wiki/Push_and_pop" target="_blank">Pop</a> rather than just viewing the first element), the producer was free to put new data into the buffer, overwriting the data just retrieved.</p>
<p>I had started my ring buffer library as a simple character (one byte) <a href="http://en.wikipedia.org/wiki/FIFO" target="_blank">FIFO</a> &#8211; first in, first out.  So, I revisited that code, and modified it to use absolute indices.  A simple byte ring buffer, first in, first out.  Now I had interrupt safe code that would work in my serial interrupt service routine.</p>
<p>Why go to the trouble to make a library module to handle a ring buffer when slapping the following <a href="http://www.embeddedrelated.com/usenet/embedded/show/77084-1.php" target="_blank">quick and dirty ring buffer code</a> (from Stefan) into the serial module would have worked as well?</p>
<pre>   #define N 128
   volatile unsigned int head, tail;
   volatile char buffer[N];
   unsigned int inuse() { return head - tail; }
   void put(char c) { if (inuse() != N) { buffer[head++%N] = c; } }
   void get(char* c) { if (inuse() != 0) { *c = buffer[tail++%N]; } }</pre>
<p>Because I needed to know that it worked correctly, and I like reusable library modules.  Especially high quality reusable modules.  Especially high quality reusable modules that include unit tests to validate functionality.  Unit tests that also serve as guides for implementers.</p>
<p>The new module files are <a href="http://kargs.net/code/ringbuf.c" target="_blank">ringbuf.c</a> and <a href="http://kargs.net/code/ringbuf.h">ringbuf.h</a> for the ring buffer with fixed sized elements, and <a href="http://kargs.net/code/fifo.c" target="_blank">fifo.c</a> and <a href="http://kargs.net/code/fifo.h" target="_blank">fifo.h</a> for the ring buffer with byte sized elements. All my versions of the ring buffer and the <a href="http://kargs.net/docs/simplest_unit_test.pdf" target="_blank">unit testing framework</a> can be found in the <a href="http://kargs.net/code/ringbuf.zip" target="_blank">ringbuf.zip</a> file.</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/software/interrupt-safe-ring-buffer-library/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>BACnet &#8211; First to the Moon, and Beyond!</title>
		<link>http://steve.kargs.net/bacnet/bacnet-first-to-the-moon-and-beyond/</link>
		<comments>http://steve.kargs.net/bacnet/bacnet-first-to-the-moon-and-beyond/#comments</comments>
		<pubDate>Tue, 16 Sep 2008 13:06:45 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[BACnet]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=112</guid>
		<description><![CDATA[I drove to the BACnet meetings in nearby Atlanta and Bill photographed my license plate.  We need lofty goals, don&#8217;t we?]]></description>
			<content:encoded><![CDATA[<p><a href="http://steve.kargs.net/wp-content/uploads/2008/09/bacnet-firsttothemoon.jpg"><img class="alignnone size-full wp-image-113" title="bacnet-firsttothemoon" src="http://steve.kargs.net/wp-content/uploads/2008/09/bacnet-firsttothemoon.jpg" alt="" width="500" height="257" /></a></p>
<p>I drove to the BACnet meetings in nearby Atlanta and Bill photographed my license plate.  We need lofty goals, don&#8217;t we?</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/bacnet/bacnet-first-to-the-moon-and-beyond/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Convert to MP3 Konqueror Service Menu</title>
		<link>http://steve.kargs.net/linux/convert-to-mp3-konqueror-service-menu/</link>
		<comments>http://steve.kargs.net/linux/convert-to-mp3-konqueror-service-menu/#comments</comments>
		<pubDate>Tue, 05 Aug 2008 13:17:22 +0000</pubDate>
		<dc:creator>skarg</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://steve.kargs.net/?p=110</guid>
		<description><![CDATA[I wanted an easy way to convert music to MP3 from various formats under Konqueror in KDE on Kubuntu Linux.  I found an interesting post about creating a KDE Service Menu which got me started in the right direction.  However, I didn&#8217;t like the way ffmpeg converted to 64kbps MP3 quality and the bad sounding [...]]]></description>
			<content:encoded><![CDATA[<p>I wanted an easy way to convert music to MP3 from various formats under Konqueror in KDE on Kubuntu Linux.  I found an <a href="http://ubuntuforums.org/showthread.php?t=684029" target="_blank">interesting post about creating a KDE Service Menu</a> which got me started in the right direction.  However, I didn&#8217;t like the way <a href="http://ffmpeg.mplayerhq.hu/" target="_blank">ffmpeg</a> converted to 64kbps MP3 quality and the bad sounding results regardless of the bitrate settings that I chose.  I tried <a href="http://lame.sourceforge.net/" target="_blank">lame</a>, and was quite pleased with the results.  I also didn&#8217;t like the way the service menu used the entire filename without stripping the dotted extension, so I copied another service menu <a href="http://groups.google.co.th/group/alt.comp.lang.perl/browse_thread/thread/dc04e1d8bd91bb35" target="_blank">perl example</a>.  My &#8220;Convert to MP3&#8243; service menu script goes into the following location:</p>
<pre>/usr/share/apps/konqueror/servicemenus/</pre>
<p>File <a href="http://steve.kargs.net/wp-content/uploads/2008/08/convert_mp3.desktop">convertmp3.desktop</a>:</p>
<pre>[Desktop Entry]
ServiceTypes=audio/*
Actions=convertToMP3

[Desktop Action convertToMP3]
Name=Convert to MP3
Exec=lame -V2 %f "`echo %f | perl -pe 's/\.[^.]+$//'`.mp3"</pre>
<p>Enjoy!</p>
]]></content:encoded>
			<wfw:commentRss>http://steve.kargs.net/linux/convert-to-mp3-konqueror-service-menu/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

