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.


Saturday, December 21, 2013

Comments On Fedora 20

I have upgraded to Fedora 20 on 2 of my machines, 1 is a KDE Desktop and the other GNOME 3.
Both upgrades were pretty painless and smooth.
Simply switch Repo and do a Repo Sync, if you added any repo that does not have Fedora 20 branch you need to remove it first.
One strange bug is the dependency on autocorr-en.
When it is installed it will refuse to download the Fedora 20 Repo.
The workaround is to uninstall libreoffice first and reinstall it after you upgraded.
  1. Fedora 20 fixes the strange KDE bootup hangs encountered in Fedora 19.
  2. Fedora 20 default font makes the text rendered on Desktop smooth
  3. Fedora 20 improved gnome 3 makes it bearable. There are USABLE extensions for application menu unlike Microsoft's half baked attempt at adding a more user friendly Start Menu
  4. GNOME 3 is more simplified yet it does not reach the point of hampering functionality. Of course comparing to KDE, KDE offers a lot more flexibility.
  5. Nothing bad can be said of KDE as it is the same.
In systems configured with BTRFS, there are issue where the write back occurs for such a long duration where it actually hangs the system until the writeback completes.

Saturday, November 2, 2013

A Simple How to use MiniDLNA on OpenWRT

SSH/Telnet into the Router
The configuration file is located at /etc/config/minidlna
The database file is located at /var/run/minidlna/files.db
An example config file as shown below:

config minidlna 'config'
    option port '8200'
    option interface 'br-lan'
    option db_dir '/var/run/minidlna'
    option log_dir '/var/log'
    option inotify '1'
    option model_number '1'
    option root_container '.'
    option album_art_names 'Cover.jpg/cover.jpg/AlbumArtSmall.jpg/albumartsmall.jpg/AlbumArt.jpg/albumart.jpg/Album.jpg/album.jpg/Folder.jpg/folder.jpg/Thumb.jpg/thumb.jpg'
    option enabled '1'
    list media_dir '/home/Share/Movies/'
    option notify_interval '3600'
    option friendly_name 'MiniDLNA Server'
    option serial '13847284'

You can change the friendly_name which will be displayed in your network on Windows 7.
Also you can change the media directory.
It should be located on your external harddisk.
The example above shows it is at /home/Share/Movies/
What happens when your files does not show?

First check if the service is started or do the following

/etc/init.d/minidlna enable && /etc/init.d/minidlna start
/etc/init.d/miniupnpd enable && /etc/init.d/miniupnpd start

If it still does not show the files but you can access the collection it means the database has been populated with an empty file.
To rectify the issue delete the database file do:

rm /var/run/minidlna/files.db

Then restart MiniDLNA and it will rescan your Harddisk Drive for Media

/etc/init.d/mindlna restart

Friday, November 1, 2013

OpenWRT TL-WDR3600/4300/4310 Release

Finally after some testing and being quite satisfied by the results I release the firmware for TL-WDR3600/4300/4310.
Although they seemed like 3 Router but they are actually based on the same SoC Platform.
WDR4310 is the China Local version, WDR4300 is the International version and WDR3600 is the International version with 1 antenna not connected.
Basically after customizing the configs and build flags (it is targeted at mips74kc processor) it can achieve 400+Mbps after disabling MSS Fix and Layer 7 Filtering.
Binaries and Source available here.
Revert to factory also available in the backup folder.
Note that factory firmware due to the use of the Atheros Switch Hardware NAT module can achieve higher rates of 800+Mbps compared to OpenWRT.
The feature set in this firmware is identical to that of TL-WR1043ND that I have compiled.
Any brilliant feedback is welcome =)

Thursday, October 17, 2013

Retards From DMCA Microsoft

This is a shame post, to shame the retards at Microsoft who DMCA anything they can get their dirty hands on without even bothering to check.
I got this stupid DMCA notice just today.
Dear MediaFire User:
MediaFire has received notification under the provisions of the Digital Millennium Copyright Act ("DMCA") that your usage of a file is allegedly infringing on the file creator's copyright protection.
The file named Activator.zip is identified by the key (mnzdmwwymzw).
As a result of this notice, pursuant to Section 512(c)(1)(C) of the DMCA, we have suspended access to the file.
The reason for suspension was:
URL: http://mediafire.com
DATE: 16 October 2013

Dear Sir or Madam,

