<?xml version="1.0" encoding="utf-8" ?>
<feed xmlns="http://www.w3.org/2005/Atom">
<title>Fun with ones and zeros - hardware</title>
<subtitle>Barry&#039;s notes on computer software and hardware</subtitle>
<link href="/blog/tags/hardware"></link>
<updated>2026-05-01T07:00:22-07:00</updated>
<id>urn:uuid:1be781ac-5596-c8db-2d74-117f9ec2cd26</id>
<entry>
<title>Logitech QuickCam Communicate STX</title>
<link href="/blog/entries/logitech-quickcam-communicate-stx"></link>
<id>urn:uuid:ad805429-6d14-efdd-d602-bb35ff147b48</id>
<updated>2008-04-26T14:21:39-07:00</updated>
<author><name>Barry Pederson</name>
<email>bp@barryp.org</email>
</author>
<content type="html">
&lt;p&gt;&lt;a href=&quot;/blog/entries/logitech-quickcam-pro-5000-mac-mini/&quot;&gt;Earlier&lt;/a&gt;, I wrote about setting up a Mac Mini user running OSX Tiger 10.4.x with a &lt;a href=&quot;http://www.kqzyfj.com/click-2824236-10440897?url=http%3A%2F%2Fwww.newegg.com%2FProduct%2FProduct.aspx%3FItem%3DN82E16826104045%26nm_mc%3DAFC-C8Junction%26cm_mmc%3DAFC-C8Junction-_-Webcam-_-Logitech%2BInc.-_-26104045&amp;amp;cjsku=N82E16826104045&quot; rel=&quot;nofollow&quot;&gt;Logitech QuickCam Pro 5000&lt;/a&gt;, and how there was trouble using the camera&#039;s microphone.  Fixing it involved mucking around with Mac OSX kernel extensions, and later automatic updates seem to have messed that up.  &lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;Rather than keep fighting with OSX, I swapped out that webcam for a Logitech QuickCam Communicate STX. Specifically, the model with part # &lt;a href=&quot;http://www.tkqlhce.com/click-2824236-10440897?url=http%3A%2F%2Fwww.newegg.com%2FProduct%2FProduct.aspx%3FItem%3DN82E16826104021%26nm_mc%3DAFC-C8Junction%26cm_mmc%3DAFC-C8Junction-_-Webcam-_-Logitech%2BInc.-_-26104021&amp;amp;cjsku=N82E16826104021&quot;&gt;961464-0403&lt;/a&gt;.
&lt;/p&gt;
&lt;p&gt;It&#039;s &lt;strong&gt;not&lt;/strong&gt; supported by default with OSX 10.4.x, but it is supported by &lt;a href=&quot;http://webcam-osx.sourceforge.net/&quot;&gt;macam&lt;/a&gt;, which is ridiculously easy to install.  After doing so it worked fine with Skype, and the auto-exposure feature even worked, where it adjusted itself automatically for the lighting in the room.
&lt;/p&gt;


</content>
</entry>
<entry>
<title>Mac OSX USB-Serial Adapter</title>
<link href="/blog/entries/mac-osx-usb-serial-adapter"></link>
<id>urn:uuid:29dec360-8a83-4bb2-8834-d4d73b3b7d88</id>
<updated>2008-03-16T13:27:24-07:00</updated>
<author><name>Barry Pederson</name>
<email>bp@barryp.org</email>
</author>
<content type="html">
&lt;p&gt;At work I occasionally need to work with devices that have serial interfaces, like Cisco Access points, and wanted to do so with my MacBook.  One particular USB-to-Serial adapter that I found works OK is a &lt;a href=&quot;http://www.tkqlhce.com/click-2824236-10440897?url=http%3A%2F%2Fwww.newegg.com%2FProduct%2FProduct.aspx%3FItem%3DN82E16812156003%26ATT%3D12-156-003%26CMP%3DAFC-C8Junction%26nm_mc%3DAFC-C8Junction%26cm_mmc%3DAFC-C8Junction-_-Adapters%2Band%2Bgender%2Bchangers-_-Sabrent-_-12156003&amp;amp;cjsku=N82E16812156003&quot;&gt;Sabrent SBT-USC1K&lt;/a&gt;, which uses the same &lt;a href=&quot;http://www.prolific.com.tw/eng/downloads.asp?ID=31&quot;&gt;MacOSX Prolific driver&lt;/a&gt; I had installed &lt;a href=&quot;/blog/entries/usb-gps-macosx/&quot;&gt;a while back for use with a GPS&lt;/a&gt;.  I&#039;ve used this on both MacOSX Tiger (10.4) and Leopard (10.5).  &lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;There are probably lots of USB-Serial adapters that work with a Mac, and even use that same driver.  I just thought I&#039;d jot down one in particular, so someone doesn&#039;t have to make a wild guess and order something hoping it happens to work with OSX.
&lt;/p&gt;


