Questions?

If you have any computer related question that is too big to fit in the chatbox you can drop a message here.Contact me for freelance Tech review writing @ alphasparc at gmail dot com.
(Location: Singapore)

Search This Blog

Loading...

Saturday, October 8, 2011

OpenWRT Built for TP-Link WR1043ND

As you can see I updated the pages, the new Trunk builds are below
My goal is to create the most functional OpenWRT pre-compiled firmware for the WR1043ND
Since I have problem compiling Backfire, I will use Trunk instead.

The following are the aims:
  • Reduction of Redundant features
  • Exclusion of unused features
  • Performance
So I will revise the features
  1. LuCI GUI 
  2. 3g USB Modem Support
  3. IPv6 in IPv4 tunneling
  4. Dynamic DNS
  5. Native IPv6
  6. QoS (Quality Of Service) Scripts
  7. Polipo
  8. Privoxy  (GUI doesn't exist)
  9. uPnP (Universal Plug & Play)
  10. SAMBA (Windows File Sharing)
  11. MultiWAN 
  12. Harddisk Idle
  13. AddUser and Delete User accounts and su function 
  14. External Harddisk supporting only EXT FileSystem 
  15. VSFTP (File Transfer Protocol Server)
  16. OpenVPN
  • (The reason I decided to remove NTFS is because 
  • It consumes a lot of CPU power which reduces the Router Performance 
  • Windows File Sharing is slow using NTFS compared to EXT File System
  • NTFS Modules consumes a lot of space on the available 8MB of Flash
I included the Optimized Default Configuration files in the folder.
You can load them to the router using the Configuration Restore/Backup function in LuCI.

openwrt-ar71xx-tl-wr1043nd-v1-squashfs-factory.bin - For Routers that are NOT running OpenWRT

openwrt-ar71xx-tl-wr1043nd-v1-squashfs-sysupgrade.bin - For Routers currently running OpenWRT

Before Flashing please read my previous posts about TP-Link WR1043ND to know what you are getting into. Consult the documentation @ OpenWRT Website or ask if you have any queries.

You can request additional feature or download the packages through the OpenWRT repository (the package installer is built into LuCI)
------------------------------------Old Firmware & New Firmware Below---------------------------------------
You can download the files here.

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)
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'
        option 'htmode' 'HT40-'
        option 'noscan' '1'
        option 'country' 'US'
        list 'ht_capab' 'SHORT-GI-40'
        list 'ht_capab' 'DSSS_CCK-40'
        option 'disabled' '0'
        option 'txpower' '24'
        option 'bursting' '1'
        option 'ff' '1'
        option 'compression' '1'
config 'wifi-iface'
        option 'device' 'radio0'
        option 'network' 'lan'
        option 'mode' 'ap'
        option 'ssid' 'Your_SSID_Here'
        option 'frag' '2346'
        option 'rts' '2347'
        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)

There is a catch to set higher transmit power without hacking the source code.
If you set the country to 'US' (United States) or 'CA' Canada, you can increase the Transmit Power to a maximum of 24dbm otherwise you will be limited to 20dbm. However the catch is that these countries have only channel 1-11 while you can set up to channel 13 for countries like Japan.


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
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=0

net.
core.netdev_max_backlog=30000
net.ipv4.tcp_moderate_rcvbuf=1

net.netfilter.nf_conntrack_checksum=0
net.ipv4.netfilter.ip_conntrack_checksum=0
net.ipv4.netfilter.ip_conntrack_max=16384
net.ipv4.netfilter.ip_conntrack_tcp_timeout_established=3600
net.ipv4.netfilter.ip_conntrack_udp_timeout=120
net.ipv4.netfilter.ip_conntrack_udp_timeout_stream=180
# 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()
# 16 MB with a few parallel streams is recommended for most 10G paths
# 32 MB might be needed for some very long end-to-end 10G or 40G paths
net.core.rmem_max = 16777216
net.core.wmem_max = 16777216
# increase Linux autotuning TCP buffer limits
# min, default, and max number of bytes to use
# (only change the 3rd value, and make it 16 MB or more)
net.ipv4.tcp_rmem = 4096 87380 16777216
net.ipv4.tcp_wmem = 4096
87380 16777216

All the TCP tweaks are derived from ESnet
Note: These tweaks are not found on OpenWRT How Tos.


Adjusting the Transmit Queue Length.

You can do this by logging into the Router via Putty using vi editor edit the file called "rc.local" in /etc/
    # Put your custom commands here that should be executed once
    # the system init finished. By default this file does nothing.
    ifconfig eth0 txqueuelen 10500
    ifconfig wlan0 txqueuelen 7935
    exit 0
Add the 3 lines above to increase the txqueuelen on Ethernet Interface.
eth0.1 is the LAN Port while eth0.2 is the WAN Port.

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/
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

Install packages that boost performance.
You can do this by logging into the Router via Putty.
opkg update
opkg install pepsal kmod-ipt-nathelper-extra
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.


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