Microsoft has received information that the domain listed above, which appears to be on servers under your control, is offering unlicensed copies of, or is engaged in other unauthorized activities relating to copyrighted works published by Microsoft.

1. Identification of copyrighted works:

Copyrighted work(s):

Office 2013
Windows XP Professional

Copyright owner: Microsoft

2. Copyright infringing material or activity found at the following location(s):

http://mediafire.com/?mnzdmwwymzw <- This file is mine
http://mediafire.com/?40xekevo25gqn8k <- This file does not belong to me
http://mediafire.com/?mf8k7rqy5zvatar <- This file does not belong to me

The above computer program(s) is being made available for copying, through downloading, at the above location without authorization of the copyright owner.

3. Statement of authority:

The information in this notice is accurate, and I hereby certify under penalty of perjury that DtecNet, Inc. is authorized to act on behalf of Microsoft, the owner of the copyright(s) in the work(s) identified above. I have a good faith belief that none of the materials or activities listed above have been authorized by Microsoft, its agents, or the law.

We hereby give notice of these activities to you and request that you take expeditious action to remove or disable access to the material described above, and thereby prevent the illegal reproduction and distribution of this copyrighted work via your company's network.

We appreciate your cooperation in this matter. Please advise us regarding what actions you take.

If you have some issues please reply to info.antipiracy@dtecnet.com, reply to no-reply@dtecnet.com will be ignored.

Yours sincerely,

MarkMonitor Anti-Piracy Team

On behalf of Microsoft Corporation
One Microsoft Way
Redmond, WA 98052
United States of America

E-mail: info.antipiracy@dtecnet.com
Information about the party that filed the report:
Company Name: Microsoft LCA World Wide Anti-Piracy Team
Contact Address: One Microsoft Way, Redmond WA 98052
Contact Name: Peter Anaman
Contact Phone: +1 (425) 705-4165
Contact Email: panaman@microsoft.com
Copyright infringement violates MediaFire's Terms of Service. MediaFire accounts that experience multiple incidents of alleged copyright infringement without viable counterclaims may be terminated.
If you feel this suspension was in error, please submit a counterclaim by following the process below.
Step 1. Click on the following link to open the counterclaim webpage.
<Link to Counter Claim>
Step 2. Use this PIN on the counterclaim webpage to begin the process:
Step 3. Fill in the fields on the counterclaim form with as much detail as possible.

This is a post-only mailing. Replies to this message are not monitored or answered.

The problem is that the file does not contain any
Office 2013 and Windows XP Professional Software/Cracks.
If you bothered to open up the file you will find it is a fscking BOOTDISK CREATOR for upgrading BIOS you retards! 
Nothing to do with your crappy Software!
With this I am convinced that DMCA notices are being filed indiscriminately worldwide by automated bot.
I think everyone should be allowed to ignore such notices.
There should be some law for compensation for filing invalid notices.
Since when was guilty until proven innocent the default?

PS: If you want to see how a retard looks like here is a picture.

Monday, October 7, 2013

A possible solution to reduce frequency of TX DMA errors

A possible solution to reduce the frequency of the TX DMA errors is as follows:
Log in via SSH/telnet,
Copy and paste the following line

uci set wireless.radio0.diversity=1 && uci set wireless.radio0.rxantenna=0x7 && uci set wireless.radio0.txantenna=0x7 && uci set wireless.radio0.disassoc_low_ack=0 && uci commit wireless && wifi

The command forces diversity and makes txantenna 0x3 and rxantenna 0x7

You should see this when you cat the /etc/config/wireless file

    option diversity '1'
    option rxantenna '0x7'
    option txantenna '0x7'
    option disassoc_low_ack '0'

Saturday, September 14, 2013

How to block advertisement using OpenWRT

Blacklist Ad Content Delivery Domains 

This is how I block advertisement at DNS level on OpenWRT.
Blocking at DNS level is advisable because it does not impact bandwidth and latency.
Simply said it tricks your computer that your loopback address is where adserver are located but cannot be found so adservers are ignored totally.
AdServers are becoming more and more of a nuisance.
  1. They serve up malware advertisement, 
  2. They load flash advertisements which waste bandwidth and increase latency. 
  3. They run javascripts to try and "take over" your web browser via redirection and popups.
