<?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>Avi :) &#187; hardware</title>
	<atom:link href="http://blog.avi.co/wp/tag/hardware/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.avi.co</link>
	<description>Open Source Software Hippy and all-round pedant</description>
	<lastBuildDate>Mon, 07 Jun 2010 14:34:05 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Dell Warranty Info</title>
		<link>http://blog.avi.co/wp/dell-warranty-info/</link>
		<comments>http://blog.avi.co/wp/dell-warranty-info/#comments</comments>
		<pubDate>Mon, 07 Dec 2009 18:06:19 +0000</pubDate>
		<dc:creator>Avi</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[code]]></category>
		<category><![CDATA[dell]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[perl]]></category>

		<guid isPermaLink="false">http://aviswebsite.co.uk/?p=397</guid>
		<description><![CDATA[I hate navigating the Dell website. It's inconsistent and messy and noisy, and all I generally want is a single date (when the warranty expires or expired on a given box). So I wrote this. It scrapes the Dell website, and returns the warranty info for the service tag it's been passed.
I've CGI'd it here.
#! [...]]]></description>
			<content:encoded><![CDATA[<p>I hate navigating the Dell website. It's inconsistent and messy and noisy, and all I generally want is a single date (when the warranty expires or expired on a given box). So I wrote this. It scrapes the Dell website, and returns the warranty info for the service tag it's been passed.<br />
I've CGI'd it <a href='../../cgi-bin/dell.pl'>here</a>.</p>
<pre class="perl"><span style="color: #808080; font-style: italic;">#! /usr/bin/perl</span>
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> strict;
<span style="color: #000000; font-weight: bold;">use</span> warnings;
&nbsp;
<a href="http://perldoc.perl.org/functions/die.html"><span style="color: #000066;">die</span></a> <span style="color: #ff0000;">&quot;$0<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\t</span>Get warranty info from dell.<span style="color: #000099; font-weight: bold;">\n</span>Usage<span style="color: #000099; font-weight: bold;">\n</span>$0 [SERVICE TAG]<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span> <span style="color: #b1b100;">if</span> !<span style="color: #0000ff;">$ARGV</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;
&nbsp;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$service_tag</span> = <span style="color: #0000ff;">$ARGV</span><span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;
&nbsp;
<span style="color: #000000; font-weight: bold;">use</span> LWP::<span style="color: #006600;">Simple</span>;
<span style="color: #000000; font-weight: bold;">use</span> HTML::<span style="color: #006600;">TableExtract</span>; <span style="color: #808080; font-style: italic;"># Is in the CPAN, and exists in the debian repositories as libhtml-tableextract-perl</span>
&nbsp;
<span style="color: #808080; font-style: italic;">## Make a URL:</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$url_base</span> = <span style="color: #ff0000;">&quot;http://support.euro.dell.com/support/topics/topic.aspx/emea/shared/support/my_systems_info/en/details&quot;</span>;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$url_params</span> = <span style="color: #ff0000;">&quot;?c=uk&amp;cs=ukbsdt1&amp;l=en&amp;s=gen&quot;</span>;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$url</span> = <span style="color: #0000ff;">$url_base</span>.<span style="color: #0000ff;">$url_params</span>.<span style="color: #ff0000;">&quot;&amp;servicetag=&quot;</span>.<span style="color: #0000ff;">$service_tag</span>;
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$content</span> = get<span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$url</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;"># Tell HTML::TableExtract to pick out the table(s) whose class is 'contract_table':</span>
<span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$table</span> = HTML::<span style="color: #006600;">TableExtract</span>-&gt;<span style="color: #006600;">new</span><span style="color: #66cc66;">&#40;</span> attribs =&gt; <span style="color: #66cc66;">&#123;</span> class =&gt; <span style="color: #ff0000;">&quot;contract_table&quot;</span> <span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;
<span style="color: #0000ff;">$table</span>-&gt;<span style="color: #006600;">parse</span><span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$content</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">## Gimme infos!</span>
<span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$ts</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$table</span>-&gt;<span style="color: #006600;">tables</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">foreach</span> <span style="color: #b1b100;">my</span> <span style="color: #0000ff;">$row</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0000ff;">$ts</span>-&gt;<span style="color: #006600;">rows</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
		<a href="http://perldoc.perl.org/functions/print.html"><span style="color: #000066;">print</span></a> <span style="color: #ff0000;">&quot;&quot;</span>, <a href="http://perldoc.perl.org/functions/join.html"><span style="color: #000066;">join</span></a><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span>&quot;</span>, <span style="color: #0000ff;">@$row</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span>&quot;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.avi.co/wp/dell-warranty-info/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>DDR RAM identification and naming conventions</title>
		<link>http://blog.avi.co/wp/ddr-ram-identification-and-naming-conventions/</link>
		<comments>http://blog.avi.co/wp/ddr-ram-identification-and-naming-conventions/#comments</comments>
		<pubDate>Tue, 03 Nov 2009 14:38:41 +0000</pubDate>
		<dc:creator>Avi</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[Tracts]]></category>
		<category><![CDATA[ddr]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[pictures]]></category>
		<category><![CDATA[ram]]></category>
		<category><![CDATA[reference]]></category>

		<guid isPermaLink="false">http://aviswebsite.co.uk/?p=153</guid>
		<description><![CDATA[All (modern) PC memory is SDRAM (Synchronous Dynamic RAM). DRAM, the predecessor, responded to requests as soon as it could after the control voltages changed, SDRAM replies according to a clock cycle (which synchronises it with the system bus).
Pretty much all modern PC memory is also DDR, Double Data Rate. With Single Data Rate RAM, [...]]]></description>
			<content:encoded><![CDATA[<p>All (modern) PC memory is SDRAM (Synchronous Dynamic RAM). DRAM, the predecessor, responded to requests as soon as it could after the control voltages changed, SDRAM replies according to a clock cycle (which synchronises it with the system bus).</p>
<p>Pretty much all modern PC memory is also DDR, Double Data Rate. With Single Data Rate RAM, data is only sent when the timing signal is high<sup>1</sup>. The clock signal is high for some period of time, then low for another period of time of the same length. One cycle consists of one high period and one low period. Single Data Rate RAM can only transmit at one of these, DDR at both.</p>
<p>DDR is then further subdivided into DDR, DDR2 and DDR3. Though the voltages are different (2.5v, 1.8v, 1.5v respectively), the big difference in practical terms is the socket shape:<br />
<center><br />
<img src="http://aviswebsite.co.uk/tools.d/ram_all.png" width="400px"/><br />
</center></p>
<p>While we're here, it's worth noting that the most commonly-used difference between DDR and DDR2 RAM, the notch position, is frightfully difficult to identify without an example of the other type against which to compare. More obvious is the gap between the contacts and the notch on the DDR stick (to the right of the notch in the above pic), which is absent on the DDR2 stick.</p>
<p>There are two ways people refer to DDR RAM, as a DDR-XXX or PC-XXXX. For example, DDR200 is also PC1600.<br />
The 200 in DDR200 is the clock rate of the memory modules (the chips on the memory stick). It is double the clock speed of the system it's plugged into, since it is DDR (and so operates twice per cycle).<br />
The 1600 in the PC1600 is the maximum number of bytes per second that the RAM allows, and is not achievable in the real world.</p>
<p>To calculate one from the other, we do</p>
<pre class="perl">TransferRate = SystemClockRate x DataRate x NumberOfBytesTransferred / NumberOfBitsPerByte
TransferRate = SystemClockRate x <span style="color: #cc66cc;">2</span> x <span style="color: #cc66cc;">64</span> / <span style="color: #cc66cc;">8</span>
TransferRate = SystemClockRate x <span style="color: #cc66cc;">16</span>
&nbsp;</pre>
<p>Since we're concerned with Dual Data Rate memory, the data rate is equal to two. It transfers 64 bytes per cycle, and each of those bytes is 8 bits long.<br />
The SystemClockRate is the frequency of the system bus, not of the memory itself - DDR200 operates at a frequency of 200MHz, but requires a system with a clock of 100MHz. In order to find the TransferRate given the MemoryFrequency we need to do</p>
<pre class="perl">&nbsp;
TransferRate = SystemClockRate x <span style="color: #cc66cc;">16</span>
   but SystemClockRate = MemoryFrequency x <span style="color: #cc66cc;">0.5</span>
TransferRate = MemoryFrequency x <span style="color: #cc66cc;">0.5</span> x <span style="color: #cc66cc;">16</span>
TransferRate = MemoryFrequency x <span style="color: #cc66cc;">8</span>
&nbsp;</pre>
<p>Hence <tt>200 x 8 = 1600</tt> means we'd expect DDR200 to give a theoretical maximum of 1600Bps, and so be PC1600.</p>
<p>The above are all maxima - DDR can operate at lower frequencies than its maximum. DDR266, while expecting a 133MHz system bus, can run satisfactorily in a 100MHz system, but it will only operate as DDR200. </p>
<p>Below are the combinations implemented in the real world:</p>
<table>
<tr>
<td>DDR200</td>
<td>PC1600</td>
</tr>
<tr>
<td>DDR266</td>
<td>PC2100</td>
</tr>
<tr>
<td>DDR333</td>
<td>PC2700</td>
</tr>
<tr>
<td>DDR400</td>
<td>PC3200</td>
</tr>
<tr>
<td>DDR2-400</td>
<td>PC2-3200</td>
</tr>
<tr>
<td>DDR2-533</td>
<td>PC2-4200</td>
</tr>
<tr>
<td>DDR2-667</td>
<td>PC2-5300</td>
</tr>
<tr>
<td>DDR2-800</td>
<td>PC2-6400</td>
</tr>
<tr>
<td>DDR2-1066</td>
<td>PC2-8500</td>
</tr>
<tr>
<td>DDR3-800</td>
<td>PC3-6400</td>
</tr>
<tr>
<td>DDR3-1066</td>
<td>PC3-8500</td>
</tr>
<tr>
<td>DDR3-1333</td>
<td>PC3-6400</td>
</tr>
<tr>
<td>DDR3-1600</td>
<td>PC3-12800</td>
</tr>
</table>
<p>The above is basically an aggregation and condensation of what is in the following articles. If you want more detail, go there:<br />
<a href="http://en.wikipedia.org/wiki/DDR_SDRAM">http://en.wikipedia.org/wiki/DDR_SDRAM</a><br />
<a href="http://www.hardwaresecrets.com/article/167/1">http://www.hardwaresecrets.com/article/167/1</a></p>
<ol class="footnotes"><li id="footnote_0_153" class="footnote">or low. I don't actually know, but It's mostly immaterial. The important bit is that it's an 'or' not an 'and'.</li></ol>]]></content:encoded>
			<wfw:commentRss>http://blog.avi.co/wp/ddr-ram-identification-and-naming-conventions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Using Synergy to share a keyboard and mouse across PCs</title>
		<link>http://blog.avi.co/wp/using-synergy-to-share-a-keyboard-and-mouse-across-pcs/</link>
		<comments>http://blog.avi.co/wp/using-synergy-to-share-a-keyboard-and-mouse-across-pcs/#comments</comments>
		<pubDate>Sat, 09 May 2009 21:10:50 +0000</pubDate>
		<dc:creator>Avi</dc:creator>
				<category><![CDATA[Geekery]]></category>
		<category><![CDATA[config]]></category>
		<category><![CDATA[hardware]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[mouse]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[synergy]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://aviswebsite.co.uk/?p=348</guid>
		<description><![CDATA[Synergy is a really neat way of using multiple computers at the same time, like a more convenient KVM switch (you do need to be physically close to all of them). 
It basically allows you to have a monitor for each PC on your desk, and one keyboard and mouse with which to monitor them. [...]]]></description>
			<content:encoded><![CDATA[<p>Synergy is a really neat way of using multiple computers at the same time, like a more convenient KVM switch (you do need to be physically close to all of them). </p>
<p>It basically allows you to have a monitor for each PC on your desk, and one keyboard and mouse with which to monitor them. Switching between PCs involves just moving the mouse pointer onto the relevant screen. It uses 'screens' rather than monitors, so you don't need to let it know if you've got a complicated multi-monitor setup on a host (or even if you add or remove monitors from one), and it allows for having screens of different sizes and for, say, the bottom half of one screen to line up with the top half of the next.</p>
<p>It's a server/client model - you have one server box into which you plug the keyboard and mouse. The rest connect over the network to it (in cleartext, don't do this where you don't trust the network).</p>
<p>I have two hosts. My work laptop is running Windows XP and has an external monitor plugged in to it. My testing PC is running Debian testing and is a PC proper. Here's my desk:<br />
<a href="http://aviswebsite.co.uk/wordpress/wp-content/uploads/using-synergy-to-share-a-keyboard-and-mouse-across-pcs/desk1.jpg"><img src="http://aviswebsite.co.uk/wordpress/wp-content/uploads/using-synergy-to-share-a-keyboard-and-mouse-across-pcs/desk1-300x225.jpg" alt="desk" title="desk" class="aligncenter size-medium wp-image-386" /></a><br />
<tt>jup-linux2</tt> is the left monitor (attached to the PC to its left, running Debian), <tt>jup-rmt07</tt> is the laptop on the right, which is also attached to the Sony screen in the middle. Since I take the laptop home with me occasionally, <tt>jup-linux2</tt> is configured as a server, <tt>jup-rmt07</tt> as the client (less to unplug).</p>
<p>Synergy is in the debian repositories, so it's just an <tt>apt-get install synergy</tt>. This provides two binaries, <tt>/usr/bin/synergyc</tt> and <tt>/usr/bin/synergys</tt>, which are the client and the server respectively.<br />
To install it in Windows, you'll want to grab it from their <a href="http://sourceforge.net/projects/synergy2/files/">Sourceforge page</a></p>
<p><strong>Configuring and starting the server</strong><br />
So, having installed, we can configure! The configuration file can be arbitrarily named, mine's cunningly called <tt>~/.synergy.conf</tt> and appears verbatim at the bottom of this. Synergy's really rather configurable, but I've never found much need for more than the basics, so I've an incredibly simple setup.</p>
<p>First, we define some 'screens'. Here we can also configure optons for screens, especially as regards the transference of caps-lock and num-lock statuses. I've no special requests, so I just list the hosts whose screens I want Synergy to manage:</p>
<pre>section: screens
	jup-rmt07:
	jup-linux2:
end</pre>
<p>Second, we define the links. For each monitor, we state what is at any edge of it. This is used to decide where to put the mouse pointer on leaving the screen, so it needs to be done in both directions - the fact that <tt>jup-linux2</tt> is to the left of <tt>jup-rmt07</tt> does not imply to synergy that <tt>jup-rmt07</tt> is to the right of <tt>jup-linux2</tt>:</p>
<pre>section: links
jup-rmt07:
	left = jup-linux2
jup-linux2:
	right = jup-rmt07
end </pre>
<p>If I have two screens at different heights, I can tell synergy that the top 30% of <tt>jup-linux2</tt> lines up with the bottom 40% of <tt>jup-rmt07</tt>, for example:</p>
<pre>jup-linux2
	right(70-100) = jup-linux2(0-40)
jup-rmt07
	left(0-40) = jup-rmt07(70-100)</pre>
<p>Again, you always always <strong>always</strong> need to define the screen in both directions. The file is parsed by synergy to see what to do on leaving that particular screen - when you're in jup-rmt07 and move towards the left of the screen, it's only going to do anything if there's a <tt>left</tt> defined for that screen, irrespective of how many rights point there.<br />
If my screens are above and below each other, <tt>up</tt> and <tt>down</tt> are used. A screen can have as many other screens round it as you like, by assigning percentages of edges to different screens.</p>
<p>Configuring the server under Windows involves a different process to use the same principles. Essentially, you build the same text file as above, but in a clicky gui. It's a little odd, but quite simple.</p>
<p><a href="http://aviswebsite.co.uk/wordpress/wp-content/uploads/using-synergy-to-share-a-keyboard-and-mouse-across-pcs/synergy-win-server1.PNG"><img src="http://aviswebsite.co.uk/wordpress/wp-content/uploads/using-synergy-to-share-a-keyboard-and-mouse-across-pcs/synergy-win-server1-150x150.PNG" alt="configuring Synergy server under Windows" title="synergy-win-server" width="150" height="150" class="size-thumbnail wp-image-370" /></a></p>
<p>To start the synergy server, we now run</p>
<pre class="bash">synergys --config ~/.synergy.conf</pre>
<p>Replacing '~/.synergy.conf' with the path to wherever the config file is saved.</p>
<p><strong>Configuring and starting the clients</strong></p>
<p>So, we have a server. Now, clients.<br />
On Windows, synergy is only one executable, so we start that, select the 'Use another computer's shared keyboard and mouse (client)' option, stick the server's hostname or IP in the box, and click 'start'.<br />
If you have a *nix client, the command to connect to a server at <tt>jup-rmt07</tt> is <tt>synergyc jup-rmt07</tt>. <tt>synergyc</tt> provides a few options for changing the behaviour.</p>
<p><strong>Starting Synergy automatically</strong><br />
Finally, I want them to start automagically on boot/login. For the linux host, this is relatively easy, add the following to your crontab:</p>
<pre class="bash">@reboot synergys --config ~/.synergy.conf</pre>
<p>And it'll be started on boot.<br />
To start it under Windows, click the 'AutoStart' button. This will let you configure it to start it on login or, if you have the requisite permissions, start on boot.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.avi.co/wp/using-synergy-to-share-a-keyboard-and-mouse-across-pcs/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