</content>
</entry>
<entry>
<title>Logitech QuickCam Pro 5000 on a Mac Mini</title>
<link href="/blog/entries/logitech-quickcam-pro-5000-mac-mini"></link>
<id>urn:uuid:8f7733f4-5ae5-a9a1-78b9-19ad253aab76</id>
<updated>2007-06-28T09:57:55-07:00</updated>
<author><name>Barry Pederson</name>
<email>bp@barryp.org</email>
</author>
<content type="html">
&lt;p&gt;I was recently working on finding a reasonable webcam that would work with an Intel Mac Mini, since Apple no longer sells the iSight and the prices for them on eBay are outrageous.
&lt;/p&gt;
&lt;p&gt;After reading reports that newer versions of the &lt;a href=&quot;http://www.kqzyfj.com/click-2824236-10440897?url=http%3A%2F%2Fwww.newegg.com%2FProduct%2FProduct.aspx%3FItem%3DN82E16826104045%26nm_mc%3DAFC-C8Junction%26cm_mmc%3DAFC-C8Junction-_-Webcam-_-Logitech%2BInc.-_-26104045&amp;amp;cjsku=N82E16826104045&quot; rel=&quot;nofollow&quot;&gt;Logitech QuickCam Pro 5000&lt;/a&gt; (labeled as &amp;quot;Vista Ready&amp;quot;) worked on Macs, I picked one up and tried it out on my Intel MacBook laptop, running OSX 10.4.8 at the time I believe.
&lt;/p&gt;
&lt;p&gt;Despite what I had read on various postings, the camera didn&#039;t show up at all, although the built-in microphone worked OK, appearing as something like &amp;quot;Unknown USB Audio Device&amp;quot;.  The camera worked OK in Windows, so I figured the hardware was OK - and returned it to the store and started looking again.
&lt;/p&gt;
&lt;p&gt;After a while, 10.4.9 came out, and supposedly included updates that supported more webcams.  I bought another QuickCam Pro 5000, and this time found that the camera and microphone worked in iChat, but the version of Skype I had at the time (2.6.0.137) only saw the microphone.  &lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;I figured this was good enough and took it out to the person with the Mini.  While there, I updated OSX to 10.4.10.  When I plugged in the QuickCam, I found that the camera worked, but now the microphone didn&#039;t show up at all.  When plugged into my 10.4.9 laptop, the camera and mic worked fine.  Apparently Apple broke something in the 10.4.10 update. (there&#039;s a discussion of it &lt;a href=&quot;http://discussions.apple.com/thread.jspa?threadID=1009957&amp;amp;amp;start=0&amp;amp;amp;tstart=0&quot;&gt;here&lt;/a&gt;.)
&lt;/p&gt;
&lt;p&gt;After poking around, I found the AppleUSBAudio system extension, which seemed like a likely suspect.  By replacing it with the same extension from 10.4.9, I was able to get the mic working - it went something like:
&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;sudo -s
(type in password)

cd /System/Library/Extensions
kextunload AppleUSBAudio.kext

(backup the AppleUSBAudio.kext directory somewhere else)
(copy the 10.4.9 AppleUSBAudio.kext directory to this directory)

(permissions got changed moving between machines, fix that up)
chown -R root:wheel AppleUSBAudio.kext  

kextload AppleUSBAudio.kext
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Plugged in the webcam, and now both camera and mic work.  Tried a newer Skype - 2.6.0.148, and that works too.  &lt;br /&gt;
&lt;/p&gt;
&lt;p&gt;So I think we&#039;ll be able to chat between the Mac Mini and the MacBook for a while - at least until Apple updates the OS again.  &lt;br /&gt;
&lt;/p&gt;
&lt;blockquote style=&quot;border: solid red 2px;padding:1em;&quot;&gt;In a &lt;a href=&quot;/blog/entries/logitech-quickcam-communicate-stx/&quot;&gt;followup entry&lt;/a&gt;, I replaced this camera with a Logitech QuickCam Communicate STX.&lt;/blockquote&gt;