If you run adblocker on client computers it becomes harder to manage when the number of client systems increase.
Fortunately OpenWRT makes this easy with the use of dnsmasq.
My web surfing experience has since greatly improved since
Here is how to do it in 2 steps(Yes it is that simple and powerful with Linux):
  1.  SSH into your router
  2. Copy and paste this Command into the terminal
wget -O /etc/dnsmasq.conf "http://pgl.yoyo.org/as/serverlist.php?hostformat=dnsmasq&showintro=1&startdate[day]=&startdate[month]=&startdate[year]=&mimetype=plaintext" && /etc/init.d/dnsmasq restart
What this script does is telling your Router to http://pgl.yoyo.org/adservers/ to get a list of known adservers in a dnsmasq friendly format and save it to /etc/dnsmasq.conf if that command is successful then restart dnsmasq.

After that you will soon notice the disappearance of many irritating advertisement when using the web .
Hopefully this improves your web surfing experience as well as let you realise and embrace the power of shell scripting.

If you want to point the ip address to (invalid ip) instead of
sed -e 's/' -i /etc/dnsmasq.conf && /etc/init.d/dnsmasq restart

Blacklist Malware Delivery Domains

Copy the ads list to temporary directory
cp /etc/dnsmasq.conf /tmp/adlist.txt 
Change to temporary directory
cd /tmp/ 
Download the Malware Domain List from malwaredomains.com
wget http://mirror1.malwaredomains.com/files/domains.txt 
Filter the file to match the format dnsmasq requires
awk '{ print $1 }' domains.txt | grep '\.' | sed 's/^/address=\//g' | sed 's/$/\/' > malwarelist.txt 
Combine the files
sed -i -e '$a\' adlist.txt && cat adlist.txt malwarelist.txt > combinelist.txt 
Sort the files
sort combinelist.txt > dnsmasq.conf 
Copy back the final file and restart dnsmasq
mv dnsmasq.conf /etc/dnsmasq.conf && /etc/init.d/dnsmasq restart && rm *.txt

Unblock a particular domain

Assuming there is this domain "example.com" that falls into the blacklist but you know you need it, so how do you unblock it? This example uses vi but you can use any text editor, the idea is the same remove the line and it will be unblocked.

Edit the file using the text editor vi
vi /etc/dnsmasq.conf
Search the file for the block domain
Delete the line navigate to the line using arrow then
The line should dissppear
Press escape to return to command mode then
to save and quit
Restart the DNS Service
/etc/init.d/dnsmasq restart
Reload the browser with Ctrl + F5 and the domain should be unblocked.

Saturday, August 31, 2013

Unscientific Comparison Between Router Firmwares

Before you continue reading, this piece is written by a OpenWRT user so you should expect some degree of bias towards OpenWRT specifically my builds but I backed this up with data. It should be reproducible.
LAN to WAN methodology is described here.

This post is about my testing of various firmware available for TL-WR1043ND Router.
Since the Router is TP-Link branded, all comparisons will be using TP-Link factory firmware as a standard.
The performance comparison would be LAN to WAN over Gigabit Ethernet Static NAT Routing.

I tested a total of 5 firmwares:
  1. Stock TP-Link firmware
  2. DD-WRT
  3. Gargoyle
  4. OpenWRT
  5. OpenWRT with tweaks


 TP-Link firmware

My assessment on this firmware is that it is targeted as a standard multimedia Router, offering MediaServer, Samba and FTP on a Single Router.
It is a firmware with fixed flash partitions with a small sector for storing your Router settings persistently.The webserver uses a frame layout to reload only a single page, the setting page in the center. There is not much I can say about it except the Routing Performance.

It averages below 140Mbps. Performance may vary based on the running processes but by default there is very little running processes to tune so you can estimate the max to be 150Mbps. It uses the standard GCC mips cross compiler to generate the firmware which partly explains the mediocre performance. It would be suitable for users with a subscription line of 100Mbps.

DD-WRT firmware

Now DD-WRT is a very interesting software. Yes I first started on 3rd Party firmware on DD-WRT which I later moved on to OpenWRT. However DD-WRT firmware was quite interesting I took a closer look at it.
DD-WRT is structured very much like TP-Link firmware it has only 64KB fixed partition for storing user settings, although there are ways to enable optware.
All the features seen on the webserver is all the features you can access.
1 thing is for sure, it is jam packed with features. 1 feature which stock I could not find on DD-WRT but could find on stock firmware is the media server. This however does not come as a surprise, the biggest package to enable mediaserver feature is the ffmpeg codec which is impossible to fix into DD-WRT which is already jam packed with features.
When I telnet into router it shows that the router uses GCC linaro 4.8 compiler to optimize the firmware as the same as OpenWRT.
It uses some of OpenWRT's components and also a updated kernel version 3.5.7.
The web interface while it looks nice seems messy to someone using OpenWRT for a long time. By default all additional features are disabled so the Routing test below is probably the best you can get. Performance isn't bad.

