Disclaimer

I am not responsible if your devices send you back in time, explodes, implodes, bricks or flies into space from the use of any software I put up.

Search

Monday, September 26, 2011

Realtek Driver Mod

For a while there has been a Realtek Driver Mod for Realtek Audio Codec Only.
This Mod enables better Audio by utilizing the X-Fi Software.
I find this mod especially effective on laptops with very low power speakers like the Acer Aspire 3810 Timeline Laptops.

Pre-Requesites:
  • Windows Vista/7 and above
  • Local Administrative Permission on the System
The Mod requires the use of a Malware Vector to generate the crack that affects only Delphi Files so Delphi Developers should use with caution, it should not affect most other users. It is not a trojan/worm.
If you don't trust the software do not use it.

Step 1:
Download the Files and uninstall existing Realtek Sound Drivers if any.

Step 2:
Extract and Install the Modified Realtek Drivers (they are not WHQL) using the AsusSetup Executable.

Step 3:
Reboot

Step 4:
Extract and Install the X-Fi Software.

Step 5:
Reboot

Step 6:
Right Click on the Sound Blaster Panel icon on the System Tray,
choose Select Audio Device and Select SB-XFi MB2.

Step 7:
Reboot and enter Safe Mode by pressing F8 rapidly during reboot.

Step 8:
Extract the activator, find the .bat file, Right Click on it and Choose Run As Administrator.
Open the Folder C:\ProgramData\Creative\SoftwareLock
Check that the following files below are created:
CTD1JXF23A.kga
CTD5H2W3DK.kga
CTL42SW23M.kga
CTL52C6FE2.kga
CTLD14KLI5.kga
CTLD2JX234.kga
CTLE2C3BA1.kga
CTLP22SV21.kga
CTT78HSK12.kga
CTT92KD23N.kga

Step 9:
Delete all the zip files and folders you don't need(Clean Up), Reboot and Enjoy.

Saturday, July 16, 2011

Hacking TP-Link WR1043ND Part 4

To Tweak the OpenWRT for Pure Performance there is no other way than editing config files from Terminal so I hope you actually read Part 3 before.
There are 4 parts to Tweaking the Performance
  1. Wireless Performance
  2. Wired Performance
  3. Web Performance
  4. QoS (Quality Of Service)
  5. Overclock the Router
Tweaking Wireless Performance:

Setting to Wireless N with G backward compatibility

The TP-Link WR1043ND Hardware has a 3 Transmit 3 Receive Radio that is only Single Band with 20/40MHZ  Frequency. It has Wireless B/G/N Capability.
To fully understand WiFi Standards you need to read up on IEEE 802.11 standards.
We start by tweaking the Radio.

Wireless N allows backward compatibility with B and G, you need to set it to 802.11g+n.
You can do this by logging into the Router via Putty using vi editor edit the file called "wireless" in /etc/config/, or do it in LuCI Web Interface(Router Config Page).


Adjusting Channel Width:

Next you need to make sure the Router is using 40MHZ Channel Width, this will allow greater throughput.
You can do this by logging into the Router via Putty using vi editor edit the file called "wireless" in /etc/config/
config 'wifi-device' 'radio0'
        option 'type' 'mac80211'
        option 'channel' '7'
        option 'macaddr' 'XX:XX:XX:XX:XX:XX'
        option 'hwmode' '11ng' #Wireless G and N Modes
        option 'htmode' 'HT40-' # Set to 2.4GHZ 40MHZ Fat Lower(-) Channel
        option 'noscan' '1' # Enable neighbour 'unfriendly' WiFi Settings
        option 'country' 'US'
        list 'ht_capab' 'SHORT-GI-40'
        list 'ht_capab' 'DSSS_CCK-40'
        option 'disabled' '0'
        option 'txpower' '24'
config 'wifi-iface'
        option 'device' 'radio0'
        option 'network' 'lan'
        option 'mode' 'ap'
        option 'ssid' 'Your_SSID_Here'
        option 'encryption' 'psk2'
        option 'key' 'your_secret_key_here'
       
Note that there are 2 htmodes, HT40+ and HT40- you set them based on the channel available. If you set it wrongly you have to log in to the router via Ethernet Cable and change it back.
By rights 'htmode' is not allowed if there are competing BSSID using that channel (the good neighbor regulation), but you can override that with 'noscan' option. There is also a distance optimization setting which I tested the best values at 20-25.

Below is a graph displaying the difference between 40MHZ Channel Width and 20MHZ Channel Width.
Note that you can define more than 1 Access Point on OpenWRT. You can configure a Second AP as Guest and Fire-walling it from your own LAN.


Higher TXPower (Transmit Power)

Transmit Power allows you to resize the cell. Max Value is 24 only works with US regulatory settings.
You can also try placing the Wireless Router at a higher position for better signal strength.

Tweaking Wired Performance:

