<?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>blog.brixandersen.dk</title>
	<atom:link href="http://blog.brixandersen.dk/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://blog.brixandersen.dk</link>
	<description>Brix's Notes &#38; Thoughts</description>
	<lastBuildDate>Sat, 03 Apr 2010 07:04:40 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Downloading Sony GPS Assist Data Manually</title>
		<link>http://blog.brixandersen.dk/?p=153</link>
		<comments>http://blog.brixandersen.dk/?p=153#comments</comments>
		<pubDate>Fri, 02 Apr 2010 18:31:31 +0000</pubDate>
		<dc:creator>brix</dc:creator>
				<category><![CDATA[Apple OS X]]></category>
		<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://blog.brixandersen.dk/?p=153</guid>
		<description><![CDATA[After having bought a new Sony DSC-HX5V digital camera, which is equipped with an integrated GPS, I discovered that it comes with windows-only software for downloading and updating the GPS almanac on the camera (the supplied PMB Portable software runs on Apple OS X, but it does not support downloading the GPS almanac). After tinkering [...]]]></description>
			<content:encoded><![CDATA[<p>After having bought a new Sony <a href="http://www.sonystyle.com/webapp/wcs/stores/servlet/ProductDisplay?productId=8198552921666077169">DSC-HX5V</a> digital camera, which is equipped with an integrated GPS, I discovered that it comes with windows-only <a href="http://support.d-imaging.sony.co.jp/www/disoft/int/pmb/">software</a> for downloading and updating the GPS almanac on the camera (the supplied PMB Portable software runs on Apple OS X, but it does not support downloading the GPS almanac).</p>
<p>After tinkering a bit with tcpdump(1) and friends I found out how to perform the download and update manually:</p>
<ol>
<li>Download <a href="http://control.d-imaging.sony.co.jp/GPS/assistme.dat">assistme.dat</a></li>
<li>Download <a href="http://control.d-imaging.sony.co.jp/GPS/assistme.md5">assistme.md5</a></li>
<li>Verify that the MD5 sum of the <code>assistme.dat</code> file matches the one in the <code>assistme.md5</code> file</li>
<li>Create a top-level folder hierarchy on the memory card for the camera (not the internal memory of the camera) called <code>Private/SONY/GPS/</code></li>
<li>Place the downloaded <code>assistme.dat</code> file in the <code>Private/SONY/GPS/</code> folder</li>
<li>Place the memory card in the camera and verify that the GPS Assist Data is valid</li>
</ol>
<p>I have written a small <a href="http://www.brixandersen.dk/files/update-gps-assist-data.pl">perl script</a> for automating the above tasks. The script takes the mount point of the memory card as argument.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brixandersen.dk/?feed=rss2&amp;p=153</wfw:commentRss>
		<slash:comments>31</slash:comments>
		</item>
		<item>
		<title>Monitoring Soekris Temperature through SNMP</title>
		<link>http://blog.brixandersen.dk/?p=149</link>
		<comments>http://blog.brixandersen.dk/?p=149#comments</comments>
		<pubDate>Sun, 21 Mar 2010 11:39:31 +0000</pubDate>
		<dc:creator>brix</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://blog.brixandersen.dk/?p=149</guid>
		<description><![CDATA[Here&#8217;s a quick tip for monitoring the temperature of your Soekris net4801 through SNMP on FreeBSD: Install the net-mgmt/bsnmp-ucd and sysutils/env4801 ports and add the following to /etc/snmpd.conf: begemotSnmpdModulePath."ucd" = "/usr/local/lib/snmp_ucd.so" %ucd extNames.0 = "temperature" extCommand.0 = "/usr/local/sbin/env4801 &#124; /usr/bin/grep ^Temp &#124; /usr/bin/cut -d ' ' -f 6" Enable and start bsnmpd(1). The temperature of [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s a quick tip for monitoring the temperature of your <a href="http://soekris.com">Soekris net4801</a> through SNMP on FreeBSD:</p>
<p>Install the <a href="http://www.freshports.org/net-mgmt/bsnmp-ucd/">net-mgmt/bsnmp-ucd</a> and <a href="http://www.freshports.org/sysutils/env4801/">sysutils/env4801</a> ports and add the following to <code>/etc/snmpd.conf</conf>:</p>
<pre>
begemotSnmpdModulePath."ucd" = "/usr/local/lib/snmp_ucd.so"
%ucd
extNames.0 = "temperature"
extCommand.0 = "/usr/local/sbin/env4801 | /usr/bin/grep ^Temp | /usr/bin/cut -d ' ' -f 6"
</pre>
<p>Enable and start <a href="http://www.freebsd.org/cgi/man.cgi?query=bsnmpd&#038;apropos=0&#038;sektion=0&#038;manpath=FreeBSD+8.0-RELEASE&#038;format=html">bsnmpd(1)</a>. The temperature of your Soekris net4801 can now be queried through UCD-SNMP-MIB::extOutput.0 OID (1.3.6.1.4.1.2021.8.1.101.0).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brixandersen.dk/?feed=rss2&amp;p=149</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Plotting Load Average as Floating Point using MRTG</title>
		<link>http://blog.brixandersen.dk/?p=131</link>
		<comments>http://blog.brixandersen.dk/?p=131#comments</comments>
		<pubDate>Mon, 15 Mar 2010 21:45:29 +0000</pubDate>
		<dc:creator>brix</dc:creator>
				<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Mostly Stuff]]></category>

		<guid isPermaLink="false">http://blog.brixandersen.dk/?p=131</guid>
		<description><![CDATA[The web is flooded with examples of how to use the popular MRTG software for plotting more exotic SNMP OIDs than just network traffic. One of the more popular variables to graph seems to be the load average of a given system, but all of the examples I have stumpled upon online compromise when it [...]]]></description>
			<content:encoded><![CDATA[<p>The web is flooded with examples of how to use the popular <a href="http://oss.oetiker.ch/mrtg/">MRTG</a> software for plotting more exotic SNMP OIDs than just network traffic.</p>
<p>One of the more popular variables to graph seems to be the load average of a given system, but all of the examples I have stumpled upon online compromise when it comes to plotting the load average as a floating point value.</p>
<p>It is, however, possible to post-process the gathered statistics before plotting the graph and the legend using the  <code>YTicsFactor</code> and <code>Factor</code> keywords as shown in the example below:</p>
<pre>
Options[load]: gauge, nopercent, noo
Target[load]: 1.3.6.1.4.1.2021.10.1.5.2&#038;PseudoZero:public@localhost
MaxBytes[load]: 100
Title[load]: 5 Minute Load Average
PageTop[load]: &lt;h1&gt;5 Minute Load Average&lt;/h1&gt;
YLegend[load]: Load Average
ShortLegend[load]: &amp;nbsp;
Legend1[load]: 5 Minute Load Average
Legend3[load]: Maximum Observed Load Average
LegendI[load]: &amp;nbsp;Load Average:
YTicsFactor[load]: 0.01
Factor[load]: 0.01
</pre>
<p>The above example will gather the 5 minute load average as an integer value (average load x 100) of localhost and use a scaling factor of 0.01 before actually plotting the graph.</p>
<p>Judging from the examples I have found online, the <code>noo</code> option and the <code>PseudoZero</code> pseudo OID used in the example are other, often overlooked features of MRTG. The <code>noo</code> option specifies that no &#8220;Output&#8221; graph shall be plotted while the <code>PseudoZero</code> pseudo OID always returns 0 (whereas <code>noi</code> disables the &#8220;Input&#8221; graph and <code>PseudoOne</code> always returns 1).</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brixandersen.dk/?feed=rss2&amp;p=131</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Terminal.app vs. iTerm, Round II</title>
		<link>http://blog.brixandersen.dk/?p=128</link>
		<comments>http://blog.brixandersen.dk/?p=128#comments</comments>
		<pubDate>Tue, 23 Feb 2010 20:12:13 +0000</pubDate>
		<dc:creator>brix</dc:creator>
				<category><![CDATA[Apple OS X]]></category>

		<guid isPermaLink="false">http://blog.brixandersen.dk/?p=128</guid>
		<description><![CDATA[A lot of water has passed beneath the bridge since I wrote my last entry about Apples Terminal.app vs. iTerm. Apple has released Snow Leopard with, among other things, a much improved version of Terminal.app, which has gotten me to ditch iTerm again. So, I bring to you a version of the script for opening [...]]]></description>
			<content:encoded><![CDATA[<p>A lot of water has passed beneath the bridge since I wrote my <a href="http://blog.brixandersen.dk/?p=119">last entry</a> about Apples Terminal.app vs. iTerm. Apple has released Snow Leopard with, among other things, a much improved version of Terminal.app, which has gotten me to ditch iTerm again.</p>
<p>So, I bring to you a version of the script for opening a new terminal window on the currently active desktop space &#8211; the Terminal.app way:</p>
<pre>
tell application "System Events"
	set TerminalCount to (count (every process whose name is "Terminal"))
end tell

if (TerminalCount is not 0) then
	tell application "Terminal"
		do script
		activate
	end tell
else
	tell application "Terminal"
		activate
	end tell
end if
</pre>
<p>As usual: Save the script to a .scpt file, open it with Script Editor, save as an Application and place a shortcut in your Dock.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brixandersen.dk/?feed=rss2&amp;p=128</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Terminal.app vs. iTerm</title>
		<link>http://blog.brixandersen.dk/?p=119</link>
		<comments>http://blog.brixandersen.dk/?p=119#comments</comments>
		<pubDate>Mon, 18 May 2009 10:55:08 +0000</pubDate>
		<dc:creator>brix</dc:creator>
				<category><![CDATA[Apple OS X]]></category>

		<guid isPermaLink="false">http://blog.brixandersen.dk/?p=119</guid>
		<description><![CDATA[Having used Apple&#8217;s own Terminal.app for all my terminal emulator needs since I switched to OS X on my primary workstation, I decided to take iTerm for a spin this weekend &#8211; it was a pleasant surprise. Compared to Terminal.app, iTerm seems to suck up a few more system resources, but this is &#8211; imho [...]]]></description>
			<content:encoded><![CDATA[<p>Having used Apple&#8217;s own Terminal.app for all my terminal emulator needs since I switched to OS X on my primary workstation, I decided to take <a href="http://iterm.sourceforge.net/">iTerm</a> for a spin this weekend &#8211; it was a pleasant surprise.</p>
<p>Compared to Terminal.app, iTerm seems to suck up a few more system resources, but this is &#8211; imho &#8211; easily made up for with the added features. Especially tab support is much better in iTerm than in Terminal.app. Being able to set the title of tabs from the running shell (using the XTerm &#8220;icon name&#8221; escape sequence) along with the tab activity indicators rocks. Copy-on-selection and Cmd-click to launch URLs are also nice additions, that &#8211; once you get used to them &#8211; are very hard to work without.</p>
<p>There is, however, one missing feature of both Terminal.app and iTerm: The ability to click an icon in the Dock and have a new terminal emulator window open in the currently selected space. I&#8217;ve written a small AppleScript to do just that for iTerm:</p>
<pre>
tell application "System Events"
	set iTermCount to (count (every process whose name is "iTerm"))
end tell

if (iTermCount is not 0) then
	tell application "iTerm"
		set newterm to (make new terminal)
		tell newterm
			launch session "Default"
			activate
		end tell
	end tell
else
	tell application "iTerm"
		activate
	end tell
end if
</pre>
<p>Save the script to a .scpt file, open it with Script Editor, save as an Application and place a shortcut in your Dock.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brixandersen.dk/?feed=rss2&amp;p=119</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Booting nanoBSD on the Alix2c2 SBC</title>
		<link>http://blog.brixandersen.dk/?p=94</link>
		<comments>http://blog.brixandersen.dk/?p=94#comments</comments>
		<pubDate>Thu, 04 Dec 2008 00:03:52 +0000</pubDate>
		<dc:creator>brix</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://blog.brixandersen.dk/?p=94</guid>
		<description><![CDATA[A friend and I recently purchased a couple of Alix2c2 SBCs from PC Engines with the intention of running FreeBSDs nanoBSD on them. However, getting nanoBSD to boot on the Alix board turned out to require a few customizations which I will post here in the hope of saving others the trouble. The Alix2c2 reports [...]]]></description>
			<content:encoded><![CDATA[<p>A friend and I recently purchased a couple of <a href="http://pcengines.ch/alix2c2.htm">Alix2c2</a> SBCs from <a href="http://pcengines.ch/">PC Engines</a> with the intention of running FreeBSDs <a href="http://www.freebsd.org/doc/en/articles/nanobsd/index.html">nanoBSD</a> on them.</p>
<p>However, getting nanoBSD to boot on the Alix board turned out to require a few customizations which I will post here in the hope of saving others the trouble.</p>
<p>The Alix2c2 reports the following at boot time for the noname 1GB CF card from PC Engines:</p>
<pre>
PC Engines ALIX.2 v0.99
640 KB Base Memory
261120 KB Extended Memory

01F0 Master 044A CF 1GB
Phys C/H/S 1966/16/63 Log C/H/S 983/32/63
</pre>
<p>Running <code>diskinfo(8)</code> on the CF in an USB CF card reader on another FreeBSD machine revealed the capacity of the card:</p>
<pre>
$ diskinfo /dev/da0
/dev/da0        512     1014644736      1981728 967     64      32
</pre>
<p>Gettng nanoBSD to boot on the Alix2c from the 1GB CF card required the following customizations to the nanoBSD configuration file:</p>
<pre>
# Drive geometry
NANO_DRIVE=ad0
NANO_MEDIASIZE=`expr 1014644736 / 512` # size from diskinfo(8) on the UBS CF card reader
NANO_HEADS=32 # heads from the logic CHS information at boot time
NANO_SECTS=63 # sects from the logic CHS information at boot time

# Boot loader
NANO_BOOT0CFG="-o nopacket -s 1 -m 3" # nopacket seems to be required by tinyBIOS
</pre>
<p>Before booting nanoBSD, hit &#8216;s&#8217; on the Alix2c2 serial console during RAM testing and switch the BIOS to LBA mode and 9600 baud serial console (default is 38400 baud, but this wont work with boot0sio). Re-attach to the serial console with 9600 baud and reboot to verify the setup.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brixandersen.dk/?feed=rss2&amp;p=94</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>One Month of iPhone 3G</title>
		<link>http://blog.brixandersen.dk/?p=80</link>
		<comments>http://blog.brixandersen.dk/?p=80#comments</comments>
		<pubDate>Mon, 11 Aug 2008 17:09:43 +0000</pubDate>
		<dc:creator>brix</dc:creator>
				<category><![CDATA[Mostly Stuff]]></category>

		<guid isPermaLink="false">http://blog.brixandersen.dk/?p=80</guid>
		<description><![CDATA[Having had my iPhone 3G for a month now, I think it&#8217;s time for a quick status report slash review slash list of annoyances &#8211; in no particular order: Missing Status Bar Icon for Ringer/Silent Switch A minor thing, sure, but I can not count how many times I have missed an SMS notification or [...]]]></description>
			<content:encoded><![CDATA[<p>Having had my iPhone 3G for a month now, I think it&#8217;s time for a quick status report slash review slash list of annoyances &#8211; in no particular order:</p>
<p><b>Missing Status Bar Icon for Ringer/Silent Switch</b><br />
A minor thing, sure, but I can not count how many times I have missed an SMS notification or an incoming call simply because I&#8217;ve forgotten to turn the ringer back on upon leaving a meeting. Of course, the switch on the side indicates the current ringer mode, but a visual indication in the top status bar on the display would be nice.</p>
<p><b>Occasional Crashes</b><br />
More than a few times when the iPod application was playing music and Safari was busy downloading or scrolling a heavy weight web page, my iPhone crashed or locked up hard &#8211; requiring a manual restart (holding down Home and Sleep/Wake button for a few seconds) in order to get back to working condition. Rather annoying. [Update: This seems to have been fixed by update to iPhone OS 2.0.2]</p>
<p><b>Inconsistent Screen Locking</b><br />
Locking the screen while the iPod is playing does not lock the volume keys on the side &#8211; often resulting in the volume keys being activated by accident while the iPhone is tucked away in my pocket, which is quite annoying. It would be nice to be able to configure this behaviour. Also, double-clicking the Home button while the screen is locked still brings up the iPod controls (if this feature is enabled in Settings) &#8211; again, it would be nice if it was configurable if the screen lock should disable double-clicking as well.</p>
<p><b>Lack of Calendar Synchronization</b><br />
For some reason, Apple does not (yet?) allow third party applications to access the calendar on the iPhone, and since the built-in calendar can only synchronize with MobileMe and Exchange over the air, this leaves the calendar application pretty much useless if you do not use either of those for your calendar. I&#8217;d love to see the calendar opened either opened up for third party applications or at least a way to synchronize the calendar using less &#8230; ahem &#8230; expensive solutions (e.g. the calendar on my iPod Nano can read a standard *.ics file &#8211; the iPhone e-mail client can read a *.vcf file and import its contents into the Contacts application, but it can not open an *.ics file).</p>
<p>Despite the above annoyances I am still quite pleased with my iPhone 3G. It is by far the most advanced mobile device I have ever had, and it beats the features of my previous mobile phones with several lengths. I hope &#8211; perhaps I&#8217;m just being naive &#8211; that the rumoured 2.1 firmware will address some of the above mentioned issues.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brixandersen.dk/?feed=rss2&amp;p=80</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apple iPhone (3G) vs. FreeBSD, take I</title>
		<link>http://blog.brixandersen.dk/?p=72</link>
		<comments>http://blog.brixandersen.dk/?p=72#comments</comments>
		<pubDate>Sat, 09 Aug 2008 23:12:16 +0000</pubDate>
		<dc:creator>brix</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://blog.brixandersen.dk/?p=72</guid>
		<description><![CDATA[No, this post won&#8217;t be able to tell you how to synchronize contacts, calendar, bookmarks etc. from your FreeBSD box to your iPhone or iPhone 3G, sorry &#8211; still working on that. It will, however, show you how to make FreeBSD recognize your iPhone as a camera device, so that you can download the photos [...]]]></description>
			<content:encoded><![CDATA[<p>No, this post won&#8217;t be able to tell you how to synchronize contacts, calendar, bookmarks etc. from your FreeBSD box to your iPhone or iPhone 3G, sorry &#8211; still working on that. It will, however, show you how to make FreeBSD recognize your iPhone as a camera device, so that you can download the photos taken with your iPhone to a FreeBSD host.</p>
<p>First of all, make sure you&#8217;re using a kernel with ugen(4) support &#8211; but either without uhid(4) support or FreeBSD 8-CURRENT in SVN revision 181482 or newer &#8211; or manually apply this patch:</p>
<p>[Update: I have just MFC'ed this patch to RELENG_7 (SVN revision 181636) and RELENG_6 (SVN revision 181637), so this patch will be included in FreeBSD 7.1 and 6.4].</p>
<pre>
Index: sys/dev/usb/usb_quirks.c
===================================================================
--- sys/dev/usb/usb_quirks.c	(revision 181481)
+++ sys/dev/usb/usb_quirks.c	(working copy)
@@ -106,6 +106,10 @@
 	ANY, { UQ_HID_IGNORE }},
  { USB_VENDOR_MGE, USB_PRODUCT_MGE_UPS2,
 	ANY, { UQ_HID_IGNORE }},
+ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE,
+	ANY, { UQ_HID_IGNORE }},
+ { USB_VENDOR_APPLE, USB_PRODUCT_APPLE_IPHONE_3G,
+	ANY, { UQ_HID_IGNORE }},

  /* Devices which should be ignored by both ukbd and uhid */
  { USB_VENDOR_CYPRESS, USB_PRODUCT_CYPRESS_WISPY1A,
Index: sys/dev/usb/usbdevs
===================================================================
--- sys/dev/usb/usbdevs	(revision 181481)
+++ sys/dev/usb/usbdevs	(working copy)
@@ -853,6 +853,8 @@
 product APPLE IPOD_08		0x1208	iPod '08'
 product APPLE IPODVIDEO		0x1209	iPod Video
 product APPLE IPODNANO		0x120a	iPod Nano
+product APPLE IPHONE		0x1290	iPhone
+product APPLE IPHONE_3G		0x1292	iPhone 3G
 product APPLE ETHERNET		0x1402	Ethernet A1277

 /* Arkmicro Technologies */
</pre>
<p>Next, make sure you have <a href="http://www.gphoto.org/">graphics/gphoto2</a> and <a href="http://gphoto.sourceforge.net/proj/libgphoto2/">graphics/libgphoto2</a> (the latter needs to be 2.4.2_1 or later for the iPhone 3G to work) installed.</p>
<p>Plug in the USB cable from your iPhone and verify using dmesg(8) that it shows up as an ugen(4) device as shown below:</p>
<pre>
kernel: ugen1: &lt;Apple Inc. iPhone, class 0/0, rev 2.00/0.01, addr 2&gt; on uhub4
</pre>
<p>That&#8217;s it &#8211; you should now be able to access the photos on your iPhone using ghoto2(1) &#8211; just replace &#8216;Apple iPhone (PTP Mode)&#8217; with &#8216;Apple iPhone 3G (PTP Mode)&#8217; for the iPhone 3G:</p>
<pre>
$ gphoto2 --camera 'Apple iPhone (PTP Mode)' -L
There is no file in folder '/'.
There is no file in folder '/store_00010002'.
There is no file in folder '/store_00010002/DCIM'.
There are 7 files in folder '/store_00010002/DCIM/100APPLE'.
#1     IMG_0007.JPG                   49 KB image/jpeg
#2     IMG_0013.JPG                  389 KB image/jpeg
#3     IMG_0022.JPG                   26 KB image/jpeg
#4     IMG_0026.JPG                  358 KB image/jpeg
#5     IMG_0027.JPG                  357 KB image/jpeg
#6     IMG_0028.JPG                  381 KB image/jpeg
#7     IMG_0029.JPG                  377 KB image/jpeg
There is no file in folder '/store_00010002/DCIM/999APPLE'.
</pre>
<p>See the gphoto2(1) man page for further usage instructions.</p>
<p>Of course, you can also use a graphical client such as <a href="http://www.gphoto.org/proj/gtkam/">graphics/gtkam</a> as long as it uses libgphoto2 for camera access.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brixandersen.dk/?feed=rss2&amp;p=72</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Life is too short for (cheap) hardware</title>
		<link>http://blog.brixandersen.dk/?p=71</link>
		<comments>http://blog.brixandersen.dk/?p=71#comments</comments>
		<pubDate>Fri, 23 May 2008 21:41:31 +0000</pubDate>
		<dc:creator>brix</dc:creator>
				<category><![CDATA[FreeBSD]]></category>

		<guid isPermaLink="false">http://blog.brixandersen.dk/?p=71</guid>
		<description><![CDATA[I recently acquired a Revoltec Alu Book USB mass storage enclosure for a 2.5&#8243; PATA HDD, which is based on the Myson CE8818 chipset and therefore matched by the (wrongly named, as this matches all CE8818 based devices) following USB quirk in FreeBSD -current: { USB_VENDOR_MYSON, USB_PRODUCT_MYSON_HEDEN, RID_WILDCARD, UMASS_PROTO_SCSI &#124; UMASS_PROTO_BBB, NO_INQUIRY &#124; IGNORE_RESIDUE }, [...]]]></description>
			<content:encoded><![CDATA[<p>I recently acquired a Revoltec Alu Book USB mass storage enclosure for a 2.5&#8243; PATA HDD, which is based on the Myson CE8818 chipset and therefore matched by the (wrongly named, as this matches all CE8818 based devices) following USB quirk in FreeBSD -current:</p>
<pre><code>
        { USB_VENDOR_MYSON,  USB_PRODUCT_MYSON_HEDEN, RID_WILDCARD,
          UMASS_PROTO_SCSI | UMASS_PROTO_BBB,
          NO_INQUIRY | IGNORE_RESIDUE
        },
</code></pre>
<p>The enclosure worked fine for a while, but then started to fail under FreeBSD with heavy disk activity, spewing the following messages in dmesg:</p>
<p><code>
<pre>
kernel: umass0: <Myson Century, Inc. USB Mass Storage Device, class 0/0, rev 2.00/b0.08, addr 2> on uhub4
root: Unknown USB device: vendor 0x04cf product 0x8818 bus uhub4
kernel: da0 at umass-sim0 bus 0 target 0 lun 0
kernel: da0: <  > Removable Direct Access SCSI-2 device
kernel: da0: 40.000MB/s transfers
kernel: da0: 114473MB (234441648 512 byte sectors: 255H 63S/T 14593C)
...
kernel: (da0:umass-sim0:0:0:0): READ(10). CDB: 28 0 8 45 78 6f 0 0 48 0
kernel: (da0:umass-sim0:0:0:0): CAM Status: SCSI Status Error
kernel: (da0:umass-sim0:0:0:0): SCSI Status: Check Condition
kernel: (da0:umass-sim0:0:0:0): ILLEGAL REQUEST asc:20,0
kernel: (da0:umass-sim0:0:0:0): Invalid command operation code
kernel: (da0:umass-sim0:0:0:0): Unretryable error
kernel: g_vfs_done():da0s1a[READ(offset=71050477568, length=36864)]error = 22
kernel: vnode_pager_getpages: I/O read error
kernel: vm_fault: pager read error, pid 27989 (cp)
</pre>
<p></code></p>
<p>cp(1), which I used for reproducing the problem, said <code>cp: /foo/bar/baz.txt: Bad address</code> and the destination file was corrupt.</p>
<p>I investigated the possible course of the failure. A dying disk? A quirky chipset? A change in the FreeBSD umass(4) driver or something else?</p>
<p>After having spent weeks of debugging this periodical error, it eventually turned out to be a dying USB HDD enclosure.</p>
<p>Close examination of the PCB showed that some of the lines connecting the HDD connector to the chipset had clearly been repaired before shipping this unit, but no coat of varnish had been given afterwards &#8211; leading to corrosion of the PCB over time.</p>
<p>I have just replaced the USB HDD enclosure with a new one (from a different vendor, of course) &#8211; and I can no longer reproduce the above problem with the same HDD installed.</p>
<p>Lesson learned: Life is too short for dealing with (cheap) hardware.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.brixandersen.dk/?feed=rss2&amp;p=71</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>CyberCity ADSL using a Cisco SOHO 77</title>
		<link>http://blog.brixandersen.dk/?p=70</link>
		<comments>http://blog.brixandersen.dk/?p=70#comments</comments>
		<pubDate>Sat, 19 Jan 2008 14:08:45 +0000</pubDate>
		<dc:creator>brix</dc:creator>
				<category><![CDATA[Mostly Stuff]]></category>

		<guid isPermaLink="false">http://blog.brixandersen.dk/?p=70</guid>
		<description><![CDATA[While debugging connectivity issues on my recently installed CyberCity ADSL line, I came to suspect the ZyXEL router supplied to me by the ISP. Erwin kindly offered to lend me a good old Cisco SOHO 77 ADSL router to test with, which meant I had to find out how to actually configure this device for [...]]]></description>
			<content:encoded><![CDATA[<p>While debugging connectivity issues on my recently installed <a href="http://www.cybercity.dk/">CyberCity</a> ADSL line, I came to suspect the ZyXEL router supplied to me by the ISP.</p>
<p><a href="http://blog.droso.org/">Erwin</a> kindly offered to lend me a good old <a href="http://www.cisco.com/en/US/products/hw/routers/ps2167/ps2168/">Cisco SOHO 77</a> ADSL router to test with, which meant I had to find out how to actually configure this device for use with CyberCity.</p>
<p>It didn&#8217;t take long, though &#8211; below my configuration for reference:</p>
<ul>
<li>dsl654321 is my CyberCity user name</li>
<li>11.22.33.44 is my public IP address</li>
<li>The example configuration contains a static PAT for all ports to 192.168.0.2
</ul>
<pre>
Current configuration : 2137 bytes
!
version 12.3
no service pad
service timestamps debug datetime localtime show-timezone
service timestamps log datetime localtime show-timezone
service password-encryption
!
hostname dsl654321
!
boot-start-marker
boot-end-marker
!
logging buffered 8192 debugging
enable secret 5 **removed**
!
clock timezone CET 1
clock summer-time CEST recurring last Sun Mar 2:00 last Sun Oct 3:00
ip subnet-zero
ip domain lookup source-interface Loopback0
ip name-server 212.242.40.3
ip name-server 212.242.40.51
!
ip dhcp pool soho77
   network 192.168.0.0 255.255.255.0
   dns-server 212.242.40.3 212.242.40.51
   default-router 192.168.0.1
   lease 0 1
!
interface Loopback0
 ip address 192.168.255.1 255.255.255.0
!
interface Tunnel0
 no ip address
!
interface Ethernet0
 ip address 192.168.0.1 255.255.255.0
 ip nat inside
 no keepalive
 no cdp enable
 hold-queue 100 out
!
interface ATM0
 no ip address
 no atm ilmi-keepalive
 dsl operating-mode ansi-dmt
 pvc 0/35
  encapsulation aal5mux ppp dialer
  dialer pool-member 1
!
interface Dialer0
 ip address negotiated
 ip nat outside
 encapsulation ppp
 dialer pool 1
 dialer-group 1
 ppp authentication pap callin
 ppp chap hostname dsl654321
 ppp chap password 7 **removed CyberCity Password**
!
ip nat inside source list 1 interface Dialer0 overload
ip nat inside source static 192.168.0.2 11.22.33.44 extendable
ip classless
ip route 0.0.0.0 0.0.0.0 Dialer0
no ip http server
!
access-list 1 permit 192.168.0.0 0.0.255.255
dialer-list 1 protocol ip permit
no cdp run
snmp-server engineID local 000000090200000427FD16B9
snmp-server community **removed** RO
snmp-server enable traps tty
banner motd ^C
***************************************
*                                     *
*   UNAUTHORISED ACCESS PROHIBITED    *
*                                     *
***************************************
^C
!
line con 0
 exec-timeout 60 0
 password 7 **removed**
 login
 transport output all
 stopbits 1
line vty 0 4
 exec-timeout 60 0
 password 7 **removed**
 login
 transport input all
 transport output all
!
scheduler max-task-time 5000
sntp server 212.242.32.206
end
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.brixandersen.dk/?feed=rss2&amp;p=70</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