It maxes at below 250Mbps so it will be good for 200Mbps lines.


Gargoyle is based on OpenWRT with its own javascript based user interface on top. It prides on its control over QoS Services. It uses linaro gcc 4.6 like OpenWRT. Technically speaking it should perform around the same as OpenWRT however this is not the case as I have seen later. Some differentiating features not found by default on other firmware is the Tor routing function. It allows installation of addition software as like OpenWRT JJFS persistent storage is mounted on top of the read only squashfs but the software repository is limited. This Gargoyle firmware which I tested is based on OpenWRT Attitude Adjustment. After disabling MSS Fix a optional iptable feature which slows down routing the results are as shown.

As shown in the chart routing performance averages above 170Mbps. If a bandwidth margin is considered it would be good for 150Mbps connection.

OpenWRT Attitude Adjustment

This is the standard OpenWRT Attitude Adjustment release, it comes bare with very little features out of box. After disabling MSS fix the following result is obtained.

It averages below 250Mbps like DD-WRT so it should be good for 200Mbps line.

OpenWRT Attitude Adjustment Optimized

This is my build of OpenWRT Attitude Adjusment for WR1043ND.
Basically I added features functionally equivalent to stock firmware, added a couple of additional features like L7 filter(also found in DD-WRT but disabled by default). The build is platform specific optimized and targeted at MIP24Kc Processor. I also included Web Optimizations and Fixes and stripped out all debugging features I can find. You can either have debug or performance but not both. Basically this is OpenWRT on steroids. After many trial and error I finalised it when there is consistent observable improvement.
To make the comparison fair I disabled L7 filter and MSS fix(Actually it outperforms the rest even without it at 270Mbps!).
So below is the result of it without L7 filter and MSS fix.

So this goes to show how optimization can improve performance on embedded system. This post might invite flaming between 3rd party firmware die hard fans but I think the graphs speak for themselves.

Wednesday, May 22, 2013

OpenWRT Release Tagged

For users on fibre you can set port priority using swconfig
swconfig dev rtl8366rb port 1 set priority 1
To check 
 swconfig dev rtl8366rb port 1 get priority
To get it to run persistently on boot
echo 'swconfig dev rtl8366rb port 1 set priority 1' >> rc.local
This will only work on patched rtl8366rb drivers.
For unpatch openwrt firmware you have to use vconfig.

Updated to R37083

Attitude Adjustment with full ipv6 support including LuCI.
Downgrade the dhcpmasq to a non ipv6 version as the function is already added into the default Attitude Adjustment.
Review all the LuCI options and fix them, expose more wifi options.
This release is really a good one!.

For WR1043ND
"-Os  -pipe -march=24kc -mno-mips16 -mgp32 -fno-caller-saves -mno-branch-likely -mplt -msym32"

I also patched lighttpd to use
server.network-backend = "linux-sendfile"
server.event-handler = "linux-sysepoll"

This is done by patching the Makefile to enable linux-sendfile function which I do not know why it was disabled in OpenWRT's lighttpd Makefile.
I did it by #undef sendfile_broken and #define have_send_file

I managed to add the repo to github
OpenWRT  TL-WDR4300

For my jperf (iperf +java frontend) I recorded increase in NAT speeds for both Routers but I would like those with highspeed internet to give me feedbacks.

Reminder: setting Wireless Region to 'US ' unlocks all "Wireless Goodness"

You can check updates on OpenWRT side using their development site.



Updates refreshed.
Removed Atheros Options since they are actually not support from documentation.
Integrate Jumbo Switch and Storm Filter since there are no issues.

Attitude Adjustment is Tagged and released!

I have also released a Beta version with Jumbo Frames and Storm Filtering
ssh into the router and use

swconfig dev rtl8366rb show (to display switch setting)

swconfig dev rtl8366rb set max_length 3

swconfig dev rtl8366rb set apply (apply the settings)

The rest you can figure out on your own using help option.