Next you need to make sure the Router Ethernet Performance is adjusted by changing the sysctl variable this will allow greater throughput.
You can do this by logging into the Router via Putty using vi editor edit the file called "sysctl.conf" in /etc/

kernel.panic=3
# The following 3 lines helps to ensure Router will always have
# sufficient memory and will not crash during samba file copy
vm.vfs_cache_pressure=1000
vm.min_free_kbytes=4099
vm.swappiness=0

net.ipv4.conf.default.arp_ignore=1
net.ipv4.conf.all.arp_ignore=1
net.ipv4.ip_forward=1
net.ipv4.icmp_echo_ignore_broadcasts=0
net.ipv4.icmp_ignore_bogus_error_responses=1
net.ipv4.tcp_ecn=0
net.ipv4.tcp_fin_timeout=30
net.ipv4.tcp_keepalive_time=120
net.ipv4.tcp_syncookies=1
net.ipv4.tcp_timestamps=1
net.core.netdev_max_backlog=5000
net.netfilter.nf_conntrack_checksum=0
net.netfilter.nf_conntrack_max=32768
net.netfilter.nf_conntrack_tcp_timeout_established=3600
net.netfilter.nf_conntrack_udp_timeout=60
net.netfilter.nf_conntrack_udp_timeout_stream=180
# Use ipv6
net.ipv6.conf.all.forwarding=1


# disable bridge firewalling by default
#net.bridge.bridge-nf-call-arptables=0
#net.bridge.bridge-nf-call-ip6tables=0
#net.bridge.bridge-nf-call-iptables=0
# Increase TCP max buffer size setable using setsockopt()
# 2 MB might be enough for some very long end-to-end paths
net.core.rmem_max = 2097152
net.core.wmem_max = 2097152
# Increase Linux autotuning TCP buffer limits
# min, default, and max number of bytes to use
# (only change the 3rd value, and make it 2 MB or more)
net.ipv4.tcp_rmem = 4096 87380 2097152
net.ipv4.tcp_wmem = 4096 65536 2097152
 
# The following 2 lines enable ipv6 privacy mode
net.ipv6.conf.all.use_tempaddr=2
net.ipv6.conf.default.use_tempaddr=2
All the TCP tweaks are derived from ESnet
Note: These tweaks are not found on OpenWRT How Tos, however I soon discovered that someone is working on bufferbloat hence the tweaks on buffersize should be approached with caution.


Also if you have a Windows File Share you want to tell the Router firewall not to monitor SAMBA Packets.
Windows Share also known as SAMBA in Linux uses the Port 445 so you need to tell OpenWRT to stop monitoring Packet Originating from LAN using Port 445.


Tweaking Web Performance:
Web Peformance typically require a lot of DNS Look up so you want to tell OpenWRT to use the Fastest DNS Server available.
You can do this by logging into the Router via Putty using vi editor edit the file called "dnsmasq.conf" in /etc/ or do it in the file /etc/config/dhcp
and add the fastest DNS Server closest to you.
Add the Line Below and change the IP of the server to YOUR fastest DNS Server. My Fastest DNS Servers may not be your Fastest DNS Server.
dhcp-option=6,165.21.83.88,8.8.8.8,208.67.222.222
Blue is a Singapore ISP DNS Server, Green is Google DNS Server, Red is OpenDNS Server.
There is no limit of the number of DNS Server you can set on OpenWRT

Quality of Service                    

What is Quality of Service?
Quality of Service makes it so that during torrenting, your webpages doesn't take a long time to load even though you are on a 1Mbps Connection.
It does this by prioritizing network traffic, putting webpage network packets in higher importance than torrent packets.
The step to installing QoS is logging into the Router via Putty then
opkg install luci-app-qos
You set the QoS by setting the Port the Network Originate from and the Priority. Or you can set layer 7 filter to detect torrent traffic. Note that Layer 7 filtering is processor intensive activity and might cause the routing performance of the router to drop.


Hopefully you learn a lot from this series of blog post and enjoy the high performance of your Modified Router running on OpenSource Software.
If you run a Windows Share Server when you place the laptop beside the router and do a copy you should be getting insane WiFi Speeds @ 150Mbps at 5m line of sight
Let the numbers speak for themselves!


In case you modified the wrong config files and got lock out the fail safe mode is here.

If you are interested I have a OpenWRT built for TL-WR1043ND that I use personally myself. It is optimized to my satisfaction for pure performance.
You can get it here.
If you actually tried my firmware you will find that all the tweaks I listed above have been already added to the firmware defaults so there is nothing additional to tweak.

Hacking TP-Link WR1043ND Part 3

I will only be posting HOW-TO not found in OpenWRT Pages, if you need to config a particular setting please refer to the Well-Documented OpenWRT HOW-TOs here.
Useful Wiki on OpenWRT include
  • Getting 3G Modem working
  • VPN (not complete)
  • Files and Settings
  • NFS Network FileSharing
