<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-1487232898757889665</id><updated>2012-01-15T14:25:09.363-08:00</updated><title type='text'>Ilap's tech</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ilapstech.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ilapstech.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>ilap</name><uri>http://www.blogger.com/profile/01985247399964184068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-1487232898757889665.post-6905311487326004571</id><published>2011-07-03T00:39:00.000-07:00</published><updated>2011-10-14T16:37:51.540-07:00</updated><title type='text'>Downgrade iPhone 3G with no working Home Button from iOS 4.2.1 to 3.1.3</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;span style="color: black; font-size: 130%; font-weight: bold;"&gt;Disclaimer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;First, I take no responsibility for any trouble caused by this info and make no guarantees of any kind.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;So, please be very carefull when you want use any info from this post.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;SO, YOU'RE USING ANY INFO IN THIS POST AT YOUR OWN RISK! &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Let's rock.:)&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Yesterday afternoon I was given an iPhone 3G, unfortunately that phone come /w faulty home button. I thought it will good for my wife or one of my children but /w no home button it's useless as it stucks in the application when the app's activated and there is no way to come out to main screen&lt;br /&gt;&lt;br /&gt;As I did not want spend a cent for a fix I thought a software solution&amp;nbsp; like &lt;a href="http://modmyi.com/cydia/package.php?id=15639"&gt;Activator&lt;/a&gt;&amp;nbsp; or similar should do the trick. But, unfortunately Activator just runs on a jailbroken iPhone. I did not want to get that iPhone jailbroken but had not have any other option as I could not find any similar app in App Store. So, I am a really newbie in this kind of things so started to read the Internet how can it be done.&lt;br /&gt;&lt;br /&gt;After a lot of reads I got more confused as this is not as easy as it looks.&lt;br /&gt;In general there are two type of jailbreaks are exist:&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Tethered (non-permanent, so you need to jailbreak again after power cycle)&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Untethered (permanent)&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;br /&gt;Also there are several jailbreak methods out there but all the methods are  depends on several factors such model, model number, iOS version, modem  FW and so on.&lt;br /&gt;&lt;br /&gt;So, lets start /w the phone specification:&lt;br /&gt;Model: iPhone 3G&lt;br /&gt;Model nr:&amp;nbsp; MB496X &lt;br /&gt;iOS version: 4.2.1 (8C148) &lt;br /&gt;Modem FW: 05.15.04 (Unlocked)&lt;br /&gt;&lt;br /&gt;An iPhone /w iOS 4.2.1 the jailbreak method in general would be the following:&lt;br /&gt;1. Choose the proper jailbreak method&lt;br /&gt;2. Put the iPhone to the &lt;a href="http://theiphonewiki.com/wiki/index.php?title=DFU_Mode"&gt;DFU (Device Firmware Upgrade) mode&lt;/a&gt;.&lt;br /&gt;3. Jailbrake it.&lt;br /&gt;&lt;br /&gt;In brief, the DFU or Device Firmware Upgrade mode allows all devices to be restored from any state.&lt;br /&gt;&amp;nbsp;The DFU is a big problem as you might be know that to put an iPhone into the  DFU mode you need to use the Sleep/Power and the Home button together.&lt;br /&gt;There is no way to put my iPhone to DFU with the method above.&lt;br /&gt;So, tried to find some other methods and just tow of them came up as a possible solution: &lt;br /&gt;1. &lt;a href="http://jaxov.com/2011/02/put-your-iphone-in-dfu-mode-without-home-power-button-with-last-dfu/"&gt;LAST DFU Software&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://theiphonewiki.com/wiki/index.php?title=DFU_Mode#Alternative_Method"&gt;True Hardware DFU Mode Automatically&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately the LAST DFU does not work /w my 3G iOS 4.2.1 and it's always entering to &lt;a href="http://theiphonewiki.com/wiki/index.php?title=Recovery_Mode_%28Protocols%29"&gt;Recovery Mode&lt;/a&gt; instead of DFU mode. I think it's a known issue /w this latest iOS.&lt;br /&gt;&lt;br /&gt;Anyway, on some older iOSes (3.1.2, 3.1.3, 3.2 and some others), some untethered jailbreaks (like &lt;a href="http://theiphonewiki.com/wiki/index.php?title=Spirit"&gt;Spirit&lt;/a&gt;) can be very smooth as the iPhone not needs to be entered into DFU mode to get it JB-d.&amp;nbsp; See details for the vulnerability of iPhone, iPhone 3G and iPhone touch (NOT for iPhone 3GS and iPod Touch 2G): http://theiphonewiki.com/wiki/index.php?title=S5L8900&lt;br /&gt;&lt;br /&gt;So, if I can get the DFU mode somehow why do not downgrade the phone to some old original iOS and try some or more untethered and non-DFU methods instead of the slow and risky HW DFU Mode and jailbrake on the current 4.2.1 iOS every time when I fail? In that case I just need enter to DFU once, restore it to an official iOS and try the user-space method anytime I want. &lt;br /&gt;&lt;br /&gt;So, I thought that my steps would be the following:&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Download the official iPhone 3G 3.1.3 and iPhone 3G 4.2.1 IPSW files &lt;/li&gt;&lt;li&gt;Put iPhone into DFU mode&lt;/li&gt;&lt;li&gt;Restore it /w an official iOS 3.1.3 using iTunes &lt;/li&gt;&lt;li&gt;Kicks the iPhone out of Restore Mode loop after it's upgraded using &lt;a href="http://jaxov.com/2011/02/download-recboot-2-2-compatible-with-mac-10-5/"&gt;RecBoot&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Do some user-space (non-DFU mode) jailbreak /w &lt;a href="http://theiphonewiki.com/wiki/index.php?title=Spirit"&gt;Spirit&lt;/a&gt;&lt;/li&gt;&lt;li&gt;Install Activator /w Cydia and reassign the Home Button to Sleep/Power or Volume button.&lt;/li&gt;&lt;/ol&gt;&lt;div style="color: red; text-align: justify;"&gt;&lt;b&gt;Please be advised that this procedure will destroy all of your stored data and installed Apps as the 4.2.1 iOS backup is not compatible /w downgraded 3.1.3 iOS.&lt;/b&gt;&lt;/div&gt;&lt;div style="color: red; text-align: justify;"&gt;&lt;b&gt; THEREFORE YOU WONT BE ABLE TO RESTORE YOUR STORED DATA FROM A BACKUP.&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;I did not matter for me as I did not have any stored data there, but maybe somebody has a bunch of app installed and songs purchased.&lt;br /&gt;So, please consider the above before proceed as I do not know how should you get the data back.&lt;br /&gt;&lt;br /&gt;I have the &lt;b&gt;Mac OS X 10.6.8 /w iTunes 10.2.2 &lt;/b&gt;installed on my  MacBook Pro, which is hardly booted as I use Ubuntu instead, but we need  to do the following on a Mac OS X as I do not have any Windows PC to test it and the iTunes is not installed in my Ubuntu.&lt;br /&gt;&lt;br /&gt;You need to download the following apps/files:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://jaxov.com/2011/02/download-recboot-2-2-compatible-with-mac-10-5/"&gt;RecBoot v2.2 for Mac OS X&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://spiritjb.com/mac"&gt;Spirit v1.0.1 for Mac OS X&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.felixbruns.de/iPod/firmware/"&gt;the original 4.2.1 IPSW (~340MB)&lt;/a&gt; and&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.felixbruns.de/iPod/firmware/"&gt;the original 3.1.3 IPSW file (~240MB)&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Download the original iPhone 3G 3.1.3 and iPhone 3G 4.2.1 IPSW files &lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I downloaded these two original IPSWs (IPhone SoftWare) from this &lt;a href="http://www.felixbruns.de/iPod/firmware/"&gt;link&lt;/a&gt;.&lt;br /&gt;The 3.1.3 is the target iOS version on my iPhone and the 4.2.1 needs for trying to put my iPhone onto DFU mode as it needs to be on the same or above version as the current one as Apple does not allow to downgrade any iDevice (iPod, Iphone and iPad) from the installed version.&lt;br /&gt;So, after I downloaded them I did the following steps.&lt;br /&gt;The following command must be typed in a terminal.&lt;br /&gt;In Mac OS X, the terminal application can be found under Utility, so click Application (in Finder) and then Utility and Terminal.&lt;br /&gt;A cmd like window will appear and you can start typing the following:&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;$ &lt;b&gt;cd&amp;nbsp; ~&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;$ &lt;b&gt;mkdir IPSW&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;$ &lt;b&gt;mv Download/iPhone*ipsw IPSW&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;$ &lt;b&gt;cd IPSW&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;$ &lt;b&gt;ls -rtl&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;-rw-r--r-- 1 ilap ilap 239139281 2011-07-02 15:32 &lt;b&gt;iPhone1,2_3.1.3_7E18_Restore.ipsw&lt;/b&gt;&lt;br /&gt;-rw-r--r-- 1 ilap ilap 338579563 2011-07-02 16:00 &lt;b&gt;iPhone1,2_4.2.1_8C148_Restore.ipsw&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Put iPhone into DFU mode&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I read several articles and some of the tries were successful and some were not. I am certain that if somebody is doing the following steps on the same type of iPhone 3G /w the same specification I have then it will success.&lt;br /&gt;&lt;br /&gt;This trick is based on an official Restore for iPhone 3G using an actual or newer version official IPSW file which is corrupted/modified to do the trick.&lt;br /&gt;&lt;br /&gt;The IPSW files are just a zipped files, so we just need:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;unzip the IPSW,&amp;nbsp;&lt;/li&gt;&lt;li&gt;modify some file of the unpacked ones,&lt;/li&gt;&lt;li&gt;repack the IPSW /w the modified file and&lt;/li&gt;&lt;li&gt;do an iTunes Restore /w this corrupted file.&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size: small;"&gt;And hopefully during the Restore process (at least at the end of that) the iPhone will stuck in the DFU mode and we can do an Official FW Restore process /w the official 3.1.3 IPSW file. As I told the iTunes cannot do a downgrade in Restore Mode as it check that /whihc version of the iOS is currently installed on the iPhone, but in DFU mode there is no any iOS is installed (as it's&amp;nbsp; completely failed) therefore we can install any officially supported IPSW files in it.&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;At the end of downgrade process the iTunes come up /w an 1015 error and will left the iPhone on the Recovery Mode loop, but it can be easily kick out of this mode using Recboot v2.2 MAC OS X or similar.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;So, lets get down to busines:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt; 1. Corrupt the IPSW&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;cd ~/IPSWs&lt;/b&gt; # To the downloaded files&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;ls - iP*&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;-rw-r--r-- 1 ilap ilap 338579762 2011-07-01 22:40 iPhone1,2_4.2.1_8C148_Restore.ipsw&lt;br /&gt;-rw-r--r-- 1 ilap ilap 239139281 2011-07-02 15:32 iPhone1,2_3.1.3_7E18_Restore.ipsw&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$&lt;b&gt; cksum *&lt;/b&gt;&lt;br /&gt;1805666746 239139281 iPhone1,2_3.1.3_7E18_Restore.ipsw&lt;br /&gt;1672942545 338579762 iPhone1,2_4.2.1_8C148_Restore.ipsw&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Save the original for later check&lt;b&gt; &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;mkdir orig&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;cp -pr &lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;iPhone1,2_4.2.1_8C148_Restore.ipsw orig&lt;/b&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Check the files&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;unzip -tq iPhone1,2_4.2.1_8C148_Restore.ipsw&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;No errors detected in compressed data of iPhone1,2_4.2.1_8C148_Restore.ipsw.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;unzip -lqq iPhone1,2_4.2.1_8C148_Restore.ipsw&amp;nbsp; */LLB*img3&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;68980&amp;nbsp; 2010-10-12 17:52&amp;nbsp;&amp;nbsp; Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3&lt;br /&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;unzip -l iPhone1,2_4.2.1_8C148_Restore.ipsw&amp;nbsp; */LLB*img3&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;Archive:&amp;nbsp; iPhone1,2_4.2.1_8C148_Restore.ipsw&lt;br /&gt;&amp;nbsp; Length&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date&amp;nbsp;&amp;nbsp;&amp;nbsp; Time&amp;nbsp;&amp;nbsp;&amp;nbsp; Name&lt;br /&gt;---------&amp;nbsp; ---------- -----&amp;nbsp;&amp;nbsp; ----&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;68980&amp;nbsp; 2010-10-12 17:52&amp;nbsp;&amp;nbsp; Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3&lt;br /&gt;---------&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -------&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 68980&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1 file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Extract the LLB file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;# &lt;b&gt;unzip -x iPhone1,2_4.2.1_8C148_Restore.ipsw&amp;nbsp; */LLB*img3&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;Archive:&amp;nbsp; iPhone1,2_4.2.1_8C148_Restore.ipsw&lt;br /&gt;&amp;nbsp; inflating: Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Copy the LLB file for later check&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;ls -rtl Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;-rw-r--r-- 1 ilap ilap 68980 2010-10-12 17:52 Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;cksum Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt;1912212578 68980 Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3&lt;/span&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;cp &lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt; Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3 orig.IPSW&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/span&gt; &lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Corrupt some part of that file (some random bytes on offset 0x240)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;This below is a one line command and not two lines.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Also, the conv=notrunc is mandatory to prevent the file shrinking after write.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;# &lt;b&gt;dd if=/dev/urandom of=Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3 bs=16 count=10 seek=36 conv=notrunc&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;10+0 records in&lt;br /&gt;10+0 records out&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;ls -lrt Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3 orig.IPSW&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;-rw-r--r-- 1 ilap ilap 68980 2011-07-02 15:55 orig.IPSW&lt;br /&gt;-rw-r--r-- 1 ilap ilap 68980 2011-07-02 15:55 Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;cksum&amp;nbsp; Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3 orig.IPSW&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;1753812497 68980 Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3&lt;br /&gt;1912212578 68980 orig.IPSW &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;As you can see above the sizes are same but cksum, which is fine&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;Repack the corrupted file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;zip -fv iPhone1,2_4.2.1_8C148_Restore.ipsw Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;freshening: Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; zip warning: Local Entry CRC does not match CD: Firmware/all_flash/all_flash.n82ap.production/LLB.n82ap.RELEASE.img3&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (in=68980) (out=42523) (deflated 38%)&lt;br /&gt;total bytes=338820395, compressed=338574217 -&amp;gt; 0% savings&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;Compare the orig and the corrupte IPSW file&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;ls -lrt iPhone1,2_4.2.1_8C148_Restore.ipsw orig/iPhone1,2_4.2.1_8C148_Restore.ipsw&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt; &lt;/b&gt;-rw-r--r-- 1 ilap ilap 338579762 2011-07-01 22:40 orig/iPhone1,2_4.2.1_8C148_Restore.ipsw&lt;br /&gt;-rw-r--r-- 1 ilap ilap 338579563 2011-07-02 16:00 iPhone1,2_4.2.1_8C148_Restore.ipsw&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;$ &lt;b&gt;cksum iPhone1,2_4.2.1_8C148_Restore.ipsw ../Orig/iPhone1,2_4.2.1_8C148_Restore.ipsw&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt; &lt;/b&gt;3489769154 338579563 iPhone1,2_4.2.1_8C148_Restore.ipsw&lt;br /&gt;1672942545 338579762 orig/iPhone1,2_4.2.1_8C148_Restore.ipsw&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Restore it /w an official iOS 3.1.3 using iTunes&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So, start the restore proceduer as usual:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Fully charge the iPhone &amp;nbsp; &lt;/li&gt;&lt;li&gt;Power off the iPhone (slide to power off)&lt;/li&gt;&lt;li&gt;Connect the iPhone to the PC using USB cable &lt;/li&gt;&lt;li&gt;Power on the iPhone&lt;/li&gt;&lt;li&gt;if iTunes does not launch when the phone is ready start the iTunes&lt;/li&gt;&lt;li&gt;Select your iDevice in the left Tree of iTunes&lt;/li&gt;&lt;li&gt;Wait for syncing and backup, when it's done&lt;/li&gt;&lt;li&gt;Press ALT and click to Restore&lt;/li&gt;&lt;li&gt;An Open Filed Dialog will be appeared and choose the corrupted IPSW (IPSW/&lt;span style="font-size: small;"&gt;iPhone1,2_4.2.1_8C148_Restore.ipsw)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;Click OK and the restore is started.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size: small;"&gt;It will start the Restore process as usual and put the phone to Restore Mode (an Apple logo in the middle and a progress bar below that), so It will crash at some stage (about 5 minutes later) close to the end of Restore, and the iTunes will come up /w error (error 37), and the phone will stuck /w black screen (this means it stuck in the DFU mode, Hoooooraaaay).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;So, we can start the REAL restore /w the official iOS 3.1.3 file.&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Close iTunes&lt;/li&gt;&lt;li&gt;Unplug the phone from computer&lt;/li&gt;&lt;li&gt;Start iTunes&lt;/li&gt;&lt;li&gt;Plug the phone back to computer&lt;/li&gt;&lt;li&gt;Press ALT and click to Restore and choose the &lt;span style="font-size: small;"&gt;file&lt;/span&gt;&lt;/li&gt;&lt;li&gt;An Open Filed Dialog will be appeared and choose the official IPSW (IPSW/&lt;span style="font-size: small;"&gt;iPhone1,2_3.1.3_7E18_Restore.ipsw&lt;/span&gt;&lt;span style="font-size: small;"&gt;)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;Click OK.&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;It will start the Restore process as usual and put the  phone to Restore Mode (an Apple logo in the middle and a progress bar  below that).&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;At the end of the Restore the iTunes come up /w the Error 1015 and the phone will entered the Recovery Mode loop (an USB cable and an iTunes icon).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Kicks the iPhone out of Restore Mode loop after it's upgraded using &lt;a href="http://jaxov.com/2011/02/download-recboot-2-2-compatible-with-mac-10-5/"&gt;RecBoot&lt;/a&gt;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;That's error message above is normal, so we just need the phone kicked out form that Recovery Mode loop which can be done with RecBoot. It's simple just download it and start it and it would say that a "Recovery Device Connected" and just click to Exit Recovery and wait until your iPhone is booted.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;So, that's all. If everything went smooth than you have an iPhone with official 3.1.3 iOS installed.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt; &lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Do some user-space (non-DFU mode) jailbreak /w &lt;a href="http://theiphonewiki.com/wiki/index.php?title=Spirit"&gt;Spirit&lt;/a&gt;&amp;nbsp;&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So, it's as easy as the RecBoot was previously, just download it from the link in this post and click to "Jailbreak" button and wait until it's doing his job.&lt;br /&gt;&amp;nbsp;Install Activator /w Cydia and reassign the Home Button to Sleep/Power or Volume button.&lt;br /&gt;&lt;br /&gt;When your phone is jailbreked, you can find the Cydia icon. Click to that icon and will do some package updates and some other stuffs.&lt;br /&gt;When it's done you can search for Activator in the Cydia repository and install.&lt;br /&gt;After it's installed you could find an Activator menu in the bottom of global Settings (main scrren Settings button). So, what I did:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Click to Settings on the iPhone's main screen&lt;/li&gt;&lt;li&gt;Find and Click to the Activator at the bottom of the Settings page&lt;/li&gt;&lt;li&gt;Click to the Anywhere&lt;/li&gt;&lt;li&gt;Scrolled down to the "Volume Buttons" and&amp;nbsp;&lt;/li&gt;&lt;li&gt;Clicked to "Down Short Hold"&lt;/li&gt;&lt;li&gt;Scrolled down to "System Actions" and select Home Button&lt;/li&gt;&lt;/ul&gt;Ind this case the Home Button will be assigned to the Short Hold on the Down Volume Button. From this point if you push down the volume button for short time (1-2sec) and release it, it will trigger a Home Button push, which is what I just wanted.&lt;br /&gt;&lt;br /&gt;&lt;div style="color: red;"&gt;NOTE: During the Cydia update my iPhone's frozen just one circle was on the middle of screen which was just circling. After ten minutes I tried to power off the phone, but I could not as the Power button was inresponsive. I tried to do a soft reset (hold the power button for a while) but no success. So, I just started the RecBoot and clicked to the Enter Recovery mode button, as soon as I clicked the iPhone, it's rebooted and entered into the Recovery Mode (iTunes icon and an USB cable sign). I waited a bit replugged the iPhone, startent the Recboot and clicked to the "Exit Recovery". After this the iPhone is rebotted as normal.&lt;/div&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: large;"&gt;Conclusion&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The phone is working properly /w this settings and have not observed any problems issues /w it. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1487232898757889665-6905311487326004571?l=ilapstech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ilapstech.blogspot.com/feeds/6905311487326004571/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ilapstech.blogspot.com/2011/07/downgrade-iphone-3g-with-no-working.html#comment-form' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/6905311487326004571'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/6905311487326004571'/><link rel='alternate' type='text/html' href='http://ilapstech.blogspot.com/2011/07/downgrade-iphone-3g-with-no-working.html' title='Downgrade iPhone 3G with no working Home Button from iOS 4.2.1 to 3.1.3'/><author><name>ilap</name><uri>http://www.blogger.com/profile/01985247399964184068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1487232898757889665.post-8700733594095230061</id><published>2010-10-09T17:42:00.000-07:00</published><updated>2011-04-26T00:05:41.186-07:00</updated><title type='text'>Galaxy Live Wallpaper like Compiz plugin for Ubuntu 10.10 (Maverick Meerkat)</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I think I do not need to introduce the live wallpapers of Android and you guys should know everything about it.&lt;br /&gt;It was a love at first sight when I read about it in the &lt;a href="http://www.curious-creature.org/2010/01/07/nexus-one-live-wallpapers/"&gt;Nexus One live wallpapers&lt;/a&gt; post.&lt;br /&gt;Especially the Galaxy Live Wallpaper was my favorite one.&lt;br /&gt;I thought that would be very nice if somebody could implement the Live Wallpapers or at least the Galaxy Live Wallpaper in the upcoming Ubuntu Maverick (10.10) somehow.&lt;br /&gt;But, there was a big silence in the Internet, so I had no option but to try to create some similar program if I want to see it in my Ubuntu (10.10) desktop.&lt;br /&gt;&lt;br /&gt;As the Compiz is available in almost all of the Linux distros and has a plugin framework, therefore I thought that would be great if I could implement some similar as a Compiz plugin. To tell the truth, when I started this project I had no any experience in OpenGL and Compiz plugin programming.&lt;br /&gt;Fortunately, I finally managed to create that plugin for my Ubuntu 10.10 Desktop. I created a screenshot, see below, to show you how it looks like.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_PTgFX7z9gyI/TK3c8ejxVpI/AAAAAAAADGo/sMr53HEPFRc/s1600/Galaxy.png" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/_PTgFX7z9gyI/TK3c8ejxVpI/AAAAAAAADGo/sMr53HEPFRc/s320/Galaxy.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;My aim was to release this plugin by 10 of October, 2010 (10.10.10) the  release date of the Ubuntu 10.10 (Maverick Meerkat), and it seems that I  have achieved it.&lt;br /&gt;I have also created and uploaded a short desktop video to Youtube (see below the embeded video) to show you all what to expect from it. Unfortunately, it is very low quality one, but should enough.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;object height="288" width="360"&gt;&lt;param name="movie" value="http://www.youtube.com/v/ISv9_2TfaeA?fs=1&amp;amp;hl=en_US"&gt;&lt;/param&gt;&lt;param name="allowFullScreen" value="true"&gt;&lt;/param&gt;&lt;param name="allowscriptaccess" value="always"&gt;&lt;/param&gt;&lt;embed src="http://www.youtube.com/v/ISv9_2TfaeA?fs=1&amp;amp;hl=en_US" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="360" height="288"&gt;&lt;/embed&gt;&lt;/object&gt;&lt;/div&gt;&lt;br /&gt;I have uploaded the &lt;a href="https://code.launchpad.net/compiz-plugins-livewallpapers"&gt;source code&lt;/a&gt; to Launchpad for the brave and a PPA package (ppa:ilap/lwp) to easy install for the lazy ones. &lt;br /&gt;One of the most missing part of the source code is the CREDITS file, where I am  going to put on all of the people name who inspired me to get this done.&lt;br /&gt;And please consider that is my first Compiz plugin/OpenGL app therefore it could be full of bugs and hidden sprites.:)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;To tell the truth, I do not know whether it will work on your system or not, as I have not had any chance to test it in some other notebooks/PCs, but it works very well on my notebook.:) .&lt;br /&gt;When the Galaxy is enabled, the compiz just uses about 8% of CPU resources on my 2.80GHz Core2 Duo notebook.&lt;br /&gt;&lt;br /&gt;So, here comes some brief information about my system and if you have some similar then it should work on your one too.&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;$ &lt;b&gt;grep model\ n /proc/cpuinfo&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;model name&amp;nbsp;&amp;nbsp;&amp;nbsp; : Intel(R) Core(TM)2 Duo CPU&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; T9600&amp;nbsp; @ 2.80GHz&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;model name&amp;nbsp;&amp;nbsp;&amp;nbsp; : Intel(R) Core(TM)2 Duo CPU&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; T9600&amp;nbsp; @ 2.80GHz&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;$ &lt;b&gt;glxinfo | grep -i render&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;direct rendering: Yes&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;OpenGL renderer string: Mesa DRI Mobile&lt;b style="color: red;"&gt; Intel® GM45&lt;/b&gt; Express Chipset GEM 20100330 DEVELOPMENT x86/MMX/SSE2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;$ &lt;b&gt;glxinfo | grep version&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;server glx version string: 1.4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;client glx version string: 1.4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;GLX version: 1.4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;OpenGL version string:&lt;b style="color: red;"&gt; 2.1 Mesa 7.9-devel&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: x-small;"&gt;OpenGL shading language version string: 1.20&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So, this VGA chipset, which is relative new, supports OpenGL 2.0. I would say if your chipset supports OpenGL 2.0 (and some extensions) then it should work properly. If it does not support then the plugin can be very slow as some GL hardware function will be passed to the software renderer.&lt;br /&gt;So, in that case you should expect that compiz will use at least 90% of CPU and provide just 2-3FPS.:) I think this can be fixed by some advice come from some&amp;nbsp; high-experienced OpenGL/Compiz plugin programmers as I am not one of them.:) &lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: large;"&gt;&lt;b&gt;Install and use&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The installation should be relative easy task, just follow the steps below.&lt;br /&gt;BUT, keep in mind this plugin is created for Ubuntu 10.10 (Maverick Meerkat) and should NOT work in the previous releases:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step one: Install the plugin&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Add my PPA to the repository.&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; $ &lt;b&gt;sudo add-apt-repository ppa:ilap/lwp&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; $ &lt;b&gt;sudo apt-get update&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. Install the package&lt;br /&gt;I named it compiz-plugins-livewallpapers as my aim is to make my source/PPA as a container for the LiveWallpapers like plugins.&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;span style="font-size: small;"&gt;&amp;nbsp; $ &lt;b&gt;sudo apt-get install compiz-plugins-livewallpapers compizconfig-settings-manager&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If somebody decided to install it from the source he/she should follow the following steps:&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; $ &lt;b&gt;bzr branch lp:compiz-plugins-livewallpapers&lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; $ &lt;b&gt;cd &lt;/b&gt;&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;compiz-plugins-livewallpapers&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; $ &lt;b&gt;sudo apt-get install &lt;/b&gt;`&lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;grep "Build-Depends" debian/control&amp;nbsp; | \&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&lt;b&gt;sed -e 's@^.*: @@' -e 's@([^(]*)@@g' -e 's@,@@g'`&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; $ &lt;b&gt;./autogen.sh&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; $ &lt;b&gt;./configure --prefix=/usr&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: small;"&gt;&amp;nbsp;&amp;nbsp; $&lt;b&gt; make &amp;amp;&amp;amp; sudo make install&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Step two: Configure the plugin&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You need to change your Desktop background to my installed background one.&lt;br /&gt;Right click on the Desktop -&amp;gt; Change Desktop Background -&amp;gt; click to "Add" button -&amp;gt; &lt;br /&gt;type "/usr/share/backgrounds" to "Location" field -&amp;gt; Press ENTER -&amp;gt; select Space_by_ilap.jpg &lt;br /&gt;-&amp;gt; click to "Open" button -&amp;gt; click "Close" button&lt;br /&gt;&lt;br /&gt;After the background is changed you need to enable (if it's not already enabled by the install process) the "Galaxy Live Wallpaper" plugin:&lt;br /&gt;Gnome Panel -&amp;gt; Systems -&amp;gt; Preferences -&amp;gt; CompizConfig Settings Manager&lt;br /&gt;The ccsm window will appear and you can see on the left a new category called "Live Wallpapers".&lt;br /&gt;&lt;br /&gt;Click on the "Live Wallpapers" category on the left.&lt;br /&gt;Enable Galaxy Live Wallpaper&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: small;"&gt;Step three: Toggle it&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Just press "&lt;b&gt;Super&lt;/b&gt;" (Windows logo button) and &lt;b&gt;F4&lt;/b&gt; buttons to toggle it on or off. &lt;br /&gt;If you are lucky then enjoy, if you are not then ask for help...&lt;br /&gt;&lt;br /&gt;So, good luck and have fun...&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1487232898757889665-8700733594095230061?l=ilapstech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ilapstech.blogspot.com/feeds/8700733594095230061/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ilapstech.blogspot.com/2010/10/galaxy-live-wallpaper-like-compiz.html#comment-form' title='103 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/8700733594095230061'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/8700733594095230061'/><link rel='alternate' type='text/html' href='http://ilapstech.blogspot.com/2010/10/galaxy-live-wallpaper-like-compiz.html' title='Galaxy Live Wallpaper like Compiz plugin for Ubuntu 10.10 (Maverick Meerkat)'/><author><name>ilap</name><uri>http://www.blogger.com/profile/01985247399964184068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_PTgFX7z9gyI/TK3c8ejxVpI/AAAAAAAADGo/sMr53HEPFRc/s72-c/Galaxy.png' height='72' width='72'/><thr:total>103</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1487232898757889665.post-6381847934180857682</id><published>2010-07-05T06:13:00.000-07:00</published><updated>2010-07-21T19:36:03.211-07:00</updated><title type='text'>I hate Monster (Apple) Inc.</title><content type='html'>I hate Apple Inc. inspite of I love some of its products (Mac OS X, Macbooks, Mac Mini etc. etc.) as those and some other stuffs/gadgets are of good quality and so on, &lt;span style="font-weight: bold;"&gt;BUT&lt;/span&gt;, &lt;a href="http://www.engadget.com/2010/04/08/apple-granted-design-patent-on-cover-flow/"&gt;I have just read that the Apple was granted&lt;/a&gt; a &lt;a href="http://patft.uspto.gov/netacgi/nph-Parser?patentnumber=D613,300."&gt;patent&lt;/a&gt; on the Cover Flow interface.&lt;br /&gt;I did not know that this patent was handed at all and am a bit confused as the 1st reference to the Cover-Flow-Like UI is back to 29th of December in 2004, but on that time that page and its contents was covered by Creative Common 2.0 NC-SA. Anyway, I am not a license guy at all just wondering how come that the Apple could granted that patent. Also as I remember that I saw a bunch of Cover-Flow-Like works in the past, which was related to Java 2D/3D.&lt;br /&gt;Anyway, here comes the info I could find in the Net. Of course, I can be wrong but this mess should be cleaned by someone.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;1. 29th of December in 2004: &lt;/span&gt;Initial thoughts (Common Creative 2.0 BY-NC-SA)&lt;br /&gt;All of my respect for the author...&lt;br /&gt;Reference: &lt;a href="http://web.archive.org/web/20051225123312/thetreehouseandthecave.blogspot.com/2004/12/dissatisfaction-sows-innovation.html"&gt;Dissatisfaction Sows Innovation&lt;/a&gt;. Keep in mind it was a mockup and not a real app.&lt;br /&gt;Picture:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos1.flickr.com/2667156_fac8b90f4b_o.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 304px; height: 304px;" src="http://photos1.flickr.com/2667156_fac8b90f4b_o.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;2. 26th of June in 2005&lt;/span&gt;: Joplin made its debut at "NetBeans Day", at JavaOne 2005&lt;br /&gt;Reference: &lt;a href="https://joplin.dev.java.net/"&gt;Joplin MP3 Player&lt;/a&gt; and it has an LGPL license.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;3. 1st of July in 2005&lt;/span&gt;: &lt;a href="http://www.curious-creature.org/2005/07/01/joplin/"&gt;Joplin blog  post&lt;/a&gt;&lt;br /&gt;Picture:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.javadesktop.org/images/joplin.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 327px; height: 353px;" src="http://www.javadesktop.org/images/joplin.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;4. July 7th, 2005:&lt;/span&gt; &lt;a href="http://www.jroller.com/gfx/entry/3d_effect_with_java2d"&gt;3D Effect with Java2D?&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;Keep  in mind in this post was the 1st reference that this demo (CDShell) was run in a Mobile phone (Motorola e680) in that time (2005)&lt;/span&gt;. So, iPhone CoverFlow????&lt;br /&gt;Picture:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://jext.free.fr/mobile1.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 234px; height: 295px;" src="http://jext.free.fr/mobile1.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. July 09, 2005&lt;/span&gt;:&lt;a href="http://www.jroller.com/page/gfx/?anchor=a_music_shelf_in_java2d" rel="bookmark"&gt;A Music Shelf in Java2D&lt;/a&gt;.&lt;br /&gt;Picture:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.progx.org/users/Gfx/cdshelf01_small.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 225px;" src="http://www.progx.org/users/Gfx/cdshelf01_small.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;5. August 13th, 2005&lt;/span&gt;: &lt;a href="http://web.archive.org/web/20051218195318/http://thetreehouseandthecave.blogspot.com/2005/08/meet-coverflow.html"&gt;An independent Mac OSX developer created the CoverFlow App&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;This is the initial version of that app which was purchased by Apple Inc.  on ~11th of September in 2006&lt;/span&gt;&lt;br /&gt;Picture:&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://photos23.flickr.com/33631485_51bda79213_o.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 606px; height: 606px;" src="http://photos23.flickr.com/33631485_51bda79213_o.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;6:  09th of November in 2005&lt;/span&gt;:  &lt;a href="http://www.jroller.com/gfx/entry/sneak_preview_of_next_demo"&gt;Sneak Preview of Next Demo&lt;/a&gt;&lt;br /&gt;&lt;a href="http://jext.free.fr/twinkle.avi"&gt;XVID Video&lt;/a&gt; and Picture&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://jext.free.fr/twinkle_small.png"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 400px; height: 314px;" src="http://jext.free.fr/twinkle_small.png" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;7. 11th of September in 2006&lt;/span&gt;:  Cover Flow and all of the Andrew Coulter Enright's IP related to the  idea were purchased by Apple Inc. and CoverFlow was integrated into  iTunes 7.0&lt;br /&gt;Picture:&lt;br /&gt;&lt;a onblur="try  {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://www.blogcdn.com/www.tuaw.com/media/2006/09/itunes7.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 425px; height: 302px;" src="http://www.blogcdn.com/www.tuaw.com/media/2006/09/itunes7.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;span style="font-weight: bold;"&gt;8: 28th of June in 2007&lt;/span&gt;: Patent filed&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;9: 28th of April in 2010&lt;/span&gt;: &lt;a href="http://patft.uspto.gov/netacgi/nph-Parser?patentnumber=D613,300."&gt;Patent granted&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center; font-weight: bold;"&gt;&lt;span style="font-size:180%;"&gt;&lt;br /&gt;And finally, back to the past.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;div style="text-align: left; font-weight: normal;"&gt;I was very keen on the Sun's Project looking glass (See pictures below) in late 2003 and early 2004, whihc was &lt;a href="http://javadesktop.org/articles/LookingGlass/index.html"&gt;released under GPL v2.0 on 30th of June in 2004&lt;/a&gt;.&lt;br /&gt;Ooooh, Does the &lt;a href="http://www.engadget.com/2007/06/12/leopard-dock-resembles-suns-project-looking-glass/"&gt;Dock seem to be similar with the Apple Leopard's one&lt;/a&gt;?&lt;br /&gt;When do you think the Leopard was released with its 3D Looks Dock? Yep, on 26th of October in 2007.&lt;br /&gt;Oh, you think it was easier to the Java guys to renew the Apple's old style dock from &lt;a href="http://en.wikipedia.org/wiki/Mac_OS_X_Public_Beta"&gt;Apple Mac OS X Public Beta (2000)&lt;/a&gt;. Yes, you could be right, but do not forget the &lt;a href="http://en.wikipedia.org/wiki/Common_Desktop_Environment"&gt;Sun's and others real dock in CDE Env&lt;/a&gt; back to 1993.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Decem&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;er 12th, 2003:&lt;/span&gt; &lt;a href="http://douglas.typepad.com/content/2003/12/suns_project_lo.html"&gt;Sun's   Project Looking Glass&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;March 25th, 2004&lt;/span&gt;: &lt;a href="http://sillydog.org/forum/-news-project-looking-glass-making-linux-3d-t5191.php"&gt;(news) Project Looking Glass - making Linux 3D!&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://douglas.typepad.com/content/I1_looking_glass_lg-thumb.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 450px; height: 327px;" src="http://douglas.typepad.com/content/I1_looking_glass_lg-thumb.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://sillydog.org/graph/temp/project_looking_glass01.jpg"&gt;&lt;img style="display: block; margin: 0px auto 10px; text-align: center; cursor: pointer; width: 450px; height: 328px;" src="http://sillydog.org/graph/temp/project_looking_glass01.jpg" alt="" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-size:180%;"&gt;&lt;br /&gt;That's all Folks!&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1487232898757889665-6381847934180857682?l=ilapstech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ilapstech.blogspot.com/feeds/6381847934180857682/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ilapstech.blogspot.com/2010/07/i-hate-monster-apple-inc.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/6381847934180857682'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/6381847934180857682'/><link rel='alternate' type='text/html' href='http://ilapstech.blogspot.com/2010/07/i-hate-monster-apple-inc.html' title='I hate Monster (Apple) Inc.'/><author><name>ilap</name><uri>http://www.blogger.com/profile/01985247399964184068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1487232898757889665.post-7459378070566353173</id><published>2009-12-17T01:20:00.000-08:00</published><updated>2009-12-17T12:53:31.064-08:00</updated><title type='text'>Add proxy support to openconnect</title><content type='html'>I just realized this afternoon that the Cisco VPN access to our Private Net has been decommissioned for two days. Ooooh... it's really a big problem because I'm working from home tomorrow and the Security team hasn't responded yet to my question relating to the new Cisco AnyConnect VPN (SSLVPN) client access.&lt;br /&gt;I've asked them why they didn't upload the Linux package to the ASA flash and declare it in the config as an AnyConnect image in order to be able to connect to our Corporation Private Net from a Linux client.&lt;br /&gt;Yep, I use LinuxCOE (COE: Common operating environment) on my Office laptop (http://linuxcoe.sourceforge.net/).&lt;br /&gt;&lt;br /&gt;So, I had to try to use use the &lt;a href="http://www.infradead.org/openconnect.html"&gt;openconnect&lt;/a&gt; instaed using the original Cisco's AnuConnect SSL VPN Client to test the new SSLVPN connection to our VPN.&lt;br /&gt;After I downloaded it I  realized that the openconnect doesn't support any connection through an https proxy. Unfortunately, I have to use a https proxy to access to the webvpn, but the openconnect doesn't support it. One more bugger.:)&lt;br /&gt;&lt;br /&gt;So, I had no option but to write a patch for the openconnect to support proxy.&lt;br /&gt;Long story sort... here comes the patch.&lt;br /&gt;&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;cat openconnect-2.12_proxy.diff&lt;/span&gt;&lt;br /&gt;&lt;pre class="source-code"&gt;&lt;code&gt;&lt;br /&gt;diff -Naur openconnect-2.12/http.c openconnect-2.12.ilap/http.c&lt;br /&gt;--- openconnect-2.12/http.c 2009-12-08 05:40:34.000000000 +1300&lt;br /&gt;+++ openconnect-2.12.ilap/http.c 2009-12-18 00:28:54.000000000 +1300&lt;br /&gt;@@ -637,3 +637,63 @@&lt;br /&gt; &lt;br /&gt;  return uagent;&lt;br /&gt; }&lt;br /&gt;+&lt;br /&gt;+void openconnect_parse_proxyurl(struct openconnect_info *vpninfo, char *url)&lt;br /&gt;+{&lt;br /&gt;+ char *proxy_port;&lt;br /&gt;+ char *proxy = url;&lt;br /&gt;+ vpninfo-&gt;proxy = proxy;&lt;br /&gt;+&lt;br /&gt;+ /* &lt;br /&gt;+  * if the format is hostname:port then we cut off the port from name&lt;br /&gt;+  */ &lt;br /&gt;+ proxy_port = strchr(proxy, ':');&lt;br /&gt;+&lt;br /&gt;+ if (proxy_port) {&lt;br /&gt;+  *proxy_port = 0x0;&lt;br /&gt;+  proxy_port++;&lt;br /&gt;+  &lt;br /&gt;+  vpninfo-&gt;proxy_port = proxy_port;&lt;br /&gt;+ }&lt;br /&gt;+ /* else the default one (1080) which is already set  will be used  */&lt;br /&gt;+}&lt;br /&gt;+&lt;br /&gt;+int process_http_proxy(struct openconnect_info *vpninfo, int ssl_sock)&lt;br /&gt;+{&lt;br /&gt;+ char buf[MAX_BUF_LEN];&lt;br /&gt;+ int buflen;&lt;br /&gt;+&lt;br /&gt;+ if(!vpninfo-&gt;proxy) {&lt;br /&gt;+  return 1;&lt;br /&gt;+ } else if (ssl_sock &lt; 0) {&lt;br /&gt;+  return -EINVAL;&lt;br /&gt;+ }&lt;br /&gt;+&lt;br /&gt;+ bzero(buf, MAX_BUF_LEN);&lt;br /&gt;+ sprintf(buf, "CONNECT %s:%s HTTP/1.1\r\n", vpninfo-&gt;hostname, vpninfo-&gt;port);&lt;br /&gt;+ sprintf(buf + strlen(buf), "Host: %s\r\n", vpninfo-&gt;hostname);&lt;br /&gt;+ sprintf(buf + strlen(buf), "User-Agent: %s\r\n", vpninfo-&gt;useragent);&lt;br /&gt;+ sprintf(buf + strlen(buf), "Proxy-Connection: keep-alive\r\n");&lt;br /&gt;+ sprintf(buf + strlen(buf), "Connection: keep-alive\r\n");&lt;br /&gt;+ sprintf(buf + strlen(buf), "Accept-Encoding: identity\r\n");&lt;br /&gt;+ sprintf(buf + strlen(buf), "\r\n");&lt;br /&gt;+&lt;br /&gt;+ vpninfo-&gt;progress(vpninfo, PRG_INFO, "Connecting to the proxy %s on port %s\n",&lt;br /&gt;+   vpninfo-&gt;proxy, vpninfo-&gt;proxy_port);&lt;br /&gt;+ vpninfo-&gt;progress(vpninfo, PRG_TRACE, "==&gt;%s&lt;==\n", buf);&lt;br /&gt;+&lt;br /&gt;+ buflen = write(ssl_sock, buf, strlen(buf));&lt;br /&gt;+ if (buflen &lt; 0) {&lt;br /&gt;+  return -EINVAL;&lt;br /&gt;+ }&lt;br /&gt;+&lt;br /&gt;+ bzero(buf, MAX_BUF_LEN);&lt;br /&gt;+ buflen = read(ssl_sock, buf, MAX_BUF_LEN);&lt;br /&gt;+&lt;br /&gt;+ if ((buflen &lt; 0) || strncmp(buf, "HTTP/1.1 200", 12)) {&lt;br /&gt;+  vpninfo-&gt;progress(vpninfo, PRG_ERR,"Proxy connection failed!");&lt;br /&gt;+  return -EINVAL;&lt;br /&gt;+ }&lt;br /&gt;+&lt;br /&gt;+ return 1;&lt;br /&gt;+}&lt;br /&gt;diff -Naur openconnect-2.12/main.c openconnect-2.12.ilap/main.c&lt;br /&gt;--- openconnect-2.12/main.c 2009-12-08 05:40:34.000000000 +1300&lt;br /&gt;+++ openconnect-2.12.ilap/main.c 2009-12-17 17:25:55.000000000 +1300&lt;br /&gt;@@ -68,6 +68,7 @@&lt;br /&gt;  {"syslog", 0, 0, 'l'},&lt;br /&gt;  {"key-type", 1, 0, 'K'},&lt;br /&gt;  {"key-password", 1, 0, 'p'},&lt;br /&gt;+ {"proxy", 1, 0, 'P'},&lt;br /&gt;  {"user", 1, 0, 'u'},&lt;br /&gt;  {"verbose", 0, 0, 'v'},&lt;br /&gt;  {"version", 0, 0, 'V'},&lt;br /&gt;@@ -109,10 +110,11 @@&lt;br /&gt;  printf("  -i, --interface=IFNAME          Use IFNAME for tunnel interface\n");&lt;br /&gt;  printf("  -l, --syslog                    Use syslog for progress messages\n");&lt;br /&gt;  printf("  -U, --setuid=USER               Drop privileges after connecting\n");&lt;br /&gt;- printf("      --csd-user=USER           Drop privileges during CSD execution\n");&lt;br /&gt;+ printf("      --csd-user=USER             Drop privileges during CSD execution\n");&lt;br /&gt;  printf("  -m, --mtu=MTU                   Request MTU from server\n");&lt;br /&gt;  printf("  -p, --key-password=PASS         Set key passphrase or TPM SRK PIN\n");&lt;br /&gt;  printf("      --key-password-from-fsid    Key passphrase is fsid of file system\n");&lt;br /&gt;+ printf("  -P, --proxy=PROXY[:PORT]        Set proxy server\n");&lt;br /&gt;  printf("  -q, --quiet                     Less output\n");&lt;br /&gt;  printf("  -Q, --queue-len=LEN             Set packet queue limit to LEN pkts\n");&lt;br /&gt;  printf("  -s, --script=SCRIPT             Use vpnc-compatible config script\n");&lt;br /&gt;@@ -182,6 +184,9 @@&lt;br /&gt;  memset(vpninfo, 0, sizeof(*vpninfo));&lt;br /&gt; &lt;br /&gt;  /* Set up some defaults */&lt;br /&gt;+ vpninfo-&gt;proxy = NULL;&lt;br /&gt;+ vpninfo-&gt;proxy_port = OC_DEF_PROXY_PORT;&lt;br /&gt;+ vpninfo-&gt;port = OC_DEF_SSL_PORT;&lt;br /&gt;  vpninfo-&gt;tun_fd = vpninfo-&gt;ssl_fd = vpninfo-&gt;dtls_fd = vpninfo-&gt;new_dtls_fd = -1;&lt;br /&gt;  vpninfo-&gt;useragent = openconnect_create_useragent("Open AnyConnect VPN Agent");&lt;br /&gt;  vpninfo-&gt;mtu = 1406;&lt;br /&gt;@@ -202,7 +207,7 @@&lt;br /&gt;  else&lt;br /&gt;   vpninfo-&gt;localname = "localhost";&lt;br /&gt; &lt;br /&gt;- while ((opt = getopt_long(argc, argv, "bC:c:Ddg:hi:k:K:lp:Q:qSs:U:u:Vvx:",&lt;br /&gt;+ while ((opt = getopt_long(argc, argv, "bC:c:Ddg:hi:k:K:lpP:Q:qSs:U:u:Vvx:",&lt;br /&gt;       long_options, NULL))) {&lt;br /&gt;   if (opt &lt; 0)&lt;br /&gt;    break;&lt;br /&gt;@@ -298,6 +303,9 @@&lt;br /&gt;   case 'p':&lt;br /&gt;    vpninfo-&gt;cert_password = optarg;&lt;br /&gt;    break;&lt;br /&gt;+  case 'P':&lt;br /&gt;+   openconnect_parse_proxyurl(vpninfo, optarg);&lt;br /&gt;+   break;&lt;br /&gt;   case 's':&lt;br /&gt;    vpninfo-&gt;vpnc_script = optarg;&lt;br /&gt;    break;&lt;br /&gt;diff -Naur openconnect-2.12/openconnect.h openconnect-2.12.ilap/openconnect.h&lt;br /&gt;--- openconnect-2.12/openconnect.h 2009-12-08 05:40:34.000000000 +1300&lt;br /&gt;+++ openconnect-2.12.ilap/openconnect.h 2009-12-17 22:04:33.000000000 +1300&lt;br /&gt;@@ -44,6 +44,9 @@&lt;br /&gt; #define OC_FORM_OPT_SELECT 3&lt;br /&gt; #define OC_FORM_OPT_HIDDEN 4&lt;br /&gt; &lt;br /&gt;+#define OC_DEF_SSL_PORT  "443"&lt;br /&gt;+#define OC_DEF_PROXY_PORT "8080"&lt;br /&gt;+&lt;br /&gt; /* char * fields are static (owned by XML parser) and don't need to be&lt;br /&gt;    freed by the form handling code -- except for value, which for TEXT&lt;br /&gt;    and PASSWORD options is allocated by process_form() when&lt;br /&gt;@@ -143,6 +146,10 @@&lt;br /&gt;  char sid_tokencode[9];&lt;br /&gt;  char sid_nexttokencode[9];&lt;br /&gt; &lt;br /&gt;+ char *proxy;&lt;br /&gt;+ char *proxy_port;&lt;br /&gt;+ char *port;&lt;br /&gt;+&lt;br /&gt;  const char *localname;&lt;br /&gt;  char *hostname;&lt;br /&gt;  char *urlpath;&lt;br /&gt;@@ -319,6 +326,8 @@&lt;br /&gt; /* http.c */&lt;br /&gt; int openconnect_obtain_cookie(struct openconnect_info *vpninfo);&lt;br /&gt; char *openconnect_create_useragent(char *base);&lt;br /&gt;+void openconnect_parse_proxyurl(struct openconnect_info *vpninfo, char *url);&lt;br /&gt;+int process_http_proxy(struct openconnect_info *vpninfo, int ssl_sock);&lt;br /&gt; &lt;br /&gt; /* ssl_ui.c */&lt;br /&gt; int set_openssl_ui(void);&lt;br /&gt;diff -Naur openconnect-2.12/ssl.c openconnect-2.12.ilap/ssl.c&lt;br /&gt;--- openconnect-2.12/ssl.c 2009-12-08 05:40:34.000000000 +1300&lt;br /&gt;+++ openconnect-2.12.ilap/ssl.c 2009-12-18 00:30:04.000000000 +1300&lt;br /&gt;@@ -477,17 +477,23 @@&lt;br /&gt;  int ssl_sock = -1;&lt;br /&gt;  int err;&lt;br /&gt; &lt;br /&gt;+ char *hostname = vpninfo-&gt;hostname;&lt;br /&gt;+ char *port = vpninfo-&gt;port;&lt;br /&gt;+&lt;br /&gt;+ if (vpninfo-&gt;proxy) {&lt;br /&gt;+  hostname = vpninfo-&gt;proxy; &lt;br /&gt;+  port = vpninfo-&gt;proxy_port; &lt;br /&gt;+ }&lt;br /&gt;+&lt;br /&gt;  if (vpninfo-&gt;peer_addr) {&lt;br /&gt;   ssl_sock = socket(vpninfo-&gt;peer_addr-&gt;sa_family, SOCK_STREAM, IPPROTO_IP);&lt;br /&gt;   if (ssl_sock &lt; 0) {&lt;br /&gt;   reconn_err:&lt;br /&gt;-   vpninfo-&gt;progress(vpninfo, PRG_ERR, "Failed to reconnect to host %s\n", vpninfo-&gt;hostname);&lt;br /&gt;+   vpninfo-&gt;progress(vpninfo, PRG_ERR, "Failed to reconnect to host %s\n", hostname);&lt;br /&gt;    return -EINVAL;&lt;br /&gt;   }&lt;br /&gt;   if (connect(ssl_sock, vpninfo-&gt;peer_addr, vpninfo-&gt;peer_addrlen))&lt;br /&gt;    goto reconn_err;&lt;br /&gt;-&lt;br /&gt;-  &lt;br /&gt;   &lt;br /&gt;  } else {&lt;br /&gt;   struct addrinfo hints, *result, *rp;&lt;br /&gt;@@ -501,14 +507,15 @@&lt;br /&gt;   hints.ai_addr = NULL;&lt;br /&gt;   hints.ai_next = NULL;&lt;br /&gt; &lt;br /&gt;-  err = getaddrinfo(vpninfo-&gt;hostname, "443", &amp;hints, &amp;result);&lt;br /&gt;+  err = getaddrinfo(hostname, port, &amp;hints, &amp;result);&lt;br /&gt;+&lt;br /&gt;   if (err) {&lt;br /&gt;    vpninfo-&gt;progress(vpninfo, PRG_ERR, "getaddrinfo failed: %s\n", gai_strerror(err));&lt;br /&gt;    return -EINVAL;&lt;br /&gt;   }&lt;br /&gt; &lt;br /&gt;   vpninfo-&gt;progress(vpninfo, PRG_INFO,&lt;br /&gt;-      "Attempting to connect to %s\n", vpninfo-&gt;hostname);&lt;br /&gt;+      "Attempting to connect to %s\n", hostname);&lt;br /&gt; &lt;br /&gt;   for (rp = result; rp ; rp = rp-&gt;ai_next) {&lt;br /&gt;    ssl_sock = socket(rp-&gt;ai_family, rp-&gt;ai_socktype,&lt;br /&gt;@@ -534,12 +541,19 @@&lt;br /&gt;   freeaddrinfo(result);&lt;br /&gt;   &lt;br /&gt;   if (ssl_sock &lt; 0) {&lt;br /&gt;-   vpninfo-&gt;progress(vpninfo, PRG_ERR, "Failed to connect to host %s\n", vpninfo-&gt;hostname);&lt;br /&gt;+   vpninfo-&gt;progress(vpninfo, PRG_ERR, "Failed to connect to host %s\n", hostname);&lt;br /&gt;    return -EINVAL;&lt;br /&gt;   }&lt;br /&gt;  }&lt;br /&gt;  fcntl(ssl_sock, F_SETFD, FD_CLOEXEC);&lt;br /&gt; &lt;br /&gt;+ if (process_http_proxy(vpninfo, ssl_sock) &lt;= 0) {&lt;br /&gt;+  vpninfo-&gt;progress(vpninfo, PRG_ERR, "Proxy connection failure\n");&lt;br /&gt;+  SSL_free(https_ssl);&lt;br /&gt;+  close(ssl_sock);&lt;br /&gt;+  return -EINVAL;&lt;br /&gt;+ }&lt;br /&gt;+&lt;br /&gt;  ssl3_method = TLSv1_client_method();&lt;br /&gt;  if (!vpninfo-&gt;https_ctx) {&lt;br /&gt;   vpninfo-&gt;https_ctx = SSL_CTX_new(ssl3_method);&lt;br /&gt;diff -Naur openconnect-2.12/version.c openconnect-2.12.ilap/version.c&lt;br /&gt;--- openconnect-2.12/version.c 2009-12-08 05:40:34.000000000 +1300&lt;br /&gt;+++ openconnect-2.12.ilap/version.c 2009-12-18 00:30:29.000000000 +1300&lt;br /&gt;@@ -1 +1 @@&lt;br /&gt;-char openconnect_version[] = "v2.12";&lt;br /&gt;+char openconnect_version[] = "v2.12-unknown";&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So, the steps to get it work are the following:&lt;br /&gt;&lt;br /&gt;#1. Download and unpack the openconnect-2.12 source.&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;cd /path/to/devel/dir&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;wget ftp://ftp.infradead.org/pub/openconnect/openconnect-2.12.tar.gz&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;tar zxvf openconnect-2.12.tar.gz&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;#2. Save this patch to your box.&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;vi openconnect-2.12_proxy.diff&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;i&lt;/span&gt;&lt;br /&gt;COPY&amp;amp;PASTE the patch above.&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;ESC&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;:x!&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#3. Patch the source&lt;br /&gt;&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;cd openconnect-2.12&lt;/span&gt;&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;patch &lt; ../openconnect-2.12_proxy.diff&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;patching file http.c &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;patching file  main.c &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;patching file openconnect.h &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;patching file ssl.c &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;patching file version.c  &lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;make&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;sudo make install&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;...  &lt;br /&gt;&lt;br /&gt;#4. Test it...&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;sudo openconnect -v --proxy=my.proxy.com target.host.com  &lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;Attempting to connect to my.proxy.com &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Connecting to the proxy my.proxy.com on port 8080&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;==&gt;CONNECT target.host.com:443 HTTP/1.1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Host: target.host.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;User-Agent: Open AnyConnect VPN Agent v2.12-unknown &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Proxy-Connection: keep-alive&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Connection: keep-alive&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Accept-Encoding: identity&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;&lt;==&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;SSL negotiation with target.host.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Connected to HTTPS on target.host.com&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;GET target.host.com/&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Got HTTP response: HTTP/1.1 302 Object Moved&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Content-Type: text/html; charset=UTF-8 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Content-Length: 0 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Cache-Control: no-cache &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Pragma: no-cache&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Connection: Keep-Alive&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Date: Thu, 17 Dec 2009 11:31:29 GMT &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Location: /+webvpn+/index.html&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Set-Cookie: tg=; expires=Thu, 01 Jan 1970 22:00:00 GMT; path=/; secure&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;GET target.host.com/+webvpn+/index.html &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Got HTTP response: HTTP/1.1 200 OK &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Server: Virata-EmWeb/R6_2_0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Transfer-Encoding: chunked&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Content-Type: text/xml &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Cache-Control: max-age=0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Set-Cookie: webvpn=; expires=Thu, 01 Jan 1970 22:00:00 GMT; path=/; secure&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Set-Cookie: webvpnc=; expires=Thu, 01 Jan 1970 22:00:00 GMT; path=/; secure&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Set-Cookie: webvpnlogin=1; secure &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-Transcend-Version: 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Fixed options give &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Please enter your username and password.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Username:&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0); font-style: italic;"&gt;yourusername&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Password:&lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0); font-style: italic;"&gt;yourpassword &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;POST target.host.com/+webvpn+/index.html&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Got HTTP response: HTTP/1.1 200 OK&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Server: Virata-EmWeb/R6_2_0 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Transfer-Encoding: chunked&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Content-Type: text/xml&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Cache-Control: max-age=0 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Set-Cookie: webvpnlogin=; expires=Thu, 01 Jan 1970 22:00:00 GMT; path=/; secure&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Set-Cookie: webvpn=.............; path=/; secure &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Set-Cookie: webvpnc=bu:/CACHE/stc/...........&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-Transcend-Version: 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Got CONNECT response: HTTP/1.1 200 OK&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Version: 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Address: 123.123.123.231&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Netmask: 255.255.248.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-DNS: 222.222.222.228&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-DNS: 222.222.222.229&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Lease-Duration: 1209600 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Session-Timeout: none&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Idle-Timeout: 1800&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Disconnected-Timeout: 1800 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Default-Domain: company.com &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Split-Include: 222.222.221.0/255.255.248.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Split-Include: 222.222.222.0/255.255.240.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Keep: true&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Rekey-Time: 14400 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Rekey-Method: ssl &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-DPD: 30&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Keepalive: 20&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Banner: Successfully%20authenticated%21%0AYou%27re%20going%20to%20connect%20a%20SSL%20gateway%20to%20the%20.............&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Smartcard-Removal-Disconnect: true&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-Content-Encoding: deflate&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-DTLS-Session-ID: 5820B98BXXXXXXXXXXXXXXA62D88086306&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-DTLS-Port: 443&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-DTLS-Keepalive: 20&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-DTLS-DPD: 30&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-DTLS-Rekey-Time: 14400 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-CSTP-MTU: 1406&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;X-DTLS-CipherSuite: AES128-SHA &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;CSTP connected. DPD 30, Keepalive 20 &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;DTLS option X-DTLS-Session-ID : 5820B98BXXXXXXXXXXXXXXA62D88086306&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;DTLS option X-DTLS-Port : 443&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;DTLS option X-DTLS-Keepalive : 20&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;DTLS option X-DTLS-DPD : 30&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;DTLS option X-DTLS-Rekey-Time : 14400&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;DTLS option X-DTLS-CipherSuite : AES128-SHA&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;SSL_set_session() failed with old protocol version 0x100&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Your OpenSSL may lack Cisco compatibility support&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;See http://rt.openssl.org/Ticket/Display.html?id=1751&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Use the --no-dtls command line option to avoid this message&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Set up DTLS failed; using SSL instead&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Connected tun0 as 123.123.123.231, using SSL + deflate&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Did no work; sleeping for 20000 ms...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;^C&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Send BYE packet: Client received SIGINT&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1487232898757889665-7459378070566353173?l=ilapstech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ilapstech.blogspot.com/feeds/7459378070566353173/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ilapstech.blogspot.com/2009/12/add-proxy-support-to-openconnect.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/7459378070566353173'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/7459378070566353173'/><link rel='alternate' type='text/html' href='http://ilapstech.blogspot.com/2009/12/add-proxy-support-to-openconnect.html' title='Add proxy support to openconnect'/><author><name>ilap</name><uri>http://www.blogger.com/profile/01985247399964184068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1487232898757889665.post-8126001868520318361</id><published>2009-11-29T16:59:00.000-08:00</published><updated>2010-09-13T23:59:43.315-07:00</updated><title type='text'>Grow /tmp Filesystem (TMPFS) on-line under Solaris 10.</title><content type='html'>I was asked recently whether it is possible to grow the /tmp Filesystem on-line (/wo reboot) under Solaris or not.  Because the /tmp was configured to 512MB mount and it's exceeded and unfortunately that box couldn't be rebooted nor the /tmp umounted (bunch of files were opened and used). The err msg was similar as these ones below.&lt;br /&gt;&lt;span style="font-style: italic;"&gt;  ... tmpfs: [ID ... kern.warning] WARNING: /tmp: File system full, swap space limit exceeded&lt;/span&gt;&lt;br /&gt;or&lt;br /&gt;&lt;span style="font-style: italic;"&gt; ... tmpfs: [ID ... kern.warning] WARNING: /tmp: File system full, memory allocation failed&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately, the mount_tmpfs doesn't support the "remount" option ("mount -F tmpfs -o remount /tmp"), so I had to answer "No, it's not".&lt;br /&gt;&lt;br /&gt;But, I couldn't help thinking about this. I know that the TMPFS (a.k.a. RAMFS in some other systems) is using the anonymous pages for the TMPFS. So, why the grow of a TMPFS is impossible?&lt;br /&gt;&lt;br /&gt;I began to dig a bit in the header files to get some relevant info about the current VFS layer of Solaris.&lt;br /&gt;&lt;br /&gt;### 1. I checked the current VFS structure in the /usr/include/sys/vfs.h&lt;br /&gt;(almost every modern OS is using that structure).&lt;br /&gt;&lt;br /&gt;As I remebered from the old-days, that the private data should be the pointer to the&lt;br /&gt;per-mount data structure for any FS.&lt;br /&gt;&lt;span style="font-size: 85%; font-style: italic;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="source-code"&gt;&lt;code&gt;&lt;span style="font-size: 85%; font-style: italic;"&gt;&lt;span style="font-family: Georgia,serif;"&gt;&lt;br /&gt;&lt;/span&gt;typedef struct vfs {&lt;br /&gt;...&lt;br /&gt;uint_t       &lt;span style="font-weight: bold;"&gt;   vfs_bsize;    &lt;/span&gt;          /* native block size */&lt;br /&gt;...&lt;br /&gt;void           &lt;span style="font-weight: bold;"&gt; *vfs_data; &lt;/span&gt;             /* private data */&lt;br /&gt;...&lt;br /&gt;} vfs_t&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-size: 85%; font-style: italic;"&gt;&lt;br /&gt;So, I found that the "vfs_data" should includes the per-mount basis info which I was looking for.&lt;br /&gt;&lt;br /&gt;###2. /usr/include/sys/fs/tmp.h&lt;br /&gt;I was looking for the header file of the TMPFS which should consists the declaration of this private structure.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="source-code"&gt;&lt;code&gt;&lt;span style="font-size: 85%; font-style: italic;"&gt;&lt;span style="font-size: 85%; font-style: italic;"&gt;/*&lt;br /&gt;&lt;span style="color: red; font-weight: bold;"&gt;* tmpfs per-mount data structure.&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;struct tmount {&lt;br /&gt;...&lt;br /&gt;char            *tm_mntpath;    /* name of tmpfs mount point */&lt;br /&gt;...&lt;br /&gt;ulong_t         tm_anonmax;     /* file system max anon reservation */&lt;br /&gt;pgcnt_t         tm_anonmem;     /* pages of reserved anon memory */&lt;br /&gt;...&lt;br /&gt;};&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-size: 85%; font-style: italic;"&gt;&lt;br /&gt;I found it, but I wasn't sure that this info needs for me or not.&lt;br /&gt;I had to do some more checks that the tm_anonmax or tm_anonmem is using to calculate the size of the FS or not.&lt;br /&gt;&lt;br /&gt;I run the following info to get the values of the relevant variables.&lt;br /&gt;&lt;br /&gt;@@ 1. Get the size of the /tmp FS.&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;# &lt;span style="font-weight: bold;"&gt;grep tmpfs /etc/vfstab &lt;span style="color: red;"&gt;*NOTE: Get the mount options.&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;swap - /tmp tmpfs - yes size=&lt;span style="color: red; font-weight: bold;"&gt;2048m&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;NOTE: If the "size" option is set, the /tmp will be mounted on that size and if it's&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;not then it use all of the available virtual memory. See man mount_tmpfs.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;# &lt;span style="font-weight: bold;"&gt;df -h /tmp&lt;/span&gt;&lt;br /&gt;Filesystem             size   used  avail capacity  Mounted on&lt;br /&gt;swap                   &lt;span style="color: red; font-weight: bold;"&gt;2.0G&lt;/span&gt;   272K   2.0G     1%    /tmp&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;@@ 2. Get the pointer to the VFS struct of the /tmp FS.&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;# &lt;span style="font-weight: bold;"&gt;echo "::fsinfo" | mdb -k | egrep "VFSP|/tmp"&lt;/span&gt;&lt;br /&gt;VFSP FS              MOUNT&lt;br /&gt;&lt;span style="color: red; font-weight: bold;"&gt;000003000f46d840&lt;/span&gt; tmpfs           /tmp&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;@@ 3. Get the pointer to the private data struct of the /tmp FS and its blocskize.&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;# &lt;span style="font-weight: bold;"&gt;echo "&lt;span style="color: red;"&gt;3000f46d840&lt;/span&gt;::print -ta vfs_t vfs_bsize vfs_data" | mdb -k&lt;/span&gt;&lt;br /&gt;3000f46d864 uint_t vfs_bsize = 0x2000 *NOTE 1:0x2000 means 8192 (8KB) in Decimal.&lt;br /&gt;3000f46d878 void *vfs_data = 0x3000f488ce8&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;*NOTE 2: The vfs_bsize (block size of the FS) is equal /w the pagesize as this FS is&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;stored in the virtual memory.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;@@ 4. Get the values of all of the interested variables.&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;# &lt;span style="font-weight: bold;"&gt;echo "&lt;span style="color: red;"&gt;3000f46d840&lt;/span&gt;::print vfs_t vfs_data | ::print struct tmount tm_mntpath tm_anonmax tm_anonmem" | mdb -k&lt;/span&gt;&lt;br /&gt;tm_mntpath = 0x3000f5f9508 "/tmp"&lt;br /&gt;tm_anonmax = &lt;span style="font-weight: bold;"&gt;0x40000&lt;/span&gt; &lt;span style="color: red; font-weight: bold;"&gt;*NOTE 2: 0x40000 means 256KB&lt;/span&gt;&lt;br /&gt;tm_anonmem = 0x22&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As you can see the anonmax's (Nr. of pages) 0x40000 * pagesize (0x2000) = 0x80000000 = 2GB.&lt;br /&gt;So, probably the tm_anonmax is the relevant size info of the /tmp FS.&lt;br /&gt;&lt;br /&gt;But, I wasn't sure. So, what else could have done to be sure that's the relevant variable to /tmp size.&lt;br /&gt;Yep, the Opensolaris source tree. So, to be sure that the size of the /tmp is calculated from the&lt;br /&gt;tm_anonmax and vfs_bsize (a.k.a pagesize), I had to dig a bit in the OpenSolaris source.&lt;br /&gt;&lt;br /&gt;Long story sort, I found an evidence that the tm_anonmax is used to set the size of the /tmp FS.&lt;br /&gt;See, brief details below (&lt;a href="http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/common/fs/tmpfs/tmp_vfsops.c"&gt;Source code of the tmp_vfsops.c&lt;/a&gt;):&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;pre class="source-code"&gt;&lt;code&gt;&lt;span style="font-size: 85%; font-style: italic;"&gt;&lt;span style="font-size: 85%; font-style: italic;"&gt;...&lt;br /&gt;static int&lt;br /&gt;230 tmp_mount(&lt;br /&gt;...&lt;br /&gt;236     struct tmount *tm = NULL; &lt;span style="color: red; font-weight: bold;"&gt;// NOTE 3: tm is a pointer to a tmount structure&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;276 &lt;span style="color: red; font-weight: bold;"&gt;     * tm_anonmax is set according to the mount arguments&lt;/span&gt;&lt;br /&gt;277      * if any.  Otherwise, it is set to a maximum value.&lt;br /&gt;278      */&lt;br /&gt;279     if (vfs_optionisset(vfsp, &lt;span style="color: red; font-weight: bold;"&gt;"size"&lt;/span&gt;, &amp;amp;sizestr)) { &lt;span style="color: red; font-weight: bold;"&gt;// NOTE: if the size vfstab option is set, SEE  above&lt;/span&gt;&lt;br /&gt;280         if ((error = tmp_convnum(sizestr, &amp;amp;anonmax)) != 0)&lt;br /&gt;281             goto out;&lt;br /&gt;282     } else {&lt;br /&gt;283         anonmax = ULONG_MAX; // NOTE: If the size is not set then use all...&lt;br /&gt;284     }&lt;br /&gt;...&lt;br /&gt;314     tm-&amp;gt;tm_anonmax = anonmax; &lt;span style="color: red; font-weight: bold;"&gt;// NOTE:set the Private data's variable&lt;/span&gt;&lt;br /&gt;315&lt;br /&gt;316     vfsp-&amp;gt;vfs_data = (caddr_t)tm; &lt;span style="color: red; font-weight: bold;"&gt;//NOTE: Private data is set.&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;319     vfsp-&amp;gt;vfs_bsize = PAGESIZE; &lt;span style="color: red; font-weight: bold;"&gt;// Yep, bsize is equal PAGESIZE.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;span style="font-size: 85%; font-style: italic;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 130%;"&gt;&lt;span style="font-weight: bold;"&gt;A live example.&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 85%; font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;This example shows how I grew the 2GB mounted /tmp to 3GB on a Solaris 10 5/09 u7 SPARC system. &lt;span style="color: red;"&gt;Please, don't try this in your system.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;If you don't listen to me then keep in mind that the HEXA numbers might differ on your system.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;#1. Get the relevant info of the /tmp&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;df -h /tmp&lt;/span&gt;&lt;br /&gt;Filesystem             size   used  avail capacity  Mounted on&lt;br /&gt;swap                   2.0G   272K   2.0G     1%    /tmp&lt;br /&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;echo "::fsinfo" | mdb -k | egrep "VFSP|/tmp"&lt;/span&gt;&lt;br /&gt;VFSP FS              MOUNT&lt;br /&gt;&lt;span style="color: red; font-weight: bold;"&gt;000003000f46d840&lt;/span&gt; tmpfs           /tmp&lt;br /&gt;&lt;br /&gt;# Get the address of the tm_anonmax to set its value.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size: 85%;"&gt;# &lt;span style="font-weight: bold;"&gt;echo "&lt;span style="color: red;"&gt;000003000f46d840&lt;/span&gt;::print vfs_t vfs_data | ::print -ta struct tmount tm_anonmax" | mdb -k&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900; font-weight: bold;"&gt;3000f488d00&lt;/span&gt; tm_anonmax = &lt;span style="color: red; font-weight: bold;"&gt;0x40000&lt;br /&gt;&lt;/span&gt;// Address and the currrent value of the tm_anonmax&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;### 2. Set the new value&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;# &lt;span style="font-weight: bold;"&gt;echo "&lt;span style="color: #009900;"&gt;3000f488d00&lt;/span&gt;/Z &lt;span style="color: red;"&gt;0x60000&lt;/span&gt;" | mdb -kw&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900; font-weight: bold;"&gt;0x3000f488d00&lt;/span&gt;:  0x40000                 =       0x60000&lt;/span&gt;&lt;br /&gt;NOTE: the 0x60000 is 384KB -&amp;gt; 384KB * 8KB = 3072KB = 3GB.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;### 3. Check if it's set.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;# &lt;span style="font-weight: bold;"&gt;echo "&lt;span style="color: #009900;"&gt;3000f488d00&lt;/span&gt;/J" | mdb -k&lt;/span&gt;&lt;br /&gt;&lt;span style="color: #009900; font-weight: bold;"&gt;0x3000f488d00&lt;/span&gt;:  &lt;span style="color: red; font-weight: bold;"&gt;60000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;OR&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;# &lt;span style="font-weight: bold;"&gt;echo "&lt;span style="color: red;"&gt;3000f46d840&lt;/span&gt;::print vfs_t vfs_data | ::print struct tmount tm_anonmax" | mdb -k&lt;/span&gt;&lt;br /&gt;tm_anonmax = &lt;span style="color: red; font-weight: bold;"&gt;0x60000&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;### 4. Check if it's working or not.&lt;br /&gt;&lt;span style="font-size: 85%;"&gt;# &lt;span style="font-weight: bold;"&gt;df -h /tmp&lt;/span&gt;&lt;br /&gt;Filesystem             size   used  avail capacity  Mounted on&lt;br /&gt;swap                   &lt;span style="color: red; font-weight: bold;"&gt;3.0G&lt;/span&gt;   272K   3.0G     1%    /tmp&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;Yep, it done...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size: 130%; font-weight: bold;"&gt;&lt;br /&gt;Conclusion:&lt;/span&gt;&lt;br /&gt;The Live Example above shows a real example which was done by myself on a Sol10 system.&lt;br /&gt;I think this solution above can be done on any Solaris version which has the feature of the tmpfs-ed /tmp Filesystem. But, you should use some different method (adb) to get same kind of info in different version of Solaris.&lt;br /&gt;&lt;br /&gt;This was my 3rd non-existent-solution-before-this type of post.:)&lt;br /&gt;This post or any info in this post is not a copy from any other post.&lt;br /&gt;So, there wasn't any solution about this on the Internet until this post.&lt;br /&gt;Or maybe was, but I couldn't find any.:)&lt;br /&gt;&lt;br /&gt;Unfortunately, it can't be done in a zone as the zone doesn't allow you to access to the /dev/kmem and /dev/ksyms. You, should access them from the Global Zone, BUT I haven't tried...&lt;br /&gt;&lt;br /&gt;&lt;span style="color: black; font-size: 130%; font-weight: bold;"&gt;Disclaimer:&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;First, I take no responsibility for any trouble caused by this info and make no guarantees of any kind.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;So, please be very carefull when you want use any info from this post.&lt;/span&gt;&lt;br /&gt;&lt;span style="color: red;"&gt;SO, YOU'RE USING ANY INFO IN THIS POST AT YOUR OWN RISK!&lt;/span&gt;&lt;br /&gt;&lt;div id="ui-datepicker-div" style="display: none;"&gt;&lt;/div&gt;&lt;div id="ui-datepicker-div" style="display: none;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1487232898757889665-8126001868520318361?l=ilapstech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ilapstech.blogspot.com/feeds/8126001868520318361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ilapstech.blogspot.com/2009/11/grow-tmp-filesystem-tmpfs-on-line-under.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/8126001868520318361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/8126001868520318361'/><link rel='alternate' type='text/html' href='http://ilapstech.blogspot.com/2009/11/grow-tmp-filesystem-tmpfs-on-line-under.html' title='Grow /tmp Filesystem (TMPFS) on-line under Solaris 10.'/><author><name>ilap</name><uri>http://www.blogger.com/profile/01985247399964184068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1487232898757889665.post-6334745228664010758</id><published>2009-09-06T02:53:00.000-07:00</published><updated>2010-01-06T11:02:08.875-08:00</updated><title type='text'>Cisco VPN Client on Karmic Koala</title><content type='html'>&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;=============================================&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;UPDATE:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;=============================================&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;Issue&lt;/span&gt;: I've got a new Intel Core 2 Duo based Notebook and after some minutes the system's hang (black screen and the mouse's not responding).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Cause:&lt;/span&gt; The kernel's paniced due the ipsec's kernel module. I switched to a virtual console (CTRL+ALT+F2) as soon as I started the vpnclient to get any error message from the system when the system hung as I didn't find any relevant error message in any log files.&lt;br /&gt;After some seconds/minutes later, I saw the panic message on the virtual console, which was relating to the cisco_ipsec.ko... So, the panic was related to the Cisco VPN kernel module.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;Workaround:&lt;/span&gt; Probably, you're using an SMP based kernel on an SMP capable arch (For ex. Intel Core 2 Duo). You should disable a CPU while you're using the VPN Cisco client.&lt;br /&gt;See, &lt;a href="http://ilapstech.blogspot.com/2009/09/cisco-vpn-client-on-karmic-koala.html?showComment=1257451714781#c7473635705597938301"&gt;this comment to solve&lt;/a&gt;.&lt;br /&gt;&lt;span style="color: rgb(255, 0, 0); font-weight: bold;"&gt;=============================================&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;I've recently installed Kubuntu 9.10 (Karmic Koala) Alpha 5 on my home laptop (IBM ThinkPad T60).&lt;br /&gt;It comes with a lot of nice features like support for the Cisco VPN (&lt;span style="font-weight: bold; font-style: italic;"&gt;"network-manager-vpnc" &lt;/span&gt;&lt;span style="font-style: italic;"&gt;a.k.a. &lt;/span&gt;VPNC plugin) and so on, but unfortunately the &lt;span style="font-weight: bold;"&gt;IPSec over TCP (TCP tunnel),&lt;/span&gt; which method needs to be used at my company, is not supported by the VPNC&lt;span style="font-weight: bold; font-style: italic;"&gt;&lt;/span&gt;.&lt;br /&gt;So, I must have tried to install the latest Cisco VPN Client (4.8.02.0300) on my fresh install.&lt;br /&gt;&lt;br /&gt;Steps:&lt;br /&gt;### 1. Get the latest vpnclient from the Net&lt;br /&gt;Google it&lt;br /&gt;&lt;br /&gt;### 2. Uncompress and compile&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;tar zxf vpnclient-linux-x86_64-4.8.02.0030-k9.tar.gz &amp;amp;&amp;amp; cd vpnclient&lt;br /&gt;&lt;/span&gt;$ &lt;span style="font-weight: bold;"&gt;sudo ./vpn_install&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Cisco Systems VPN Client Version 4.8.02 (0030) Linux Installer                    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Making module&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;make -C /lib/modules/2.6.31-9-generic/build SUBDIRS=/opt/Devel/CiscoVPNClient/4.8.02/vpnclient modules&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;make[1]: Entering directory `/usr/src/linux-headers-2.6.31-9-generic'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;  CC [M]  /opt/Devel/CiscoVPNClient/4.8.02/vpnclient.ori/interceptor.o&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;/opt/Devel/CiscoVPNClient/4.8.02/vpnclient.ori/interceptor.c: In function ‘interceptor_init’:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;/opt/Devel/CiscoVPNClient/&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;4.&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;8.02/vpnclient.ori/interceptor.c:132: error: ‘struct net_device’ has no member named ‘hard_start_xmit’&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;/opt/Devel/CiscoVPNClient/&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;4.&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;8.02/vpnclient.ori/interceptor.c:133: error: ‘struct net_device’ has no member named ‘get_stats’&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;/opt/Devel/CiscoVPNClient/&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;4.&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;8.02/vpnclient.ori/interceptor.c:134: error: ‘struct net_device’ has no member named ‘do_ioctl’&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;/opt/Devel/CiscoVPNClient/&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;4.&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;8.02/vpnclient.ori/interceptor.c: In function ‘add_netdev’:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;/opt/Devel/CiscoVPNClient/&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;4.&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;8.02/vpnclient.ori/interceptor.c:271: error: ‘struct net_device’ has no member named ‘hard_start_xmit’&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;/opt/Devel/CiscoVPNClient/&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;4.&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;8.02/vpnclient.ori/interceptor.c:272: error: ‘struct net_device’ has no member named ‘hard_start_xmit’&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;/opt/Devel/CiscoVPNClient/&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;4.&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;8.02/vpnclient.ori/interceptor.c: In function ‘remove_netdev’:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;/opt/Devel/CiscoVPNClient/&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;4.&lt;/span&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0);"&gt;8.02/vpnclient.ori/interceptor.c:294: error: ‘struct net_device’ has no member named ‘hard_start_xmit’&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;make[2]: *** [/opt/Devel/CiscoVPNClient/4.8.02/vpnclient.ori/interceptor.o] Error 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;make[1]: *** [_module_/opt/Devel/CiscoVPNClient/&lt;/span&gt;&lt;span style="font-style: italic;"&gt;4.&lt;/span&gt;&lt;span style="font-style: italic;"&gt;8.02/vpnclient.ori] Error 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;make[1]: Leaving directory `/usr/src/linux-headers-2.6.31-9-generic'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;make: *** [default] Error 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Failed to make module "cisco_ipsec.ko".&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Oooops, so it's failed. I tried to find any solution on the Net but I couldn't get any.&lt;br /&gt;I looked at the source code and seemed that the Linux kernel 2.6.31 replaced the old &lt;span style="font-weight: bold; font-style: italic;"&gt;net_device&lt;/span&gt; structure with a new one and is using that new structure for the net_device operations. This structure called &lt;span style="font-weight: bold;"&gt;net_device_ops&lt;/span&gt; (const struct net_device_ops *netdev_ops).&lt;br /&gt;&lt;br /&gt;I think this new netdevice feature  is available from the 2.6.29 kernel and it was coexisted with the old method too.&lt;br /&gt;I got some info about this on the following link: http://cateee.net/lkddb/web-lkddb/COMPAT_NET_DEV_OPS.html&lt;br /&gt;&lt;br /&gt;Unfortunately, this option is disappeared from the 2.6.31 so there was no option anymore to get the vpnclient to work with a COMPAT_NET_DEV_OPS=y built 2.6.31 kernel.&lt;br /&gt;&lt;br /&gt;As I didn't find any info how should I get the Cisco vpnclient to work on the Linux kernel 2.6.31 I needed to try to modify the Cisco's source(s) myself. Long story short I finally managed to create a small patch which is working for me on the Kubuntu 9.10 Karmic Koala /w Linux kernel 2.6.31-9.&lt;br /&gt;&lt;br /&gt;Here comes the tiny patch.&lt;br /&gt;&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;cat vpnclient-linux.2.6.31.diff &lt;/span&gt;&lt;br /&gt;&lt;pre class="source-code"&gt;&lt;code&gt;&lt;br /&gt;--- vpnclient.ori/interceptor.c 2009-05-21 01:16:34.000000000 +1200&lt;br /&gt;+++ vpnclient/interceptor.c 2009-09-06 22:02:39.000000000 +1200&lt;br /&gt;@@ -116,6 +116,14 @@&lt;br /&gt;};&lt;br /&gt;#endif&lt;br /&gt;&lt;br /&gt;+#if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(2,6,31)&lt;br /&gt;+static struct net_device_ops interceptor_netdev_ops = {&lt;br /&gt;+    .ndo_start_xmit = interceptor_tx,&lt;br /&gt;+    .ndo_do_ioctl   = interceptor_ioctl,&lt;br /&gt;+    .ndo_get_stats  = interceptor_stats,&lt;br /&gt;+};&lt;br /&gt;+#endif&lt;br /&gt;+&lt;br /&gt;static struct notifier_block interceptor_notifier = {&lt;br /&gt;.notifier_call = handle_netdev_event,&lt;br /&gt;};&lt;br /&gt;@@ -129,9 +137,13 @@&lt;br /&gt;{&lt;br /&gt;ether_setup(dev);&lt;br /&gt;&lt;br /&gt;+#if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(2,6,31)&lt;br /&gt;+    dev-&gt;netdev_ops = &amp;amp;interceptor_netdev_ops;&lt;br /&gt;+#else&lt;br /&gt;dev-&gt;hard_start_xmit = interceptor_tx;&lt;br /&gt;dev-&gt;get_stats = interceptor_stats;&lt;br /&gt;dev-&gt;do_ioctl = interceptor_ioctl;&lt;br /&gt;+#endif&lt;br /&gt;&lt;br /&gt;dev-&gt;mtu = ETH_DATA_LEN-MTU_REDUCTION;&lt;br /&gt;kernel_memcpy(dev-&gt;dev_addr, interceptor_eth_addr,ETH_ALEN);&lt;br /&gt;@@ -242,6 +254,9 @@&lt;br /&gt;{&lt;br /&gt;int rc = -1;&lt;br /&gt;int i = 0;&lt;br /&gt;+#if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(2,6,31)&lt;br /&gt;+    struct net_device_ops * tmp_ops;&lt;br /&gt;+#endif&lt;br /&gt;&lt;br /&gt;if (!supported_device(dev))&lt;br /&gt;{&lt;br /&gt;@@ -268,8 +283,14 @@&lt;br /&gt;Bindings[i].original_mtu = dev-&gt;mtu;&lt;br /&gt;&lt;br /&gt;/*replace the original send function with our send function */&lt;br /&gt;+#if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(2,6,31)&lt;br /&gt;+    Bindings[i].InjectSend = dev-&gt;netdev_ops-&gt;ndo_start_xmit;&lt;br /&gt;+    tmp_ops = (struct net_device_ops *) dev-&gt;netdev_ops;&lt;br /&gt;+    tmp_ops-&gt;ndo_start_xmit = replacement_dev_xmit;&lt;br /&gt;+#else&lt;br /&gt;Bindings[i].InjectSend = dev-&gt;hard_start_xmit;&lt;br /&gt;dev-&gt;hard_start_xmit = replacement_dev_xmit;&lt;br /&gt;+#endif&lt;br /&gt;&lt;br /&gt;/*copy in the ip packet handler function and packet type struct */&lt;br /&gt;Bindings[i].InjectReceive = original_ip_handler.orig_handler_func;&lt;br /&gt;@@ -285,13 +306,21 @@&lt;br /&gt;{&lt;br /&gt;int rc = -1;&lt;br /&gt;BINDING *b;&lt;br /&gt;+#if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(2,6,31)&lt;br /&gt;+    struct net_device_ops * tmp_ops;&lt;br /&gt;+#endif&lt;br /&gt;&lt;br /&gt;b = getbindingbydev(dev);&lt;br /&gt;&lt;br /&gt;if (b)&lt;br /&gt;{&lt;br /&gt;   rc = 0;&lt;br /&gt;+#if LINUX_VERSION_CODE &gt;= KERNEL_VERSION(2,6,31)&lt;br /&gt;+        tmp_ops = (struct net_device_ops *) dev-&gt;netdev_ops;&lt;br /&gt;+        tmp_ops-&gt;ndo_start_xmit = b-&gt;InjectSend;&lt;br /&gt;+#else&lt;br /&gt;   dev-&gt;hard_start_xmit = b-&gt;InjectSend;&lt;br /&gt;+#endif&lt;br /&gt;   kernel_memset(b, 0, sizeof(BINDING));&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;So, the further steps to get cisco vpnclient to work:&lt;br /&gt;&lt;br /&gt;### 4. Save this small patch above to a file. for example to cisco-vpnclient.2.6.31.diff and do the folowing:&lt;br /&gt;Or downolad it from &lt;a href="http://dl.dropbox.com/u/1289817/vpnclient-linux.2.6.31.diff"&gt;&lt;span style="font-weight: bold;"&gt;HERE&lt;/span&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;### 5. Patch the source&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;cd vpnclient&lt;/span&gt;&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;patch &lt; ../vpnclient-linux.2.6.31.diff &lt;/span&gt;&lt;br /&gt;patching file interceptor.c&lt;br /&gt;&lt;br /&gt;### 6. Compile it&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;sudo ./vpn_install&lt;/span&gt;&lt;br /&gt;Cisco Systems VPN Client Version 4.8.02 (0030) Linux Installer     &lt;br /&gt;Copyright (C) 1998-2006 Cisco Systems, Inc. All Rights Reserved.   &lt;br /&gt;...&lt;br /&gt;* Modules will be installed in "/lib/modules/2.6.31-9-generic/CiscoVPN".&lt;br /&gt;...&lt;br /&gt;Making module                                                         &lt;br /&gt;make -C /lib/modules/2.6.31-9-generic/build SUBDIRS=/opt/Devel/CiscoVPNClient/4.8.02/vpnclient.ori modules&lt;br /&gt;make[1]: Entering directory `/usr/src/linux-headers-2.6.31-9-generic'                     &lt;br /&gt;CC [M]  /opt/Devel/CiscoVPNClient/&lt;span style="font-style: italic;"&gt;4.&lt;/span&gt;8.02/vpnclient.ori/interceptor.o                      &lt;br /&gt;CC [M]  /opt/Devel/CiscoVPNClient/&lt;span style="font-style: italic;"&gt;4.&lt;/span&gt;8.02/vpnclient.ori/linuxkernelapi.o                   &lt;br /&gt;LD [M]  /opt/Devel/CiscoVPNClient/&lt;span style="font-style: italic;"&gt;4.&lt;/span&gt;8.02/vpnclient.ori/cisco_ipsec.o                      &lt;br /&gt;Building modules, stage 2.                                                              &lt;br /&gt;MODPOST 1 modules                                                                       &lt;br /&gt;WARNING: could not find /opt/Devel/CiscoVPNClient/&lt;span style="font-style: italic;"&gt;4.&lt;/span&gt;8.02/vpnclient.ori/.libdriver.so.cmd for&lt;br /&gt;/opt/Devel/CiscoVPNClient/&lt;span style="font-style: italic;"&gt;4.&lt;/span&gt;8.02/vpnclient.ori/libdriver.so&lt;br /&gt;CC      /opt/Devel/CiscoVPNClient/&lt;span style="font-style: italic;"&gt;4.&lt;/span&gt;8.02/vpnclient.ori/cisco_ipsec.mod.o                        &lt;br /&gt;LD [M]  /opt/Devel/CiscoVPNClient/&lt;span style="font-style: italic;"&gt;4.&lt;/span&gt;8.02/vpnclient.ori/cisco_ipsec.ko                           &lt;br /&gt;make[1]: Leaving directory `/usr/src/linux-headers-2.6.31-9-generic'                            &lt;br /&gt;Copying module to directory "/lib/modules/2.6.31-9-generic/CiscoVPN".                           &lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;### 7. Load the compiled kernel module (cisco_ipsec.ko)&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;lsmod | grep cisco&lt;/span&gt;&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;sudo /etc/init.d/vpnclient_init start&lt;/span&gt;&lt;br /&gt;Starting /opt/cisco-vpnclient/bin/vpnclient: Done&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;lsmod | grep cisco&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold; color: rgb(0, 153, 0);"&gt;cisco_ipsec           595804  0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;### 8. Connect&lt;br /&gt;$ &lt;span style="font-weight: bold;"&gt;sudo vpnclient connect WORK&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Cisco Systems VPN Client Version 4.8.01 (0640)                                           &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Copyright (C) 1998-2007 Cisco Systems, Inc. All Rights Reserved.                         &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Client Type(s): Linux                                                                    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Running on: &lt;/span&gt;&lt;span style="font-weight: bold; color: rgb(255, 0, 0); font-style: italic;"&gt;Linux 2.6.31-9-generic&lt;/span&gt;&lt;span style="font-style: italic;"&gt; #29-Ubuntu SMP Sun Aug 30 17:39:23 UTC 2009 i686      &lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Config file directory: /etc/opt/cisco-vpnclient                                          &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Initializing the VPN connection.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Initiating TCP to &lt;vpn&gt;, port &lt;port&gt;&lt;/port&gt;&lt;/vpn&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Contacting the gateway at &lt;gw&gt;&lt;/gw&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;User Authentication for WORK...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Enter Username and Password.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Username [&lt;user&gt;]:&lt;/user&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Password []:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Authenticating user.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Negotiating security policies.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Securing communication channel.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;"Use of this network is restricted to authorized users only. User activity may be monitored and/or recorded. Anyone using this network expressly consents to such monitoring and/or recording. BE ADVISED: if possible criminal activity is detected, these records, along with certain personal information, may be provided to law enforcement officials."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Do you wish to continue? (y/n): y&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Your VPN connection is secure.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;VPN tunnel information.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Client address: &lt;client&gt;&lt;/client&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Server address: &lt;server&gt;&lt;/server&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Encryption: 128-bit AES&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Authentication: HMAC-SHA&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;IP Compression: None&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;NAT passthrough is active on port TCP &lt;port&gt;&lt;/port&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Local LAN Access is enabled&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;Finally, I get it to work and it seems to be stable as I couldn't experienced any issue with this solution since it's applied.&lt;br /&gt;&lt;br /&gt;Reference(s):&lt;br /&gt;http://projects.tuxx-home.at/?id=cisco_vpn_client&lt;div id="ui-datepicker-div" style="display: none;"&gt;&lt;/div&gt;&lt;div id="ui-datepicker-div" style="display: none;"&gt;&lt;/div&gt;&lt;div id="ui-datepicker-div" style="display: none;"&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1487232898757889665-6334745228664010758?l=ilapstech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ilapstech.blogspot.com/feeds/6334745228664010758/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ilapstech.blogspot.com/2009/09/cisco-vpn-client-on-karmic-koala.html#comment-form' title='111 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/6334745228664010758'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/6334745228664010758'/><link rel='alternate' type='text/html' href='http://ilapstech.blogspot.com/2009/09/cisco-vpn-client-on-karmic-koala.html' title='Cisco VPN Client on Karmic Koala'/><author><name>ilap</name><uri>http://www.blogger.com/profile/01985247399964184068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>111</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1487232898757889665.post-638324362634650593</id><published>2009-04-05T03:44:00.000-07:00</published><updated>2009-04-09T05:15:53.103-07:00</updated><title type='text'>My 1st HTPC #Part 3: Mini PCI Capture Card - AverMedia M103 (hybrid)</title><content type='html'>&lt;span style="font-size:85%;"&gt;This part sometimes called "AverTV Hybrid DVB-T" or "Avermedia M103 (hybrid)" or whatever, but the most important things is which chips are built into this card and are those supported by the Linux or not.&lt;/span&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_PTgFX7z9gyI/SdiPA7yOUQI/AAAAAAAAAwc/UvUe4q1gwIE/s1600-h/Avermedia_pict.jpg"&gt;&lt;img style="margin: 0pt auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_PTgFX7z9gyI/SdiPA7yOUQI/AAAAAAAAAwc/UvUe4q1gwIE/s320/Avermedia_pict.jpg" alt="" id="BLOGGER_PHOTO_ID_5321160205949358338" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;XC3028 - Xceive Silicon Tuner (for Hybrid system)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;MT352 - Silicon Tuner - Zarlink DVB-T Demodulator (Digital Terrestrial TV Demodulator)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;SAA7135H - Philips Video Decoder and Broadcast Audio Decoder / PCI bridge (for worldwide sku)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_PTgFX7z9gyI/SdiFNaghfUI/AAAAAAAAAv8/TPvkUaLrat0/s1600-h/Avermedia_int.png"&gt;&lt;img style="margin: 0pt auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 246px;" src="http://1.bp.blogspot.com/_PTgFX7z9gyI/SdiFNaghfUI/AAAAAAAAAv8/TPvkUaLrat0/s400/Avermedia_int.png" alt="" id="BLOGGER_PHOTO_ID_5321149425238768962" border="0" /&gt;&lt;/a&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;Fortunately, these chips are (theoreticaly) supported by the latest Linux kernel &gt;=2.6.xx, so let's to see that the card can work on it or not.&lt;br /&gt;&lt;br /&gt;This card has just one input and doesn't any external output (Audio, S-video, composit and A/V output).&lt;br /&gt;The input of this card is the A/V output of my SKY Decoder (Pace DS620) and the output is the Analog VGA which will be an input for a VGA port of my Samsung LE32R27B TV.&lt;br /&gt;&lt;br /&gt;As this card doesn't have any external audio output so the Audio just could come from the card directly by the DMA using the PCI bus.&lt;br /&gt;I've just created a semantics picture of the capture card and its relations to other components to make sense how it works. See above.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;root@htpd:/# &lt;span style="font-weight: bold;"&gt;dmesg | more&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;...&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;Linux video capture interface: v2.00&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7130/34: v4l2 driver version 0.2.14 loaded&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7134 0000:04:07.0: PCI INT A -&gt; GSI 17 (level, low) -&gt; IRQ 17&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7133[0]: found at 0000:04:07.0, rev: 209, irq: 17, latency: 0, mmio: 0xfd8fe000&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7134 0000:04:07.0: setting latency timer to 64&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7133[0]: subsystem: 1461:f636, board: AVerMedia MiniPCI DVB-T Hybrid M103&lt;br /&gt;[card=145,autodetected]&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7133[0]: board init: gpio is 360000&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7133[0]: i2c eeprom 00: 61 14 36 f6 00 00 00 00 00 00 00 00 00 00 00 00&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;...&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7133[0]: i2c eeprom f0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7133[0]: i2c scan: found device @ 0x1e  [???]&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7133[0]: i2c scan: found device @ 0xa0  [eeprom]&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7133[0]: i2c scan: found device @ 0xc2  [???]&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;tuner' 0-0061: chip found @ 0xc2 (saa7133[0])&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;xc2028 0-0061: creating new instance&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;xc2028 0-0061: type set to XCeive xc2028/xc3028 tuner&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;firmware: requesting xc3028-v27.fw&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;xc2028 0-0061: Loading 80 firmware images from xc3028-v27.fw, type: xc2028 firmware, ver 2.7&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;xc2028 0-0061: Loading firmware for type=BASE F8MHZ (3), id 0000000000000000.&lt;/span&gt;&lt;span style="font-style: italic;"&gt; (0), id 00000000000000ff:&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;xc2028 0-0061: Loading firmware for type=(0), id 0000000100000007.&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;xc2028 0-0061: Loading SCODE for type=MONO SCODE HAS_IF_5320 (60008000), id 0000000f00000007.&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7133[0]: registered device video0 [v4l2]&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;saa7133[0]: registered device vbi0&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7134 ALSA driver for DMA sound loaded&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;saa7133[0]/alsa: saa7133[0] at 0xfd8fe000 irq 17 registered as card -2&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;xc2028 0-0061: attaching existing instance&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;xc2028 0-0061: type set to XCeive xc2028/xc3028 tuner&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;DVB: registering new adapter (saa7133[0])&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;DVB: registering frontend 0 (Zarlink MT352 DVB-T)...&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;xc2028 0-0061: Loading firmware for type=(0), id 0000000100000007.&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;xc2028 0-0061: Loading SCODE for type=MONO SCODE HAS_IF_5320 (60008000), id 0000000f00000007.&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;...&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;So, it can be seen that all of the chips are recognized and configured by the intrepid and also that the following devices are registered&lt;br /&gt;saa7133[0]: registered device video0 [v4l2] as /dev/video0 (as there is no other capture card)&lt;br /&gt;saa7133[0]: registered device vbi0 as /dev/vbi0 (data send within the channel such the teletext and so on)&lt;br /&gt;saa7134 ALSA driver for DMA sound loaded as /dev/dsp1 as the intel HDA is using the /dev/dsp audio device.&lt;br /&gt;DVB: registering frontend 0 (Zarlink MT352 DVB-T)... as /dev/dvb/adapter0/*&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;Issues and resolutions&lt;/span&gt; &lt;/span&gt;&lt;br /&gt;OK, let's check that it works or not. I have some options to check this but I prefer the mplayer or the tvtime and using the aerial antenna or the output of my SKY box. So, to fully understand what I wanted to check see the picture below.&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_PTgFX7z9gyI/SdiFWi2E_1I/AAAAAAAAAwE/3xtrQAAA6w0/s1600-h/Avermedia.png"&gt;&lt;img style="margin: 0pt auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 139px;" src="http://1.bp.blogspot.com/_PTgFX7z9gyI/SdiFWi2E_1I/AAAAAAAAAwE/3xtrQAAA6w0/s400/Avermedia.png" alt="" id="BLOGGER_PHOTO_ID_5321149582095482706" border="0" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;As my htpc is connected to an old pace DSR600 Sky decoder which is using the UHF 38th channel RF output (607.250 MHz in Europian frequency table) I needed to check that frequency with any TV capable player/application can get the TV stream or not. See details: tvtime, mplayer, UHF, VHF, Channel_37.&lt;br /&gt;&lt;br /&gt;Also keep in mind that the "AVerMedia MiniPCI DVB-T Hybrid" doesn't have any external audio output which could have been patched to the 6-jack, 2-jack or any TV audio input to get any sound.&lt;br /&gt;In this case the audio output of the capture card must be piped to the Intel HDA output to get any sound. The mplayer is capable to do this but not the tvtime.&lt;br /&gt;To test that capture card I needed to do the following:&lt;br /&gt;&lt;br /&gt;1. Get which Capture (Audio input) and Playback (Audio output) devices are exist in the system.&lt;br /&gt;ilap@htpc:~$ &lt;span style="font-weight: bold;"&gt;arecord -l&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;**** List of CAPTURE Hardware Devices ****&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Subdevices: 1/1&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;br /&gt;Subdevice #0: subdevice #0&lt;/span&gt; &lt;span style="font-style: italic;"&gt;card 0: Intel [HDA Intel], device 2: ALC888 Analog [ALC888 Analog]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Subdevices: 1/1&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;br /&gt;Subdevice #0: subdevice #0&lt;/span&gt; &lt;span style="font-style: italic;"&gt;card 1: SAA7134 [SAA7134], device 0: SAA7134 PCM [SAA7134 PCM]&lt;/span&gt;  &lt;span style="font-style: italic;"&gt;&lt;br /&gt;Subdevices: 1/1&lt;/span&gt; &lt;span style="font-style: italic;"&gt; Subdevice #0: subdevice #0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;ilap@htpc:~$ &lt;span style="font-weight: bold;"&gt;aplay -l&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;**** List of PLAYBACK Hardware Devices ****&lt;br /&gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;card 0: Intel [HDA Intel], device 0: ALC888 Analog [ALC888 Analog]&lt;br /&gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;Subdevices: 1/1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Subdevice #0: subdevice #0&lt;/span&gt; &lt;span style="font-style: italic;"&gt;card 0: Intel [HDA Intel], device 1: ALC888 Digital [ALC888 Digital]&lt;br /&gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;Subdevices: 1/1&lt;/span&gt; &lt;span style="font-style: italic;"&gt; Subdevice #0: subdevice #0&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;So, it shows 2 Sound cards:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Intel HDA (the internal one) and the&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;SAA7134 PCM (which is bundled in the Avermedia M103 capture card).&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;It also clearly seen that the SAA7134 PCM is just capable for the CAPTURE and not for the PLAYBACK as there is no any Audio output in that card.&lt;br /&gt;&lt;br /&gt;2. Check the card /w mplayer and/or tvtime&lt;br /&gt;ilap@htpc:~$ &lt;span style="font-weight: bold;"&gt;mplayer -v tv:// -tv freq=607.250:\&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;device=/dev/video0:input=0:norm=PAL:\&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;audiorate=32000:alsa:forceaudio:amode=1:\&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;adevice=hw.1,0:volume=100:immediatemode=0 -vo gl2 -aspect 16:9&lt;/span&gt; ...&lt;br /&gt;&lt;br /&gt;The freq=607.250 (or channel=38), adevice=hw,1.0 and the immediatemode=0 are the most important parameters for the mplayer. The adevice tells which is the audio capture device where the sound comes from. The immediatemode=0 lets the mplayer know that the AUDIO is not patched by cable (capture card's external audio output&lt;--cable to--&gt;other soundcard external input (such mic)) but piped directly from adevice to the default audio output device in this case to /dev/dsp (Intel HDA).&lt;br /&gt;&lt;br /&gt;As the tvtime is not capable to do this pipe we need to pipe it directly. For example the following command starts the tvtime in background and the "arecord | aplay" pipe is capturing the audio from the hw:1,0 (sa7134 capture card) and pipe to the default sound device (Intel HDA's /dev/dsp).&lt;br /&gt;&lt;br /&gt;ilap@htpc:~$ &lt;span style="font-weight: bold;"&gt;tvtime &amp;amp; arecord -D hw:1,0 -r 3200 | aplay&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;Finaly, I got the Video and Audio stream so I just needed to configure it in the MythTV. See, later&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Conclusion&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;I was supprised how good quality TV stream is coming out from this card as I was expected a "reasonable" output as it's a nearly zero priced capture card.&lt;br /&gt;&lt;br /&gt;But, to tell the truth I compared the output from my htpc and directly attached SKY decoder (through EuroSCART) and the quality of the stream from the directly attached input is better then the htpc one.&lt;br /&gt;But, I think the problem is that the TV has some internal features (such noise reduction etc.) to improve the quality of a noisy channel such a BNC input and I think that/those feature(s) is/are not used for the VGA output. But, I'm maybe wrong as I am/was not able to check the VGA output as an TV input to the TV as I don't have any VGA to TV (RCA/BNC/Composit/EuroSCART) converter.&lt;br /&gt;&lt;br /&gt;Anyway it's more than worth buying this capture card for anybody who needs a MiniPCi capture card.&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_PTgFX7z9gyI/SdiBQtQDGsI/AAAAAAAAAvg/fLIqSg9BbxI/s1600-h/L320_back_fin.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_PTgFX7z9gyI/SdiBQtQDGsI/AAAAAAAAAvg/fLIqSg9BbxI/s320/L320_back_fin.jpg" alt="" id="BLOGGER_PHOTO_ID_5321145083763038914" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;References&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;&lt;a href="http://www.linuxtv.org/wiki/index.php/AverMedia_M103_%28Hybrid%29_Mini_PCI"&gt; http://www.linuxtv.org/wiki/index.php/AverMedia_M103_(Hybrid)_Mini_PCI&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1487232898757889665-638324362634650593?l=ilapstech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ilapstech.blogspot.com/feeds/638324362634650593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ilapstech.blogspot.com/2009/04/my-1st-htpc-part-3-mini-pci-capture.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/638324362634650593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/638324362634650593'/><link rel='alternate' type='text/html' href='http://ilapstech.blogspot.com/2009/04/my-1st-htpc-part-3-mini-pci-capture.html' title='My 1st HTPC #Part 3: Mini PCI Capture Card - AverMedia M103 (hybrid)'/><author><name>ilap</name><uri>http://www.blogger.com/profile/01985247399964184068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_PTgFX7z9gyI/SdiPA7yOUQI/AAAAAAAAAwc/UvUe4q1gwIE/s72-c/Avermedia_pict.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1487232898757889665.post-3673362217547294139</id><published>2009-04-05T03:42:00.001-07:00</published><updated>2009-04-05T04:05:38.116-07:00</updated><title type='text'>My 1st HTPC #Part 2: Mini PCIe Wi-Fi Card - Atheros AR2425 AR50007EG 802.11g</title><content type='html'>&lt;span style="font-size:85%;"&gt;This card includes an Atheros AR2425 chip and is using the PCI id 186c:001c (Atheros Communications Inc. AR242x 802.11bg Wireless PCI Express Adapter (rev 01)) and Subsystem id 144f:7131 (Askey Computer Corp. Device)&lt;br /&gt;&lt;br /&gt;In spite of this chip is theoretically supported by the Linux through the madwifi and/or ath5k drivers I got a big headache to get this card works due the lack of information on the Internet.&lt;br /&gt;&lt;br /&gt;See details (issues and resolutions) below...&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Issues and resolutions&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;1. The version of the HAL of the current Madwifi driver (0.9.4) in Mythbuntu 8.10 doesn't support this card.&lt;br /&gt;Error message:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ath_hal: module license 'Proprietary' taints kernel.&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;ath_hal: 0.9.30.13 (AR5210, AR5211, AR5212, AR5416, RF5111, RF5112, RF2413, RF5413, RF2133)&lt;/span&gt; &lt;span style="font-style: italic;"&gt;wlan: 0.8.4.2 (svn r2619)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ath_pci: 0.9.4.5 (svn r2619)&lt;/span&gt; &lt;span style="font-style: italic;"&gt;PCI: Enabling device 0000:04:00.0 (0000 -&gt; 0002)&lt;/span&gt; &lt;span style="font-style: italic;"&gt;ACPI: PCI Interrupt 0000:04:00.0[A] -&gt; GSI 19 (level, low) -&gt; IRQ 19&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;br /&gt;PCI: Setting latency timer of device 0000:04:00.0 to 64&lt;/span&gt; &lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 0, 0);"&gt;&lt;br /&gt;MadWifi: unable to attach hardware: 'Hardware revision not supported' (HAL status 13)&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;br /&gt;ACPI: PCI interrupt for device 0000:04:00.0 disabled&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2. I had to install the latest madwifi. Check the following ticket: http://madwifi-project.org/ticket/1192 to process. The install process of the newest madwifi will ask to remove the current ath_hal and ath_pci drivers. So, I recommend to backup them before remove.&lt;br /&gt;&lt;br /&gt;Brief steps to install the latest HAL (as in 03/27/2009):&lt;br /&gt;2.1. Get the sources&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;sudo apt-get install svn build-essential linux-headers-$(uname -r)&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;cd ~&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;svn checkout http://svn.madwifi-project.org/madwifi/branches/madwifi-hal-0.10.5.6 madwifi-hal-0.10.5.6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2.2. Unload the already loaded driver (if they're not already blacklisted)&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;cd madwifi-hal-0.10.5.6/scripts&lt;/span&gt; # &lt;span style="font-weight: bold;"&gt;sudo ./madwifi-unload&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;sudo ./find-madwifi-modules.sh $(uname -r)&lt;/span&gt;&lt;br /&gt;2.3. Build the driver&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;cd ..&lt;/span&gt; # &lt;span style="font-weight: bold;"&gt;make &amp;amp;&amp;amp; sudo make install&lt;/span&gt; # &lt;span style="font-weight: bold;"&gt;sudo modprobe ath_pci&lt;/span&gt;&lt;br /&gt;But, the latest madwifi (0.10.9.6) couldn't configure the Mini-PCIe card.&lt;br /&gt;Error message:&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 0, 0);"&gt;wifi%d: unable to attach hardware: ‘EEPROM mac address invalid’ (HAL status 9)&lt;/span&gt;&lt;br /&gt;I should have used the ath5k instead.&lt;br /&gt;&lt;br /&gt;4. I tried to use the ath5k driver instead, but it is not built for the Ubuntu 8.10. So, I needed to install the backported ath5k driver.&lt;br /&gt;&lt;br /&gt;Brief steps to install&lt;br /&gt;4.1. Install the backports&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;sudo apt-get install linux-backports-modules-generic&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;sudo (/bin/echo -e "blacklist ath_hal\nblacklist ath_pci" &gt;&gt; /etc/modprobe.d/blacklisted)&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;sudo init 6&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Unfortunately, the backported ath5k still couldn't configure the Mini-PCIe card.&lt;br /&gt;Err msg:&lt;br /&gt;&lt;span style="font-style: italic;"&gt;cfg80211: Using static regulatory domain info&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;cfg80211: Regulatory domain: US&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(2402000 KHz - 2472000 KHz @ 40000 KHz), (600 mBi, 2700 mBm)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(5170000 KHz - 5190000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(5190000 KHz - 5210000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(5210000 KHz - 5230000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(5230000 KHz - 5330000 KHz @ 40000 KHz), (600 mBi, 2300 mBm)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;(5735000 KHz - 5835000 KHz @ 40000 KHz), (600 mBi, 3000 mBm)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;cfg80211: Calling CRDA for country: US&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ath5k 0000:02:00.0: PCI INT A -&gt; GSI 17 (level, low) -&gt; IRQ 17&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ath5k 0000:02:00.0: registered as 'phy0'&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;ath5k 0000:02:00.0: PCI INT A disabled&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; font-weight: bold; color: rgb(255, 0, 0);"&gt;ath5k: probe of 0000:02:00.0 failed with error -22 #The -22 is the EINVAL from errno.h&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So, none of the supported drivers (madwifi, ath5k, ath9k) could configure it at all.&lt;br /&gt;In case of I never give the things like this up, I was thinking of using the ndiswrapper as the last chance.&lt;br /&gt;But, before the last chance I had a quick rest /w a cup of coffee and was thinking of the things of the BIG LIFE:)&lt;br /&gt;&lt;br /&gt;After these, I installed the ndiswrapper and dowloaded the Windows native driver to use by the ndiswrapper.&lt;br /&gt;&lt;br /&gt;4. Install the ndiswrapper and blacklist the ath5k too.&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;sudo (/usr/bin/echo "blacklist ath5k" &gt;&gt; /etc/modprobe.d/blacklisted)&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;rmmod ath5k&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;sudo apt-get install ndisgtk&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;cd ~&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;wget http://blakecmartin.googlepages.com/ar5007eg-64-0.2.tar.gz&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;tar xvf ar5007eg-*.tar.gz&lt;/span&gt; # &lt;span style="font-weight: bold;"&gt;sudo ndiswrapper -i net5211.inf&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;sudo init 6&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;modprobe ndiswrapper&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;ifconfig wlan0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;wlan0 Link encap:Ethernet HWaddr &lt;span style="font-weight: bold; color: rgb(255, 0, 0);"&gt;FF:FF:FF:FF:FF:FF&lt;/span&gt;&lt;/span&gt; &lt;span style="font-style: italic;"&gt;    BROADCAST RUNNING MTU:1500 Metric:1&lt;/span&gt; &lt;span style="font-style: italic;"&gt;   &lt;/span&gt;...&lt;br /&gt;&lt;br /&gt;Fortunately, the card has been partialy configured as the native driver was loaded and the interface has been created (wlan0), but the interface still didn't come up as the MAC address was a broadcast one (FF:FF:FF:FF:FF:FF).&lt;br /&gt;&lt;br /&gt;So, I tried to modify the MAC with the macchanger, which was successfull, and the response of the 1st ping from my sweety WL-500gP has been arrived healthy.&lt;br /&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;sudo apt-get install macchanger&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;lspci -vvnn -s 02:0.0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;02:00.0 Ethernet controller [0200]: Atheros Communications Inc. AR242x 802.11abg Wireless PCI Express Adapter [168c:001c] (rev 01)&lt;/span&gt;&lt;span style="font-style: italic;"&gt; Subsystem: Askey Computer Corp. Device [144f:7131]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;#  &lt;span style="font-weight: bold;"&gt;macchanger --list=Askey&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Misc MACs:&lt;/span&gt; &lt;span style="font-style: italic;"&gt;Num    MAC        Vendor&lt;/span&gt; &lt;span style="font-style: italic;"&gt;---    ---        ------&lt;/span&gt; &lt;span style="font-style: italic;"&gt;&lt;br /&gt;6068 - 00:90:96 - Askey Computer Corp.&lt;/span&gt;  &lt;span style="font-style: italic;"&gt;Wireless MACs:&lt;/span&gt; &lt;span style="font-style: italic;"&gt;Num    MAC        Vendor&lt;/span&gt; &lt;span style="font-style: italic;"&gt;---    ---        ------&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;macchanger -m 00:90:96:4f:5c:e2 wlan0&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;ping cerberus&lt;/span&gt; &lt;span style="font-style: italic;"&gt;PING cerberus (192.168.0.1) 56(84) bytes of data.&lt;/span&gt; &lt;span style="font-style: italic;"&gt;64 bytes from cerberus (192.168.0.1): icmp_seq=1 ttl=64 time=1.32 ms&lt;/span&gt; &lt;span style="font-style: italic;"&gt;...&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;So, after this, I stored the new MAC permanently into the EEPROM as the macchanger just changing it temporary in the kernel space. To do that I used the ath_info command.&lt;br /&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;mkdir ath_info &amp;amp;&amp;amp; cd ath_info&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;svn checkout http://svn.madwifi-project.org/ath_info/trunk/ .&lt;/span&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;make&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;gcc -g -O2 -W -Wall -c ath_info.c&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;ath_info.c: In function ‘main’:&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;ath_info.c:2847: warning: ignoring return value of ‘fwrite’, declared with attribute warn_unused_result&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;gcc -g -O2 -W -Wall  -o ath_info ath_info.o&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;To get which memory address can be used to program the EEPROM&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;lspci -v -s 02:0.0 | grep Mem&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;Memory at &lt;span style="font-weight: bold;"&gt;fddf0000&lt;/span&gt; (64-bit, non-prefetchable) [size=64K]&lt;/span&gt;&lt;br /&gt;Dump the EEPROM addresses where the MAC is stored (0x1d-0x1f and 0xa5-0xa7)&lt;br /&gt;&lt;br /&gt;#  &lt;span style="font-weight: bold;"&gt;sudo ./ath_info -d fddf0000 | egrep "^00(18|a0):"&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;0018:  0000 0000 0000 0000 0000 0000 0000 0000&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;00a0:  0000 ffff ffff ffff ffff ffff ffff ffff&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;The MAC (for example: AA:BB:CC:DD:EE:FF) is stored in the following format:&lt;span style="font-style: italic;"&gt;&lt;br /&gt;---- 0x18 0x19 0x1a 0x1b 0x1c 0x1d 0x1e 0x1f&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;0018:  0000 0000 0000 0000 0000 EEFF CCDD AABB&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;---- 0xa0 0xa1 0xa2 0xa3 0xa4 0xa5 0xa6 0xa7&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;00a0:  0000 ffff ffff ffff ffff BBAA DDCC FFEE&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;As the EEPROM of this Mini PCIe card is write protected I must have set some GPIO pin to Low to enable it for writing.&lt;br /&gt;But, which GPIO pin should be set as every motherboard and/or card has different GPIO pin for this?&lt;br /&gt;&lt;br /&gt;So, I tried 3 4 5 (the commonly used ones), but no success,&lt;br /&gt;It's come back /w the following error message:&lt;br /&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;sudo -w -g 3:0 fddf0000 0x1d 0x5ce2&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;span style="font-style: italic;"&gt;WARNING: The write function may easy brick your device or&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;violate state regulation on frequency usage.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Proceed on your own risk!&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Shall I write the above value(s)? (y/n) y&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;writing *0x001f := 0x0001&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0); font-weight: bold;"&gt;#ERR do_write_pairs: offset 0x001f: wrote 0x5ce2 but read 0x0000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic; color: rgb(255, 0, 0); font-weight: bold;"&gt;restoring GPIO CR c0 -&gt; 0&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So, I tried it from 0 and then 1 and the 1 was the winner.&lt;br /&gt;So, the chosen MAC (00:00:e2:4f:5c:e2) is stored with the following commands:&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;root@htpc:/&lt;/span&gt;&lt;span style="font-size:85%;"&gt;# &lt;span style="font-weight: bold;"&gt;sudo -w -g 1:0 fddf0000 0x1d 0x5ce2&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;root@htpc:/&lt;/span&gt;&lt;span style="font-size:85%;"&gt;# &lt;span style="font-weight: bold;"&gt;sudo -w -g 1:0 fddf0000 0x1e 0xe24f&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;root@htpc:/&lt;/span&gt;&lt;span style="font-size:85%;"&gt;# &lt;span style="font-weight: bold;"&gt;sudo -w -g 1:0 fddf0000 0x1f 0x0000 &lt;/span&gt;# This one is not necessary...&lt;br /&gt;...&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;root@htpc:/&lt;/span&gt;&lt;span style="font-size:85%;"&gt;# &lt;span style="font-weight: bold;"&gt;sudo -w -g 1:0 fddf0000 0xa5 0x0000&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;root@htpc:/&lt;/span&gt;&lt;span style="font-size:85%;"&gt;#&lt;span style="font-weight: bold;"&gt; sudo -w -g 1:0 fddf0000 0xa6 0x4fe2&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;root@htpc:/&lt;/span&gt;&lt;span style="font-size:85%;"&gt;#&lt;span style="font-weight: bold;"&gt; sudo -w -g 1:0 fddf0000 0xa7 0xe25c&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;root@htpc:/&lt;/span&gt;&lt;span style="font-size:85%;"&gt;#&lt;span style="font-weight: bold;"&gt; sudo ./ath_info -d fddf0000 | egrep "^00(18|a0):"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;0018:  0000 0000 0000 0000 0000 5ce2 e24f 0000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;00a0:  0000 ffff ffff ffff ffff 0000 4fe2 e25c&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After this, I disabled the blacklisted drivers (ath_pci, ath_hal) and rebooted the box.&lt;br /&gt;As I expected it's started to do its job.:)&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;br /&gt;root@htpc:/#&lt;/span&gt;&lt;span style="font-size:85%;"&gt; &lt;span style="font-weight: bold;"&gt;dmesg | egrep -i "wifi|ath"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[   17.796476] ath_hal: module license 'Proprietary' taints kernel.&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;[   17.999420] ath_pci 0000:02:00.0: PCI INT A -&gt; GSI 17 (level, low) -&gt; IRQ 17&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;[   17.999442] ath_pci 0000:02:00.0: setting latency timer to 64&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;[   18.499991] MadWifi: ath_attach: Switching rfkill capability off.&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;[   18.667946] wifi0: Atheros AR2425 chip found (MAC 14.2, PHY SChip 7.0, Radio 10.2)&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;[   18.808582] ath_pci: wifi0: Atheros 5424/2424: mem=0xfddf0000, irq=17&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;[   30.604452] ath0: no IPv6 routers present&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;iwconfig ath0&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;ath0      IEEE 802.11g  ESSID:"ilap-wlan"  Nickname:""&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;Mode:Managed  Frequency:2.437 GHz  Access Point: 00:17:31:FB:2E:44&lt;br /&gt;&lt;/span&gt;&lt;span style="font-style: italic;"&gt;Bit Rate:11 Mb/s   Tx-Power:18 dBm   Sensitivity=1/1 &lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;Retry:off   RTS thr:off   Fragment thr:off&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;Power Management:off&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;# &lt;span style="font-weight: bold;"&gt;ifconfig ath0&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;ath0      Link encap:Ethernet  HWaddr 00:00:e2:4f:5c:e2 &lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;inet addr:192.168.0.3  Bcast:192.168.0.255  Mask:255.255.255.0&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;inet6 addr: fe80::200:e2ff:fe4f:5ce2/64 Scope:Link&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;RX packets:452180 errors:0 dropped:0 overruns:0 frame:0&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;br /&gt;TX packets:143741 errors:0 dropped:0 overruns:0 carrier:0&lt;/span&gt;&lt;br /&gt;...&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-size:85%;"&gt;So, the Wi-Fi has been installed...&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;Diversity mode&lt;br /&gt;&lt;/span&gt;Almost every Mini PCI Wi-Fi 802.11b/g card has at least two antennas (MAIN, AUX) and&lt;br /&gt;these two antennas are configured to use the diversity mode by default, which means that the chip dynamically switches between these two antennas to pickup the strongest signal. It sometimes can cause some performance degradation as it's always switching between them.&lt;br /&gt;I just have one antenna, so this setting is not necessary.&lt;br /&gt;&lt;br /&gt;# 1. Check the mode&lt;br /&gt;root@htpc:/# &lt;span style="font-weight: bold;"&gt;grep -r . /proc/sys/dev/wifi0/ 2&gt;/dev/null| egrep "anten|diver"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/proc/sys/dev/wifi0/txantenna:1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/proc/sys/dev/wifi0/rxantenna:0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;/proc/sys/dev/wifi0/diversity:1&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;# 2. Disable the diversity mode&lt;br /&gt;root@htpc:/# &lt;span style="font-weight: bold;"&gt;echo 0 &gt; /proc/sys/dev/wifi0/diversity&lt;/span&gt;&lt;br /&gt;root@htpc:/# &lt;span style="font-weight: bold;"&gt;echo 2 | tee/proc/sys/dev/wifi0/{r,t}xantenna&lt;/span&gt;&lt;br /&gt;or&lt;br /&gt;root@htpc:/# &lt;span style="font-weight: bold;"&gt;sysctl -w dev.wifi0.diversity=0&lt;/span&gt;&lt;br /&gt;root@htpc:/#&lt;span style="font-weight: bold;"&gt; sysctl -w dev.wifi0.txantenna=2&lt;/span&gt;&lt;br /&gt;root@htpc:/# &lt;span style="font-weight: bold;"&gt;sysctl -w dev.wifi0.rxantenna=2&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;root@htpc:/# &lt;span style="font-weight: bold;"&gt;athstats&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;1 beacon miss interrupts&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;715 tx management frames&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;110 tx failed due to too many retries&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;2112 long on-chip tx retries&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;573 tx frames with no ack marked&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;173 tx frames with an alternate rate&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;3391 rx failed due to bad CRC&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;401 PHY errors&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;   14 OFDM restart&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;   387 CCK restart&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;109 periodic calibrations&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;rssi of last ack: 22&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;rssi of last rcv: 21&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;6 switched default/rx antenna&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;Antenna profile:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[1] tx       42 rx      749&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;[2] tx    19449 rx    64576&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;root@htpc:/# &lt;span style="font-weight: bold;"&gt;80211stats&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;19825 rx from wrong bssid&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;8107 rx discard due to it's a dup&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;43 rx discard due to mcast echo&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;17614 rx element unknown&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;266 rx frame chan mismatch&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;3 rx w/ incorrect keyid&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;12 rx seq# violation (CCMP)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;29 active scans started&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;1 nodes timed out inactivity&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;# To make changes permanent&lt;br /&gt;root@htpc:/#&lt;span style="font-weight: bold;"&gt; sysctl dev.wifi0 2&gt;/dev/null | egrep "anten|divers"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;dev.wifi0.txantenna = 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;dev.wifi0.rxantenna = 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;dev.wifi0.diversity = 0&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;root@htpc:/sys#&lt;span style="font-weight: bold;"&gt; echo "# Set the WIFI&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;dev.wifi0.diversity = 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;dev.wifi0.txantenna = 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;dev.wifi0.rxantenna = 2" &gt;&gt; /etc/sysctl.conf&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:100%;" &gt;&lt;br /&gt;Conclusion&lt;br /&gt;&lt;/span&gt;In spite of the lack of information of this card and hard to get it up, I'm statisfied with it.&lt;br /&gt;It's very cheap, but very good quality. This card is also used by Apple too named it as "Airport Extreme".&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_PTgFX7z9gyI/SdiGvEFN1YI/AAAAAAAAAwU/kw62wE2ts54/s1600-h/L320_back_notfin.jpg"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; cursor: pointer; width: 320px; height: 240px;" src="http://4.bp.blogspot.com/_PTgFX7z9gyI/SdiGvEFN1YI/AAAAAAAAAwU/kw62wE2ts54/s320/L320_back_notfin.jpg" alt="" id="BLOGGER_PHOTO_ID_5321151102845834626" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;References&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;http://www.madwifi-project.org&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1487232898757889665-3673362217547294139?l=ilapstech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ilapstech.blogspot.com/feeds/3673362217547294139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ilapstech.blogspot.com/2009/04/my-1st-htpc-part-2-mini-pcie-wi-fi-card.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/3673362217547294139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/3673362217547294139'/><link rel='alternate' type='text/html' href='http://ilapstech.blogspot.com/2009/04/my-1st-htpc-part-2-mini-pcie-wi-fi-card.html' title='My 1st HTPC #Part 2: Mini PCIe Wi-Fi Card - Atheros AR2425 AR50007EG 802.11g'/><author><name>ilap</name><uri>http://www.blogger.com/profile/01985247399964184068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_PTgFX7z9gyI/SdiGvEFN1YI/AAAAAAAAAwU/kw62wE2ts54/s72-c/L320_back_notfin.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-1487232898757889665.post-4237629589891688984</id><published>2009-04-04T00:24:00.000-07:00</published><updated>2009-04-06T01:48:13.632-07:00</updated><title type='text'>My 1st HTPC #Part 1: The hardware</title><content type='html'>&lt;span style="font-size:85%;"&gt;I have been thinking of building a cheap HTPC (Home Theatre PC) for ages, but when I tried to collect which parts (Barebone Case, CPU, RAM, HD, DVD-ROM, TV-tuner, Graphics card, IR remote, etc.) should I need and how much do those parts cost, the price has reached the 1000 NZD which is much more higher than I should pay for it. So, I thought it is not worth building one...&lt;br /&gt;&lt;br /&gt;Also, I thought that a reasonable HW for an HTPC should includes a Core Duo processor with 1GB ram, Wi-Fi, fast HDD, ODD (Optical Disc Drive), TV Capture card, Bluetooth, reasonable Graphic card (just for playback and not for Game). Also, it should be small, quite and flossy.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;But, once upon a day:), I saw an Acer Aspire L320 on the TradeMe, here in New Zealand, just for 370 NZD (188 USD) and it includes the Intel(R) ViiV(TM) Technology Platform featuring:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Intel Core Duo processors&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Intel i946GZ (North Bridge) + Intel ICH7-DH (South Bridge) chipset&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Intel 82573L (Vidalia) Intel PRO/10/100/1000 PM Network Connection.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;L320&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;The Aspire L320 is small (25x20x6cm), quite (~26dB), fast enough and also has some empty Mini-PCI(e) slots (1xMini-PCI and 1x Mini-PCIe) for the additional parts.&lt;br /&gt;So, I thought why not... Let's have a try... If I fail then I will have a slimline PC instead.:)&lt;br /&gt;&lt;br /&gt;Anyway, for the Geek I have written the details and put some pictures of the Acer Aspire L320&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Case: simline PC&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Dimension (WxHxD): 60 x 200 x 250 mm&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Weight: 2.6Kg&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;CD/DVD-ROM: Slim-line Pioneer DVD-RW (DVR-K06RS, 2MB buffer, FW 1.06)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;I/O ports:&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;No any PCI nor ISA expansion slot.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt; &lt;span style="font-weight: bold;font-size:85%;" &gt;       Front Panel&lt;/span&gt; &lt;span style="font-weight: bold;font-size:85%;" &gt;               &lt;/span&gt;&lt;span style="font-size:85%;"&gt;o&lt;/span&gt;&lt;span style="font-size:85%;"&gt; 2-jack Audio Input/output&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;               &lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;1x Mini FireWire&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Multi-card reader (MMC, SD, MS, MS Pro, XD)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;2 USB Slots&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;Back panel&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;1xDC input (135W), so I had to choose the low-power components to fit to this restriction.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;1&lt;/span&gt;&lt;span style="font-size:85%;"&gt;xAnalog VGA and 1xDVI port&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;1xEthernet interface,  RJ45 port&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;4xUSB2.0 port&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;1xFirewire port&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;6-jack Audio ports (5.1 but 7.1 /w the front ones)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;Downside&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;There is no&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;any PCI slot (See the picture),&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;internal Wi-Fi,&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;IR remote &amp;amp; bluster,&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;internal Capture Card (TV-tuner) nor&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Bluetooth in this model.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-size:78%;"&gt;Note: To tell to truth its bigger brother (L3600) has almost every features (except the PCI slot and Wi-Fi) to be a great HTPC. I saw a used L3600 on the TradeMe just 700NZD with faster CPU, bigger HDD and so on. I would have bought it if I haven't already bought this one.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;Motherboard&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;The Aspire L320 using the ViiV technology with 82801GDH Northbridge and Intel 946GZ (ICH7-DH) Southbridge. There are 2 Audio codecs are coexist in the ICH7-DH chip, but it seems that the AC'97 have been disabled.&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;The old fashion AC'97 on the 00:1e:2* (Audio) and 00:1e:3 (Modem)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;and the newest Intel HD Audio on the 00:1b:00.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:78%;"&gt;Note:00:1e:2 means PCI bus 0, device 27 and function 0.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;The mobo (MOtherBOard) of the L320 is a closed product, no any information on the Internet.&lt;br /&gt;So, I had to chase and di&lt;/span&gt;&lt;span style="font-size:85%;"&gt;g the board a bit to get some information about it.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_PTgFX7z9gyI/SdiFwVzw1sI/AAAAAAAAAwM/quEl8PDKAA0/s1600-h/Mobo.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 400px; height: 290px;" src="http://4.bp.blogspot.com/_PTgFX7z9gyI/SdiFwVzw1sI/AAAAAAAAAwM/quEl8PDKAA0/s320/Mobo.jpg" alt="" id="BLOGGER_PHOTO_ID_5321150025272710850" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt; So, I finally managed to figure out almost all of the secrets of it (See the L320 Block Diagram):&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt; CPU: 1.6GHz Core Duo (&lt;/span&gt;&lt;span style="font-size:85%;"&gt;LGA 775, E2140, Conroe, 1MB cache, 65nm, 65W) and can  be upgreaded up to 2.66G&lt;/span&gt;&lt;span style="font-size:85%;"&gt;Hz  Core 2 Duo (E6700, Conroe, 65nm, 65W)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Memory: 1GB -&gt; 2x512MB DIMMs (Dual Channel)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Motherboard (mobo): FI946GZG, 04MJ2302789, Socket 775, mfg: 2007/06/09&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;         o 1xMini-PCI expansion slot&lt;br /&gt;o 1xMini-PCIe expansion slot&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;NorthBridge: 82946GZ GMCH (Graphic &amp;amp; Memory Controller Hub, 3.3W)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;         o Integrated Intel 3000 GMA graphics (not for game but MythTV).&lt;br /&gt;o Supporting Dual channel memory&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;SouthBridge: Intel® 82801GDH ICH7 Digital Home (ICH7-DH) Stepping: A1 (SL8UK)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;         o AC'97 (disabled in this configuration)&lt;br /&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;o&lt;/span&gt;&lt;span style="font-size:85%;"&gt;  Intel HD Audio /w Realtek ALC888 HDA Codec /w 7.1+2 Channels&lt;br /&gt;o Vidalia&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;BIOS bus (LPC or SPI): LPC bus&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;BIOS type: Phoenix 6.0G&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Bios ver: R01-A4 upgraded to R02-B0L (L=Linux)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Bios Chip: Pm49FL004T-3CCJE&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Super I/O chip: IT8718F (Not used as there is no any PS/2 Keyborad and Mouse ports)&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;The Southbridge (ICH7) is divided into 6 logical devices:&lt;br /&gt;ilap@htpc:~$ &lt;span style="font-weight: bold;"&gt;lspci -tvnn&lt;/span&gt;&lt;br /&gt;-[0000:00]-&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;# Northbridge&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;+-00.0  Intel Corporation 82946GZ/PL/GL Memory Controller Hub [8086:2970] (Note&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;+-02.0  Intel Corporation 82946GZ/GL Integrated Graphics Controller [8086:2972]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;# Southbridge&lt;/span&gt;&lt;span style="font-style: italic;"&gt;&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;#Intel HDA&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          +-1b.0  Intel Corporation 82801G (ICH7 Family) High Definition Audio Controller [8086:27d8]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;# PCI-E root ports (3 of 6)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          +-1c.0-[0000:01]--&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;         +-1c.1-[0000:02]--00.0  Atheros Communications Inc. AR242x 802.11abg Wireless PCI-E ... [168c:001c]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;         +-1c.2-[0000:03]--00.0  Intel Corporation 82573L Gigabit Ethernet Controller [8086:109a]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;# USB 4xUHCI and 1xEHCI Controllers&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          +-1d.0  Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #1 [8086:27c8]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          +-1d.1  Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #2 [8086:27c9]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          +-1d.2  Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #3 [8086:27ca]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          +-1d.3  Intel Corporation 82801G (ICH7 Family) USB UHCI Controller #4 [8086:27cb]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          +-1d.7  Intel Corporation 82801G (ICH7 Family) USB2 EHCI Controller [8086:27cc]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;# PCI-to-PCI Bridge (PCI 0 to PCI 4)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          +-1e.0-[0000:04]--+-06.0  Texas Instruments TSB43AB23 IEEE-1394a... Controller (PHY/Link) [104c:8024]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          |                 \-07.0  Philips Semiconductors SAA7135 Video Broadcast Decoder [1131:7133]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;# PCI-to-LPC Bridge, IDE, SATA, SMBus controller&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          +-1f.0  Intel Corporation 82801GH (ICH7DH) LPC Interface Bridge [8086:27b0]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          +-1f.1  Intel Corporation 82801G (ICH7 Family) IDE Controller [8086:27df]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          +-1f.2  Intel Corporation 82801GR/GH (ICH7 Family) SATA AHCI Controller [8086:27c1]&lt;/span&gt;&lt;br /&gt;&lt;span style="font-style: italic;"&gt;          \-1f.3  Intel Corporation 82801G (ICH7 Family) SMBus Controller [8086:27da]&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;See details below:&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_PTgFX7z9gyI/SdiDbjzy_bI/AAAAAAAAAv0/b1HyRDcf7pY/s1600-h/BlockDiagramm.png"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 290px; height: 400px;" src="http://3.bp.blogspot.com/_PTgFX7z9gyI/SdiDbjzy_bI/AAAAAAAAAv0/b1HyRDcf7pY/s400/BlockDiagramm.png" alt="" id="BLOGGER_PHOTO_ID_5321147469230439858" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;Sound (Intel HD Audio /w Realtek ALC888 HDA Codec /w 5.1+2 Channels)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;It has 6-jack in back and 2-jack in front, so I needed to set the parameter of model of HDA driver to "6stack" or "acer" to get the sound.&lt;br /&gt;See, /usr/share/doc/alsa-base/driver/ALSA-Configuration.txt.gz for details&lt;br /&gt;root@htpc# &lt;span style="font-weight: bold;"&gt;(S="options snd-hda-intel model=6stack"; T=/etc/modprobe.d/alsa-base; grep "$S" $T &gt; /dev/null || echo "$S" &gt;&gt; "$T")&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-size:100%;"&gt;&lt;span style="font-weight: bold;"&gt;References&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;www.acer.com.tw&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;ark.intel.com&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-size:130%;" &gt;To buy the parts...&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;I had to enable my eBay account and try to find what components I need to build a Linux based HTPC. I had two choises to fill up the two empty internal slots as I needed one Mini PCI(e) Wi-fi and one Mini PCI(e) capture card to get the L320 to be an HTPC:&lt;br /&gt;&lt;/span&gt;&lt;ol&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Mini PCI Capture card and Mini PCIe Wi-Fi  or&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Mini PCIe Capture card and Mini PCi Wi-Fi.&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;Also, I needed an IR remote (to control the HTPC) and Blaster (control&lt;br /&gt;the SKY box), a Wi-FI internal antenna, cable (IPEX/U.FL &lt;-&gt; RP.SMA) for the Wi-Fi card and a u.Fl to BNC pigtail for the 75 ohm TV Antenna Input of the Capture Card.&lt;br /&gt;&lt;br /&gt;The prices I found on the eBay were the following:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Mini-PCI Capture Card (/w u.fl to BNC cable) 8.99 USD&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Mini-PCIe Wi-Fi     13.99 USD&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;or&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Mini-PCIe Capture Card (/w areial antenna) 64.99 USD&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Mini-PCI Wi-Fi:     10.99 USD&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;75.98 USD versus 22.98 USD. Which one do you think I choosed?:)&lt;br /&gt;Yep, the winner is the following couple:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;AVerMedia M103 (Hybrid DVB-T and NTSC/PAL/SECAM/FM) found as "Mini PCI TV DVB-T PAL Card MCE Asus Acer ie3" on the eBay and it's came with the (cable too)&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Atheros AR2425 AR5007EG Mini PCI-E Wi-Fi Card 802.11g.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;span style="font-size:85%;"&gt;Finally I have managed to buy the folowing parts:&lt;br /&gt;&lt;/span&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Hauppauge Media Centre Remote Control Retail Box, Includes IR receiver and IR Blaster (MCE certified) 35.89NZD + 5NZD shipping&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Atheros AR2425 AR5007EG MiNi PCI-E WiFi Card 802.11G  13.99USD + free shipping&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;AverMedia M103 Mini-PCI Hibrid (Analog TV/DVB-T) Card a.k.a Acer TV (MCE certified) /w u.FL to BNC pigtail. 12.49 EUR ~ 15.92USD ~ 31.85 NZD&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;Tiny USB 2.0 Bluetooth 2.0 EDR Dongle 3.27 USD /w free shipping. 6,35 NZD&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;wifi U.FL male RP-SMA Pigtail for Mini PCIe Card 20cm. 4.99 USD + Free shipping&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size:85%;"&gt;10 DBI 2.4GHz WIRELESS WIFI ANTENNA BOOSTER WLAN RP-SMA. 1USD + 3.01USD Shipping&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_PTgFX7z9gyI/SdiXo1GtM2I/AAAAAAAAAws/v6LDsqzfo8A/s1600-h/L320_back.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 240px;" src="http://3.bp.blogspot.com/_PTgFX7z9gyI/SdiXo1GtM2I/AAAAAAAAAws/v6LDsqzfo8A/s320/L320_back.jpg" alt="" id="BLOGGER_PHOTO_ID_5321169687444009826" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;br /&gt;So the cost of the prospective HTPC is ~490 NZD -&gt; ~ 250 USD which I think is a reasonable price for an HTPC. I just needed the L320 to be built as an HTPC.&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/1487232898757889665-4237629589891688984?l=ilapstech.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ilapstech.blogspot.com/feeds/4237629589891688984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ilapstech.blogspot.com/2009/03/my-1st-htpc-part-1-hardware.html#comment-form' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/4237629589891688984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/1487232898757889665/posts/default/4237629589891688984'/><link rel='alternate' type='text/html' href='http://ilapstech.blogspot.com/2009/03/my-1st-htpc-part-1-hardware.html' title='My 1st HTPC #Part 1: The hardware'/><author><name>ilap</name><uri>http://www.blogger.com/profile/01985247399964184068</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_PTgFX7z9gyI/SdiFwVzw1sI/AAAAAAAAAwM/quEl8PDKAA0/s72-c/Mobo.jpg' height='72' width='72'/><thr:total>5</thr:total></entry></feed>