Note that the Jumbo Frame is a switch only option reason is that the AR9132 SoC DOES NOT SUPPORT JUMBO FRAME only the switch RTL8366RB do.

I have just release another update, changes are as follows:
-Rename some of the stuff in LuCI
-Removal of excess packages(torrents etc) now 1.8 MB left for you to install the stuff you want
  1. There is a lot of feedback from people who want to install specific packages for their own needs so the best way is to give them space to do that.
-Compress Javascript and CSS
-Update certain packages
-Rename PnP and uShare modules device information
-Remove pure-ftpd and added vsftpd with TLS
(managed to compile successfully and tested it)
  1. vsftpd with TLS does encrypted FTP using less flash and less RAM 
Added Port Monitoring Patches to the switch driver of both Routers

OpenWRT Attitude Adjustment Release For TL-WDR4300
LAN to WAN Wired Benchmark Software Routing

OpenWRT Attitude Adjustment Release for TL-WR1043ND
LAN to WAN Wired Benchmark Software Routing

With L7-Protocol and QoS (Default Configuration)

With L7-Protocol and QoS Service Stopped MSS disabled

Wireless LAN to WAN (2M Line of Sight)
With L7-Protocol and QoS Service Stopped MSS disabled
Using AES WPA2-PSK encryption 40MHZ Fat Channel, noscan enabled dtim_period=1
Basically what you can expect on Wireless.
Note: Results may vary due to interference of surrounding networks

As usual
Factory for upgrading from TP-LINK stock firmware to OpenWRT firmware
Sysupgrade for upgrading from older OpenWRT version to newer OpenWRT version

Thursday, January 24, 2013

Fedora 18 Installation Review

When Fedora 18 was released there was alot of negative reviews about it.
I have to agree with a lot of these opinions.
The LiveCD was badly done.
The installer was pure rubbish. In making the UI Touch Friendly a lot of core features for customising the installation was removed.
To me it was like hell freezing over for Linux. During installation I have to think 5 minutes before clicking to the next screen because I am never sure if the installer will nuke my second dual bootable partition, luckily I cautiously made it by double checking every process.
Finally I got it pretty usable after getting through the hellish installation process.

Stop making stupid UI and pissing off the loyal users!
People who continue to use Linux started as noobs and learn it because it is logical not because of stupid UI that works like crap but looks good.

I downloaded and installed KDE Spin, GNOME is crap.

KDE understands that Tablets are in nature different from Desktops.
They do have a Tablet Mode (it is called plasma) but it is hidden when you select the Desktop Mode.
They do not do stupid things like unifying Touch UI and Desktop UI when their input devices and nature are completely different.

So this post will give a general idea of how to survive Fedora 18 installation.

Things to note:
1) ALWAYS REVIEW the partition layout or the chance that it will nuke all other partitions is very high!

2) Add "nomodeset" to the end of the kernel booting parameter if you are using Nvidia Drivers on computer with a Nvidia Graphics Adapter otherwise it will hang during booting.

3) Remember to install the akmod for nvidia if you are using the Nvidia Graphics Adapter otherwise a kernel update will hang the booting process. The akmod acts as a backup nvidia kmod driver when the kernel was updated before the nvidia driver. You should install kmod-nvidia and akmod-nvidia together.

4) Add RPMFusion repository and if you want you can install steam repository if you want to game on it

5)Edit the file /etc/default/grub and add the following lines to get a pretty boot screen that matches your resolution.
In this example my resolution is 1366*768 (if your resolution is different just change the values accordingly):
Then run grub2-mkconfig -o /boot/grub2/grub.cfg as root/sudo
Also run dracut -f as root/sudo

6) Finally the following software are recommended:
  • freetype-fonts
  • vlc
  • libreoffice
  • chrome
  • firefox
  • adobe-flash
  • elementary icons for a professional look
  • You can also change the plymouth to use fedup animation instead of the default. (Use plymouth-set-default-theme)
Other than that all is well. The great thing about Linux is NO ONE can force a crap UI on you.
If GNOME screws up go KDE etc.
KDE allows you to configure everything to your preference, cuts your screen nicely into 4 if you need to compare different windows. An absolute joy to use.

Note that this guide isn't an installation guide, it is more of an advice to existing Linux users about the gotchas of Fedora 18.

Fedora 18 can be an awesome OS to use, provided you managed to get through the crappy installation. And avoid GNOME.

Thats it hope this can help you get through to enjoy Fedora 18!