It is troublesome/pointless to rewrite well-documented resources.
Reading the How-To is a must have for all OpenWRT newbies!

First you need to set a Router Config Page Login Password.
Otherwise the SSH ports will not be open for you to configure and upload files to it.
Open Web Browser, Enter "192.168.1.1" in URL Bar.
Then follow the picture below:


From here onward is to demostrate how to login and use the Router like a Linux Terminal Computer.
It makes little sense not to leverage on the Compute Capabilities of Linux after using a more powerful third party firmware.
OpenWRT assumes users know Linux Terminal KungFu hence it is intimidating to those who don't.
Hopefully after reading this you will pick up some Terminal KungFu.
_______________________________________________
Upload Files to Router using SCP







______________________________
SSH (Login) into Router



Basic Linux Commands in OpenWRT
  • "ls" - List Files in Existing Folder
  • "dmesg" - Display System(Router) diagnostic message 
  • "pwd" - Display Present Working Directory
  • "opkg" - OpenWRT Package Installer 
    • "opkg install package" to install a software call "package"
    • "opkg remove package" to uninstall a software call "package"
    • "opkg list-install" to list all installed software"
    • "opkg update" to update list of package available in the OpenWRT Repository the router needs to be connected to the internet before you can update
    • "opkg" to display all possible commands
  • "wifi" to restart Wireless Radio
  • "ifup/down" to start or stop a Particular Interface
    • "ifup wan" to start WAN interface
    • "ifdown wan" to stop WAN interface
    • "ifup lan" to start LAN interface
    • "ifdown lan" to stop LAN interface
  • "cd" to change directory
    • "cd .." to go up 1 level (Exit the folder)
    • "cd /" to go to Root Directory 
    • "cd /tmp/ to go to tmp directory (If you want to go to a specific directory type "cd /tm" then press Tab to auto complete the name of the folder useful if the name of the folder is very very long
  • "vi" Text Editor
    • eg. to Edit a file call "network" in folder "/etc/config/" type "vi /etc/config/network"
    • The default mode in VI is view mode to display text files
    • To enter/delete Text in vi press "i" to Enter insert mode and type to enter backspace to delete
    • To delete a particular line of text in vi Press "Esc" go to the line using arrow then enter "dd" twice and the line disappears
    • To save a file press "Esc" then ":w" (w stands for write)
    • To exit VI press "Esc" then ":q" (q stands for quit)
    • To exit without saving  press "Esc" then ":q!" (! stands for "I don't care just do it !)
    • To exit with saving  press "Esc" then ":wq"
  • "reboot" to restart Router
  • "cp" - copy eg to copy a file called "network" from inside /tmp/ to /etc/config"      
"cp /tmp/network /etc/config/network"
    • Syntax as follows: cp <source> <destination>
  • "rm" - Delete a particular file
  • "wget" -Download file from Internet (Must be connected to Internet first, make sure the file size doesn't exceed the the total memory of the router)

The list of commands is actually quite a chunk, you should read up on Linux Shell if you are interested.

Hacking TP-Link WR1043ND Part 2

Part 2: Upgrading to OpenWRT


First of all what is OpenWRT?

It is a niche Linux Distribution meant for Routers.
Which means after installing it you can add packages onto the Operating System to expand its capabilities.
Much like any Linux Distribution it maintains a package repository for end-users.

It will help alot if you have prior knowledge on Linux Terminal Commands because OpenWRT run Linux.

Why OpenWRT out of so many Third Party Firmware?

OpenWRT provides its own Repository brimming with numerous packages.
It is very much like Debian is for Routers.

Hardware Required:
  1. Working Ethernet Cable to connect the PC to the Router                                                                                (You should have 1 in the Box where you bought the Router).
Software Required:
The Software Required is for controlling the Router Via a PC otherwise you can't interact with it.
  1. SSH Terminal (For Windows Download Putty, Most GNU\Linux should have SSH Terminals by Default)           This Program is for Accessing the router like logging in to a server.
  2. WinSCP (For Windows Download WinSCP, Most GNU\Linux should have SCP Terminals by Default)      This Program is for Uploading and Downloading Packages to the Router.
  3. Fairly Advance Web Browser ( Either Firefox, Internet Explorer and Chrome will do)                                       This is for accessing the LuCI Web Interface installed into the router.
a)Download the Firmware from OpenWRT Download Site.

For TP-Link WR1043ND we access the OpenWRT Stable Repository.
Go to the Folder for the latest release of OpenWRT then go into the /ar71xx/ subfolder.
This folder is meant for Atheros MIPS Processor based routers.
Scroll until you find files with the name "openwrt-ar71xx-tl-wr1043nd-v1-"

Look carefully and you should see 2 matching files:
The first ends with
openwrt-ar71xx-tl-wr1043nd-v1-squashfs-sysupgrade.bin
The second one ends with
openwrt-ar71xx-tl-wr1043nd-v1-squashfs-factory.bin
Sysupgrade is for Upgrading Routers already installed with OpenWRT of the older versions while factory is for Upgrading Routers on Original Firmware.

Assuming the Router is runnning Original Stock Firmware from TP-Link, download
openwrt-ar71xx-tl-wr1043nd-v1-squashfs-factory.bin 

b)Flashing the Firmware
  1. Disconnect all Internet Connections on the PC and Router. 
  2. Ensure the Router/PC is on Stable Power Source.
  3. Connect the PC use to upload the file to the Router using the Ethernet Cable.
  4. Open Internet Browser on the PC
  5. Type "192.168.1.1" in the URL Bar of the Internet Browser to access the TP-Link Router Configuration Page if you did not touch any ip configuration the default is usually 192.168.1.1.
  6. Default Login name and Password is written under the Router.
  7. Go to the Firmware Upgrade Utility Page
  1. Click on Browse then navigate to the Folder where you downloaded  openwrt-ar71xx-tl-wr1043nd v1-squashfs-factory.bin
  2. Click Upgrade and Wait for 15 mins 

  1. Double Check the Lights on the Router it should blink quickly then turn off then turn on again.
  2. Type "192.168.1.1" in the URL Bar of the Internet Browser again. You should see the LuCI Webpage
 
  1. There should be no password just click login. Set a password (Under Administration) immediately to enable SSH Login.
  2. You are done your router is now running on OpenWRT, but you are not done yet you still need to configure the router for normal use.