</content>
</entry>
<entry>
<title>Fibre Channel part 2</title>
<link href="/blog/entries/fibre-channel-part-2"></link>
<id>urn:uuid:109b325a-6ae2-fc44-13a2-3abbb04335c9</id>
<updated>2006-10-07T09:59:00-07:00</updated>
<author><name>Barry Pederson</name>
<email>bp@barryp.org</email>
</author>
<content type="html">&lt;body&gt;&lt;p&gt;&lt;a href=&quot;/blog/entries/fibre-channel&quot;&gt;524 bytes per sector&lt;/a&gt; on a harddisk?  That may work for some IBM RAID array, but FreeBSD isn&#039;t going to stand for it.   After some searching, it appears the thing to do is to somehow change the sector size and do a low-level format.   &lt;/p&gt;
&lt;p&gt;Turns out Seagate has a very detailed &lt;a href=&quot;http://www.seagate.com/support/disc/manuals/fc/cheetah_10k7_fc_pm.pdf&quot;&gt;manual&lt;/a&gt; on these drives, and it mentions that the sector size can be between 512 and 528 bytes.  The sector size setting is apparently stored on a &quot;SCSI mode page&quot; 3, and the FreeBSD &lt;code&gt;camcontrol&lt;/code&gt; utility has support for viewing/editing this.  Running&lt;/p&gt;
&lt;div class=&quot;source&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;camcontrol modepage da0 -m &lt;span class=&quot;m&quot;&gt;3&lt;/span&gt;
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;shows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Tracks per Zone:  7564 
Alternate Sectors per Zone:  0
Alternate Tracks per Zone:  20
Alternate Tracks per Logical Unit:  0
Sectors per Track:  784
Data Bytes per Physical Sector:  524
Interleave:  1
Track Skew Factor:  272 
Cylinder Skew Factor:  120
SSEC:  0
HSEC:  1
RMB:  0
SURF:  0&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;which is the current settings, and the same command with the addition of  &lt;code&gt;-P 2&lt;/code&gt; to view the default settings shows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Tracks per Zone:  7564
Alternate Sectors per Zone:  0
Alternate Tracks per Zone:  20
Alternate Tracks per Logical Unit:  0
Sectors per Track:  809
Data Bytes per Physical Sector:  512
Interleave:  1
Track Skew Factor:  272
Cylinder Skew Factor:  120
SSEC:  0
HSEC:  1
RMB:  0
SURF:  0&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Those settings would be ideal.  Notice how the smaller sector size gives more sectors per track.  How to get the drive to switch to them?  Adding a &lt;code&gt;-e&lt;/code&gt; parameter to the camcontrol command as in: &lt;code&gt;camcontrol modepage da0 -m 3 -e&lt;/code&gt; should allow for changing that modepage, but all I got back was: &lt;code&gt;camcontrol: no editable entries&lt;/code&gt;.  Running &lt;code&gt;camcontrol modepage da0 -m 3 -P 1&lt;/code&gt; to see the changeable values shows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Tracks per Zone:  0
Alternate Sectors per Zone:  0
Alternate Tracks per Zone:  0
Alternate Tracks per Logical Unit:  0
Sectors per Track:  0
Data Bytes per Physical Sector:  0
Interleave:  0
Track Skew Factor:  0
Cylinder Skew Factor:  0
SSEC:  0
HSEC:  0
RMB:  0
SURF:  0&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Dang, the IBM firmware has locked out making changes to the sector size.   According to the Seagate manual:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;The changeable values list can only be changed by downloading new firmware into the flash E-PROM. &lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Oh crap, where do you get new firmware, and how would you load it?  Doesn&#039;t seem that Seagate has new firmware available for easy download (like you get with motherboards and such).    Doing some digging with Google turned up some potential sources from deep within Sun and Grass Valley Group websites, but for all I know they&#039;re non-standard similar to how the IBM stuff is.  This was not looking good.&lt;/p&gt;
&lt;p&gt;Some more digging turned up &lt;a href=&quot;http://groups.google.com/group/mailing.freebsd.scsi/browse_thread/thread/15d9a0ad667ebf12/4d3912146f221425&quot;&gt;this thread&lt;/a&gt; from a FreeBSD mailing list, which suggests setting a sector-size value and immediately reformatting the disk with:&lt;/p&gt;
&lt;div class=&quot;source&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;camcontrol cmd da1 -v -c &lt;span class=&quot;s2&quot;&gt;&quot;15 10 0 0 v:i1 0&quot;&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;12&lt;/span&gt; -o &lt;span class=&quot;m&quot;&gt;12&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;0 0 0 8  0 0:i3 0 v:i3&quot;&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;512&lt;/span&gt;
camcontrol cmd -n da -u &lt;span class=&quot;m&quot;&gt;1&lt;/span&gt; -v -t &lt;span class=&quot;m&quot;&gt;7200&lt;/span&gt; -c &lt;span class=&quot;s2&quot;&gt;&quot;4 0 0 0 0 0&quot;&lt;/span&gt; 
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;I wasn&#039;t sure if this was applicable to my particular FC drive, and would just changing the sector size also adjust the sectors-per-track or other possibly related settings?  After doing a lot of reading on the &lt;code&gt;camcontrol&lt;/code&gt; command, and various &lt;a href=&quot;http://www.t10.org&quot;&gt;SCSI specs&lt;/a&gt;, I felt I had some understanding of what the above commands did, and figured it was worth a shot.  &lt;/p&gt;
&lt;p&gt;What do you know, it worked!  There was a bit of trouble with the second &lt;code&gt;camcontrol&lt;/code&gt; command in that it timed out too soon, but the sector size did change and it stayed changed.   For my second drive, I tried the regular &lt;code&gt;camcontrol format&lt;/code&gt; command instead of the raw one given in the example above.&lt;/p&gt;
&lt;div class=&quot;source&quot;&gt;&lt;pre&gt;&lt;span&gt;&lt;/span&gt;camcontrol cmd da0 -v -c &lt;span class=&quot;s2&quot;&gt;&quot;15 10 0 0 v:i1 0&quot;&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;12&lt;/span&gt; -o &lt;span class=&quot;m&quot;&gt;12&lt;/span&gt; &lt;span class=&quot;s2&quot;&gt;&quot;0 0 0 8  0 0:i3 0 v:i3&quot;&lt;/span&gt; &lt;span class=&quot;m&quot;&gt;512&lt;/span&gt;
camcontrol format da0 
&lt;/pre&gt;&lt;/div&gt;
&lt;p&gt;That actually worked a bit better,  because &lt;code&gt;camcontrol format&lt;/code&gt; shows a nice progress display, instead of making you guess a timeout and waiting for while you hope it&#039;s working.  &lt;/p&gt;
&lt;p&gt;So now I&#039;ve got a couple 10K rpm FC drives with FreeBSD installed and booting off them.   &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;da0 at isp0 bus 0 target 120 lun 0
da0: &amp;lt;IBM-SSG S0BE146 3706&amp;gt; Fixed Direct Access SCSI-3 device 
da0: 100.000MB/s transfers, Tagged Queueing Enabled
da0: 140014MB (286749488 512 byte sectors: 255H 63S/T 17849C)
da1 at isp0 bus 0 target 124 lun 0
da1: &amp;lt;IBM-SSG S0BE146 3709&amp;gt; Fixed Direct Access SCSI-3 device 
da1: 100.000MB/s transfers, Tagged Queueing Enabled
da1: 140014MB (286749488 512 byte sectors: 255H 63S/T 17849C)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I noticed the smaller sector size gives more total space on the drive.  They&#039;re fairly fast, but  not life-changingly fast.  It&#039;s been an interesting experience messing with them, but next time around I&#039;ll probably go back to SATA drives (or maybe SAS will be cheap on eBay by then....)  &lt;/p&gt;&lt;/body&gt;</content>
</entry>
<entry>
<title>Fibre Channel</title>
<link href="/blog/entries/fibre-channel"></link>
<id>urn:uuid:340f7eb4-c3c8-d92c-90c9-0e5cf1d9d8fb</id>
<updated>2006-09-29T06:58:00-07:00</updated>
<author><name>Barry Pederson</name>
<email>bp@barryp.org</email>
</author>
<content type="html">&lt;p&gt;I&#039;m going to be updating my home server soon, and I&#039;ve often thought it would be nice to have some fast server-class harddisks for speed and reliability, maybe even arranged in a mirror because I&#039;ve got a lot of stuff I wouldn&#039;t want to lose.   A couple weeks ago I started looking into &lt;a href=&quot;http://en.wikipedia.org/wiki/Fibre_Channel&quot;&gt;Fibre Channel&lt;/a&gt; gear that&#039;s available on eBay and was surprised to see how cheap some of this stuff was, with several 10k rpm and 15k rpm drives advertised as new going for 1/4 or less of the retail prices.  I bit the bullet and bought a bunch of  HBAs, cables, and drives for under $300.&lt;/p&gt;
&lt;p&gt;The first HBA I got was a Qlogic QLA2000 for $1.99, which seems to be a stripped down version of the QLA2100 that has a 32-bit PCI interface instead of the 2100&#039;s 64-bit PCI-X setup.  The machine I&#039;m putting this into only has regular 32-bit PCI slots, so I&#039;m not really loosing out on anything by using the cheaper card.  Also got a QLA2200 which is a 64-bit card, but it works fine in a 32-bit PCI slot.&lt;/p&gt;
&lt;p&gt;The drives are a pair of &amp;quot;new&amp;quot; 146.8GB Seagate Cheetah 10K.7 drives,  part # ST3146707FC with an IBM label on them for $230 total.  To buy the SCSI versions of those drives from NewEgg at today&#039;s price would cost $430 each, so I&#039;ve saved over $600 by going this route.   However, I entered one of the drive&#039;s serial numbers into Seagate&#039;s warranty webpage, and found that it&#039;s not eligible for warranty through them - you must go through the OEM they sold the drives to (IBM in this case).  Did some poking around on IBM&#039;s site and it&#039;s not obvious if/how you&#039;d get warranty service through them.  I guess that&#039;s the price you pay buying this type of drive.&lt;/p&gt;
&lt;p&gt;A 5-pack of HSSDC-DB9 cables was just $20, and the final piece was a &amp;quot;Start&amp;quot; T-Card directly from &lt;a href=&quot;http://ckcomputersystems.com/ckcs/catalog/default.php?cPath=21&quot;&gt;CK Computer Systems&lt;/a&gt; for $34. (the &lt;a href=&quot;http://www.ckcomputersystems.com/chris/fibrechannel.htm&quot;&gt;FAQ&lt;/a&gt; on that site was really helpful)&lt;/p&gt;
&lt;p&gt;Basically just plugged it all together, and fired the machine up.  The Qlogic card shows a BIOS boot message saying to hit ALT-Q to get into their setup.  There&#039;s one part in their BIOS utility where it scans your loop for devices - it showed the card, and then 15 blank spots.  I thought I was screwed at first, but after hitting page down several times I found the drive at id 120. Wow, FC can handle a lot of devices compared to SCSI.  &lt;/p&gt;
&lt;p&gt;Booted FreeBSD 6.1 (already installed on a regular ATA disk), and saw it detect the Qlogic card with the &lt;code&gt;isp(4)&lt;/code&gt; driver, and a &lt;code&gt;da0&lt;/code&gt; drive.  Once I saw that working, I tried adding &lt;code&gt;ispfw_load=&quot;YES&quot;&lt;/code&gt; to &lt;code&gt;/boot/loader.conf&lt;/code&gt;.  On the next reboot, it paused after it detected the &lt;code&gt;isp&lt;/code&gt; card, presumably loading the firmware that comes with FreeBSD.  The relevant &lt;code&gt;dmesg&lt;/code&gt; parts are:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;isp0: &amp;lt;Qlogic ISP 2100 PCI FC-AL Adapter&amp;gt; port 0xce00-0xceff mem 
      0xfe7df000-0xfe7dffff irq 17 at device 2.0 on pci2
isp0: [GIANT-LOCKED]
----
da0 at isp0 bus 0 target 120 lun 0
da0: &amp;lt;IBM-SSG S0BE146 3709&amp;gt; Fixed Direct Access SCSI-3 device
da0: 100.000MB/s transfers, Tagged Queueing Enabled
da0: 137501MB (275154368 524 byte sectors: 255H 63S/T 17127C)&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The &lt;code&gt;camcontrol&lt;/code&gt; utility seems to work with the HBA/drive combination no problem at all.  However, when I tried to do a &lt;code&gt;fdisk /dev/da0&lt;/code&gt; it errored out with:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;fdisk: can&#039;t read fdisk partition table
fdisk: /boot/mbr: length must be a multiple of sector size&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Oops, didn&#039;t like the 524 byte sectors.  I&#039;ll cover how I dealt with that in &lt;a href=&quot;/blog/entries/fibre-channel-part-2&quot;&gt;part 2&lt;/a&gt;.&lt;/p&gt;</content>
</entry>
</feed>