tag:blogger.com,1999:blog-85174685784787102992024-02-21T07:38:43.992+10:00frenetic rapportbleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.comBlogger34125tag:blogger.com,1999:blog-8517468578478710299.post-25658180106786554652015-03-22T15:02:00.001+10:002016-04-14T01:47:18.494+10:00N64 GC Replacement Stick Controller IC Swap MK2<i>Edit: Ahhh, didn't realise I would be hackaday'ed. I'll have the compiled hex files up as soon as I get to test the source works with the modifications. If you have an ATTiny261A spare, I'm happy for you to take the source and try it out. I should have the parts by Tuesday. In the meantime, using the <a href="http://freneticrapport.blogspot.com.au/2014/10/n64-gc-replacement-stick-ic-swap.html">ATtiny24 method</a> still works perfectly fine, it's just a pain to solder.</i><br />
<br />
<i>Edit2: Compiled hex files - https://drive.google.com/file/d/0BxyIgc7ZORksdUhLNGdoTFJXQzg/view?usp=sharing</i><br />
<br />
<br />
Using the method in this <a href="http://freneticrapport.blogspot.com.au/2014/10/n64-gc-replacement-stick-ic-swap.html">previous post</a> you are able to replace the IC on these Simple Jet boards. The issue is the ATtiny24 only comes in an SOIC narrow variant. Looking through the ATtiny catalogue there also aren't any 18 pin SOIC variants available.<br />
<br />
It's time to get crafty again. Looking around I found the <a href="http://www.atmel.com/devices/attiny261a.aspx">ATTINY261A-SU</a> which is a 20pin ATtiny variant for <span itemprop="price">$</span><span itemprop="price">1.58AU each in when you order a quantity of 2 from <a href="http://au.rs-online.com/web/p/microcontrollers/7194070/">RS</a> including shipping. So still quite cheap (you could use the more expensive </span><a href="http://www.atmel.com/Images/doc8026.pdf">ATtiny26 too</a>).<br />
<span itemprop="price"><br /></span>
<span itemprop="price">The problem is that the chip itself has a layout of 20 pins.</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMHwzyz68sySPcvSP168zwrVKLuZjAaefDMjbB4tx-EcuEm-hoOHagBzbgOAHZop00gIHzcIBKm_03OUq2bcmMnj0JgK2SrOEW3GqCwqrxolH1p9n1e_olm1IukA3mPApB4FWpQOYa_aqr/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="153" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjMHwzyz68sySPcvSP168zwrVKLuZjAaefDMjbB4tx-EcuEm-hoOHagBzbgOAHZop00gIHzcIBKm_03OUq2bcmMnj0JgK2SrOEW3GqCwqrxolH1p9n1e_olm1IukA3mPApB4FWpQOYa_aqr/s1600/Untitled.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span itemprop="price">Some simple analysis of the pin orientations allows us to pick an optimal layout. With this layout we can now do the following:</span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1bYB0BaIOnDpaLFryXHtmHnMKXfedWheJgER5F4mwRgJPJ6oHIMxoQ3FEL9bRcU3LyE1F6elXA4iaKCnJsVGLGAMiF1Sc7eZQ0gwkJEMJSFDmS4Oi4CUexC_bm5w3pAtBQrQ13jXNNq12/s1600/DSC_0371-mk2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="221" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1bYB0BaIOnDpaLFryXHtmHnMKXfedWheJgER5F4mwRgJPJ6oHIMxoQ3FEL9bRcU3LyE1F6elXA4iaKCnJsVGLGAMiF1Sc7eZQ0gwkJEMJSFDmS4Oi4CUexC_bm5w3pAtBQrQ13jXNNq12/s1600/DSC_0371-mk2.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhBFXzGNbOdqKg3c8xR1Taura88pi1jD5hen5SnlCGX5Xs5LhvlwcABS1BYLi7WbwED3Ja1RDuxMcKBeH6uK_NI6Y4KYq9iNkQVcQnO3wkkE2h5PJHQfkXUcwsIkLJdQ5lcxj0IISJIdHTJ/s1600/DSC_0371-mk2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<a name='more'></a><div class="separator" style="clear: both; text-align: center;">
</div>
<span itemprop="price">Notice that the two bottom pins of the </span><span itemprop="price">ATTINY261A (10 and 11) are not connected to any pads on the PCB. </span>Make sure that pin 10 and 11 don't touch ground when soldering. <br />
<br />
<span itemprop="price">Here are the new pin designations: </span><br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgekZNlKEfWWmnogd_vD7bKpeA2VgjugXvU-sHOjei9dHI9ozafU8Q74IBsxrZRNa9nj-x7whFCiTvlPlU9QQRO8gZxN_sjrLzFcKXfkDRzVu0YBTD44cDfwvbXhmzutjgERd4sUb7A_UZL/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="169" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgekZNlKEfWWmnogd_vD7bKpeA2VgjugXvU-sHOjei9dHI9ozafU8Q74IBsxrZRNa9nj-x7whFCiTvlPlU9QQRO8gZxN_sjrLzFcKXfkDRzVu0YBTD44cDfwvbXhmzutjgERd4sUb7A_UZL/s1600/Untitled.png" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh1Aj-xGluTPp4Rr1x7iSkq5YTrrE_A0yLKqRxKC-KToV5FmetR94FGw8wPpP0TVkJ5P4IhtV7hR1MpaHhbKXHgma5DbBn2igxzgAU7bIva3fiej7u91lxlm71yKZN3OzC7Pvh6of0g8Z6z/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><br /></a></div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<span itemprop="price"><br /></span>
<span itemprop="price">I am still using version 2.1 of the code as before. Here is the updated <a href="http://pastebin.com/PDfeR6WJ">source code</a> (precompiled hex <a href="https://drive.google.com/file/d/0BxyIgc7ZORksdUhLNGdoTFJXQzg/view?usp=sharing">here</a>; note the EEPROM file is labelled .eep). Programming using the guide from the <a href="http://freneticrapport.blogspot.com.au/2014/10/n64-gc-replacement-stick-ic-swap.html">original post</a>. The fusebytes remain the same:</span><br />
<span itemprop="price"><br /></span>
<br />
<div class="de1">
<i> * fusebyte low: 0x42</i></div>
<i>
* fusebyte high: 0xdf</i><br />
<br />
Once programmed, don't power the chip on yet. It's now time to modify the PCB. You will now want to remove the components marked in red and blue on the left/bottom, and desolder the main IC. To make it easier,
you can cut each leg of the IC carefully and clean up the pads once the
chip is removed with some solder wick. Be careful not to lift any
traces.<br />
<br />
Now solder the newly programmed
IC in the orientation shown and bridge the contacts marked in blue with solder and (pin 10 and 11 should be at the bottom and not connected to any traces as shown in the picture above). You
will then need to connect a 10KOhm resistor between VCC (pin 6) and pin 10 of
the ATtiny (as shown in yellow). Additionally bridge the other points marked in yellow with some hookup wire (don't connect the two wires which cross over together, they should be separate connections). Once soldered, you can add a little hot glue to pins 10 and 11 to give them a little strength if you like. <br />
<br />
Note that there are some functional differences as outlined in the above
table and the source as to how to re-calibrate and invert the X-Y axis.
The re-calibration pins have changed and the invert axis pins are now enabled on active high, rather than active low (active low is the
default when you follow the instructions above). If you want to invert,
you just need to desolder and lift the appropriate axis pin. Please see the above table's "new code description" column for details. <br />
<br />
You're now ready to use the modified board. On first power up, be sure
follow the installation guide from the first linked thread: <a href="http://www.mediafire.com/?ty3ln8q1cvk243h">http://www.mediafire.com/?ty3ln8q1cvk243h </a><br />
<span itemprop="price"><br /></span>
<span itemprop="price"><br /></span>
<span itemprop="price"><br /></span>
<span itemprop="price"><br /></span>bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com13tag:blogger.com,1999:blog-8517468578478710299.post-3497340979187779782014-10-26T15:47:00.000+10:002015-03-22T18:37:20.826+10:00N64 GC Replacement Stick Controller IC SwapEdit: I'll shortly have code and instructions for using the wider
ATTINY26-16SU/ATTINY261A-SU for easier soldering (order this rather than the ATtiny24
if you are looking to perform this mod in the next couple of days).<br />
<br />
Edit 2: <a href="http://freneticrapport.blogspot.com.au/2015/03/n64-gc-replacement-stick-controller-ic.html">Here</a> are the updated instructions!<br />
<br />
Building on the <a href="http://s9.zetaboards.com/Nintendo_64_Forever/single/?p=8115071&t=7360571">awesome work</a> of forum member "micro" from NFGgames in this <a href="http://nfggames.com/forum2/index.php?topic=5023.0">thread</a>, I decided to take things a step further and modify the board directly; instead of replacing the entire PCB from the replacement <a href="http://micro-64.com/features/ngcthumbstickreview.shtml">GC style joysticks</a> (with the "Simple Jet" PCB). This was to bring down the cost of replacement from $20 to $2 (considering you have already paid for the board in the original stick) and to satisfy those waiting for limited release of these PCB's (myself included).<br />
The only real downside to this modification is you don't get the updated joystick potentiometer or easy to configure jumpers.<br />
<br />
While some suppliers have released a <a href="http://s9.zetaboards.com/Nintendo_64_Forever/single/?p=8115035&t=7360571">newer version</a> of this stick, you aren't guaranteed that you will receive it from all suppliers, they have also increased the price of this version and there are still minor issues with these sticks that micro's redesign has fixed. This swap will also work for that board too, by just removing the components in the same positions.<br />
<br />
Micro's mod relies on the ATtiny24/24A. The great thing about the chip is it has a highly configurable pin layout. Through some simple reverse engineering of the original board, reconfiguring the code's pin dependencies and some chip reorientation, I have been able to get this to work by removing a couple of passives on the original board and replacing the existing IC with the ATtiny24. You can either use the SOIC based <span id="goog_139461903"></span><a href="http://au.rs-online.com/web/p/microcontrollers/6664495/?searchTerm=ATTINY24+soic&relevancy-data=636F3D3226696E3D4931384E44656661756C74266C753D656E266D6D3D6D61746368616C6C7061727469616C26706D3D5E5B5C707B4C7D5C707B4E647D5C707B5A737D2D2C2F255C2E5D2B2426706F3D3926736E3D592673743D4B4559574F52445F4D554C54495F414C5048415F4E554D455249432673633D592677633D4E4F4E45267573743D415454494E59323420736F696326">ATtiny24</a> <span id="goog_139461904"></span>or <a href="http://au.rs-online.com/web/p/microcontrollers/6962373/?searchTerm=ATTINY24a+soic&relevancy-data=636F3D3226696E3D4931384E44656661756C74266C753D656E266D6D3D6D61746368616C6C7061727469616C26706D3D5E5B5C707B4C7D5C707B4E647D5C707B5A737D2D2C2F255C2E5D2B2426706F3D3926736E3D592673743D4B4559574F52445F4D554C54495F414C5048415F4E554D455249432673633D592677633D4E4F4E45267573743D415454494E5932346120736F696326">ATtiny24A</a> (whichever is easier to source), as they are identical for this purpose except for minor current requirements.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjphTrRg_Jlf3nCtPb6zS2YUaa0RCK2qcrCXVc7Q7KEYKVYx1xpU4_WN6usV1Ccdd4dPOMWbZQwdWitm0m1SvkveQh6m2y6JPHvZ6SrcOiBnfcPYsXgRzN9NU-NXeaYrgNwk_Tnd6woUPEl/s1600/fixed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjphTrRg_Jlf3nCtPb6zS2YUaa0RCK2qcrCXVc7Q7KEYKVYx1xpU4_WN6usV1Ccdd4dPOMWbZQwdWitm0m1SvkveQh6m2y6JPHvZ6SrcOiBnfcPYsXgRzN9NU-NXeaYrgNwk_Tnd6woUPEl/s1600/fixed.png" height="122" width="320" /></a></div>
<br />
<a name='more'></a><br />
With this pin arrangement comes some small code changes from the<a href="http://www.mediafire.com/download/zmzz5zm7z89yzv3/N64_Stick_Converter_PCB_v2.1.zip"> original source</a>. Get these from <a href="http://pastebin.com/CWSd2NwB" rip-style-bordercolor-backup="" rip-style-borderstyle-backup="" rip-style-borderwidth-backup="">http://pastebin.com/CWSd2NwB</a> if you want to build from source yourself. I have also crudely translated the code comments. The original code is still there too, it's just been commented out if you want to see what has changed.<br />
<br />
Now that you have built and compiled the code in Atmel Studio, you should now program the hex file. Get the <a href="https://drive.google.com/file/d/0BxyIgc7ZORksX3dITUZVb2s5ZUk/view?usp=sharing">pre-compiled hex file here</a>, and <a href="https://drive.google.com/file/d/0BxyIgc7ZORksSHdMWXphUUVGN00/view?usp=sharing">epprom</a>.<br />
<br />
<pre style="margin: 0; padding: 0;"><code class="bbc_code">avrdude -p t24 -U flash:w:"N64 Stick Converter PCB v2.1.hex"
avrdude -p t24 -U eeprom:w:"N64 Stick Converter PCB v2.1.eep"</code></pre>
<br />
Don't forget to set the fuse values on the blank chip:<br />
<br />
<pre style="margin: 0; padding: 0;"><code class="bbc_code">avrdude -p t24 -U lfuse:w:<0x42>
avrdude -p t24 -U hfuse:w:<0xdf><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--></0xdf></0x42></code></pre>
<pre style="margin: 0; padding: 0;"><code class="bbc_code"> <div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH0PbhaCR86TEMQXm4VqQSZf9Dkqj36hRTqQBhXMvTd89UW3KAHo5aKPsmwjYyXWHQS90BPZ9Xg8eYhu6i45zWNpg4-XSOBwVd5GB-skNZbZMsZOZqa4QAILl0c3NCP2k9ToAe7VdVJs2i/s1600/program.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH0PbhaCR86TEMQXm4VqQSZf9Dkqj36hRTqQBhXMvTd89UW3KAHo5aKPsmwjYyXWHQS90BPZ9Xg8eYhu6i45zWNpg4-XSOBwVd5GB-skNZbZMsZOZqa4QAILl0c3NCP2k9ToAe7VdVJs2i/s1600/program.png" height="313" width="320" /></a></div>
</code></pre>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<pre style="margin: 0; padding: 0;"><code class="bbc_code"><!--0xdf--><!--0x42--><!--0xdf--><!--0x42--></code></pre>
Once programmed, don't power the chip on yet. It's now time to modify the PCB:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtdO_f93vQlsckbJS-KUqNSJRI8C0t-EPs-SuEEMtFnQ3R_6HpMX_ZW5kf1dD9VIK-sy5RTZ_Vr2GqrC9UKMpgy5dZCsvSBppcO3J9jZ8RSiRHzXjX2jFPxiQU-ktsLa4suEk2GI2NhX1M/s1600/DSC_0371e.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgtdO_f93vQlsckbJS-KUqNSJRI8C0t-EPs-SuEEMtFnQ3R_6HpMX_ZW5kf1dD9VIK-sy5RTZ_Vr2GqrC9UKMpgy5dZCsvSBppcO3J9jZ8RSiRHzXjX2jFPxiQU-ktsLa4suEk2GI2NhX1M/s1600/DSC_0371e.jpg" height="221" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
You will want to remove the two capacitors marked in red, the resistors marked in blue on the left, and desolder the main IC. To make it easier, you can cut each leg of the IC carefully and clean up the pads once the chip is removed with some solder wick. Be careful not to lift any traces.<br />
<br />
Now bridge the contacts marked in blue and solder the newly programmed IC in the orientation shown. The IC is a bit thinner, so it might be a little tricky to solder the pins to the original pads. Note that the ATtiny sits one pin in from each end of the existing chip and the orientation is inverted (as shown in the picture and table above). You will need to connect a 10KOhm resistor between VCC (pin 2) and pin 4 of the ATtiny as well (as shown in yellow). Additionally bridge pins 1 and 2 with solder as shown in blue on the right of the IC. Also solder pin 14 to the additional pin adjacent to it, (shown in blue; this is ground).<br />
<br />
Note that there are some functional differences as outlined in the above table and the source as to how to re-calibrate and invert the X-Y axis. The re-calibration pins have changed and the invert axis pins are now handled on active high, rather than active low (active low is the default when you follow the instructions above). If you want to invert, you just need to desolder and lift the appropriate axis pin.<br />
<br />
You're now ready to use the modified board. On first power up, be sure follow the installation guide from the first linked thread: <a href="http://www.mediafire.com/?ty3ln8q1cvk243h">http://www.mediafire.com/?ty3ln8q1cvk243h</a><br />
<br />
<br />
<br />bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-77139777448619197772013-11-19T00:29:00.003+10:002014-10-26T16:21:16.976+10:00Supermicro BIOS ShenanigansLet me take you on a small journey. You receive a large number of Supermicro workstations with <a href="http://www.supermicro.com/products/motherboard/xeon/c600/x9srg-f.cfm">X9SRG-F</a> boards. You get them connected and racked up, try to install something and the keyboard doesn't work. You try another, same thing.<br />
<br />
OK, it's a USB keyboard, maybe there is a problem with the BIOS reading USB, I'll just plug in a PS/2 keyboard. Oh there isn't a PS/2 port on this board. Right lets try <a href="http://en.wikipedia.org/wiki/Intelligent_Platform_Management_Interface">IPMI</a> to get into the BIOS using the console. Great, this works, but you cannot mount any USB devices at all. I'll just plug in a SATA drive and get the BIOS flashed to see if it's something up with the BIOS.<br />
<br />
<a href="https://www.blogger.com/blogger.g?blogID=8517468578478710299" name="more"></a><br />
<a name='more'></a><br />
<br />
I download the latest (X9SRG3_801) and only version available on the Supermicro website which doesn't come with any release notes whatsoever. I'm sure this version will fix it, it's the latest right? I boot a DOS boot CD, loaded with the update and flash the BIOS (and IPMI). Reboot.....<a href="http://www.ami.com/support/doc/AMI_Aptio_4.x_Status_Codes_PUB.pdf">F9 BIOS error code</a>. This means the main <a href="http://www.supermicro.com/support/faqs/faq.cfm?faq=16115">BIOS block</a> is corrupt. In this instance you need to recover the BIOS by renaming the BIOS file to SUPER.ROM, place it on the root drive of a FAT32/16/12 formatted USB flash drive and hold down Ctrl+Home on the keyboard when the machine turns on.<br />
<br />
After recovering via the recovery option screen, this would still not get past the above error once rebooted, so I can only surmise that the latest BIOS version is to blame. Unfortunately Supermicro doesn't release older versions on their site, you have to email support to get these. Although, you can use Wayback machine to view the <a href="http://web.archive.org/web/*/http://www.supermicro.com/support/bios/">cached version</a> of the BIOS download page, to obtain older versions (click the date you think is right, go through the agreement and then modify the link when it cannot find the file). I downloaded the previous version (<a href="http://www.supermicro.com/support/resources/getfile.aspx?ID=2208">X9SRG3_306</a>) and recovered with this instead.<br />
<br />
It works! The BIOS "recovered"....but USB devices nor SATA devices would detect after the update. <br />
<br />
So now this machine doesn't boot from any device and it just goes straight into the BIOS. Triple checking through and trying different BIOS options didn't help. But there is a "dxe bs driver unrecognised" error in the BIOS log (BS indeed).<br />
<br />
<div rip-style-bordercolor-backup="" rip-style-borderstyle-backup="" rip-style-borderwidth-backup="">
By the looks of things this board is well and truly toast. The only thing I can sum up is that the BIOS startup block and the main block are mismatched and causing issues (the recovery mode only flashes the main block). I spoke to our distributor and they said just RMA it. But we don't have time to do this as these machines need to go into service and I cannot trust any updates at this time to work on the other machines.</div>
<div rip-style-bordercolor-backup="" rip-style-borderstyle-backup="" rip-style-borderwidth-backup="">
<br /></div>
<div rip-style-bordercolor-backup="" rip-style-borderstyle-backup="" rip-style-borderwidth-backup="">
Let's check what type of chip this is:</div>
<div rip-style-bordercolor-backup="" rip-style-borderstyle-backup="" rip-style-borderwidth-backup="">
<br /></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH1uZbedqWyUtMHQALZdNW_Adz-L79jgxGKkf1WrExfGlZWUL9LV9h-1iWZG_K_-FAVvuB8m45bqikGBIO7TCch2Cz3kQh3XoyX5zVBlbWSmYeY8OiO7B8W3r9ZbQy_ryrOs2q7yXsHAqQ/s1600/IMAG1575.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiH1uZbedqWyUtMHQALZdNW_Adz-L79jgxGKkf1WrExfGlZWUL9LV9h-1iWZG_K_-FAVvuB8m45bqikGBIO7TCch2Cz3kQh3XoyX5zVBlbWSmYeY8OiO7B8W3r9ZbQy_ryrOs2q7yXsHAqQ/s320/IMAG1575.jpg" height="181" width="320" /></a></div>
<br />
It's a <a href="http://www.winbond.com/NR/rdonlyres/A88DEF07-8303-4617-BAE6-B8A365057DC8/0/W25Q64CV.pdf">Windbond 25Q64CV.</a> Hmm, lets see if <a href="http://flashrom.org/">flashrom</a> supports this:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyfSOvhNolFWDkgeMgDf-GYmXufTeKJrcrS-sXegwGmRSp1uwBWCRJdS3Ri3mnx0gzLn7lHExPS8LClisQMjx3V_bK1XI9FBbtBeiRqhoYhL4LdODSlYps_TZ0HLliw4z3cof5jwuYUCLY/s1600/support.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyfSOvhNolFWDkgeMgDf-GYmXufTeKJrcrS-sXegwGmRSp1uwBWCRJdS3Ri3mnx0gzLn7lHExPS8LClisQMjx3V_bK1XI9FBbtBeiRqhoYhL4LdODSlYps_TZ0HLliw4z3cof5jwuYUCLY/s320/support.png" height="36" width="320" /></a></div>
Oh wonderful! Well, I do still have my buspirate from my <a href="http://freneticrapport.blogspot.com.au/2010/10/how-to-restore-bios-after-bad-flash.html?showComment=1381608099815#c8229662013166289195">previous flashing endeavors</a>. I get the soldering iron out and whip the chip out. Using an SOIC ZIF socket I got on ebay a few years back I checked the pinout:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5UmU07_XRNz8gBDA-2avkfMReiMAfIkTO13z6A9_b9Pe-CQJ5AI2Dt5kITx8kbocvL3e4FradMDIT2ANXGXouYwfNBvIfBImvQVZqOW8qbrENQf9BYm8p1z4M1yMfVd3wAvbeJ9JRYbfr/s1600/pinout.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj5UmU07_XRNz8gBDA-2avkfMReiMAfIkTO13z6A9_b9Pe-CQJ5AI2Dt5kITx8kbocvL3e4FradMDIT2ANXGXouYwfNBvIfBImvQVZqOW8qbrENQf9BYm8p1z4M1yMfVd3wAvbeJ9JRYbfr/s320/pinout.png" height="138" width="320" /></a></div>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdaTZMW7yCQWRvei92oYoftscYhTNzYx2eyl3olMpkjN_eNgUxDZcPXWjjBzqUPhe3-aas8rMXHL0AvIoftpbz_kqqeLqVgilVGXDigvnjZfJvdHQe3qbcD6SVCwn-vKLcEn74DgMQRTLD/s1600/description.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgdaTZMW7yCQWRvei92oYoftscYhTNzYx2eyl3olMpkjN_eNgUxDZcPXWjjBzqUPhe3-aas8rMXHL0AvIoftpbz_kqqeLqVgilVGXDigvnjZfJvdHQe3qbcD6SVCwn-vKLcEn74DgMQRTLD/s320/description.png" height="141" width="320" /></a></div>
Here is the buspirate to 25Q64CV pinout (notice it's exactly the same as the MX25L8005PC from the previous blog post):<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">Bus Pirate 25Q64CV - Pin#</span><br />
<span style="font-family: "Courier New",Courier,monospace;">CS CS - 1</span><br />
<span style="font-family: "Courier New",Courier,monospace;">MISO DO - 2</span><br />
<span style="font-family: "Courier New",Courier,monospace;">V+ 3.3v WP - 3</span><br />
<span style="font-family: "Courier New",Courier,monospace;">GND GND - 4</span><br />
<span style="font-family: "Courier New",Courier,monospace;">MOSI DI - 5</span><br />
<span style="font-family: "Courier New",Courier,monospace;">CLK SCK - 6</span><br />
<span style="font-family: "Courier New",Courier,monospace;">V+ 3.3v HOLD - 7</span><br />
<span style="font-family: "Courier New",Courier,monospace;">V+ 3.3v VCC - 8</span><br />
<span style="font-family: "Courier New",Courier,monospace;">Vpullup VCC - 8</span><br />
<br />
I updated the buspirate firmware to the latest just to be sure:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjlsS_rczV_BVlPrhD7wxV2wUv_6bf7uiQ4cHpf0dLfcDl9kUQ28YsFFlEfB8Kkt9V3d3beF4s5qICZW4I7PcOzId7s9zpXmA0cEjh3qNtTDpi1usTcKr1NBuv-oqqVmeYdb44cQMZRK1p/s1600/version.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjjlsS_rczV_BVlPrhD7wxV2wUv_6bf7uiQ4cHpf0dLfcDl9kUQ28YsFFlEfB8Kkt9V3d3beF4s5qICZW4I7PcOzId7s9zpXmA0cEjh3qNtTDpi1usTcKr1NBuv-oqqVmeYdb44cQMZRK1p/s320/version.png" height="72" width="320" /></a></div>
Grabbed the lasted svn release of flashrom (0.9.7-r1763), connected it up and read the chip:<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0xsZ7aJy6ZiytG_32LlMteIi-u97SiPIbUxgvM1m0jKlCKORphwIROo-X9PRmAi1G9DHLyLUtbTwhOpcrEGFmeixnZJEbapJYJVWZSjieJ97eAE8GiN0f5hxcsGmwGlg7WTsu6egb24yl/s1600/read.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0xsZ7aJy6ZiytG_32LlMteIi-u97SiPIbUxgvM1m0jKlCKORphwIROo-X9PRmAi1G9DHLyLUtbTwhOpcrEGFmeixnZJEbapJYJVWZSjieJ97eAE8GiN0f5hxcsGmwGlg7WTsu6egb24yl/s320/read.png" height="201" width="320" /></a></div>
<br />
Success!<br />
<br />
Note that this flashing process did take a little time and I created a script to read, flash and verify (run this script as root/sudo):<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">#!/bin/bash<br />flashrom -p buspirate_spi:dev=/dev/ttyUSB0,spispeed=8M -r ./OLD.ROM -V | tee ./read<br />flashrom -p buspirate_spi:dev=/dev/ttyUSB0,spispeed=8M -w ./X9SRG3.306 -V | tee ./write</span></span><br />
This will create two text files once complete with the output for you to check (the write also verifies), plus another with the data originally on the chip.<br />
<br />
There is a more recent patch that might not have made it's way into the buspirate firmware which makes the reading and flashing much faster too:<br />
<br />
<a href="http://dangerousprototypes.com/forum/viewtopic.php?f=40&t=3864&start=15#p41505">http://dangerousprototypes.com/forum/viewtopic.php?f=40&t=3864&start=15#p41505</a><br />
<br />
<span style="color: #6aa84f;"><span style="font-family: "Courier New",Courier,monospace;">Erase/write done.<br />Verifying flash... VERIFIED.<br />Raw bitbang mode version 1<br />Bus Pirate shutdown completed.</span></span><br />
<br />
I solder the chip back into the machine.<br />
<br />
Even more success! The machine boots, can once again see devices AND USB NOW WORKS!<br />
<br />
Thank you so much Supermicro for not releasing different BIOS revisions and not even having the decency to have release notes for the different revisions. Really bloody helpful! bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com2tag:blogger.com,1999:blog-8517468578478710299.post-8941844587157853992013-07-02T20:17:00.000+10:002014-10-26T16:21:51.947+10:00Rigol DS2072 200Mhz Bandwidth and Full Option Hack<br />
<b><i>UPDATE:</i></b><br />
<i><br /></i>
<i>You can now generate keys and permanently activate all of the options and bandwidth without any extra hardware. <a href="http://pastebin.com/AzWgnGq8">Here</a> is the c code which will generate the keys (it is the most up to code from the <a href="http://www.eevblog.com/forum/testgear/sniffing-the-rigol%27s-internal-i2c-bus/msg264876/#msg264876">thread</a> with a couple of modifications). All you have to do under Linux is place the above code (and fill out the private key value from the forum or use the pastebin link's code) into rigolkey.c. Alternatively there is also a <a href="http://www.eevblog.com/forum/testgear/sniffing-the-rigol%27s-internal-i2c-bus/msg265758/#msg265758">Windows exe</a> floating around on the forum there too which you can use.</i> <i> </i><br />
<br />
<i>Make sure you have g++ installed and perform the following:</i><br />
<i>mkdir miracl</i><br />
<i>cd miracl/</i><br />
<i>wget <a class="bbc_link" href="https://github.com/CertiVox/MIRACL/archive/master.zip" target="_blank">https://github.com/CertiVox/MIRACL/archive/master.zip</a></i><br />
<i>unzip -j -aa -L master.zip</i><br />
<i>bash linux (or bash linux64 if running 64bit OS)</i><br />
<i>cd .. </i><br />
<i>gcc rigolkey.c -I ./miracl/ ./miracl/miracl.a -o rigolkey</i><br />
<i><br /></i>
<i>Now run:</i><br />
<i>./rigolkey [your device serial] [option parameter]<your device="" number="" serial=""> <device option=""><your device="" number="" serial=""> <option><br /></option></your></device></your></i><br />
<i>Use "DSA9" for the option parameter to convert to a DS2202 with all options enabled. There are more options available <a href="http://www.eevblog.com/forum/testgear/sniffing-the-rigol%27s-internal-i2c-bus/msg265028/#msg265028">here</a>. The device serial number is located on your about screen, or on the back of the scope. If you have somehow managed to reset your serial number to a default value on the about scree (DS2A0000000001), then use that rather than the sticker at the back.</i><br />
<i><br /></i>
<i>It is recommended to have at least firmware version 00.01.00.00.03 before entering the licence. Now apply the licence key that the keygen spits out. This is located under Utility>Options>Setup>Editor=ON. Enter the code using the intensity dial and button then hit Apply. It should then say "Option Installed!" if you entered this correctly. You now have all options enabled including 200MHz bandwidth.</i><br />
<div class="separator" style="clear: both; text-align: center;">
<i><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlUqETlgV_LgHsI50CrzuDFtK9npk0QbooSTMnGc8H4Zq59PxPLbSphyn-i_UCg2cPjBRDDYQoZvt_HlCSRc2Qdv91QzQyirhm3NoyfLgI3dnhiygErIDeziEp2kCfa1uVwmqMJYNSg2zQ/s1600/DSC_0722.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhlUqETlgV_LgHsI50CrzuDFtK9npk0QbooSTMnGc8H4Zq59PxPLbSphyn-i_UCg2cPjBRDDYQoZvt_HlCSRc2Qdv91QzQyirhm3NoyfLgI3dnhiygErIDeziEp2kCfa1uVwmqMJYNSg2zQ/s320/DSC_0722.JPG" height="213" width="320" /></a></i></div>
<i> Reboot and your options will remain:</i><br />
<div class="separator" style="clear: both; text-align: center;">
<i></i></div>
<div class="separator" style="clear: both; text-align: center;">
<i><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij9FB9jy1L7OMAll0p2t-QN38Uf4DGI9vU03l12OiXdk1udfQFcUwlv1VwCe0gXUPChBTthB8vOQAQRQnAShiGxg9Hmeyd5BAds1ZYej3BcJ6JzCFx-q1v1fLlEStvLfw3xrHAgKoE0tlv/s1600/DSC_0724.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEij9FB9jy1L7OMAll0p2t-QN38Uf4DGI9vU03l12OiXdk1udfQFcUwlv1VwCe0gXUPChBTthB8vOQAQRQnAShiGxg9Hmeyd5BAds1ZYej3BcJ6JzCFx-q1v1fLlEStvLfw3xrHAgKoE0tlv/s320/DSC_0724.JPG" height="212" width="320" /></a></i></div>
<i></i><br />
<a name='more'></a><i><br /></i>
<i>This should continue to work with future updates. It is currently working with the latest </i><i><a class="bbc_link" href="http://rapidshare.com/files/2084400657/DS2000-01_01_00_02.7z" target="_blank">00.01.01.00.02.</a></i><br />
<br />
<i>This also works to unlock the extra features with the DS4000 series by using DSH9 as the option value for the key generator. </i><br />
<i> </i><br />
<i>END UPDATE </i><br />
<br />
Based on the great work over at the <a href="http://www.eevblog.com/forum/testgear/sniffing-the-rigol%27s-internal-i2c-bus/">EEVBlog forums</a>, I have successfully unlocked my <a href="http://www.rigolna.com/products/digital-oscilloscopes/ds2000/ds2072/">DS2072</a> to have 200MHz bandwidth and all options enabled (increased memory depth MEM-DS2, serial data decode SD-DS2, advanced triggering AT-DS2).<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRyiOY4-N47Rwe7k9ftUmibmB0IPlffweiIaO1De4U8VoU6XFIchRw8rP3TC113hYFHPmlXMZaU-TJ4rWhACeI5W2kOJOZdSSXXZ6swzW9waj-XsWAUVXsuoOly0lFyd7MLGunEX7pVQPU/s1600/DSC_0024.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRyiOY4-N47Rwe7k9ftUmibmB0IPlffweiIaO1De4U8VoU6XFIchRw8rP3TC113hYFHPmlXMZaU-TJ4rWhACeI5W2kOJOZdSSXXZ6swzW9waj-XsWAUVXsuoOly0lFyd7MLGunEX7pVQPU/s320/DSC_0024.JPG" height="212" width="320" /></a></div>
<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
This does not require any modifications to the scope and the options reset after power down, so there is no worry of voiding your warranty with this method. Basically the hack works by sending an engineering unlock code via USB after the scope has booted. This is done by connecting a Raspberry Pi (or any other SBC with USB and python for that matter) to the USB device port on the back. For convenience I also power the Pi with the front USB host port (so the Pi turns on when the scope does).<br />
<a href="http://www.blogger.com/null" name="more"></a><br />
I chose <a href="http://www.raspberrypi.org/downloads">Arch Linux</a> for the Pi for this as it boots very quickly. For this I used archlinux-hf-2013-06-06.zip.<br />
<br />
You will need to update the scope's firmware to 00.01.00.00.03 (edit: apparently the latest 01.01.00.02 also works with this too) by placing the firmware image in the root directory of a memory stick formatted with FAT32 (be careful with this easier method though, you can lock up the scope and wipe your factory calibration/trial options, more info/alternative <a href="http://www.eevblog.com/forum/testgear/first-impressions-and-review-of-the-rigol-ds2072-ds2000-series-dso/msg158684/#msg158684">here</a>). Then place the USB stick into the scope (it will autodetect it). If you already have this version, then leave it be.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjouteVljtXrxzjBt4qiUIEaQqZhaMPZDPY4U6L6RBlfVJQ6mFhebCwuj7nEyMnc7MZMPMHjnkQNXjivyBU0_cILTuahktTltn67A0OWQgE87Fwv_c9wfijVk_PRcU84RbHY7Z11XX9D5Al/s1600/DSC_0011.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjouteVljtXrxzjBt4qiUIEaQqZhaMPZDPY4U6L6RBlfVJQ6mFhebCwuj7nEyMnc7MZMPMHjnkQNXjivyBU0_cILTuahktTltn67A0OWQgE87Fwv_c9wfijVk_PRcU84RbHY7Z11XX9D5Al/s320/DSC_0011.JPG" /></a></div>
<br />
<a href="http://www.eevblog.com/forum/testgear/first-impressions-and-review-of-the-rigol-ds2072-ds2000-series-dso/msg158684/#msg158684">Firmware 00.01.00.00.03</a><br />
<br />
The following setup is based on "Harvs" post <a href="http://www.eevblog.com/forum/testgear/sniffing-the-rigol%27s-internal-i2c-bus/msg254181/#msg254181">here</a>. Which is based on the work by "cybernet" (and others of course) in the thread.<br />
<br />
Boot the Raspi and run the following:<br />
pacman -Syy<br />
pacman -S python<br />
pacman -S python-pip<br />
pip install pyusb<br />
<br />
With this version of python 3, some small changes to the python code posted need to be made.<br />
<br />
Change:<br />
<ul>
</ul>
Line 52 of rigol.py from:<br />
command = bytearray(SCPI_command) <br />
to: <br />
command = bytearray(SCPI_command, 'latin1')<br />
<br />
Line 35 of applyCode.py from:<br />
read_data = ":SYST:SET " + response.tostring<br />
to:<br />
read_data = ":SYST:SET " + str(response)<br />
<br />
Line 38 of applyCode.py from:<br />
read_data += response.tostring<br />
to:<br />
read_data += str(response)<br />
<br />
Here are the fully modified versions:<br />
<a href="http://pastebin.com/ZzCp9JU4">http://pastebin.com/ZzCp9JU4</a><br />
<a href="http://pastebin.com/Q7cdQ1f2">http://pastebin.com/Q7cdQ1f2</a><br />
<br />
Place these in /root/<br />
<br />
ArchLinux uses systemd rather than initscripts. So we have to enable rc.local for this next part (or create a systemd script for it, it's up to you).<br />
<br />
Create /etc/systemd/system/rc-local.service with the following:
<br />
<blockquote>
[Unit]<br />
Description=/etc/rc.local Compatibility<br />
<br />
[Service]<br />
Type=forking<br />
ExecStart=/etc/rc.local<br />
TimeoutSec=0<br />
#StandardInput=tty<br />
RemainAfterExit=no<br />
[Install]<br />
WantedBy=multi-user.target</blockquote>
Create /etc/rc.local with the following
<br />
<blockquote>
#!/bin/bash
python <br />
/root/applyCode.py</blockquote>
Now run "chmod 555 /etc/rc.local"<br />
<br />
You could also put "shutdown -h now" at the end of /etc/rc.local and if you needed to edit the python script/change anything on the system you could just boot into single user mode by putting the following in cmdline.txt "init=/bin/sh" on the first (FAT32) partition of the SD card (alternatively don't plug the Rigol in and boot the Pi without making the change to cmdline.txt) . This would serve to save some power.<br />
<br />
Only do this though when everything is running correctly.<br />
<br />
Now run "systemctl enable rc-local.service" to enable the rc.local "service". Setup is now done. Halt the Pi and disconnect.<br />
<br />
Connect the rear USB port on the scope to the Raspberry Pi. Now plug the Pi's microusb power connector into the front port on the scope.<br />
<br />
Turn on the scope:<br />
<div class="separator" style="clear: both; text-align: center;">
<iframe allowfullscreen='allowfullscreen' webkitallowfullscreen='webkitallowfullscreen' mozallowfullscreen='mozallowfullscreen' width='320' height='266' src='https://www.youtube.com/embed/DnOGmsP-iVQ?feature=player_embedded' frameborder='0'></iframe></div>
<br />
You should, after a few seconds, get the following if you browse the installed options:<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkE02ygMZBr8N6Pv-TuqBvr7VD4UzhM_YDJffOnd3qJ2nOyotcj9hbljMmAcOQTsbVQLGGtT6Kh6Cdq_7rgiGnr9N2TKTh5k3SwEFEwNDlYWi5-24NGksQCSmP5aNHyeOvBy-N1aOPccIH/s1443/DSC_0020.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkE02ygMZBr8N6Pv-TuqBvr7VD4UzhM_YDJffOnd3qJ2nOyotcj9hbljMmAcOQTsbVQLGGtT6Kh6Cdq_7rgiGnr9N2TKTh5k3SwEFEwNDlYWi5-24NGksQCSmP5aNHyeOvBy-N1aOPccIH/s320/DSC_0020.JPG" height="212" width="320" /></a></div>
<br />
If you look at the about screen you will also notice that it now has the DS2202 Model designation.
Enjoy your fully optioned DS2202!<br />
<br />
You can unplug the Pi completely if you need to use the USB ports at all at this stage. Although you will need to plug it back in when you restart.<br />
<br />
Note, this also works for the other DS2000 series scopes (DS2102 and DS2202; except it doesn't upgrade bandwidth on the DS2202) and the DS4000 series as well by modifying the python script with one of the following option codes:<br />
LLLLLLL-RLGLLDS-DSB9LLL-LLLLLLL - enable 6 options <br />
LLLLLLL-RLGLLDS-DSD9LLL-LLLLLLL - enable 7 options<br />
LLLLLLL-RLGLLDS-DSH9LLL-LLLLLLL - enable 8 optionsbleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com20tag:blogger.com,1999:blog-8517468578478710299.post-9568082927494477512013-02-03T00:43:00.001+10:002014-10-28T23:51:58.505+10:00More Raspberry Pi Power Saving (Part 3)Be sure to read <a href="http://freneticrapport.blogspot.com.au/2013/01/first-raspberry-pi-model-512mb-off-re_24.html">part 1</a> and <a href="http://freneticrapport.blogspot.com.au/2013/01/raspberry-pi-model-b-to-model.html">part 2</a>.<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJudr_4bf2Zid0YBuXlO4M_nDeQfNYYmtyWX9lcl5nyhS1tNqw3sx7_IXozHreAqSovdrA-aB35qYAhK9DJCeL3T4fxEpgVODJqt2gNqwGWBbbODyg754sbE0YncYQmGSV3U_9ubW4wsqn/s1600/DSC_0528.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgJudr_4bf2Zid0YBuXlO4M_nDeQfNYYmtyWX9lcl5nyhS1tNqw3sx7_IXozHreAqSovdrA-aB35qYAhK9DJCeL3T4fxEpgVODJqt2gNqwGWBbbODyg754sbE0YncYQmGSV3U_9ubW4wsqn/s400/DSC_0528.JPG" height="266" width="400" /></a></div>
Further adding to the Raspberry Pi's superfluous power draw are the linear 1.8V and 3.3V regulators (RG1 and RG2 respectively). Currently in place of the 3.3V regulator is the NCP1117/SE8117TA (which in turn feeds the 1.8V regulator in series). <a href="http://www.bitwizard.nl/wiki/index.php?title=Reducing_power_consumption_of_a_raspberry_Pi">People</a> <a href="http://www.seanet.com/~karllunt/RasPiRegulatorReplacement.html">are</a> <a href="http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63&t=12387">reporting</a> <a href="http://www.tooms.dk/forum/topic.asp?TOPIC_ID=286">that</a> a modification of RG2 to a switch mode variant sees reductions in power consumption between 10 to 25%. I will not be looking to replace the 1.8V regulator as it seems to only offer <a href="http://www.tooms.dk/forum/topic.asp?TOPIC_ID=288">marginal</a> improvement on top of replacing RG2.
<br />
<a name='more'></a><br />
<br />
I have chosen to replace this regulator with the <a href="http://docs-asia.electrocomponents.com/webdocs/063c/0900766b8063c4d2.pdf">RECOM R-783.3-0.5</a> high efficiency/low ripple switching supply. It offers very high efficiency (91%) at it's minimum voltage limit (4.75V) so at 5V it should offer about the same. It has the following pinout:
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbb37VwYUQ3r4c_-0ceW1_a483fMBks79kKatDPfp6FzcXI8U2txQqOiM7BICGO0vBclnUFG-woTXE5rxRi2XF7ZMR05HotKU_fG_bH08xFA5RAuF9gLe1yz7qqrQREoWdl3Y-dkp98XKT/s1600/recom.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbb37VwYUQ3r4c_-0ceW1_a483fMBks79kKatDPfp6FzcXI8U2txQqOiM7BICGO0vBclnUFG-woTXE5rxRi2XF7ZMR05HotKU_fG_bH08xFA5RAuF9gLe1yz7qqrQREoWdl3Y-dkp98XKT/s400/recom.png" height="386" width="224" /></a></div>
Be careful, because it has a slightly different pinout to the NCP1117 on the board (which also uses the tab rather than pin2 for Vout). <br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizJw2z8plMsmR4Lc9xnvKXXQVPWrRHQ4-Yrik3aOBPTTPWYeFa-6-ffbUNqkoDedkOOXfEMdEnkEF_SUkUUiucpbZj8iRnz9nRQpzB_NhjEwwAHIT80yjhZzfL8uGlMzjTCsPdvZ7uC6yT/s1600/original.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEizJw2z8plMsmR4Lc9xnvKXXQVPWrRHQ4-Yrik3aOBPTTPWYeFa-6-ffbUNqkoDedkOOXfEMdEnkEF_SUkUUiucpbZj8iRnz9nRQpzB_NhjEwwAHIT80yjhZzfL8uGlMzjTCsPdvZ7uC6yT/s400/original.png" height="238" width="184" /></a></div>
Remove the NCP1117 and replace with the RECOM R-783.3-0.5. You will need to work some magic with the pins (be sure to pre-plan as you don't want to have to re-bend the legs as they can break off quite easily). As a tip, I decided to solder Vout to the top of capacitor C11 for convenience, rather than the pad/tab.
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP2zCQTAcbOB8NOAHzA_OZhSWcI9VAbiKldffLGtoF-I73VfgOvekosyhduBZdnvEoL76pdhNtBpANIpOE0QTOd32hr1pa3QFG651SvkmW6O8Q9paLvqR9vKI5ofxoxxGiTbXQxRhXRbOq/s1600/DSC_0540.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiP2zCQTAcbOB8NOAHzA_OZhSWcI9VAbiKldffLGtoF-I73VfgOvekosyhduBZdnvEoL76pdhNtBpANIpOE0QTOd32hr1pa3QFG651SvkmW6O8Q9paLvqR9vKI5ofxoxxGiTbXQxRhXRbOq/s400/DSC_0540.JPG" height="266" width="400" /></a></div>
Alright, now to check it's still working.
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTgVrFUz-ouZxM7WFGo9uQucGX_tF_lw0N22vmXJaHLVra5RWEA7spl-fsDlVNYokIZWEzJhJV7-CswxBUJwtB1js0gFkqBCsW9QvhEJcId8b75yLX3XyCwMUKMgKBW641s1JD2mdnpy3x/s1600/DSC_0541.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTgVrFUz-ouZxM7WFGo9uQucGX_tF_lw0N22vmXJaHLVra5RWEA7spl-fsDlVNYokIZWEzJhJV7-CswxBUJwtB1js0gFkqBCsW9QvhEJcId8b75yLX3XyCwMUKMgKBW641s1JD2mdnpy3x/s400/DSC_0541.JPG" height="400" width="266" /></a></div>
Now for some new measurements:
<br />
<blockquote>
25.7mA - After "sudo halt"<br />
93.6mA - Idle (avg)<br />
96.2mA - Idle (avg) (with HDMI connected)<br />
136.0mA - Running stress test<br />
138.8mA - Running stress test (with HDMI connected)</blockquote>
Comparing that to the <a href="http://freneticrapport.blogspot.com.au/2013/01/raspberry-pi-model-b-to-model.html">previous tests</a>, we achieve a load reduction of 13.5-16.4% (27.2% when halted) which is nothing short of awesome.<br />
<br />
But we can't stop there. All this power has gone to my head. We can now enable a power saving mode which will throttle back the <a href="http://wiki.stocksy.co.uk/wiki/Raspberry_Pi_Setup#Power_Saving">CPU when idling</a>.
<br />
<br />
Install the following (note, you will need a USB NIC on a hub to connect to the internet if you have removed the LAN9512):<br />
sudo apt-get install cpufrequtils<br />
<br />
Edit /boot/config.txt and insert the following values:<br />
<blockquote>
force_turbo=0 #turns on frequency scaling<br />
arm_freq=700 #sets max frequency<br />
arm_freq_min=100 #sets min frequency</blockquote>
Then you can now set the 'ondemand' governor. This will alter the CPU clock speed depending on load.<br />
<br />
cpufreq-set -g ondemand<br />
<br />
Now reboot. If you don't perform all of this before rebooting (contrary to what's on the site linked above), you will have issues with the pi rebooting because the CPU frequency is too low (as the Broadcom's watchdog time kicks in) or USB devices acting bizarre.<br />
<br />
You can check you current speed in Hz with "cpufreq-info"<br />
<br />
Now for the stats:<br />
<blockquote>
90.5mA - Idle (avg) - 100Mhz<br />
93.6mA - Idle (avg) (with HDMI connected) - 100Mhz<br />
134.9mA - Running stress test - 700Mhz<br />
137.93mA - Running stress test (with HDMI connected) - 700Mhz</blockquote>
While this isn't a significant decrease, it still provides some benefit over not having it on and it doesn't take too much effort to enable it.
bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com1tag:blogger.com,1999:blog-8517468578478710299.post-91578263245037975422013-01-24T21:34:00.000+10:002016-07-19T21:53:51.333+10:00Raspberry Pi Model B to Model A Conversion Cleanup - Part 2Be sure to see <a href="http://freneticrapport.blogspot.com.au/2013/01/first-raspberry-pi-model-512mb-off-re_24.html">part 1</a>.
A lot of the components on the board are now redundant as they are no longer used/connected, so for cosmetic reasons we can now remove these from the board. The easiest way to remove them is to load a soldering iron tip with solder and flood the SMD components. They should just flow away and join with the solder lump on the tip and leave a nice clean finish.
<br />
<br />
Firstly on the top, you will want to remove the components in the spaces marked red. You can also remove the RJ45 connector if you wish.
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0_4GZdecAa8y6XzKlsmw5v3UdQbLeUA0S0sAw7uLO8EXDogrnu9D2J5rZyO9gXMR4-LSgOrP7iqaPBWHiBZZRVXC2vy5JClWnL5AbNSfOmrOjFMvPZlhnSEGGL1lfQBW9vvPfxv4gBlc9/s1600/DSC_0505.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0_4GZdecAa8y6XzKlsmw5v3UdQbLeUA0S0sAw7uLO8EXDogrnu9D2J5rZyO9gXMR4-LSgOrP7iqaPBWHiBZZRVXC2vy5JClWnL5AbNSfOmrOjFMvPZlhnSEGGL1lfQBW9vvPfxv4gBlc9/s400/DSC_0505.JPG" width="265" /></a></div>
<a name='more'></a><br />
On the flip side, you can also remove the SMD components marked in red. The crystal might be a little difficult to remove, but as before if you don't want to re-purpose it, you can just load it up with solder and keep the heat on it until it slides away. Otherwise you can use the same technique used with the gas torch:
<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6kYG4QLLKSHOkS1h_TtsVNzUHaHzp6v4k9cg9ebvhfN3Ugyol_gcPuSnHstUJyREU-kCnH0PGQkkcEK2gZ4HW8Q6AGSQpd8EIP50aW1SiqmJrvtHKs_TLIydQsi1wf15bJEqJCveczVKH/s1600/DSC_0509.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj6kYG4QLLKSHOkS1h_TtsVNzUHaHzp6v4k9cg9ebvhfN3Ugyol_gcPuSnHstUJyREU-kCnH0PGQkkcEK2gZ4HW8Q6AGSQpd8EIP50aW1SiqmJrvtHKs_TLIydQsi1wf15bJEqJCveczVKH/s400/DSC_0509.JPG" width="400" /></a></div>
<br />
Now you can remove the USB connector and change it with a single port variant.<br />
<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaVnrFawHBbZBqtCCc1zfgqJtDhTu-4eMy4w5kkCMg2FgDA212RBTZDIViCk-veu6ckV8EfBXKwL88_sLFNZKYulDle616S86cM4gm2LdvTI1O_BDuJwsS2ALQ8af1QJLnUYRfbJmIlZp5/s1600/DSC_0523.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgaVnrFawHBbZBqtCCc1zfgqJtDhTu-4eMy4w5kkCMg2FgDA212RBTZDIViCk-veu6ckV8EfBXKwL88_sLFNZKYulDle616S86cM4gm2LdvTI1O_BDuJwsS2ALQ8af1QJLnUYRfbJmIlZp5/s400/DSC_0523.JPG" width="266" /></a></div>
<br />
You will now have an almost indistinguishable Model A Raspberry Pi.
<br />
Why all the fuss you might ask? Well lets have a look at some figures for the 512MB "Model A" Raspberry Pi.<br />
<br />
Power usage <a href="http://www.raspberrypi.org/phpBB3/viewtopic.php?p=164893">comparison</a> with the other Raspberry Pi models (the Model A here is the original pre-production model).
<br />
<br />
From the page:
<br />
<blockquote>
352mA - Model-B Running stress test<br />
330mA - Model-B Idle<br />
143mA - Model-A Running stress test<br />
118mA - Model-A Idle (with HDMI connected)<br />
110mA - Model-A Idle<br />
107mA - Model-B After "sudo halt"<br />
33 mA - Model-A After "sudo halt"</blockquote>
<br />
From my tests with the 512MB Model A with a lab supply at 5.00V:
<br />
<blockquote>
35.29mA - After "sudo halt"<br />
106.9mA - Idle (avg)<br />
111.1mA - Idle (avg) (with HDMI connected)<br />
163.5mA - Running stress test <br />
165.9mA - Running stress test (with HDMI connected)<br />
265.2mA - Stress Quake 3 (avg) (with HDMI connected)</blockquote>
<br />
My CPU stress test was run with:<br />
cat /dev/urandom |gzip > /dev/null & md5sum < /dev/urandom &
<br />
<br />
It looks like it draws a little extra current while stressing over the 256MB Model A. This would undoubtedly be due to the doubling of the RAM.
<br />
<br />
Update:
<br />
<br />
Juggling with RAM sizes by giving 256 to the GPU and 256 to the CPU (in /boot/config.txt) yields the following:
<br />
<blockquote>
160.6mA - Running stress test <br />
163.5mA - Running stress test (with HDMI connected)</blockquote>
<br />
<span style="color: white; font-size: xx-small;">Hi Hackaday.io (2016)! </span>bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com5tag:blogger.com,1999:blog-8517468578478710299.post-7978986967069018242013-01-24T00:21:00.002+10:002013-01-24T23:01:29.884+10:00First Raspberry Pi Model A 512MB Off The (Re-)Production Line - Part 1Who wants to wait (or pay highly inflated prices for pre-production run) for the Raspberry Pi Model A, when you can have it now for a low price of <a href="http://australia.rs-online.com/web/p/products/7568308/?">$36AUD</a> complete with a 512 MB RAM update?
<br/><br/>
Cosmetically and functionally the Model A has removed the LAN9512 IC, Ethernet port and the secondary USB port. Under the hood, they have also designed the PCB to accommodate both Model A and B configurations, depending on the placement of a couple of components. In this series, I will be converting the Raspberry Pi Model B to a Model A with 512MB RAM.
<br/><br/>
Let's first compare the two boards by eye. On <a href="http://www.raspberrypi.org/archives/2759">this</a> page they have nice pictures of the Model A board. Looking at these pictures and our current board, we essentially want to remove the extra components from the Model B to match the Model A.<br/><br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_C23tIcbeSJVQDDeU63beoKWIFJG62kcNnDmh9xAcUCj1D5X5Y6fmslq4tF4oOFnco4hNIqPori5Wvo0rEcA4x1AsiW2P7uVFRSMG_K8PC5P8pkfHWVeC5_Cw-qyhyphenhyphenDF-Ku5n8AT0A83u/s1600/DSC_0471.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="400" width="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_C23tIcbeSJVQDDeU63beoKWIFJG62kcNnDmh9xAcUCj1D5X5Y6fmslq4tF4oOFnco4hNIqPori5Wvo0rEcA4x1AsiW2P7uVFRSMG_K8PC5P8pkfHWVeC5_Cw-qyhyphenhyphenDF-Ku5n8AT0A83u/s400/DSC_0471.JPG" /></a></div>
<a name='more'></a><br/>
Firstly, we want to desolder the <a href="http://www.smsc.com/LAN9512">LAN9512</a> chip:<br/><div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOlSapY3VvwKu2gt9tGUp4W0hBiJ7G_VY68NZB9El01DfZjuOXiklERrK9HFaTz5T_u6iK9A9RTjG95q011MxVeQYnjFEYm1-XFMq7BV_Luuvgc6hhpyGeeGAJS1WIrR0WUlVDLRRlSdV7/s1600/DSC_0472.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="400" width="266" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjOlSapY3VvwKu2gt9tGUp4W0hBiJ7G_VY68NZB9El01DfZjuOXiklERrK9HFaTz5T_u6iK9A9RTjG95q011MxVeQYnjFEYm1-XFMq7BV_Luuvgc6hhpyGeeGAJS1WIrR0WUlVDLRRlSdV7/s400/DSC_0472.JPG" /></a></div><br/>
By holding a gas/butane torch a couple of centimeters from the board with a hot blower attachment, heat the surrounds of the chip gently to raise the latent temperature of the board. After about 30 seconds, move the heat to the center of the chip and circle about the edges slightly, you should very shortly be able to lift the chip up with tweezers and remove the IC when the solder starts to re-flow (if you have trouble with tweezers, you might be able to just slide it sideways with a small screwdriver until it comes loose). The chip should just come right off (I recommend that if you have never done this before, to practice on some dummy PCBs that you have handy). As an aside, one of the neat things about using a butane torch for re-flow use is that it doesn't blow small components around as much and it also burns most of the oxygen from the heat it provides. Oxidization is a killer for re-flow tasks.<br/><br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkU00vldtr1NiZz2BlVardmtPcjWPF5hJU9phyphenhyphenisNAlfXyiht_FNNJmjrZG5iudA71D8EHPYXS1edniSv4acg0QrBLljOVtrTU4416x1BArLr_dhRvR8kkiWbXcoPMjbaM8qkxFUaNOA3C/s1600/DSC_0476.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="267" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgkU00vldtr1NiZz2BlVardmtPcjWPF5hJU9phyphenhyphenisNAlfXyiht_FNNJmjrZG5iudA71D8EHPYXS1edniSv4acg0QrBLljOVtrTU4416x1BArLr_dhRvR8kkiWbXcoPMjbaM8qkxFUaNOA3C/s400/DSC_0476.JPG" /></a></div><br/>
Let's now test to make sure things still start up:<br/><br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSN-umtg5KS2PlNTdxTOGrkdBd3u2X4dkg47JMQ9_cE_FpNxmDvR4nhETUSiyKQC5BGxG7a9_rLJrklhBVg-qxBHA6qYH067kWsLsyc_eujSrJDA8z211c-9EfVr_pYngyy_tJWYE2Uda_/s1600/DSC_0479.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="266" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSN-umtg5KS2PlNTdxTOGrkdBd3u2X4dkg47JMQ9_cE_FpNxmDvR4nhETUSiyKQC5BGxG7a9_rLJrklhBVg-qxBHA6qYH067kWsLsyc_eujSrJDA8z211c-9EfVr_pYngyy_tJWYE2Uda_/s400/DSC_0479.JPG" /></a></div>
<br/>
Ahh, activity lights of joy. But there is now no functional USB. Comparing the two boards I notice the Model A is missing most of the SMD mount components around the LAN9512 chip, except for two new resistors (R36 and R37) that don't exist on the Model B.<br/><br/>
Model A:
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGUKRrtLibNFe01vT9ktg4fziRcPoexmiwotK5YolnlajFSWAbW__j9eg5KIHn9rEt-RwTarCFN6nr-sU0xo6MjAPBbBoXunRTYU2hN022AECOcCUBJ5DOaxFtHpmNvs8lwov9rwlrYmwM/s1600/Model-A_back.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="283" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgGUKRrtLibNFe01vT9ktg4fziRcPoexmiwotK5YolnlajFSWAbW__j9eg5KIHn9rEt-RwTarCFN6nr-sU0xo6MjAPBbBoXunRTYU2hN022AECOcCUBJ5DOaxFtHpmNvs8lwov9rwlrYmwM/s400/Model-A_back.jpg" /></a></div>
<br/>
Model B:
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRKvOFfyfwjrYDRq9xThJMSoIqCjCdijSeShuSMSMV_VJ_nPi0M8s7qxmIiV6ZIRtX860p97H8FA-5EWVWpi4YbxiDzxM_kd9TV9yYWVIULGAArZZKyhWgW9dSDTjvI14ZpbB3yT-_9y1d/s1600/DSC_0480.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="264" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhRKvOFfyfwjrYDRq9xThJMSoIqCjCdijSeShuSMSMV_VJ_nPi0M8s7qxmIiV6ZIRtX860p97H8FA-5EWVWpi4YbxiDzxM_kd9TV9yYWVIULGAArZZKyhWgW9dSDTjvI14ZpbB3yT-_9y1d/s400/DSC_0480.JPG" /></a></div>
<br/>
According to the <a href="http://www.raspberrypi.org/wp-content/uploads/2012/04/Raspberry-Pi-Schematics-R1.0.pdf">schematic</a>, R36 and R37 are just <a href="http://en.wikipedia.org/wiki/Zero-ohm_link">Zero-ohm links</a> which connect the USB port directly to the <a href="http://www.broadcom.com/products/BCM2835">Broadcom BCM2835</a> when the LAN9512 isn't populated. We can just bridge these like so:<br/><br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqcVuJnI7GrVUXHRUO9brYd1Ib1fyVjnumM2PJHNK7B6NSIR3_Sry62acfIgTDw-uobqLEC34GuFTJJcX34GguQgW73xAN2LdGcvoy0Dlzx07TwHua6JzmVw9mF9sGljhh0-5K43RgiGmn/s1600/DSC_0480s.jpg" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="247" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiqcVuJnI7GrVUXHRUO9brYd1Ib1fyVjnumM2PJHNK7B6NSIR3_Sry62acfIgTDw-uobqLEC34GuFTJJcX34GguQgW73xAN2LdGcvoy0Dlzx07TwHua6JzmVw9mF9sGljhh0-5K43RgiGmn/s400/DSC_0480s.jpg" /></a></div>
<br/>
Once you have done this, you can then fire up your Pi:
<br/><br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZGbc3AdOqHncVOtzyimLC59D4SDuVE9HxR42pdmnaEO1lfAn5-GJFcQuuHaJp3WWgkVRGViZzyUlfjWFIqkEf2tnpptZQJNa_sBgvNei9fCFL_pXJOCpI_Y5O3wJecP4Uyf0RgAShT2KB/s1600/DSC_0481.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="266" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZGbc3AdOqHncVOtzyimLC59D4SDuVE9HxR42pdmnaEO1lfAn5-GJFcQuuHaJp3WWgkVRGViZzyUlfjWFIqkEf2tnpptZQJNa_sBgvNei9fCFL_pXJOCpI_Y5O3wJecP4Uyf0RgAShT2KB/s400/DSC_0481.JPG" /></a></div>
<br/>
Plug in a USB device and test it out (note, only the bottom port works now):
<br/><br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuD3zvVt2XYSzIfxveYifnY6vHh0-d-wZLKR3ou9SmmS31K2FArFyyfZbwinhINB8cdcf5IZVQRlYjSO3DHY5rr4sdphXVTlitT2b6ypk2zAVPqsNzYD-VShQ9uFbYaoIlmbwgBxV9kkfT/s1600/DSC_0492.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="266" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiuD3zvVt2XYSzIfxveYifnY6vHh0-d-wZLKR3ou9SmmS31K2FArFyyfZbwinhINB8cdcf5IZVQRlYjSO3DHY5rr4sdphXVTlitT2b6ypk2zAVPqsNzYD-VShQ9uFbYaoIlmbwgBxV9kkfT/s400/DSC_0492.JPG" /></a></div>
<br/>
Success! A Das Keyboard on a USB hub.
<br/><br/>
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8JqjVcrEoTdrFzh0V4gnUZ0S-KB1qdjJe-eJpjSaDjsGs8Yt7X_U3OtzVYDLdxIKiOj8WewgJGFHcUD0E1aQZcrSI3nDIIXReNqfU7HZcbYKTe7ny2YN2OLnYHUm6Y27oqCV4pQeEjBkc/s1600/DSC_0494.JPG" imageanchor="1" style="margin-left:1em; margin-right:1em"><img border="0" height="266" width="400" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh8JqjVcrEoTdrFzh0V4gnUZ0S-KB1qdjJe-eJpjSaDjsGs8Yt7X_U3OtzVYDLdxIKiOj8WewgJGFHcUD0E1aQZcrSI3nDIIXReNqfU7HZcbYKTe7ny2YN2OLnYHUm6Y27oqCV4pQeEjBkc/s400/DSC_0494.JPG" /></a></div>
<br/><br/>
Functionally we now have a Raspberry Pi Model A, but cosmetically things aren't quite right yet. In <b><a href="http://freneticrapport.blogspot.com.au/2013/01/raspberry-pi-model-b-to-model.html">part 2</a></b> I will be cleaning up the redundant SMD components from the board and changing the USB connector.
bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com5tag:blogger.com,1999:blog-8517468578478710299.post-24943802063307424772011-05-05T01:11:00.001+10:002013-01-24T21:46:59.554+10:00Samsung GT-I9000 (Galaxy S) Touch Screen and Keypad RepairA mate of mine recently left his Galaxy S outside in the rain, floating in a puddle overnight after some overzealous drunken antics which rendered the home button unresponsive. Sending it back to Samsung for repair would obviously require payment as it had easily set off the water damage sensors.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnVExg0RaAdYmWldzXOwHwR7qwyTr6HkEDxUV_KL_396dTLf2YRaIVFJXordVNbBSvY5vhyfbTEvDNwWKU-9NpvnXVaweVp13BzyltWyakdm17_cZM1Eo1SSq_5Ef6ADm_CpMcFDa_NWk8/s1600/DSC_0384.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnVExg0RaAdYmWldzXOwHwR7qwyTr6HkEDxUV_KL_396dTLf2YRaIVFJXordVNbBSvY5vhyfbTEvDNwWKU-9NpvnXVaweVp13BzyltWyakdm17_cZM1Eo1SSq_5Ef6ADm_CpMcFDa_NWk8/s320/DSC_0384.JPG" width="263" /></a></div><a name='more'></a>Firstly I must say, this is a very very difficult proceedure, and even if you know what you are doing, you have to be very gentle. There are a <a href="http://www.youtube.com/watch?v=qI1R7dlUyvA">few videos</a> floating around about how to disassemble which I don't recommend following as they make it look far easier than it actually is (oh and don't use a screwdriver like that at all).<br />
<br />
One of the better guides I did find was for the 4G version of the phone which doesn't have the tactile home button, but instead it has a full touch keypad. You can see that <a href="http://www.ifixit.com/Teardown/Samsung-Galaxy-S-4G-Teardown/4977%20">here</a>. Make note of their use of a heatgun (or a hairdryer) as you will need it to remove the screen from the internal structure. You will also need a Phillips #00 screwdriver, and plastic phone opening tools. Also note that this is NOT a step by step guide, it merely serves to provide some hints.<br />
<br />
Following the guide we remove the back cover and panel: <br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgecLgTep8cEnrBCIn4wNB7RJzDZ7HGDvjzA4I-26upTATxwy68QViRnKN8H1u_uc9TD3jrlgT7rPhJsk7MQOsmuU_YD88yydJFs9bro1KzCX9CzaJC9zU0ikURSUeQCJKptYOPRVRSOqfb/s1600/DSC_0381.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgecLgTep8cEnrBCIn4wNB7RJzDZ7HGDvjzA4I-26upTATxwy68QViRnKN8H1u_uc9TD3jrlgT7rPhJsk7MQOsmuU_YD88yydJFs9bro1KzCX9CzaJC9zU0ikURSUeQCJKptYOPRVRSOqfb/s320/DSC_0381.JPG" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;">Now we see the culprit, unfortunately it's not as easy as just removing it and putting the new one on. We have to remove the entire screen:</div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0l7EKXUOQh_oh-LmL3n7JOljyd7QVrxPJoeNPf-tKd_4g4nGhKEsJchuRyedm7DG0FTLEm2EddbzYarCmx5lmmW8s2i50KZNHBUBlC50AdyCwUEVFmRbtTW-VU_B5X5v5HqHOo8sbQ6pL/s1600/DSC_0351.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg0l7EKXUOQh_oh-LmL3n7JOljyd7QVrxPJoeNPf-tKd_4g4nGhKEsJchuRyedm7DG0FTLEm2EddbzYarCmx5lmmW8s2i50KZNHBUBlC50AdyCwUEVFmRbtTW-VU_B5X5v5HqHOo8sbQ6pL/s320/DSC_0351.JPG" width="320" /></a></div>Get out your plastic phone opening tools and your hairdryer and slowly pry the silver bezel and screen away from the internal frame (the bezel must come off with the screen in one piece).<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSYuCe7pKvbRPgs7Q34YVVQy5XQ2ihRzzePlo4cFF6sDP_Hb-DKlRPtTooHny_nYHusFz850tghJoLdGxpa-BNND8c8gVCGjMTa6obIL69p1w-TeC9AREhFtUq8PnZxoH0Mzrw9rzg9Pxg/s1600/DSC_0357.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSYuCe7pKvbRPgs7Q34YVVQy5XQ2ihRzzePlo4cFF6sDP_Hb-DKlRPtTooHny_nYHusFz850tghJoLdGxpa-BNND8c8gVCGjMTa6obIL69p1w-TeC9AREhFtUq8PnZxoH0Mzrw9rzg9Pxg/s320/DSC_0357.JPG" width="320" /></a></div>This next picture will show you why the bezel must come off all at once with the screen. If you are replacing the screen alone and you want to keep the keypad, there are two small tabs adhered to the screen that connect to it and this must be removed gently with the plastic tool and some heat. I am lucky that I am replacing the keypad today, rather than the screen.<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWdJ99QxEMDI4HNoq6AnEeLnn6J1MMP-8bBoaqp4axQfJIO1MfJsP1U6a1OAGryv-Og45Cv4ntM27RhTnNIKlkuS-OZys_G4U_zod6bIMyi_P32aXWTY6C8am8HHrTeKFS8dyUPMICtHoM/s1600/DSC_0365.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjWdJ99QxEMDI4HNoq6AnEeLnn6J1MMP-8bBoaqp4axQfJIO1MfJsP1U6a1OAGryv-Og45Cv4ntM27RhTnNIKlkuS-OZys_G4U_zod6bIMyi_P32aXWTY6C8am8HHrTeKFS8dyUPMICtHoM/s320/DSC_0365.JPG" width="320" /></a></div><div style="text-align: left;">Here is my replacement keypad ready to be installed: </div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2L4VAYUayiruiTRzzs3AYhBshSqDBDHOg1q5aRZiQXoqKNWH0KHcRKbN3OwX2plnjegP_X0OAPLbNgeaSoppZqjshe4OQMRxFu7oQUs7a38GIAfOir6ZXCpNRvp0gjhO-dhnY_VOX2Hrc/s1600/DSC_0348.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2L4VAYUayiruiTRzzs3AYhBshSqDBDHOg1q5aRZiQXoqKNWH0KHcRKbN3OwX2plnjegP_X0OAPLbNgeaSoppZqjshe4OQMRxFu7oQUs7a38GIAfOir6ZXCpNRvp0gjhO-dhnY_VOX2Hrc/s320/DSC_0348.JPG" width="320" /></a></div>You can now replace the keypad. I used a small drop of super glue to hold things in place while a mixture of epoxy sealed the deal for a strong bond (only use a little bit):<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC9UMRkI1vTsd0R_6QUnPl9SgGWZmpTNOF3BJShV1tmZGYbayDpHQxaZFqhSRnPAX-DDYJkPn6kxkQMNiPb4ChxbkdieRhLSmovMQK-cY2IJfowoFhY90emwJa9Kvsvnaal7KrY49_AM2M/s1600/DSC_0368.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiC9UMRkI1vTsd0R_6QUnPl9SgGWZmpTNOF3BJShV1tmZGYbayDpHQxaZFqhSRnPAX-DDYJkPn6kxkQMNiPb4ChxbkdieRhLSmovMQK-cY2IJfowoFhY90emwJa9Kvsvnaal7KrY49_AM2M/s320/DSC_0368.JPG" width="212" /></a></div>All replaced. Now leave the touch screen tabs free as you will need to adhere them to the screen later:<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipmM_Ovv2Al8JVeG8BCcWTlETETdHFcZ6Kl8f001EicjTxXxlgpt2i58owgdnsCCvOIWGgoj8Q36C58DtqCUpiPd8zDf4Fp45tVrvthL-JpCxF8PwtOnxFoKiWxc0IngJ4vKTcjVYEvfzO/s1600/DSC_0369.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEipmM_Ovv2Al8JVeG8BCcWTlETETdHFcZ6Kl8f001EicjTxXxlgpt2i58owgdnsCCvOIWGgoj8Q36C58DtqCUpiPd8zDf4Fp45tVrvthL-JpCxF8PwtOnxFoKiWxc0IngJ4vKTcjVYEvfzO/s320/DSC_0369.JPG" width="320" /></a></div>Clean all of the old adhesive from the frame with pure isopropyl alcohol:<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT9tu38V7UgY_ghE1LS6vu3XCcLTcUj88ComvD7jBoKbgeAeYR5aJ4AwgWNXFtbZkqVIv1utCXk_rWXp9rie7SH_XB-cgKsOzelzKT4RYcIn2X1aAtQ_s59JF_kxcwbXfbqNd51h34unBA/s1600/DSC_0374.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjT9tu38V7UgY_ghE1LS6vu3XCcLTcUj88ComvD7jBoKbgeAeYR5aJ4AwgWNXFtbZkqVIv1utCXk_rWXp9rie7SH_XB-cgKsOzelzKT4RYcIn2X1aAtQ_s59JF_kxcwbXfbqNd51h34unBA/s320/DSC_0374.JPG" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;">Stick the screen back onto the silver bezel (use a little epoxy in the corners to hold it steady), and put some adhesive tape onto the back of the screen itself (this is to hold the screen to the frame, otherwise it will fall off). If you don't have adhesive tape, you can use epoxy. Also you can now adhere the keypad touch tabs to the screen where they should go (use the bezel as a guide):</div><div class="separator" style="clear: both; text-align: left;"></div><div class="separator" style="clear: both; text-align: center;"> <a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgne03nl5r6JHWZxtYw9PTVTCoATHCqGVxGGC1GuDzRP4QGCmcVPKU5-x_sVxXkIp88rS1wsWiZ_uU8d7ipAJK0lSk3FKfiC5YBokD5m-YUtz5fxIYXGDVheuTFNlx6Aahr5SpukiwDDk7I/s1600/DSC_0375.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgne03nl5r6JHWZxtYw9PTVTCoATHCqGVxGGC1GuDzRP4QGCmcVPKU5-x_sVxXkIp88rS1wsWiZ_uU8d7ipAJK0lSk3FKfiC5YBokD5m-YUtz5fxIYXGDVheuTFNlx6Aahr5SpukiwDDk7I/s320/DSC_0375.JPG" width="212" /></a></div>Put the rest of the phone back together:<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYgVQVBYtdmWPGfZpO1Eb9ubDVINKS8qDZxUAzV7X1Y-SV-iKRLlW2RA8Jo8ebD4_c16ahIQ4ooyn6HxG23D-xMCzXyOTs9qCKBqPtyIhJ9c6GJX118rcu1hkkYKO88BGGx8e7vldaZmt-/s1600/DSC_0383.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjYgVQVBYtdmWPGfZpO1Eb9ubDVINKS8qDZxUAzV7X1Y-SV-iKRLlW2RA8Jo8ebD4_c16ahIQ4ooyn6HxG23D-xMCzXyOTs9qCKBqPtyIhJ9c6GJX118rcu1hkkYKO88BGGx8e7vldaZmt-/s320/DSC_0383.JPG" width="320" /></a></div><div class="separator" style="clear: both; text-align: left;">I mentioned earlier that you have to be very gentle. Well I managed to do this to the screen when taking it apart (in other words destroy it). I assure you it no longer worked, and it was replaced with a new screen. One thing to note when buying replacement screens, they all seem to be SuperAMOLED (from various forums), even if they say LCD. Even the model numbers are the same as the original. The replacement was also an OEM model, and from a detailed inspection, the only difference is that it doesn't have the Samsung logo, everything else is the same, even down to the driver chips and it looks as crisp as ever.</div><div class="separator" style="clear: both; text-align: left;"><br />
</div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnmMbfWjgQ0uJ6fYa7ZJN5CuN01bDBerkLDl5nJy234cZZA-B2I_-EyJ6CUyr4PAT6cKUpTOmq9Zsvswz80XlJvW4TdxwfutS3wDzhyphenhyphen95RIHDBXCv5OG5g9rUa6e_-_GhifUa0fpftD2Yt/s1600/DSC_0360.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgnmMbfWjgQ0uJ6fYa7ZJN5CuN01bDBerkLDl5nJy234cZZA-B2I_-EyJ6CUyr4PAT6cKUpTOmq9Zsvswz80XlJvW4TdxwfutS3wDzhyphenhyphen95RIHDBXCv5OG5g9rUa6e_-_GhifUa0fpftD2Yt/s320/DSC_0360.JPG" width="320" /></a></div><br />
Once you have replaced the keypad, you will probably notice that the touch buttons don't work. No it's not because you haven't put them on properly (unless you really stuffed something up), instead you will need to update the touch pad firmware to fix this problem. Do this by typing the following into the dialer:<br />
<br />
<br />
<div style="text-align: center;"><span style="font-size: large;">*#*#2663#*#*</span></div><div style="text-align: center;"><span style="font-size: large;"><br />
</span></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3E4N0LkxSm2DwqJNCGH1ssLgSdd6DXRqMgssWxMvo0TANbHJH0xRm8Rg1NImmZ-U_g9zuEwgCRdE80RO9AwC9YDCXSxR2SZLdC9SdyXdeq7rWXuQdqzOWHel3gb-shjMMvYHYuF-3SAcG/s1600/DSC_0386.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3E4N0LkxSm2DwqJNCGH1ssLgSdd6DXRqMgssWxMvo0TANbHJH0xRm8Rg1NImmZ-U_g9zuEwgCRdE80RO9AwC9YDCXSxR2SZLdC9SdyXdeq7rWXuQdqzOWHel3gb-shjMMvYHYuF-3SAcG/s320/DSC_0386.JPG" style="cursor: move;" width="212" /></a></div><br />
The above screen will appear. Now click Touch key FW update. It should take a few seconds and now your touch buttons will be working once again, along with the dreaded home button :)bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com6tag:blogger.com,1999:blog-8517468578478710299.post-18159426390056986932011-05-04T00:22:00.007+10:002011-05-04T19:34:52.224+10:00Windows Hidden/Not Connected Device Removal Script And Devcon MusingsI recently needed to create a quick script that uninstalls any devices that have since been disconnected from the system (or fail to be seen). Normally these devices can only be found if you open a command prompt and enter the following (then show hidden devices):<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;"><span class="userInput">set devmgr_show_nonpresent_devices=1</span></span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: small;"><span class="userInput">start devmgmt.msc</span></span><br />
<br />
</div><span class="userInput">The problem arose when I had a large number of touchy USB data aquisition devices that required this to be performed regularly, which becomes very tedious. This is where the <a href="http://support.microsoft.com/kb/311272">devcon</a> utility comes in handy. Although there are a few small problems; the devcon utility has issues removing hidden devices. A lot of people claim this is because it just in fact doesn't do it, as there is apparenly a flag in the program that prevents you from doing it out of the box and modifying the source is the only way to go (I have looked through the source, and I could find no such thing that would cause this behaviour). This is flat out incorrect, you can indeed remove hidden devices with devcon out of the box (provided you have the correct version for your Windows installation, more on this later).</span><br />
<span class="userInput"></span><br />
<a name='more'></a><span class="userInput">Firsly to do this you need the <b>full </b>device ID string that devcon spits out from a find command. This string will look something like this: </span><br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span class="userInput" style="font-size: x-small;">PCI\VEN_1000&DEV_0060&SUBSYS_1F0C1028&REV_04\4&10333E29&0&0030. </span></div><div style="font-family: "Courier New",Courier,monospace;"><br />
</div><span class="userInput">You can then remove the device with the following command:</span><br />
<br />
<span class="userInput" style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">devcon remove <br />
"@PCI\VEN_1000&DEV_0060&SUBSYS_1F0C1028&REV_04\4&10333E29&0&0030"</span></span><br />
<br />
Take note of the quotes and @ symbol as these are required to allow hidden devices to be removed. Once we have this information, we can make our lives easier by creating a script to remove all hidden devices from a machine:<br />
<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">@ECHO OFF</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">DEVCON Find * | FIND /I /V "matching device(s)" > "DevicesExist.txt"</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">FOR /F "tokens=1 delims=: " %%A IN ('DEVCON FindAll * ^| FIND /I /V "matching device(s)"') DO (</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> TYPE "DevicesExist.txt" | FIND "%%~A" >NUL</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> IF ERRORLEVEL 1 %Debug% DEVCON Remove "@%%~A"</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">) </span></span><br />
<br />
This script finds all devices that aren't hidden, and then compares that to a list of every single device seen and removes those that are no longer connected.<br />
<br />
Save the above as a batch file and run it in the same directory as devcon and you are done. Now I mentioned earlier that you will need the correct version of devcon for your installation of Windows. If you find that the above script does not work for you (you will probably get the error: ‘Remove failed. No devices removed.’), you will then need to recompile devcon from the sources in the <a href="http://msdn.microsoft.com/en-us/windows/hardware/gg487467">Windows Driver Kit</a> for the operating system you are going to run on. Don't worry, it's not as hard as you might think. Install the Windows Driver Kit and then goto Start, Programs, Sevelopment Kits, WDK XXXX, Build Environments, Windows [Target], Windows [Target] Free Build Environment, replacing [Target] with the appropriate version of Windows you are building for. Now goto the src\setup\devcon folder in the WDK install directory and run:<br />
<br />
<span style="font-size: small;"><span style="font-family: "Courier New",Courier,monospace;">build -ceZ</span></span><br />
<br />
You can now use the newly built devcon with the above script.bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com3tag:blogger.com,1999:blog-8517468578478710299.post-29299151058511137552011-05-03T23:34:00.002+10:002011-05-03T23:37:30.351+10:00ESXi Automation (KMS Post Followup)I finally got around to creating a small script which automates the process of starting up all of the machines outlined in the post, <a href="http://www.freneticrapport.com/2011/03/kms-activation-with-less-than-25.html">KMS Activation With Less than 25 Machines and VMWare ESXi</a> after I found that the counter in the Windows KMS server resets itself after 30 days. This is of course OK with current machines, but when adding more machines it is not of course desirable.<br />
<a name='more'></a><br />
Utilising a script called <a href="http://blog.peacon.co.uk/wiki/Esxi-control.pl">esxi-control.pl</a> we are able to do this on a Windows machine with <a href="http://www.vmware.com/support/developer/vcli/">vCLI</a> installed (preferably the KMS machine itself).<br />
<br />
You will now need to decide on a method of reactivating the clients. I opted to make a startup script that ran "slmgr /ato", but you can also use pfexec (if you have set a password on the initial account). If you opt to create a startup script, you will need to create a new additional snapshot for each "machine" to save it (obviously you should include this in the image building process outlined in the previous entry).<br />
<br />
Once you have decided on this, create the following batch script on the server you have installed vCLI on:<br />
<br />
<div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">@echo off</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">REM Note: virtual machine must be powered on for script to change to a different snapshot, this script overcomes this with the two if statements below.</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">SET numofmach=24</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">SET seconds=60</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">EditV32 -p "Enter a password: " -m passwd</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">SET /a count=%numofmach%+1</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">FOR /L %%i IN (1,1,%count%) DO (</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">REM Start machine</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">esxi-control.pl --server esxi --username root --password %passwd% --action poweron --vmname kms-maintain</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">IF NOT "%%i"=="1" (</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">echo Waiting for machine to start</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">@ping 127.0.0.1 -n 2 -w 1000 > nul</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">@ping 127.0.0.1 -n %seconds% -w 1000 > nul</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">REM Activate, you could use psexec here:</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">REM psexec \\kms-maintain -u user -p blah "slmgr /ato"</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">REM or just use a startup script on machine</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">)</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;"><br />
</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">IF NOT "%%i"=="%count%" (</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">REM Change to next snapshot</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">esxi-control.pl --server esxi --username root --password %passwd% --action revert-to-snapshot --snapshotname activate-%%i --vmname kms-maintain</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">)</span></div><div style="font-family: "Courier New",Courier,monospace;"><span style="font-size: x-small;">) </span></div><div style="font-family: inherit;"><br />
</div>Now note that this script uses <a href="http://www.westmesatech.com/editv.html">EditV32</a> to mask the text input when obtaining the password of the ESXi server. Obtain the appropriate version from it's webpage and put that in the same directory as the above batch script and esxi-control.pl. Once set let it run. If you find that the number of seconds is not enough, just increment it at the top. You can also modify this script to not get a password for the server if you like.bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-15997851518062480512011-04-11T00:56:00.003+10:002011-04-11T00:58:35.245+10:00Kinect USB CableI finally got around tonight to putting a cable together for the Xbox 360 Kinect that I bought a few months back. I opted to build my own rather than<a href="http://www.microsoftstore.com/store/msstore/en_US/pd/productID.221244000"> ordering one from Microsoft</a> (I had bought the 360 S with Kinect bundle and this version does not come with the power supply cable).<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieiMBAhgsWIxVW7AbaEyIA3th_W_ndsAeOTJtKAcYU68cd1gY5epKbkt8LJS4XnRRFYyu03WpnBmkOYUVdSoVwqY6Hgt3BR1uNEB13WEV_qlnCJWKF2stoEY5BQjGV3z4KPvFK0ztVVVH9/s1600/DSC_0335.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieiMBAhgsWIxVW7AbaEyIA3th_W_ndsAeOTJtKAcYU68cd1gY5epKbkt8LJS4XnRRFYyu03WpnBmkOYUVdSoVwqY6Hgt3BR1uNEB13WEV_qlnCJWKF2stoEY5BQjGV3z4KPvFK0ztVVVH9/s320/DSC_0335.JPG" width="320" /></a></div><a name='more'></a>This is the pinout for the connector (<a href="http://kinecthacks.net/kinect-pinout/">source</a>). I used a cheap Kinect extension cable that I picked up for $5 and spliced that onto a USB cable and a 1.5Amp 12V regulated power supply.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaIR00p1GKMqNrrcyD14wAqbyCNlex3_qHdjVJUg5-WvwoAl1khuxsuJ229GTxcCivAXpXWrOb7i-bNsWnk64Cv0xpB78DiIFrv_DQu_alYbEHj9-Ms_5kMXYzGQugwF81WZVXRO_Y-eEb/s1600/pinout21.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhaIR00p1GKMqNrrcyD14wAqbyCNlex3_qHdjVJUg5-WvwoAl1khuxsuJ229GTxcCivAXpXWrOb7i-bNsWnk64Cv0xpB78DiIFrv_DQu_alYbEHj9-Ms_5kMXYzGQugwF81WZVXRO_Y-eEb/s320/pinout21.png" width="320" /></a></div><br />
Once together I installed the drivers and compiled the demo from the openkinect.org <a href="http://openkinect.org/wiki/Getting_Started">getting started page</a>.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbJIY0ZfQsl936ceGuc9PU7zhsu1C5_cEb8H8WNfruJ7XgCam13upXTAMaZ8DONEgvNYohY-jiPvRM5yWfx7DiirYPZkT4YP76I7k1X3MflOAUnUqOQCNCRB5ExwFA3Dp2msVz3aGapA_N/s1600/LibFreenect+11042011+123435+AM.png" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="127" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgbJIY0ZfQsl936ceGuc9PU7zhsu1C5_cEb8H8WNfruJ7XgCam13upXTAMaZ8DONEgvNYohY-jiPvRM5yWfx7DiirYPZkT4YP76I7k1X3MflOAUnUqOQCNCRB5ExwFA3Dp2msVz3aGapA_N/s320/LibFreenect+11042011+123435+AM.png" width="320" /></a></div><br />
Working well. Now I can start some Kinect hacking :)bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com1tag:blogger.com,1999:blog-8517468578478710299.post-49756569828010024762011-04-07T21:37:00.013+10:002011-04-10T19:18:08.376+10:00Solaris Like Ping Bash ScriptHere is a simple bash script I wrote to allow you to perform a <i><b>quick</b></i> ping operation and have it work similar to how it does on Solaris operating systems:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsPBJPdQ9_R2mv7YWjWgNI1_5Qc75s08y9dhA1LUpKPOsJ2h4SlU0H5wxGE5SNMjTVngsTkaBpeP0ar_xKu7RExVAP-HM0f0EQjMb1JyK24FoVv_0FlpASpm4hqqdxVdGdBJ38KwMHtpFO/s1600/sping.png" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhsPBJPdQ9_R2mv7YWjWgNI1_5Qc75s08y9dhA1LUpKPOsJ2h4SlU0H5wxGE5SNMjTVngsTkaBpeP0ar_xKu7RExVAP-HM0f0EQjMb1JyK24FoVv_0FlpASpm4hqqdxVdGdBJ38KwMHtpFO/s320/sping.png" width="320" /></a></div><a name='more'></a><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">#!/bin/bash<br />
pinghost()<br />
{<br />
ping -c 1 $args &> /dev/null<br />
case $? in<br />
0)<br />
echo "$host is alive";<br />
;;<br />
1)<br />
echo "no answer from $host";<br />
;;<br />
2)<br />
echo "sping: unknown host $host";<br />
;;<br />
esac<br />
}<br />
if [ -z $1 ]; then<br />
echo "Usage: sping host"<br />
echo `ping 2>&1 | sed -e 's/ping/sping/'`<br />
else<br />
#Get hostname from args (in any order)<br />
args=$@<br />
while test -n "$1"<br />
do<br />
if [[ "$1" = -* ]]; then<br />
shift 2<br />
else <br />
host="$1"<br />
break<br />
fi <br />
#shift<br />
done<br />
pinghost $args<br />
fi</span><span style="font-family: "Courier New",Courier,monospace;"></span></span><br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;"> </span><br />
</span>Great little tool when pinging lots of machines at once in a script. The original functionality of the ping command is retained (you can run command line arguements). You can even make this script executable and put it in your /usr/bin folder for easy access.bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-12302501534869406772011-04-07T21:12:00.004+10:002011-04-20T15:05:11.376+10:00/usr/lib/libstdc++.so.X: version GLIBCXX_3.4.XX required byHave you every tried to start up a new program and received this cryptic error:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">/usr/lib/libstdc++.so.X: version GLIBCXX_3.4.XX required by...</span><br />
<br />
<span style="font-family: inherit;">If you have, browsing the internet will usually lead you to believe that you must update your version of libstdc++ or upgrade to a newer distribution of your favourite OS. Well if upgrading is out of the question and you already have the latest verion</span> of libstdc++ installed on your system from your distro's repositories. You also tried to upgrade it to a newer version and you get a whole bunch of dependency errors (which will be the case since the newer version is incompatible with most things that are currently compiled on your system), you can follow these steps.<br />
<a name='more'></a><br />
Firstly find out what versions of GLIBCXX are supported on your system:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">strings /usr/lib/libstdc++.so.X | grep CXX</span><br />
<br />
Replacing X with the highest version number in of libstdc++ you have in the /usr/lib directory). Note that if you are running 64bit, it will be in /usr/lib64.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-aF_Y9e8_tlsKBhMSVHKcbS6tm6GKNh0A6sFwjv7wNwdGyC3bMxtcs9SeU88UJtLPEpDJXvnoOysJ0PJq3qzqafZqOK2Jp_xpGT4WoCV8gWaIPzMCsHck1SXvXRGwE-f2xurzgpmmUnuT/s1600/strings.png" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="201" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh-aF_Y9e8_tlsKBhMSVHKcbS6tm6GKNh0A6sFwjv7wNwdGyC3bMxtcs9SeU88UJtLPEpDJXvnoOysJ0PJq3qzqafZqOK2Jp_xpGT4WoCV8gWaIPzMCsHck1SXvXRGwE-f2xurzgpmmUnuT/s320/strings.png" width="320" /></a></div>Now you will notice that the version of GLIBCXX you are requiring is not on that list. Your distro will most certainly have a newer version of this to install from a newer repository, but it will break other things on your system if you go ahead and try to install it. The trick now is to only run with that version of libstdc++ for the program you are trying to run.<br />
<br />
To do this, download the rpm or package that contains the newer version of libstdc++ from a newer version of the distribution's repository. Try not to go too far ahead, make an educated guess as to which version you might need from which distro (for instnace if you are using openSUSE 11.1, check 11.2 first) If it came in an rpm do the following in a temp directory to extract the rpm without installing it:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">rpm2cpio libstdc++.rpm | cpio -idmv</span><br />
<br />
Now run the strings command from before, and see if it contains the right version of GLIBCXX you need. If it does, copy the out the fullname and the <a href="http://tldp.org/HOWTO/Program-Library-HOWTO/shared-libraries.html">fully qualified</a> link of libstdc++ into the ./lib directory of the program you are wanting to run.<br />
<br />
Now create a small script with the following:<br />
<div style="font-family: "Courier New",Courier,monospace;">#!/bin/bash</div><div style="font-family: "Courier New",Courier,monospace;">PREVIOUS_LD=$LD_LIBRARY_PATH</div><div style="font-family: "Courier New",Courier,monospace;"><br />
</div><div style="font-family: "Courier New",Courier,monospace;">LD_LIBRARY_PATH=/path/to/lib/folder/of/program:$LD_LIBRARY_PATH</div><div style="font-family: "Courier New",Courier,monospace;">export LD_LIBRARY_PATH</div><div style="font-family: "Courier New",Courier,monospace;"><br />
</div><div style="font-family: "Courier New",Courier,monospace;">./program_to_run</div><div style="font-family: "Courier New",Courier,monospace;"><br />
</div><div style="font-family: "Courier New",Courier,monospace;">#Restore LD_LIBRARY_PATH </div><div style="font-family: "Courier New",Courier,monospace;">LD_LIBRARY_PATH=$PREVIOUS_LD</div><span style="font-family: "Courier New",Courier,monospace;">export LD_LIBRARY_PATH</span><br />
<br />
<span style="font-family: inherit;">This will override what is in /usr/lib/ and now all is now right with the world once again, executing the script should now allow your program to run.</span>bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-85919137493932604942011-04-06T21:39:00.008+10:002011-04-06T21:52:48.339+10:00Redirect Commands to Other TerminalsI had a friend ask me today if it would be possible to send commands to another terminal in Linux. Now I am not talking about how to send stdio to other terminals (echo "Test" > /dev/ttyX), but to actually run the command in that terminal. <br />
<br />
I came across a small <a href="http://www.humbug.in/2010/utility-to-send-commands-or-data-to-other-terminals-ttypts/">tool</a> to do this for us.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5tq0LvrOY8Yx1qNC2jwIksNSCieNSG8dwmDrVeZpgHcbBSxASBO1TvNbYMVHviywbHNnuI99Ia7U927bFFX5zGQ9NyMtyDiwmI03ef-joKnYiYQgGiBrfN9oC-Z5fAkJ0CPPI3PwViGv6/s1600/ttysend.png" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="197" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi5tq0LvrOY8Yx1qNC2jwIksNSCieNSG8dwmDrVeZpgHcbBSxASBO1TvNbYMVHviywbHNnuI99Ia7U927bFFX5zGQ9NyMtyDiwmI03ef-joKnYiYQgGiBrfN9oC-Z5fAkJ0CPPI3PwViGv6/s320/ttysend.png" width="320" /></a></div><a name='more'></a><br />
Create a file called ttysend.c and put the following inside it:<br />
<br />
<pre><span class="syntax0"><span style="font-size: xx-small;"><span class="syntax-KEYWORD2" style="font-family: "Courier New",Courier,monospace;">#include <stdio.h>
#include <stdlib.h>
#include <fcntl.h>
#include <sys/stat.h>
#include <sys/ioctl.h>
#include <string.h>
#include <unistd.h>
void print_help(char *prog_name) {
printf("Usage: %s [-n] DEVNAME COMMAND\n", prog_name);
printf("Usage: '-n' is an optional argument if you want to push a new line at the end of the text\n");
printf("Usage: Will require 'sudo' to run if the executable is not setuid root\n");
exit(1);
}
int main (int argc, char *argv[]) {
char *cmd, *nl = "\n";
int i, fd;
int devno, commandno, newline;
int mem_len;
devno = 1; commandno = 2; newline = 0;
if (argc < 3) {
print_help(argv[0]);
}
if (argc > 3 && argv[1][0] == '-' && argv[1][1] == 'n') {
devno = 2; commandno = 3; newline=1;
} else if (argc > 3 && argv[1][0] == '-' && argv[1][1] != 'n') {
printf("Invalid Option\n");
print_help(argv[0]);
}
fd = open(argv[devno],O_RDWR);
if(fd == -1) {
perror("open DEVICE");
exit(1);
}
mem_len = 0;
for ( i = commandno; i < argc; i++ ) {
mem_len += strlen(argv[i]) + 2;
if ( i > commandno ) {
cmd = (char *)realloc((void *)cmd, mem_len);
} else { //i == commandno
cmd = (char *)malloc(mem_len);
}
strcat(cmd, argv[i]);
strcat(cmd, " ");
}
if (newline == 0)
usleep(225000);
for (i = 0; cmd[i]; i++)
ioctl (fd, TIOCSTI, cmd+i);
if (newline == 1)
ioctl (fd, TIOCSTI, nl);
close(fd);
free((void *)cmd);
exit (0);
}</span> </span></span></pre><br />
Now compile it by running "<span style="font-family: "Courier New",Courier,monospace;">make ttysend</span>".<br />
<br />
To run the tool, first find out what terminal you are currently using that you want to send commands to by typing "<span style="font-family: "Courier New",Courier,monospace;">tty</span>". Then in another terminal run the following:<br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">sudo ./ttysend -n [tty_to_redirect_to] [command_plus_args]</span><br />
<br />
This ttysend must be run as user root or setuid root (chmod u+s).bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-20127247263848308952011-03-31T20:48:00.004+10:002011-03-31T21:03:50.353+10:00Acekard 2i on Nintendo 3DS Update IssuesAfter playing around with the 3DS I decided to try some of my old DS games. I have an Acekard AK2i and wanted to test it out. Lo and behold it doesn't boot. Checking the <a href="http://www.acekard.com/download.php#ak2">Acekard website</a> reveals they have made an update for the Acekard 2i to allow you to load on the 3DS (please note this will not [yet] allow you to play 3DS games, just DS games).<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0Fbp33KvkAoKLJLjPb13A9qJwDZTJ73DXgfq-ngZX_4rNoYZ5XpHEIv-Up14WI-kzItB-WKfbNq6KWwzmKQVfOUAr2keUDZaGzp99helSJw_ruFFMCWk3wcYuS4YLACQNy-PZ96OO-IZM/s1600/DSC_0322.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh0Fbp33KvkAoKLJLjPb13A9qJwDZTJ73DXgfq-ngZX_4rNoYZ5XpHEIv-Up14WI-kzItB-WKfbNq6KWwzmKQVfOUAr2keUDZaGzp99helSJw_ruFFMCWk3wcYuS4YLACQNy-PZ96OO-IZM/s320/DSC_0322.JPG" width="320" /></a></div><a name='more'></a><br />
Obviously because it doesn't run on the 3DS, you will need a an older DS to support flashing the Acekard's firmware. I currently have a DSi and orginal DS, so I opted to update via the DSi version of the flash on my DSi. While running through the update process I kept getting the error "Update is cancelled, reboot DS". This message would normally come up when you press any button to cancel, although I was not pressing any buttons. It seems though that a <a href="http://gbatemp.net/t284784-acekard-2i-3ds-update-firmware?pid=3551329&st=45&#entry3551329">few</a> <a href="http://gbatemp.net/index.php?showtopic=282242">people</a> have had this <a href="http://gbatemp.net/t281327-blank-acekard-icon-on-dsi?&st=0">issue</a>. By the looks of things there is (and has been for some time) an issue with certain revisions of firmware currently on the card already and updating from that with the DSi. The only way to update these cards with certain firmware versions is by using a regular DS or DSlite. Luckily I also have a regular DS. So I updated it with that version of the updater. <br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZi0rxa_-peidnkrj5z-Dn57eJckCkAJURleIUlnE367dOEGo4Glbh6DLA8pbG1ck4iy_REfYfL1ZbyXlS-9tMwpJrfxvyEuAAy74zBnSFJS6MfdIWhctZwn9UlBVbIFW95_WzVfOqLWXb/s1600/DSC_0312.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhZi0rxa_-peidnkrj5z-Dn57eJckCkAJURleIUlnE367dOEGo4Glbh6DLA8pbG1ck4iy_REfYfL1ZbyXlS-9tMwpJrfxvyEuAAy74zBnSFJS6MfdIWhctZwn9UlBVbIFW95_WzVfOqLWXb/s320/DSC_0312.JPG" width="320" /></a></div>Once you have updated, you can enjoy your DS games once more with the Acekard 2i. Have fun :)<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRLP-Aph8nLAK1Yv3EBlX6xTkfeRy0dT7jVMdCJCA6eUHD3I4Gw2oKrh-diZfZFXlvyfcerzu3lYlpyal3iyKIt9d1uIi7sX2Uz9CMwEWBvZorrc4zfoF29Ne4arL6OwMqmGEL9MSoGeby/s1600/DSC_0319.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRLP-Aph8nLAK1Yv3EBlX6xTkfeRy0dT7jVMdCJCA6eUHD3I4Gw2oKrh-diZfZFXlvyfcerzu3lYlpyal3iyKIt9d1uIi7sX2Uz9CMwEWBvZorrc4zfoF29Ne4arL6OwMqmGEL9MSoGeby/s320/DSC_0319.JPG" width="320" /></a></div><br />
If you want directions on how to flash, please see <a href="http://gbatemp.net/t218103-updated-n00b-guide-to-setting-up-your-acekard?">this page</a>.bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-48199630160954366712011-03-31T17:55:00.007+10:002011-03-31T18:07:07.585+10:00Nintendo 3DSI picked up a <a href="http://en.wikipedia.org/wiki/Nintendo_3DS">Nintendo 3DS</a> today at lunchtime on the Australian launch day. I managed to get one without a preorder from JB HiFi on Chapel Street in Melbourne for <a href="http://www.jbhifi.com.au/games/nintendo-3ds-console/">$298AUD</a> with an accessory pack. They didn't have many left so I got quite lucky.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBKsLMub0d6W-hO7kE4MC2cacsWVmXGCEtux_Tu1IEF7tte22W5E93tjCTu__eAS82SsVPGH1fQ0AEFawkRkN-5jh1sgaCLt8veKfkjCQUF7ntlJT5bnSl-sKJZcJdR1UUcglFlaJMm1QI/s1600/DSC_0303s.jpg" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjBKsLMub0d6W-hO7kE4MC2cacsWVmXGCEtux_Tu1IEF7tte22W5E93tjCTu__eAS82SsVPGH1fQ0AEFawkRkN-5jh1sgaCLt8veKfkjCQUF7ntlJT5bnSl-sKJZcJdR1UUcglFlaJMm1QI/s320/DSC_0303s.jpg" width="320" /></a></div><a name='more'></a><br />
The first impressions of using it are quite good. It does indeed have a lot of potential, except it was a bit disapointing that the launch titles were lacking. I did manage to pick up Super Street Fighter 4 3D Edition. I'm not normally a fan of fighting games but this was good fun and the 3D effects fit very well. The game itself is actually very enjoyable and offers a multitude of features that utilise the 3DS's networking capabilities (like <a href="http://www.nintendo3dsinfo.com/the-nintendo-3ds-wireless-features-tag-mode-streetpass/">StreetPass</a>). You do need to rest your eyes after a little while with the 3D on though (maybe I'm just getting old). And the fact that you must remain almost dead center to the screen to keep the 3D effect is something you really have to get used to, but the screen is crisp and easy to look at which makes this easier.<br />
<br />
The built in software is fun to play with and it definitely shows off what the unit is capable of, I am now just looking forward to some real games like <a href="http://nintendo3dsblog.com/new-ocarina-of-time-3d-comparison-screenshots">Legend of Zelda: Ocarina of Time 3D</a>, and the ability to play 3D movies. Until then I should really dig out my old DS games and finish some of them off.<br />
<br />
Nintendo has done a great job, and the 3D effect is fantastic. It's certainly a great upgrade to their DS line of portable consoles.bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-44209263269008945962011-03-16T00:20:00.015+10:002011-05-03T23:41:07.689+10:00KMS Activation With Less than 25 Machines and VMWare ESXiIf you want to use <a href="http://www.microsoft.com/licensing/existing-customers/product-activation.aspx">KMS</a> licencing with less than 25 machines on your network, you will find that you have difficulty doing so as the machines will not activate until you have required count of 25. Sure you could setup some virtual machines to do this, but this takes a fair few resources and can also take a bit of time to copy all of the required images.<br />
<br />
I have found a more simpler solution for the previous technique which can even be scripted to the point where it is all done for you (this guide doesn't automate every step, but you can easily do this for yourself once you get the general idea). All you will need is an installed copy of VMWare's free <a href="http://www.vmware.com/products/vsphere-hypervisor/index.html">ESXi</a> and away you go (assuming that you have the required compatible hardware for ESXi, a KMS licence server and a copy of Windows that you are using). Yes you can still do this with multiple VMs, but this is much more elegant and takes up a lot less space.<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNSnsptjbPjSM4l0xc-bOKuRMk582cfenP7DlNKHjHdMXOI8fmwHryNMCD079YD-nGzlGappHbSwpBKCMOQ7S6Q8DKFY7T_xCvf4Plhpji7MNBmeMbt4FyiVdvncAmPIBs1jGf_Xjix50V/s1600/KMS+Process_thumb.jpg" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="195" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgNSnsptjbPjSM4l0xc-bOKuRMk582cfenP7DlNKHjHdMXOI8fmwHryNMCD079YD-nGzlGappHbSwpBKCMOQ7S6Q8DKFY7T_xCvf4Plhpji7MNBmeMbt4FyiVdvncAmPIBs1jGf_Xjix50V/s320/KMS+Process_thumb.jpg" width="320" /></a></div><div style="text-align: center;"> <span style="font-size: xx-small;"><a href="http://blogs.technet.com/b/education/archive/2009/09/24/key-management-service-volume-license-activation.aspx">Image courtesy Microsoft</a></span></div><a name='more'></a><i><b><br />
</b></i><br />
<br />
<i><b>UPDATE - I have created a followup to this post. Please read, <a href="http://www.freneticrapport.com/2011/05/esxi-automation-kms-post-followup.html">http://www.freneticrapport.com/2011/05/esxi-automation-kms-post-followup.html</a></b></i><br />
Using your installed version of ESXi, create a new VM for the Windows version you want to install. This image does not need many resources, so make it as bare as possible (NIC, 1 CPU, 512MB RAM, DVD-ROM; installing Windows 7 on less than 512MB of RAM under ESXi gives a bluescreen).<br />
<br />
Now do the following:<br />
<ol><li>Install Windowson the new guest you have created.</li>
<li>Once installed and you are at the initial desktop shutdown the machine (when setting up, don't set a password to make things easier in the long run).</li>
<li>Now disconnect the DVD-ROM device from the VM. This will make bootup faster for the snapshotted VMs (as the snapshot also stores the vmx file state).</li>
<li>Now right click the guest and select Snapshot>Take Snapshot<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDvABvbDcHo1T8WSyQ_aF4o1W8uMIEfQ3kGdgHn0v8CU9s7XfvCgXYMkPp-AzgO33838d5MPL0whIIVMRQttLh0_l5yAlHpxPQctyym5t_IQTvJYJWXhy6wm-VCM5YhS45eTNoY7AClAMS/s1600/Outlook8.jpg" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="203" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhDvABvbDcHo1T8WSyQ_aF4o1W8uMIEfQ3kGdgHn0v8CU9s7XfvCgXYMkPp-AzgO33838d5MPL0whIIVMRQttLh0_l5yAlHpxPQctyym5t_IQTvJYJWXhy6wm-VCM5YhS45eTNoY7AClAMS/s320/Outlook8.jpg" width="320" /></a> <br />
<div class="separator" style="clear: both; text-align: center;"></div></li>
<li>Start the machine back up again.</li>
<li>Configure the machine to your liking (I suggest just keeping it close to stock, but maybe installing updates). Be sure to update the ntp settings at this point, as KMS has issues if times are out of sync.</li>
<li>Copy these two scripts to the guest:<br />
<span style="font-size: x-small;"><b style="font-family: "Courier New",Courier,monospace;">Generalise.bat</b><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> </span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">start cmd /c </span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">slmgr /rearm"</span></span><span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">timeout /t 10 /nobreak > NUL</span></span><span style="font-size: x-small;"><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> wmic computersystem where name="%COMPUTERNAME%" call rename name="computer-%random%"</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> shutdown /r /t 0</span><br style="font-family: "Courier New",Courier,monospace;" /><br style="font-family: "Courier New",Courier,monospace;" /><b style="font-family: "Courier New",Courier,monospace;">Activate.bat</b><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">start cmd /c "slmgr.vbs /skms licence-kms:1688"</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">timeout /t 2 /nobreak > NUL</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">start cmd /c "slmgr.vbs /ipk FJ82H-XT6CR-J8D7P-XQJJ2-GPDD4"</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">timeout /t 15 /nobreak > NUL</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">start cmd /c "slmgr.vbs /ato"</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">timeout /t 30 /nobreak > NUL</span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;">shutdown /s /t 0</span></span><br />
<br />
Note: %random% just generates a random number, you can change this to whatever naming convention you like. The key above is the KMS licence key for Windows 7 Pro. <a href="http://technet.microsoft.com/en-us/library/ff793421.aspx">Here</a> are the other KMS licence keys appropriate for your system. You don't have to setup the first line of activate.bat if you have forward and reverse DNS settings for your KMS server setup correctly.</li>
<li>Set the generalise.bat script to start up at next boot (using run once perhaps), and also maybe add a line before shutdown in generalise.bat to add activate.bat to runonce. This is up to you, you can do this manaully if you want. The thing to note is that you want to run generalise first, and then run activate after the reboot.<br />
If you have run out of rearms, change the following key in the registry to 1:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\SoftwareProtectionPlatform] </span><br style="font-family: "Courier New",Courier,monospace;" /><span style="font-family: "Courier New",Courier,monospace;"> "SkipRearm"=dword:00000001 </span></span></li>
<li>Now shutdown the machine.</li>
<li>Create a new snapshot (I called this one configured).</li>
<li>Now create multiple snapshots of this configured machine:<br />
Firstly go into snapshot manager and click the "configured" snapshot and then click "go to". Now create a new snapshot (it will change the "you are here" target to the configured snapshot again;because it changes to the latest snapshot by default). Now this is the important bit, after each snapshot go into snapshot manager, click "configured" and then click "go to". Continue to do this until you have the desired number of dummy machines. You should get something like this:<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLnjC3DpMmwXN1iJ4ubwhvAsbfk5Naar8zHPzGlzLfHO-P8L3uus5lavsYGdpd0pf6slb6uGrPIXxsA23_y26tSfK41SEqI3XlmedaMmq7awF_05_h3cgp6aO9PB1CUzzA3Z_ytJ5wEAUM/s1600/Outlook3.jpg" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="259" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjLnjC3DpMmwXN1iJ4ubwhvAsbfk5Naar8zHPzGlzLfHO-P8L3uus5lavsYGdpd0pf6slb6uGrPIXxsA23_y26tSfK41SEqI3XlmedaMmq7awF_05_h3cgp6aO9PB1CUzzA3Z_ytJ5wEAUM/s320/Outlook3.jpg" width="320" /></a></li>
<li>Now run each image by selecting the snapshot in the snapshop manager and clicking "go to", then starting the VM. Shutdown and snapshot between images. Once you shutdown each image you must snapshot, or your changes will be lost (you will be warned of this). You should get something that looks like this in the snapshot manager:<br />
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwMLKoSe475lG4eU6igTZM8tI39QvjzPdhesvgvhIG2V_-_6mZ-MWZgzM1GhuQEC5QniiRYXJlUeiCoFh2ynx6UxZRyZgLvCkPoodMI64kDr5pDDHRnMxMeBQYWQdBeBm10GWiJCVL2sKZ/s1600/Last+Steps.jpg" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="259" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwMLKoSe475lG4eU6igTZM8tI39QvjzPdhesvgvhIG2V_-_6mZ-MWZgzM1GhuQEC5QniiRYXJlUeiCoFh2ynx6UxZRyZgLvCkPoodMI64kDr5pDDHRnMxMeBQYWQdBeBm10GWiJCVL2sKZ/s320/Last+Steps.jpg" width="320" /></a></li>
</ol><br />
Now watch your count go up on the KMS host (slmgr /dlv) :)<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRMAKMtJLLnpL_yFcXOy0Ec0VBT845vUppQtHU3a9Cn4LvFbxoB3exU1ZNyE3Pg6BVsVkRRT53O3rMmoPGm4-w7wc7MslYGorN8Qqr_TE8E4iLJG0ez_Wac0SYsk5CXi9VCir2Mz08ndle/s1600/Outloo9.jpg" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="220" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRMAKMtJLLnpL_yFcXOy0Ec0VBT845vUppQtHU3a9Cn4LvFbxoB3exU1ZNyE3Pg6BVsVkRRT53O3rMmoPGm4-w7wc7MslYGorN8Qqr_TE8E4iLJG0ez_Wac0SYsk5CXi9VCir2Mz08ndle/s320/Outloo9.jpg" width="320" /></a></div>The proceedure above allows you to reset CMID without running sysprep generalize. This isn't supported by Microsoft and should only be used on the dummy machines. Your actual SOE should run sysprep before rolling out images.<br />
<br />
Note, do not add key until you have snapshoted the config, otherwise you will have the same activation ID as all the machine and your KMS count will not go up.<br />
<br />
All you need to do now is start the machines from each snapshot up once every 180 days. You can automate this with vSphere CLI.bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-80198214629492599192011-03-14T23:17:00.010+10:002011-03-19T12:53:34.055+10:00Australian International Airshow 2011Here are some pics from the <a href="http://www.airshow.net.au/avalon2011/index.html">2011 Australian International Airshow</a>:<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieqODVNp9u3AYemgt3Rf2rOwFQDADJ7bWzJgiAGK6bHalXiItp4GHwZwWrls-qdYGIHWi9OMghTP7V0ih_nIbvWmYFt9RoHEPGEUa4kKtqIE5wLpW6zF5ajFTOxBSmg2KFsD7jbRcnZ-kE/s1600/image014.jpg" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="128" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEieqODVNp9u3AYemgt3Rf2rOwFQDADJ7bWzJgiAGK6bHalXiItp4GHwZwWrls-qdYGIHWi9OMghTP7V0ih_nIbvWmYFt9RoHEPGEUa4kKtqIE5wLpW6zF5ajFTOxBSmg2KFsD7jbRcnZ-kE/s320/image014.jpg" width="320" /></a></div><a name='more'></a><br />
<br />
<embed flashvars="host=picasaweb.google.com&hl=en_US&feat=flashalbum&RGB=0x000000&feed=https%3A%2F%2Fpicasaweb.google.com%2Fdata%2Ffeed%2Fapi%2Fuser%2Fblairbeckers%2Falbumid%2F5583923144706280337%3Falt%3Drss%26kind%3Dphoto%26hl%3Den_US" height="267" pluginspage="http://www.macromedia.com/go/getflashplayer" src="https://picasaweb.google.com/s/c/bin/slideshow.swf" type="application/x-shockwave-flash" width="400"></embed>bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-65017847167235117482011-03-14T22:23:00.003+10:002011-03-19T12:53:17.877+10:00Export KML From Google MapsIt seems Google has removed the ability to download the kml for any maps you edit in Google Maps (the option was called, view in Google Earth). There is a simple solution, just click the "Link" button and select the text in "Paste link in email or IM". Copy this text and past into your adress bar and add &output=kml to the end of the link and press enter.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbjy08UMQiWmj77AXn4pOyhvhc6QPKzENeNDbwvX9mh85X16Ma36U1FC4dSiBO57WJ9NmDKRGK3SE7Ch8FCmOCt3aPuoKM8dwsb1KV69E72qo8zzKzOBq85OU_ojxd0CtpxiVKZMW7dLYY/s1600/Fullscreen+capture+14032011+111903+PM.bmp.jpg" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="206" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjbjy08UMQiWmj77AXn4pOyhvhc6QPKzENeNDbwvX9mh85X16Ma36U1FC4dSiBO57WJ9NmDKRGK3SE7Ch8FCmOCt3aPuoKM8dwsb1KV69E72qo8zzKzOBq85OU_ojxd0CtpxiVKZMW7dLYY/s320/Fullscreen+capture+14032011+111903+PM.bmp.jpg" width="320" /></a></div><br />
<br />
The KML should now download :)bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-40861049467990338182011-03-14T22:09:00.004+10:002011-03-19T12:53:04.257+10:00Samsung TV Overscan and Text Fuzzyness IssuesI recently hooked my PC up to my Samsung TV with a DVI-HDMI cable rather than the VGA cable I was using to allow for audio passthrough. One of the first things I noticed was that the image was overscanning by a fair bit. Now, some Samsung TV have a "Screen Fit" setting under Picture>Picture Options>Size. The only problem with using this option is that the image is for some reason being upsampled by the TV then down sampled again and the text would be a little fuzzy with a light glow around it.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD5zNXFFm2NvWSqyxSNQd_PhOdMp94AOZhgMfa-N-iwZBuNNcBjR8CjHvg8thfJacvxna2cCMPofr6nm7n2RJLt7t6SZDm_Fmt6mZ7KKOLNyThbalwkr1bJt7e_QoJQzMmofNwmRjg-u_h/s1600/DSC_0101.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiD5zNXFFm2NvWSqyxSNQd_PhOdMp94AOZhgMfa-N-iwZBuNNcBjR8CjHvg8thfJacvxna2cCMPofr6nm7n2RJLt7t6SZDm_Fmt6mZ7KKOLNyThbalwkr1bJt7e_QoJQzMmofNwmRjg-u_h/s320/DSC_0101.JPG" width="320" /></a></div><br />
<a name='more'></a><br />
After some fiddling about and researching (most Samsung TVs have this issue) it was found that you must have the HDMI connection to the PC on the HDMI/DVI connection on the TV (usually HDMI 1, see your manual for details) and you should rename the HDMI/DVI source under Input>Edit Name to PC and it will no longer upsample the image (so you no longer have to use the "Screen Fit" option; in fact it is now disabled). If you rename it to "DVI PC", it will also work but I discovered that the HDMI audio passthrough no longer worked, so set it to "PC".<br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwa-HICiXfc3X03uv-1LpLEa2c2MjC6YBPtKbx0CZpKJ9xakODX9LMW8e6DnxLtpcg-GivINPgDovq-HhLAfxnf2wi6t0DmAjWf9ckfTB01cW0rg8WP_fPFUjBxq31sqiRCTpMlmIKACQg/s1600/DSC_0103.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgwa-HICiXfc3X03uv-1LpLEa2c2MjC6YBPtKbx0CZpKJ9xakODX9LMW8e6DnxLtpcg-GivINPgDovq-HhLAfxnf2wi6t0DmAjWf9ckfTB01cW0rg8WP_fPFUjBxq31sqiRCTpMlmIKACQg/s320/DSC_0103.JPG" width="320" /></a></div><br />
Now you can reset the picture settings back to default and all should look nice as well. If you notice your blacks are a little grey, go to Picture>Picture Options and change "HDMI Black Level" to "Low".bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-37002382053502655562011-03-14T21:42:00.002+10:002011-03-19T12:52:48.849+10:00Removing Chewing Gum From Clothes With WD-40I was recently unfortunate enough to wash and dry my clothes with a packet of chewing gum rolled into the mix. This resulted in the, what was thought of at the time, demise of some of my good business shirts.<br />
<br />
This just didn't work with me, and I decided to do a bit of DIY dry cleaning.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOiJ0hY_iMwT6qbl1V5B26L1ZITHxVNm9T114f62CF3riNmKffDCAzh67fQPgLhNAC0EEdIiwM-euq5KouFd3IcvbnTDJPX7zVQApgug6soOchitOMTtGvk5Le7Iy6OljOe2oYLIcRvfwc/s1600/DSC_0098.JPG" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgOiJ0hY_iMwT6qbl1V5B26L1ZITHxVNm9T114f62CF3riNmKffDCAzh67fQPgLhNAC0EEdIiwM-euq5KouFd3IcvbnTDJPX7zVQApgug6soOchitOMTtGvk5Le7Iy6OljOe2oYLIcRvfwc/s320/DSC_0098.JPG" width="212" /></a></div><br />
<a name='more'></a>Firstly you should obtain a can of WD-40 (apparently petrol also works if you are ever so inclinded). Before spraying, make sure to remove as much of the gum with a blunt knife (a non serrated butter knife will do) as possible (putting it in the freezer for a few hours will help if it is still soft).<br />
<br />
Once the area is prepared, spray it with WD-40. After about 30 minutes, the gum should start to disolve and lift out of the fabric. Use the blunt knife again to scrape as much as you can off (be gentle and patient, try not to ruin the fabric with the knife). Spray the fabric again and repeat with the knife. Continue to do this until the gum is completely gone.<br />
<br />
The clothes will now smell quite strong and might still have some oily residue from the gum. A nice long soak will soon have this gone. If you still have oily stains, use a stain remover of your choice.<br />
<br />
Please note, make sure to test on an inconspicuous area first, as some clothes might not handle being treated this way. This has worked for me on cotton and some synthetic shirts, please see a specialist if you cannot afford to damage the garment in any way.bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com8tag:blogger.com,1999:blog-8517468578478710299.post-65066662044044997852010-11-04T22:04:00.003+10:002010-11-04T22:19:10.561+10:00Sony Vegas 9.0c Installation on Windows 7 64bit Issues<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigqQudDTW-Y6QeqK1LtNvK_D0FxpY5GBMVuFronXXkjeron5d_fXOVTu8yoXnw09_fJsbqBDOMV87OQk982jGSf1KR17ylny3szVOZWHiNjkmajQ5ClLruZCcbn9YWxCs5CO7k2XUSfvXu/s1600/vegas.png" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="213" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEigqQudDTW-Y6QeqK1LtNvK_D0FxpY5GBMVuFronXXkjeron5d_fXOVTu8yoXnw09_fJsbqBDOMV87OQk982jGSf1KR17ylny3szVOZWHiNjkmajQ5ClLruZCcbn9YWxCs5CO7k2XUSfvXu/s320/vegas.png" width="320" /></a></div><br />
If you get a "Requirements not met. Press OK to Exit Install." error when trying to install Sony Vegas 9.0c on Windows 7 64bit, and you are certain that you have installed the following:<br />
<a name='more'></a><br />
<a href="http://www.blogger.com/goog_1660745632"></a><br />
<a href="http://www.google.com.au/url?sa=t&source=web&cd=1&sqi=2&ved=0CBgQFjAA&url=http%3A%2F%2Fwww.microsoft.com%2Fdownloads%2Fdetails.aspx%3Ffamilyid%3D32bc1bee-a3f9-4c13-9c99-220b62a191ee&rct=j&q=Microsoft%20Visual%20C%2B%2B%202005%20redistributable&ei=qp_STN2oFIK3cLPJsdMM&usg=AFQjCNF7niPNhiI_1CwfnWF2GIo1jigTug&cad=rja">Microsoft Visual C++ 2005 Redistributable</a><br />
<a href="http://www.microsoft.com/downloads/details.aspx?familyid=a5c84275-3b97-4ab7-a40d-3802b2af5fc2">Microsoft Visual C++ 2008 SP1 Redistributable</a><br />
<a href="http://www.microsoft.com/downloads/details.aspx?familyid=ba9257ca-337f-4b40-8c14-157cfdffee4e">Microsoft Visual C++ 2008 SP1 Redistributable (x64)</a> <br />
<br />
<ol><li>Make sure that you <b>DO NOT</b> press the OK button on the error from the Sony Setup program (if you do, open the installer again and get it to the screen you see above).</li>
<li>Bring up the Run dialog (Windows Key + R) and type the following in it:<span style="font-family: "Courier New",Courier,monospace;"><br />
%TEMP%</span></li>
<li>Press enter.</li>
<li>Find the folder "SonyInstall_1" and open it.</li>
<li>Run vegas90.msi as Administrator and go through the setup as normal.</li>
<li>Once the installation is complete you can now click the OK button on the error box from above.</li>
</ol>Now you can open the program as normal and register :)bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-89973692881379339912010-11-04T19:39:00.002+10:002010-11-04T22:19:05.910+10:00DHCP Issues and Force10 SwitchesIn our environment we use <a href="http://syslinux.zytor.com/wiki/index.php/PXELINUX">PXELINUX</a> and <a href="http://etherboot.org/wiki/index.php">gPXE</a> to NFS and iSCSI boot our diskless Windows and Linux machines respectively. Recently with a new update to our SUSE distributions we came across an issue where the machines would no longer get a secondary DHCP lease before the machine tries to connect to the NFS share and continue booting. Instead it would just time out and fail to boot. As an aside note, this issue seemed to be with a timing change in the dhcpcd binary that is built with the mkinitrd script as replacing it with an older version manually allows this to boot.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR5hf9AwGX8C6eNKC-qs6x84KqtrzlZ6RXFC0hHp89GJs_E7GutXGMRgqQs6HS-zmW39uFo4iZN-M4FGpn4UPs66QOBPBaaWLePnJVaW_ifPMcwpFCQVWfj8bQt2sKX049K2Wl4ofz3Ppq/s1600/0026267353.jpg" rel="lightbox" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="177" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhR5hf9AwGX8C6eNKC-qs6x84KqtrzlZ6RXFC0hHp89GJs_E7GutXGMRgqQs6HS-zmW39uFo4iZN-M4FGpn4UPs66QOBPBaaWLePnJVaW_ifPMcwpFCQVWfj8bQt2sKX049K2Wl4ofz3Ppq/s320/0026267353.jpg" width="320" /></a></div><br />
On certain Windows machines we would also have the same issue when gPXE tries to get it's configuration from a secondary DHCP chainload request (<a href="http://markmail.org/message/afi5vqxif74zzczr">similar to this person's issue</a>), it would also time out and fail to boot. Changing the timings of the gPXE boot scripts overcomes this, but it does indeed add extra time to the boot process.<br />
<br />
The odd thing about both of these problems is that it would only happen on certain hardware configurations and on others it would boot fine.<br />
<a name='more'></a><br />
While doing some <a href="http://www.cisco.com/en/US/products/hw/switches/ps700/products_tech_note09186a00800b1500.shtml">research</a> I discovered that our problems are most certainly coming from the fact that PortFast was not enabled on the ports that were being used for netbooting our machines. After enabling this and doing some testing it was solved and now everything boots quickly.<br />
<br />
Here is how to enable PortFast on a Force10 S Series switch running the latest FTOS:<br />
<br />
<span style="font-family: inherit;">Step 1: Enable STP</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">configure </span><br />
<span style="font-family: "Courier New",Courier,monospace;">protocol spanning-tree 0</span><br />
<span style="font-family: "Courier New",Courier,monospace;">no disable</span><br />
<span style="font-family: "Courier New",Courier,monospace;">exit </span><br />
<br />
<span style="font-family: inherit;">Step 2: Enable portfast on the interface you desire</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">interface gigabitethernet [stackunit]/[port]</span><br />
<span style="font-family: "Courier New",Courier,monospace;">spanning-tree 0 portfast</span><br />
<br />
<span style="font-family: inherit;">Step 3: Check that it is enabled</span><br />
<br />
<span style="font-family: "Courier New",Courier,monospace;">show spanning-tree</span><br />
<br />
Now write the settings to flash and you are done.bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-24484080438664252652010-10-21T20:10:00.004+10:002011-03-14T22:14:33.962+10:00ESXi 4.0 to 4.1 Update Without vCenterWe recently needed to update our ESXi boxes from 4.0 to 4.1 to enable better support for USB devices (in particular flexlm HASP dongles).<br />
<br />
Here are the steps to prepare for the update:<br />
<ol><li>Download vSphere CLI - <a href="http://www.vmware.com/support/developer/vcli/">http://www.vmware.com/support/developer/vcli/</a></li>
<li>Download the update zip - <a href="https://www.vmware.com/tryvmware/p/activate.php?p=free-esxi&lp=1">https://www.vmware.com/tryvmware/p/activate.php?p=free-esxi&lp=1</a> (scroll down to "<span class="btitle">ESXi 4.1 (upgrade ZIP from ESXi 4.0)").</span></li>
<li><span class="btitle">You will also need to download a new version of vSphere Client from <a href="http://vsphereclient.vmware.com/vsphereclient/2/5/8/9/0/2/VMware-viclient-all-4.1.0-258902.exe">http://vsphereclient.vmware.com/vsphereclient/2/5/8/9/0/2/VMware-viclient-all-4.1.0-258902.exe</a></span></li>
<li><span class="btitle">Install the vSphere CLI. </span></li>
</ol><a name='more'></a><br />
Now to update:<br />
<ol><li>First power off all of your virtual machines and then place ESXi into maintenance mode.</li>
<li>Upgrade esxupdate bulletin - open vCLI and change to the \VMWare VSphere CLI\bin folder and type the following:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">vihostupdate.pl --server [hostname/ip] -i -b [fullpath to update .zip] -B ESXi410-GA-esxupdate</span></span><br />
The process should run and state it was complete.</li>
<li>Upgrade bulletin - in the same vCLI window, type the following:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">vihostupdate.pl --server [hostname/ip] -i -b [fullpath to update .zip] -B ESXi410-GA</span></span><br />
The process should run and state it was complete.</li>
<li>Verify the installation by typing the following into the same window:<br />
<span style="font-size: x-small;"><span style="font-family: "Courier New",Courier,monospace;">vihostupdate.pl --server [hostname/ip] -query</span></span></li>
<li>Now reboot the ESXi host.</li>
<li>Now update the vSphere client before reconnecting to the ESXi box. </li>
</ol>One last thing you will now need to do is re-register and get a new serial for the upgraded version, don't worry this is free.<br />
<br />
See the <a href="http://www.vmware.com/support/vsphere4/doc/vsp_esxi41_vc41_rel_notes.html">release notes</a> and the <a href="http://www.vmware.com/pdf/vsphere4/r41/vsp_41_upgrade_guide.pdf">vSphere Upgrade Guide</a> for more info.<br />
<br />
UPDATE:<br />
<br />
If you get the error: "No matching bulletin or VIB was found in the metadata.No Bulletin or VIB found with ID 'ESXi410-GA'" when running:<br />
<br />
vihostupdate.pl --server [hostname/ip] -i -b [fullpath to update .zip] -B ESXi410-GA<br />
<br />
Remove the -B ESXi410-GA option at the end.<br />
<br />
New updated vSphere Client for the current version (4.1 Update 1):<br />
<br />
http://vsphereclient.vmware.com/vsphereclient/3/4/5/0/4/3/VMware-viclient-all-4.1.0-345043.exe<br />
<br />
Release Notes (4.1 Update 1):<br />
<br />
http://www.vmware.com/support/vsphere4/doc/vsp_vc41_u1_rel_notes.htmlbleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0tag:blogger.com,1999:blog-8517468578478710299.post-15873479870001074722010-10-16T17:00:00.002+10:002010-10-17T18:46:47.341+10:00Something So SimpleMy clothes dryer over the last few months has reduced so drastically in efficiency and has constantly been making the most horrible groaning squeak sound. So bad that I would have to close all the doors in the house just so I bear to run it, not to mention that the neighbours must be going insane (I live in an apartment block).<br />
<br />
Well who would have though that after stripping it down into it's fundamental pieces that the sound was coming from a small bearing located at the back of the drum.<br />
<br />
<div class="separator" style="clear: both; text-align: center;"></div><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnawbQnUerGvGNp22hjSRLrtNVJZsxnNhZ39lRyzNsrAAL8m8ZzT9ugXZSZrhdFxNwNx_UzWmjDYllLgDVTqdDFYklnW_R30ktiia3rDxqWJL-myk7yLG-bKP7ZgfseP3ViX7DLrN82yf6/s1600/DSC_0036.jpg" imageanchor="1" rel="lightbox" style="margin-left: 1em; margin-right: 1em;"><img border="0" height="212" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnawbQnUerGvGNp22hjSRLrtNVJZsxnNhZ39lRyzNsrAAL8m8ZzT9ugXZSZrhdFxNwNx_UzWmjDYllLgDVTqdDFYklnW_R30ktiia3rDxqWJL-myk7yLG-bKP7ZgfseP3ViX7DLrN82yf6/s320/DSC_0036.jpg" width="320" /></a></div><a name='more'></a><br />
<br />
Unfortunately you do in fact have strip most of the dryer apart just to access this one little replaceable piece. Once removed and replaced everything was back to normal, and my clothes are drying faster than ever. This whole procedure took me about 25 minutes.<br />
<br />
The reason I am posting such a thing is just to point out that firstly, most things don't need throwing out and can be fixed extraordinarily easily (this is very safe with no risk of electric shock if you unplug the device). Secondly to add to the previous comment, most of us would just throw the dryer out and buy a new one adding to the millions of tonnes of landfill on our planet. This is exactly what the manufacturer wants you to do so you will spend more money on a new one (which is why they design the product to rely on something so small and easily fallible).<br />
<br />
So just before you throw out your broken possessions, take a quick look at it and you might be surprised as to what you can do with it.bleckyhttp://www.blogger.com/profile/14665307597562131328noreply@blogger.com0