Friday, July 15, 2011

Hacking TP-Link WR1043ND Part 1

This is a series of blog post detailing about how to hack the TP-Link WR1043ND to maximize its potential.
I will try to be as noob friendly as possible.
My Mods are in no way original, it is just a collection of existing mods combined into a few articles for easy instructional reading.
Special Thanks to the guys @ OpenWRT who made this possible.

The hacks done are as follows:
  1. Upgrade the Internal DDR RAM from 32MB to 64MB.
  2. Upgrading the firmware from TP-Link Stock Firmware to OpenWRT.
  3. Accessing/Operating OpenWRT from Shell Commands
  4. Configuring and Tweaking the Router for Maximium Performance. Please Read 3 first.
First of all why mod a router?
  • To make it do more for less because a router is actually an embedded system which can do more running Open Firmware rather than suffer the limitations imposed by stock firmware. After installing OpenWRT you will be able to install packages to make the router perform more tasks than ever.
  • To get better performance. Most manufacturers do not actually tweak the router performance much, rather they prefer to prettify the routers so they can sell more instead of making it do better at what it is supposed to do because most consumers are stupid.
  • Get latest updates. When running stock firmware, updates are pretty much at the mercy of manufacturers, compared to running open firmware like OpenWRT you get new updates every time there is a new release.
  • Learn more. You get to learn more about Linux and other stuff you never knew before and that itself is priceless.
Why you do not want to mod a router:
  • Firstly it voids warranty, it is possible that during the course of modding you may damage the router if you made a mistake hence it doesn't make sense for the manufacturer to pay for your mistake.
  • It is tedious and costly if you do not have the tools or the patience or brains.
The Router


The Router in question is the TP-Link WR1043ND.
Why TP-Link WR1043ND out of so many OpenWRT supported routers?
  1. It is cheap. If you check the market for routers you will find it selling for a low cost. I bought it for SGD$75. Do the conversion and you will be convinced.
  2. It is powerful. Again if you check the market you will find the next cheapest Gigabit Router priced at more than SGD$100. In the WR1043ND you will find lots of flash memory for installing OpenWRT as well. The 3 Antennas it possess further increase the Wireless Performance. It also contain a USB Port for expanded possibilities (FileSharing anybody?).
  3. It is Stable. Because of reason 1) and 2) many hardware hackers have bought and modified this router and OpenWRT to suit it, so it runs incredibly stable on OpenWRT.
TP-Link is a Network Device Manufacturer from China but being objective, I am not concern about branding. I don't get anything useful out of branding, rather I am more concern with the performance I can get for a low cost. Moreover it is a excellent product specification wise.

Information about the MIPS24KC Core SKU




The Specification:

The Core
CPU = Atheros AR9132-BC1E rev 2
MIPS Architecture Rev = MIPS 24Kc V7.4
ASEs implemented = mips16
(code-compression support only)
CPU Speed = 400MHz
Advance High Performance Bus (AHB) = 200MHZ
Instruction cache = 64kB, VIPT, 4-way, linesize 32 bytes
Data cache = 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Flash Type = Serial
Flash Chip = 25P64V6P 99AJAV5 MYS722
Flash Size = 8MB
RAM Size = 32MB
RAM Bus = 400MHZ
RAM Chip = Zentel A3S56D40FTP
Switch = Realtek RTL8366RG A1G17A2 GA05B
Ethernet Port Count = Gigabit LAN and WAN Ports
Power = 12V/1.5A
USB = 1 USB 2.0 Port

The Radio
Wireless Radio = Atheros AR9103 3x3 MIMO
Channel Width = 20MHZ or 40MHZ
Antenna Connector Type = 3dBi Detachable RP-SMA Omni Directional Antenna X 3
Wireless Standard = IEEE 802.11b/g/n 
WiFi Operating Frequency = 2.4~2.4835GHz (Single Band)
 802.11n = up to 300Mbps
 802.11g = 6, 9, 12, 18, 24, 36, 48, 54Mbps
 802.11b = 1, 2, 5.5, 11Mbps
Part 1: Upgrading the DDR RAM

Upgrading the DDR RAM requires soldering, if you are not good at this you can skip this section.
 
Tools required:
  1. Soldering Iron
  2. Solder (Try to get good quality ones poor quality ones have very little flux hence difficult to solder)
  3. Soldering Flux
  4. Way to Desolder SMT Component ( I used ChipQuik, simple fast, easy, and clean )
  5. Desoldering Wick
  6. Dexterous Hands
  7. Magnifying Lens
  8. Tweezer 
  9. Isopropyl Alcohol for Cleaning also known as Rubbing Alcohol in Pharmacies
  10. Compatible DDR RAM IC (TSOP 66, 66 pins and 16bit Data Width, Check the DataSheet to be sure)
List Of Known Compatible RAM IC:
Hynix HY5DU121622DTP-D43
Infineon HYB25D512160B
a) Dissembling The Router
  1. Turn off the Power and Unplug all cables. This is common sense.
  2. Unscrew the Antennas, this is to prevent obstruction of soldering activity later.
  3. Ground yourself, depending on where you are, electrostatic charges can accumulated on your body and its discharge may damage sensitive electrical equipment.
  4. Remove the 2 Rubber Feet at the back of the router. The exposed screws are circled in Red.
  5. Pull the lid up from the back so the router lid is angled as shown below.
  6. Using a Flat Head Screw Driver, slide the tip into the slit exposed in front and give it a gentle twist and the cover should come off. Do it for both sides.                                                                                                           
  7. You should see the exposed board as shown. The DRAM to be desoldered is shown below boxed in Red                                                                                                                                                        
b)SMT Desoldering the DRAM
  1. Ensure the tip of the Soldering Iron is clean, otherwise you will have a hard time soldering.
  2. Spread some soldering flux along on the legs of the DRAM using a tweezer.
  3. Next, I melt the ChipQuik on the legs of the IC using the soldering Iron. ChipQuik is a low temperature solder which means it remains in liquid state at warm temperatures therefore it is easy to remove it.
  4. Make sure ChipQuik fuses with the legs of the RAM. Do not apply heat directly to ChipQuik or the legs or the DRAM or the Board using the soldering Iron. The trick is to touch the ChipQuik, melt it, spread it on the legs and remove the soldering Iron. This is to lessen the likelyhood of damaging the DRAM by excessive heating. Do this quickly repeatedly until the ChipQuik fuses with the legs of the DRAM. Do this for BOTH sides of the legs on the DRAM.
  5. When the ChipQuik fuses with all the legs of the DRAM, gently but firmly nudge the DRAM to dislodge it from the solder pads using a tweezer while ChipQuik is still fluid. If it doesn't budge repeat 3) and try again until it dislodges. Remove the DRAM.
  6. After it dislodges use a desoldering wick dip with some flux and put it on the remaining ChipQuik left on the board. You do not have to use desoldering wick on big pieces of ChipQuik you can pluck it off the green board when it cools.
  7. Heat the soldering wick with the soldering Iron and it should absorb the ChipQuik like a sponge with water.
  8. Clean the Soldering Pad using the method in 7.
  9. At the end you should be left with a 66 clean soldering pads ready accept a new IC.
  10. If you are still not sure what to do after reading this watch some youtube videos on SMT Soldering it will give you a better picture on SMT Soldering.
c) Soldering on the new DRAM
  1. You should have the DRAM IC upgrade ready as shown. 
  2. Apply some Flux on the Soldering Pad.
  3. Align the Pins of the New DRAM with the Soldering Pads. Notice there is a Black Circle on the DRAM. You need to match the Orientation of the DRAM with the Router Circuit Board diagram printed on the board.
  4. Make sure the legs are aligned on BOTH Side of the soldering pads. Apply Flux on the DRAM legs.
  5. Dip the tip of the Soldering Iron with some solder and spread it on the legs.
  6. Gently spread the solder on the legs using the Soldering Iron. Touch the solder, gently drag along the legs and release, repeat until all the legs are covered. If solder is stucked between 2 or more legs, apply more flux on the stucked solder and repeat Step 6 again.
  7. Make sure the solder do not short the legs of the DRAM.
  8. Examine the Legs using a Magnifying Lens to make sure no shorting occurs. Make sure every leg of the DRAM gets some solder. If you have too much solder remove the excess out using the soldering wick.
  9. Clean the Router Board and the DRAM using clean cloth dipped in Isopropyl Alcohol (Rubbing Alcohol) 
  10. Again If you are still not sure what to do after reading this watch some youtube videos on SMT Soldering it will give you a better picture on SMT Soldering.
Let the Router Board Dry (Alcohol evaporate quickly) turn on the power. Your Router should boot up just fine.
Unlike BroadCom MIPS routers most Atheros MIPS router do not need modification of the NVRAM to fully initialize the Memory.

Note that different Routers contain different memory. TSOP 66 is used by DDR Memory and has 66 Pins.
The other common memory found is TSOP 54 which has 54 pins but TSOP 54 has low Storage Density hence it is unlikely to find a compatible DRAM to upgrade to.

Extra Tips: If you feel your router is overheating this is a solution:

Friday, June 17, 2011

Ultimate Wireless Lan Upgrade Guide For Windows & Linux

Recently I purchased a WiFi Card on Ebay.

The reason is because at certain areas in public places where I frequent, the WiFi Access Point has poor reception.

On my colleagues' computer especially those with Intel WiFi they were able to get at least 1 bar of signal where my Atheros Card couldn't even connect at all.

My Atheros AR5B91 is a 2 Transmit 2 Receive Single Band Card from Atheros.
It comes default with certain version of Acer Aspire 4740G (Acer use different parts for same laptop models).

The card that I purchased from ebay is a Intel Advance-N 6200 AGN. Search "Intel 6200" in Ebay.
It cost only USD$16 and is a 2 Transmit 2 Receive Dual Band Card from Intel.

Single Band means the Card can transmit and receive from the 2.4GHZ Radio Frequencies while a Dual Band Card can transmit and receive from the 2.4GHZ and 5GHZ Radio Frequencies.

This translates to greater range, frequencies and throughput.
Since it is only USD$16 and it can solve my WiFi issues why not?
In this case the cost over improvement justifies the upgrade.
Moreover it is an OEM Card not Engineering Sample.

The latest Intel 6205 AGN Card cost a whopping USD$30 for a Engineering  Sample and $40 for an OEM Card.
That is 2 times the cost of the Intel 6200 AGN Card.
Atheros do have high end Dual Band cards as well but they are even more horribly expensive.

Sorry for the poor picture quality below.

Firstly you need to uninstall the Older WiFi Card Driver:

This step is for Windows only because in Linux the WiFi Driver is a dynamically loaded Kernel Module.

1)Go to Control Panel to locate the Driver of your old Wireless Card. Uninstall it.

2)If it is not inside the Control Panel as an Installation Package go to Device Manager, Right Click and select uninstall.

3)Shutdown the computer.

Secondly you need to install the WiFi Card:

1)Turn over the base and unscrew the cover concealing the WiFi Card
(I placed the Intel card under the existing Atheros Card):


 2)Gently unplug the Black and White Cables attached to the WiFi

3)The WiFi Cable connection diagram is as shown below:


The old Atheros AR5B91 is as shown on the left while the new Intel 6200 AGN Card is shown on the right.

"1" Connects to the White Main Cable and "2" Connects to the Black Auxiliary Cable

Intel Cards have helpful Black and White Triangles to indicate the colour of the cable to connect.

Sometimes OEM mess up the Black and White Cables result in laptops having poor reception.
The solution is simply to swap them.

Thirdly you need to install the new WiFi Card Driver:


For Windows

1)By default Windows will not autodetect and Install the Driver for New WiFi Cards;
This is because when Windows 7 was released the device was not ready, the new Drivers were not sent to Microsoft yet hence they were unable to include the drivers inside the default Windows Installation

2)There are 2 Ways of obtaining the driver either 1 will do
  • Connect your computer via an Ethernet Cable, run Windows Updates and the WiFi Driver will appear in the list of important Updates(The lazy way, only basic drivers are installed).
  • Connect your computer via an Ethernet Cable. Download the driver directly from Intel(Recommended way Intel MyWiFi Software is available). 
    • Note: If the latest version of Intel WiFi Driver package does not include the driver for Intel 6200N  download the second latest version instead:  currently 14.0.2.2.
If the new Card gets installed with a extended name eg. (XXXX Wireless #2)  simply
  • Uninstall the Device (But do not delete the driver)
  • Do a Windows Registry Search on the keyword "XXXX" then delete the relevant entries (Please be-careful not to delete the wrong ones)
  • Click AutoDetect in Device Manager to reinstall the Device, the name should be corrected.

For Linux
 
1)You have to make sure the MicroCode of the WiFi Card is installed in your Linux Distribution.

Most Distribution have it installed by default but will load only if the relevant Card is detected(Dynamically Loaded Module).

Connect your computer via an Ethernet Cable
Open up the Software Manager and search for the keyword "Intel" then check the correct Firmware is installed for the Card Model.

2)If there are no issues, your new Network Interface should be detected as "wlan1" check using "su" enter password then "ifconfig"
If you want it to be called wlan0 as it should have been simply edit this file
/etc/udev/rules.d/70-persistent-net.rules
with a text editor vi or nano then delete the line containing "wlan0", replace it with the line containing "wlan1" then change "wlan1" to "wlan0". Reboot.

Performance

Of course, an upgrade has to yield visible, experimentally reproducible improved results.
If you do not have the data there is no upgrade to speak of.

When taking the readings, only the WiFi cards and the drivers are different (Duh?!) the rest of the variables are kept constant like position of the computer to access point etc.

My Access Point is an Aztech HW550-3G that is a 2 Transmit 2 Receive Ralink Chipset that transmit only on the 2.4GHZ range.
If you have an Dual Band Access Point you get even better performance now that the Intel WiFi can transmit on the 5GHZ frequencies.

Signal Strength Improvement on Windows

I used inSSIDer(google for the program) to get my readings. The value to be compared is the yellow text.
RSSI refers to the signal strength\quality of a WiFi Connection
Note: The RSSI readings are displayed with a negative sign.
Which means the less negative the better.

Also note that the upgrade unlocks the ability to transmit on the 5GHZ range this significantly increases the range because the 2.4GHZ frequencies are currently saturated in many areas.
Your Cordless Phones, Microwave Ovens and other Single Band Wireless Device over-occupies the 2.4GHZ frequency range.

Original Atheros AR5B91 Signal Strength:

Upgraded Intel 6200 AGN Signal Strength:

I noticed this Access Point in my vicinity:

Anyone who buys Apple Overpriced Products automatically earns a "idiot" label from me.

Apple Products are overpriced, run of mill hardware with good looking software and designs.
Hardware Hackers want cheap powerful hardware and they hack the software to unlock new capabilities so you rarely get extra value out of overpriced Apple Hardware.

Signal Strength Improvement on Linux

To Check Signal Strength on Linux, open a terminal.
Enter "su" to enter superuser admin mode.

Then type "iwlist wlan0 scanning".

Your Access Point Details will show up in text. You use the SSID to identify the network you are testing.
The listing sequence is random.

Old Atheros Readings:
Cell 02 - Address: 00:XX:XX:XX:XX:XX
                    Channel:10
                    Frequency:2.457 GHz (Channel 10)
                    Quality=38/70  Signal level=-72 dBm 
The new Intel 6200 AGN Readings:
Cell 06 - Address: 00:XX:XX:XX:XX:XX
                    Channel:10
                    Frequency:2.457 GHz (Channel 10)
                    Quality=47/70  Signal level=-63 dBm 
The Intel 6200 AGN Card has shown improved signal strength on both Windows and Linux Platform.

Throughput Improvement

Throughput is the rate of Data Flow per second.
The higher the better.

Basically the Sample 1.3GB file is hosted on a Server Connected by Ethernet cable to my router to make sure Wireless Connection is the limiting factor in data transfer rate.
Hence I wirelessly copied the file from the server to my upgraded laptop.
The file has to travel from the server to the router then wirelessly to the laptop, since data transfer over Ethernet Cable is greater than over wireless, Wireless Transfer rate becomes the limiting factor which we want to test.

The old Atheros Throughput:
  

The Atheros Card transfers at approximately 2.67MB/s

The Intel 6200 AGN Throughput:

The data transfer rate is approximately 3.47+MB/s.

Note that we can't use the percentage as a fair comparison because it is calculated as a percentage over the link speed .
The Atheros Card connects at a fixed link speed of 300Mb/s while the Intel Card connects at a variable speed (according to utilisation) probably for power conservation (Look at the red rectangle above).

During testing the data transfer for Intel Card was still climbing but it was quite obvious the Intel card has higher throughput so I just took a screenshot and concluded.

On a Dual Band capable Access Point the throughput is further boosted.

Basically this was quite an awesome Wireless Card Upgrade considering the low price and the considerable performance improvements.

So if you are suffering from Poor Range and Throughput (and you are sure it is not due to issue from the Acess Point) from your WiFi Card from other manufacturers like "Ralink, Broadcom, Atheros" a cheap upgrade to Intel WiFi might just be the solution.

Feel free ask any question about the upgrade.

Saturday, June 4, 2011

Nvidia & Acer Screw Ups

Finally Fixed in Driver Version 280.26 the info below is now obsolete to fix the issue just download and install the latest Nvidia Driver.
Recently the stupid Acer Tech People left out the Device ID of Acer Aspire 4740G's Graphics Adapter G310M resulting in no more Verde Driver for Acer Aspire 4740G.
There is no justification or explanation from either Nvidia or Acer side.
You can imagine the frustration from this bullshit.
Screw Nvidia and Acer. Either way they are going down the Crapple route and are slowly making their way into my overprice laptops black list.


To fix Nvidia/Acer's screw up, open "nvac.inf" using a text editor found inside the extracted driver inside the "display driver" folder.
Ctrl - F and enter "0A75"
When you see this line
%NVIDIA_DEV.0A75.01% = Section011, PCI\VEN_10DE&DEV_0A75&SUBSYS_035A1025
Change it to
%NVIDIA_DEV.0A75.01% = Section011, PCI\VEN_10DE&DEV_0A75&SUBSYS_03181025 
Then save and exit and rerun the installer.
There is a big red warning sign because you modified the driver so it fails WHQL so just ignore it and continue to install.


Damn Nvidia & Acer.


If you do not want to see the stupid Red Warning Box complain to Acer / Nvidia about their screws up and make it heard.

Friday, June 3, 2011

How to Mod your Laptop VGA BIOS

Basically there are 2 locations where the VGA BIOS in laptops.
Some OEMS embed the VGA BIOS in the EFI/BIOS in your laptops,
other OEMs have a separate VGA BIOS firmware on the VGA Card itself.

TYPE 1
As a general rule laptops with discrete MXM board modules like the (picture below) has
the VGA BIOS as a separate piece of code located on the module itself.
It is NOT part of the EFI/BIOS of the Mainboard.

TYPE II
For OEM Boards with a GPU embedded on the Mainboard itself the VGA BIOS usually exist as a chunk of Code inside the BIOS of the Mainboard itself.
(Picture below shows the GPU on the top left corner on the mainboard covered by the black plastic)


Nowadays more and more OEMs are using TYPE II method of integration because
1) They can make the laptop more compact and light because separate MXM modules increase the thickness of the laptop.
2) It is cheaper to integrate everything on the mainboard using BGA soldering rather than have PCI-E connectors.

This article talks about modifying Type II VGA BIOS only.

First you have to identify the Type of Firmware the laptop uses, this is depends on the BIOS Vendor used by the OEM. An OEM can use a different BIOS vendor for different models.

The most prominent BIOS vendors are: Insyde, AMI, Phoenix, AWARD and Intel.

On the website mydigitallife you can find many tools coded by the members for BIOS disassembly.

We are going to use their tools to dissemble the VGA Module from the BIOS.

In this example, the Aspire 4740G uses the Insyde BIOS so download the PhoenixTool which is capable of dissembling Phoenix, Insyde, Dell and other EFI BIOS.

After downloading the PhoenixTool we decompress the PhoenixTool contents to a new folder.


We extract the PhoenixTool to a folder called  "NEW". The main program is called PhoenixTool.exe
After decompressing the disssembly Tool we proceed to download the EFI/BIOS from the OEM website and decompress it as well..


From Above we can see the Complete BIOS Firmware is called NALG0x64.fd.
BIOS usually uses file extension such as BIN, ROM, BIO, WPH, FD and many more. Different BIOS Vendor usually use a different identifier.


When we use the PhoenixTool.exe to open the NALG0x64.fd file, the tool also display the emergency Insyde Recovery Filename.


After the modules have been dissembled you should see the screen above. The modules have been dissembled in a newly created folder called "DUMP" where the original NALG0x64.fd is located.


The Red Box shows the VGA BIOS module. The VGA BIOS module is usually a 70-60KB file, to confirm if it is the VGA Module, you open it with a dissembler and check the content, you should see Nvidia text reference in the binary.


The dissembly of the file shows a lot of Nvidia Text Reference to further confirm if it is the exact module you want you should Google the SKU Code in the example above it is "GT218" which references to G310M Nvidia GPU.
Some laptop BIOS has more than 1 VGA BIOS because 1 Model can have many variations of Different Nvidia SKU GPUs.A good example would be the Acer Aspire 4741G.

Next Download the Nibitor from MVKTECH website. Open the VGA Module and choose "Tools" Fermi Voltage Editor (For Newer Generation of Nvidia GPUs).
For ATi you would probably use Radeon BIOS Editor (RBE).
As you can see the original BIOS has the P3 state which is the default state (the lowest performance state) set at a voltage is 0.85V that is why when using HWMonitor you will never see the voltage drop below 0.85.
The lowest performance state can however use a lower voltage of 0.80V.


So we set the P3 State to 0.8V and Apply. Save the Modified VGA BIOS and exit.


Using EzH20, a Insyde BIOS Editor we open the original NALG0x64.fd file.


Select Components -> Replace Module. Each Insyde Module has a Unique GUID identifier.
8 Character - 4 Character - 4 Character - 4 Character - 12 Character
The Module we seek has the identifier "AC1E1B97-69C4-475D-8471-0F3893802F96"



Under "Module to Load" browse to the modified VGA BIOS.


Under "Change ROM GUID" enter the original identifier: "AC1E1B97-69C4-475D-8471-0F3893802F96"
Then Patch the Firmware.


Finally Save the Modified Firmware and flash it with the Insyde flashit Tool while replacing the original NALG0x64.fd with the modified NALG0x64.fd.