Install mysql php5 and phpmyadmin on raspberry pi

Install PHP

sudo apt-get install php5-cgi

Edit php.ini file
sudo nano /etc/php5/cgi/php.ini

Scroll the bottom and add
cgi.fix_pathinfo = 1

save and exit

Enable fast CGI
sudo lighty-enable-mod fastcgi-php

Restart lighttpd
sudo /etc/init.d/lighttpd restart

Create phpinfo page
sudo nano /var/www/phpinfo.php

and add the following
<?php phpinfo();?>

Save and exit

Enter Pi ip addres into a browser followed by phpinfo.php
http://192.168.1.x/phpinfo.php

Install MySQL and PHPMYADMIN

sudo apt-get install mysql-server mysql-client phpmyadmin

mysql root password, confirm

During the installation of PHPMyAdmin you will be asked which web server is installed. Choose lighttpd.

A message will appear asking whether you want to create a dummy database. As the message states, if you know what you are going to be using the database server for or a database is already configured then you can answer no but if you are just experimenting then you can answer yes.

I recommend answering yes to this. It doesn’t do any harm.

Continue Reading

Install lighttpd webserver on raspberry pi

This quick guide will walk you through installing the lighttpd webserver on a raspberry Pi.

Update packages
sudo apt-get update

Install lighttpd
sudo apt-get install lighttpd

Once completed enter your pi’s ip address in a browser and if all has gone well your should see the holding page.

Now we will adjust some permissions to ensure the “Pi” user account can write files to the location where Lighttpd expects to find web pages. The /var/www directory is currently owned by the “root” user. So let’s make the “www-data” user and group the owner of the /var/www directory.
sudo chown -R www-data:www-data /var/www

Allow the “www-data” group permission to write to /var/www
sudo chmod 775 /var/www

Add the “Pi” user to the “www-data” group.
sudo usermod -a -G www-data pi

For permissions to take effect reboot te Pi
sudo reboot

Continue Reading

Installing grive (google drive sync) on the raspberry pi

I had the need to upload files to the cloud to share with family members and rather than using web servers/ftp I thought i’d try something different and try uploading to my google drive, after a quick search I found the grive application and this is my howto for intsatalling it. This application syncs data between your pi and google drive so when exectued any newly created directories and files on either will be refelcted on the other.

Debian GNU/Linux 7.0 \n \l
Linux devpi 3.6.11+ #456 PREEMPT Mon May 20 17:42:15 BST 2013 armv6l GNU/Linux

sudo apt-get install git cmake build-essential libgcrypt11-dev libjson0-dev libcurl4-openssl-dev libexpat1-dev libboost-filesystem-dev libboost-program-options-dev binutils-dev libboost-test-dev libqt4-dev libyajl-dev

cd /usr/bin (or location of your choice)

git clone git://github.com/Grive/grive.git

Now the next bit i’m unsure if it is required but I saw a couple of places and mention it and it worked for me.

nano /usr/bin/grive/libgrive/src/drive/State.cc

Lines that use the Add() method need to contain a cast to the correct size of integer. The expression “(boost::uint64_t)” must be added to lines 251, 252 and 256.

Original code

[code]void State::Write( const fs::path& filename ) const
{
Json last_sync ;
last_sync.Add( “sec”,   Json(m_last_sync.Sec() ) );
last_sync.Add( “nsec”,  Json(m_last_sync.NanoSec() ) );

Json result ;
result.Add( “last_sync”, last_sync ) ;
result.Add( “change_stamp”, Json(m_cstamp) ) ;

std::ofstream fs( filename.string().c_str() ) ;
fs << result ;
}[/code]

Edited code

[code]void State::Write( const fs::path& filename ) const
{
Json last_sync ;
last_sync.Add( “sec”, Json((boost::uint64_t)m_last_sync.Sec() ) );
last_sync.Add( “nsec”, Json((boost::uint64_t)m_last_sync.NanoSec() ) );

Json result ;
result.Add( “last_sync”, last_sync ) ;
result.Add( “change_stamp”, Json((boost::uint64_t)m_last_sync.NanoSec() ) );

std::ofstream fs( filename.string().c_str() ) ;
fs << result ;
}[/code]

cd grive

cmake .

make

Go off and make a cup of tea, this was the output from my ‘make’

— The C compiler identification is GNU 4.6.3
— The CXX compiler identification is GNU 4.6.3
— Check for working C compiler: /usr/bin/gcc
— Check for working C compiler: /usr/bin/gcc — works
— Detecting C compiler ABI info
— Detecting C compiler ABI info – done
— Check for working CXX compiler: /usr/bin/c++
— Check for working CXX compiler: /usr/bin/c++ — works
— Detecting CXX compiler ABI info
— Detecting CXX compiler ABI info – done
— Found libgcrypt: -L/lib/arm-linux-gnueabihf -lgcrypt
— Found JSON-C: /usr/lib/arm-linux-gnueabihf/libjson.so
— Found CURL: /usr/lib/arm-linux-gnueabihf/libcurl.so (found version “7.26.0”)
— Found EXPAT: /usr/lib/arm-linux-gnueabihf/libexpat.so (found version “2.1.0”)
— Boost version: 1.49.0
— Found the following Boost libraries:
—   program_options
—   filesystem
—   unit_test_framework
—   system
— Found libbfd: /usr/lib/libbfd.so
— Found ZLIB: /usr/lib/arm-linux-gnueabihf/libz.so (found version “1.2.7”)
— Boost version: 1.49.0
— Found the following Boost libraries:
—   program_options
— Looking for Q_WS_X11
— Looking for Q_WS_X11 – found
— Looking for Q_WS_WIN
— Looking for Q_WS_WIN – not found.
— Looking for Q_WS_QWS
— Looking for Q_WS_QWS – not found.
— Looking for Q_WS_MAC
— Looking for Q_WS_MAC – not found.
— Found Qt4: /usr/bin/qmake (found version “4.8.2”)
— Boost version: 1.49.0
— Configuring done
— Generating done
— Build files have been written to: /usr/bin/grive
root@devpi:/usr/bin/grive# make
Scanning dependencies of target grive
[  1%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive/Drive.cc.o
/tmp/ccUoIJGZ.s: Assembler messages:
/tmp/ccUoIJGZ.s:1217: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[  3%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive/ResourceTree.cc.o
[  5%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive/State.cc.o
/tmp/ccqpHvLk.s: Assembler messages:
/tmp/ccqpHvLk.s:1304: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[  7%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive/Resource.cc.o
/tmp/ccsa5Cwk.s: Assembler messages:
/tmp/ccsa5Cwk.s:1784: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[  8%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive/Entry.cc.o
[ 10%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive/CommonUri.cc.o
/tmp/ccoSoHiI.s: Assembler messages:
/tmp/ccoSoHiI.s:2087: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 12%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive/Feed.cc.o
/tmp/ccxSRdbr.s: Assembler messages:
/tmp/ccxSRdbr.s:2043: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 14%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive2/Drive.cc.o
[ 16%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive2/Resource.cc.o
[ 17%] Building CXX object libgrive/CMakeFiles/grive.dir/src/drive2/Feed.cc.o
/tmp/ccRyox4j.s: Assembler messages:
/tmp/ccRyox4j.s:807: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 19%] Building CXX object libgrive/CMakeFiles/grive.dir/src/http/Download.cc.o
[ 21%] Building CXX object libgrive/CMakeFiles/grive.dir/src/http/CurlAgent.cc.o
/tmp/cc46d8yU.s: Assembler messages:
/tmp/cc46d8yU.s:2734: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 23%] Building CXX object libgrive/CMakeFiles/grive.dir/src/http/StringResponse.cc.o
[ 25%] Building CXX object libgrive/CMakeFiles/grive.dir/src/http/XmlResponse.cc.o
[ 26%] Building CXX object libgrive/CMakeFiles/grive.dir/src/http/ResponseLog.cc.o
/tmp/ccadIJw8.s: Assembler messages:
/tmp/ccadIJw8.s:2136: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 28%] Building CXX object libgrive/CMakeFiles/grive.dir/src/http/Header.cc.o
[ 30%] Building CXX object libgrive/CMakeFiles/grive.dir/src/protocol/AuthAgent.cc.o
/tmp/ccinj0Nr.s: Assembler messages:
/tmp/ccinj0Nr.s:2734: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 32%] Building CXX object libgrive/CMakeFiles/grive.dir/src/protocol/OAuth2.cc.o
[ 33%] Building CXX object libgrive/CMakeFiles/grive.dir/src/protocol/JsonResponse.cc.o
[ 35%] Building CXX object libgrive/CMakeFiles/grive.dir/src/protocol/Json.cc.o
/tmp/ccQSz3wF.s: Assembler messages:
/tmp/ccQSz3wF.s:1284: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 37%] Building CXX object libgrive/CMakeFiles/grive.dir/src/json/JsonParser.cc.o
/tmp/ccPFN5lG.s: Assembler messages:
/tmp/ccPFN5lG.s:1258: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 39%] Building CXX object libgrive/CMakeFiles/grive.dir/src/json/Val.cc.o
/tmp/ccpF11ho.s: Assembler messages:
/tmp/ccpF11ho.s:1258: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 41%] Building CXX object libgrive/CMakeFiles/grive.dir/src/json/JsonWriter.cc.o
[ 42%] Building CXX object libgrive/CMakeFiles/grive.dir/src/json/ValBuilder.cc.o
/tmp/ccLZ9For.s: Assembler messages:
/tmp/ccLZ9For.s:1317: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 44%] Building CXX object libgrive/CMakeFiles/grive.dir/src/json/ValResponse.cc.o
[ 46%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/Config.cc.o
[ 48%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/MemMap.cc.o
[ 50%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/Crypt.cc.o
/tmp/ccO8XZsF.s: Assembler messages:
/tmp/ccO8XZsF.s:1258: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 51%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/SignalHandler.cc.o
[ 53%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/Exception.cc.o
/tmp/ccW3Aswb.s: Assembler messages:
/tmp/ccW3Aswb.s:1298: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 55%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/StringStream.cc.o
[ 57%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/File.cc.o
/tmp/ccfUIifg.s: Assembler messages:
/tmp/ccfUIifg.s:1317: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 58%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/DateTime.cc.o
/tmp/ccdVVlEY.s: Assembler messages:
/tmp/ccdVVlEY.s:1258: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 60%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/OS.cc.o
/tmp/ccZ13815.s: Assembler messages:
/tmp/ccZ13815.s:1258: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 62%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/StdStream.cc.o
[ 64%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/log/Log.cc.o
[ 66%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/log/DefaultLog.cc.o
[ 67%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/log/CompositeLog.cc.o
[ 69%] Building CXX object libgrive/CMakeFiles/grive.dir/src/util/log/CommonLog.cc.o
[ 71%] Building CXX object libgrive/CMakeFiles/grive.dir/src/xml/String.cc.o
[ 73%] Building CXX object libgrive/CMakeFiles/grive.dir/src/xml/TreeBuilder.cc.o
/tmp/ccw5H8GH.s: Assembler messages:
/tmp/ccw5H8GH.s:1258: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 75%] Building CXX object libgrive/CMakeFiles/grive.dir/src/xml/NodeSet.cc.o
/tmp/ccChV8aK.s: Assembler messages:
/tmp/ccChV8aK.s:1284: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 76%] Building CXX object libgrive/CMakeFiles/grive.dir/src/xml/Node.cc.o
/tmp/cce88Vcr.s: Assembler messages:
/tmp/cce88Vcr.s:1284: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 78%] Building CXX object libgrive/CMakeFiles/grive.dir/src/bfd/Backtrace.cc.o
[ 80%] Building CXX object libgrive/CMakeFiles/grive.dir/src/bfd/Debug.cc.o
[ 82%] Building CXX object libgrive/CMakeFiles/grive.dir/src/bfd/SymbolInfo.cc.o
Linking CXX static library libgrive.a
[ 82%] Built target grive
Scanning dependencies of target btest
[ 83%] Building CXX object libgrive/CMakeFiles/btest.dir/test/btest/UnitTest.cc.o
[ 85%] Building CXX object libgrive/CMakeFiles/btest.dir/test/btest/JsonValTest.cc.o
/tmp/ccmfDU7O.s: Assembler messages:
/tmp/ccmfDU7O.s:1331: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[ 87%] Building CXX object libgrive/CMakeFiles/btest.dir/test/btest/ValTest.cc.o
/tmp/ccykX0B1.s: Assembler messages:
/tmp/ccykX0B1.s:1331: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
Linking CXX executable btest
[ 87%] Built target btest
Scanning dependencies of target grive_executable
[ 89%] Building CXX object grive/CMakeFiles/grive_executable.dir/src/main.cc.o
/tmp/ccCqNHWz.s: Assembler messages:
/tmp/ccCqNHWz.s:1788: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
Linking CXX executable grive
[ 89%] Built target grive_executable
[ 91%] Generating src/moc_MainWnd.cxx
[ 92%] Generating ui_MainWindow.h
Scanning dependencies of target bgrive_executable
[ 94%] Building CXX object bgrive/CMakeFiles/bgrive_executable.dir/src/main.cc.o
[ 96%] Building CXX object bgrive/CMakeFiles/bgrive_executable.dir/src/MainWnd.cc.o
[ 98%] Building CXX object bgrive/CMakeFiles/bgrive_executable.dir/src/DriveModel.cc.o
/tmp/cc6HZ70x.s: Assembler messages:
/tmp/cc6HZ70x.s:1731: Warning: swp{b} use is deprecated for ARMv6 and ARMv7
[100%] Building CXX object bgrive/CMakeFiles/bgrive_executable.dir/src/moc_MainWnd.cxx.o
Linking CXX executable bgrive
[100%] Built target bgrive_executable

Next create a directory where you want to keep your google drive files ie /home/user/googledrive and copy the grive executable to it.

root@devpi:/usr/bin/grive/ cp grive /home/user/googledrive

NOTE: RUNNING THIS APPLICATION WILL SYNC DATA BETWEEN GOOGLE DRIVE AND YOUR PI, CHECK YOUR USAGE ON GOOGLE DRIVE TO ENSURE YOU HAVE ENOUGH STORAGE ON YOUR PI

The first time your run grive you need to do it with the -a option

cd /home/user/googledrive

./grive -a

A link will be printed in the terminal window. Copy the link and paste it in a browser. A page on google will appear asking you confirm permissions for the app.

After clicking accept you will be taken to another google page which has a bog with a code in it

copy and paste this into your terminal

Please input the authentication code here:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

Reading local directories
Synchronizing folders
Reading remote server file list
Synchronizing files
sync “./grive” doesn’t exist in server, uploading
sync “./test” created in remote. creating local
Finished![/code]

That’s it your first sync is done, your googledrive directory on your pi should now reflect whats stored on your remote google drive. Adding files to either the pi or cloud will be reflected the next time grive is exectuted using the command grive from your created folder ie

cd /home/user/googledrive

grive

Now you can create scripts/cron jobs to automatically sync your files.

ENJOY!

Continue Reading

HP Microserver N54L Nas Build

As per my previous posts i've decided to take the plunge and go for the N54L Microserver from HP. Rather than doing many posts covering the post I will be encompassing everything into a single one as a blog reader I find this easier to follow than many posts spread over lots of days causing confusion.

 
As I said previously the thing that put me off about the microserver was the fact it had no media card slots and only a single 5.25" bay. After some research i've found a solution, namely the Startech Slim Optical & 3.5in Hard Drive Mounting Bracket for 5.25in Front Bay which allows for fitment of slim optical drive and a standard 3.5" device in my case a media card reader.

That's the first problem sorted, the next one was to overcome the fact that the internal usb on the N54L doesn't use a header as on most motherboard but rather a 'real' usb port. I managed to find the Akasa External to internal USB adapter which will convert from the header connector on the media card reader to a usb port. I purchased this and a Samsung SN-208FB/BEBE 8x DVD/RW SATA Slim Black OEM along with a Akasa AK-ICR-07U3 3.5" Black Internal Multi Card Reader M2, Micro SD & USB 3.0 from Scans store on ebay for total of £27.66 delivered to my local argos store, ok so the usb 3.0 connector is pointless for the microserver but i've had a couple of the cheapo media readers before and they seem to just stop working or break so thought i'd spend a couple of poound extra on a named brand.
 
More to follow………..
Continue Reading

New NAS the FINAL decision

Yes i've still been pondering over which new nas to go for and like a woman i've ended up back at the first product I looked at *sigh* namely the HP Microserver. 

I did look at the Acer Aspire XC-603 which ebuyer were selling for £130 as I liked the fact it was of reasonable spec and had a media card reader built in. However looking at 2.5" 2tb drives they were coming in at over £100 each when a 4tb 3.5" can be had for the same money. 
I again considered the shuttle but like my current one power consumption is a little on the high side and due to previous hardware failures don't appear to be designed for 24hr usage.
Alas it was back to the microserver with it's 4 HDD slots and numerous USB ports it's surely a no brainer. I copy pi sd cards quite regularly so wanted to put in a media card reader but there is only a single external 5.25 slot so couldn't have a optical drive as well, or so I thought….. after some searching I came across the Startech Optical & 3.5in Hard Drive Mounting Bracket for 5.25in Front Bay (wow that was a long name to type) which can be had for around £20 posted. I've specced a slim DVD RW and card reader and will be ordering them shortly.
Next decision is HDD, i'm probably going to go for WD Red's either 2 or 3tb in RAID 1.
This project will take a while to complete due to limited funds but at the end it's should be a nice little setup.
Continue Reading

Zalman Z9 U3

Now I like my Antec 300 case but have always had a problem with the front usb ports being loose/not working properly so after a lot of research i've decided to go for the Zalman Z9 U3 case. OK i'll be honest i'm not overly keen on the front 'flaps' but it's pros clearly out weight this con, front usb 3 and 2 ports, side window, dust filter, a neat space for mounting the SSD behind the motherboard plate, all black interiror (saves me spraying again) and finally price, it can be had for £47.27 shipped from quietpc.com so for sub £50 this case is hard to beat.
Continue Reading

Jump to SSD

So i've been planing to make the move to SSD in my desktop for a while due to the fact I want to upgrade to Windows 7 from XP and that my current installation never shuts down properly and thus rebuilds the raid every time making it unusable for about an hour. On the hotukdeals website an offer was posted 'Sandisk Ultra Plus 128GB SSD @ Amazon £45.87' I had orginally been looking at the Samsung Evo 840 but the price is always stuck around £55. I asked the misses to order the sandisk one but before she did the price went back up to £54.99 *sigh*, then I remembered flubit, I put in a request thinking they'd discount on the £54.99 price but I was pleased to find they did it on the sale price so was 'offered' it at £40.27! well needless to say I couldn't buy it quick enough and have recieved confirmation that it's been dispatched today. Now the drive is sata III ie 6Gb/s and my motherboard only supports sata II 3Gb/s, I was looking to get a PCIe card so I could use ut to it's full capacity but I also wanted to upgrade to USB 3.0 but the trouble is I only have one spare PCIe x4 slot so I have decided to just upgrade to USB 3.0 for now as the SSD will still be faster than my current mechanical drive.

I checked my current drives with CrystalDiskInfo and both have power on hours of nearly 2 years solid, the second drive is also reported as 'Bad' so don't think this upgrade could come any sooner.


Continue Reading

Second thoughts….Linksys WRT1900AC

Despite my initial enthusiasm over this router after looking into it a bit more I'm not convinced it's all it makes out to be..

My first broadband router was a Linksys WRT54G and eventually upgraded to the 'S' version which featured speed boost. I have fond memories of this router as found it to be reliable and highly configurable with the addition of third-party firmware, in fact it's one of the reasons I still use Linksys networking equipment at home to this day. But is the new WRT1900AC just an attempt to get those of us with deep routed (no pun intended) soft spot for our little blank and blue boxes to part with our hard earned cash?

The 'open source ready' feature they mention in their sales literature is some what a ruse as most consumer grade routers can have OpenWRT or DD-WRT installed on them to open up a whole host of new features, indeed OpenWRT was originally developed for the Linksys WRT54G range so being 'open source ready' is actually nothing new but appears to be nothing more than a sales gimmick.
People are still buying and selling the old WRT54G routers and there is a clear demand for them despite their ageing hardware but this is where the new version shines, featuring a sleek new look (but still harbouring the colours and curves of the original to tempt us even more) dual-band 2.4GHz and 5GHz wifi, 4 gigabit lan ports eSATA and USB 3.0 ports for attaching external storage. The hardware spec alone is sweet enough to make the geekiest of us to blush and say "shut up and take my money!". 
But here's the clanger and it's a big one for me and that's the price. Cheapest i've found it is £219.99 and for something that i'm likely to take out the box and install free third-party firmware on doesn't sit right. There are some very good spec alternatives on the market for less money, BUT it has an eSATA port I hear you cry, I can honestly say at all the time i've been in networking never have I thought "I need a router with an eSATA port". USB 3.0 is nice but after my previous attempt using an external drive on my Linksys WAG router and banging my head in frustration at the slower than a kerb crawler cruising on a friday night throughput I ditched it vowed never to return or I would subject myself to a thousand lashings with a cauliflower.
I am due a router upgrade soon but unless it drops to around the £100 mark I may finally be tempted away from the Linksys stable.  
Continue Reading

TP Link WDR3600 recovery without serial

For those of you that don't feel confident enough to solder a serial header or need to recover a router quickly without having to buy any extras i've found a quick and easy way to do so.

I found holding the reset button in and powering on the router attempts to download a recovery firmware from a tftp server, i've written some simple steps to allow this. 
1, Change your PC/Laptop ip address to 192.168.0.66
2, Connect you computer to one of the LAN ports on the router (WAN port won't work for this)
2, Setup a tftp server on your machine (I use solarwinds tftp server)
3, Put the desired firmware in your tftp folder and rename it to wdr3600v1_tp_recovery.bin
4, Start the tftp server
5, Hold down the WPS/Reset button on the router
6, Power on the router
7, After approximately 7 seconds release the reset button
8, The router will now download the firmware from your server and upgrade
Sit back and marvel at it's simplicity.
Here is the output seen via serial during this operation….
[code]U-Boot 1.1.4 (Sep  9 2013 – 14:28:41)
U-boot DB120
DRAM:  128 MB
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
Using default environment
PCIe Reset OK!!!!!!
In:    serial
Out:   serial
Err:   serial
Net:   ag934x_enet_initialize…
No valid address in Flash. Using fixed address
 wasp  reset mask:c03300
WASP  —-> S17 PHY *
: cfg1 0x7 cfg2 0x7114
eth0: ba:be:fa:ce:08:41
athrs17_reg_init: complete
eth0 up
eth0
dup 1 speed 1000
Using eth0 device
TFTP from server 192.168.0.66; our IP address is 192.168.0.86
Filename 'wdr3600v1_tp_recovery.bin'.
Load address: 0x80060000
Loading: T T T T T #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ############################
done
Bytes transferred = 8126464 (7c0000 hex)
original_product_id = 36000001
 original_product_ver = 01
 recovery_product_id = 36000001
 recovery_product_ver = 01
 auto update firmware: product id verify sucess!
First 0x2 last 0x7d sector size 0x10000
 125
Erased 124 sectors
Copy to Flash… write addr: 9f020000
done
U-Boot 1.1.4 (Sep  9 2013 – 14:28:41)
U-boot DB120
DRAM:  128 MB
id read 0x100000ff
flash size 8MB, sector count = 128
Flash:  8 MB
Using default environment
PCIe Reset OK!!!!!!
In:    serial
Out:   serial
Err:   serial
Net:   ag934x_enet_initialize…
No valid address in Flash. Using fixed address
 wasp  reset mask:c03300
WASP  —-> S17 PHY *
: cfg1 0x7 cfg2 0x7114
eth0: ba:be:fa:ce:08:41
athrs17_reg_init: complete
eth0 up
eth0
Autobooting in 1 seconds
## Booting image at 9f020000 …
   Uncompressing Kernel Image … OK
Starting kernel …
Booting Atheros AR934x
Linux version 2.6.31–LSDK-9.2.0_U6.616 (root@localhost.localdomain) (gcc version 4.3.3 (GCC) ) #1 Wed Mar 20 15:14:56 CST 2013
Ram size passed from bootloader =128M
flash_size passed from bootloader = 8
CPU revision is: 0001974c (MIPS 74Kc)
ath_sys_frequency: cpu srif ddr srif cpu 560 ddr 450 ahb 225
Determined physical RAM map:
 memory: 08000000 @ 00000000 (usable)
Zone PFN ranges:
  Normal   0x00000000 -> 0x00008000
Movable zone start PFN for each node
early_node_map[1] active PFN ranges
    0: 0x00000000 -> 0x00008000
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
Kernel command line: console=ttyS0,115200 root=31:02 rootfstype=squashfs init=/sbin/init mtdparts=ath-nor0:128k(u-boot),1024k(kernel),6912k(rootfs),64k(config),64k(ART) mem=128M
PID hash table entries: 512 (order: 9, 2048 bytes)
Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
Writing ErrCtl register=00000000
Readback ErrCtl register=00000000
Memory: 112924k/131072k available (1852k kernel code, 17984k reserved, 428k data, 120k init, 0k highmem)
NR_IRQS:128
plat_time_init: plat time init done
Calibrating delay loop… 279.55 BogoMIPS (lpj=559104)
Mount-cache hash table entries: 512
****************ALLOC***********************
 Packet mem: 8026c4c0 (0xe00000 bytes)
********************************************
NET: Registered protocol family 16
PCI init:ath_pcibios_init
ath_pcibios_init(294): PCI CMD write: 0x356
registering PCI controller with io_map_base unset
bio: create slab <bio-0> at 0
pci 0000:00:00.0: PME# supported from D0 D1 D3hot
pci 0000:00:00.0: PME# disabled
Returning IRQ 64
NET: Registered protocol family 2
IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
TCP established hash table entries: 4096 (order: 3, 32768 bytes)
TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP reno registered
NET: Registered protocol family 1
ATH GPIOC major 0
squashfs: version 4.0 (2009/01/31) Phillip Lougher
msgmni has been set to 220
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
serial8250.0: ttyS0 at MMIO 0xb8020000 (irq = 19) is a 16550A
console [ttyS0] enabled
PPP generic driver version 2.4.2
NET: Registered protocol family 24
5 cmdlinepart partitions found on MTD device ath-nor0
Creating 5 MTD partitions on "ath-nor0":
0x000000000000-0x000000020000 : "u-boot"
0x000000020000-0x000000120000 : "kernel"
0x000000120000-0x0000007e0000 : "rootfs"
0x0000007e0000-0x0000007f0000 : "config"
0x0000007f0000-0x000000800000 : "ART"
->Oops: flash id 0xef4017 .
—-TP IGMP has been init——
TCP cubic registered
NET: Registered protocol family 10
NET: Registered protocol family 17
802.1Q VLAN Support v1.8 Ben Greear <greearb@candelatech.com>
All bugs added by David S. Miller <davem@redhat.com>
athwdt_init: Registering WDT success
ath_otp_init: Registering OTP success
ath_clksw_init: Registering Clock Switch Interface success
VFS: Mounted root (squashfs filesystem) readonly on device 31:2.
Freeing unused kernel memory: 120k freed
init started:  BusyBox v1.01 (2013.02.27-07:39+0000) multi-call binary
This Board use 2.6.31
insmod: cannot open module `/lib/modules/2.6.31/kernel/x_tables.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/xt_tcpudp.ko': No such file or directory
xt_time: kernel timezone is -0000
nf_conntrack version 0.5.0 (2048 buckets, 8192 max)
CONFIG_NF_CT_ACCT is deprecated and will be removed soon. Please use
nf_conntrack.acct=1 kernel parameter, acct=1 nf_conntrack module option or
sysctl net.netfilter.nf_conntrack_acct=1 to enable it.
ip_tables: (C) 2000-2006 Netfilter Core Team
insmod: cannot open module `/lib/modules/2.6.31/kernel/iptable_raw.ko': No such file or directory
insmod: cannot open module `/lib/modules/2.6.31/kernel/flashid.ko': No such file or directory
PPPoL2TP kernel driver, V1.0
PPTP driver version 0.8.3
insmod: cannot open module `/lib/modules/2.6.31/kernel/harmony.ko': No such file or directory
 (none) mips #1 Wed Mar 20 15:14:56 CST 2013 (none)
(none) login: Now flash open!
Now flash open!
Now flash open!
Now flash open!
Now flash open!
Erase from 0X7E0000 to 0X7EFC80:.
Program from 0X7E0000 to 0X7EFC80:
write successfully
Now flash open!
Now flash open!
Erase from 0X7E0000 to 0X7EFC80:.
Program from 0X7E0000 to 0X7EFC80:
write successfully
Now flash open!
Erase from 0X7E0000 to 0X7EFC80:.
Program from 0X7E0000 to 0X7EFC80:
write successfully
ATHR_GMAC: Length per segment 1536
ATHR_GMAC: fifo cfg 3 01f00140
ATHR_GMAC: RX TASKLET – Pkts per Intr:100
ATHR_GMAC: Mac address for unit 0:bfff0000
ATHR_GMAC: ff:ff:ff:ff:ff:ff
ATHR_GMAC: Max segments per packet :   1
ATHR_GMAC: Max tx descriptor count :   128
ATHR_GMAC: Max rx descriptor count :   128
ATHR_GMAC: Mac capability flags    :   2381
athr_gmac_ring_alloc Allocated 2048 at 0x87af3000
athr_gmac_ring_alloc Allocated 2048 at 0x87a6f800
WASP  —-> S17 PHY *
Setting Drop CRC Errors, Pause Frames and Length Error frames
Hello, nat module!
thread: napt_ct_scan create success pid:108
netlink_kernel_create succeeded at tp_rule_nl_prot: [29]
isis_ip_intf_entry_add id[0] for vid[1]
isis_ip_intf_entry_add id[1] for vid[2]
ACL(Index 0) For packet From Wan Port and TTL is zero
ACL is not yet enabled. Enabling…
ACL Rule(Index 2) For UDP with Zero Checksum
######## S17 SSDK init succeeded! ########
++++ athrs17_igmp_setup once
athrs17_reg_init:done
Setting PHY…
napt_ct_scan_thread: time: 4
ADDRCONF(NETDEV_UP): eth0: link is not ready
device eth0.1 entered promiscuous mode
device eth0 entered promiscuous mode
Now flash open!
Receive unknown msgType:10 at isis_nat_helper.2631.c:2930/tp_rule_netlink()!
isis_ip_intf_entry_add id[1] for vid[2]
br0: port 1(eth0.1) entering forwarding state
ACL Rule(Index 1) For Packet From WAN to LAN Port And DIP is in lan net
nf_conntrack_rtsp v0.6.21 loading
nf_nat_rtsp v0.6.21 loading
Enet:0 port4 up
ATH_MAC_TIMER: enet unit:0 is up…
RGMii 1000Mbps full duplex
ATH_MAC_TIMER: done cfg2 0x7215 ifctl 0x0 miictrl
ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
asf: module license 'Proprietary' taints kernel.
Disabling lock debugging due to kernel taint
ath_hal: 0.9.17..1 (AR5416, AR9380, REGOPS_FUNC, WRITE_EEPROM, 11D)
ath_rate_atheros: Copyright (c) 2001-2005 Atheros Communications, Inc, All Rights Reserved
ath_dfs: Version 2.0.0
Copyright (c) 2005-2006 Atheros Communications, Inc. All Rights Reserved
ath_dev: Copyright (c) 2001-2007 Atheros Communications, Inc, All Rights Reserved
ath_ahb: 9.2..0_U10.1020 (Atheros/multi-bss)
__ath_attach: Set global_scn[0]
ACBKMinfree = 48
ACBEMinfree = 32
ACVIMinfree = 16
ACVOMinfree = 0
CABMinfree = 48
UAPSDMinfree = 0
Restoring Cal data from Flash
dfs_attach: use DFS enhancements
DFS min filter rssiThresh = 18
DFS max pulse dur = 151 ticks
ath_get_caps[5108] rx chainmask mismatch actual 3 sc_chainmak 0
ath_get_caps[5083] tx chainmask mismatch actual 3 sc_chainmak 0
SC Callback Registration for wifi0
wifi0: Atheros 9340: mem=0xb8100000, irq=2
ath_pci: 9.2.0_U10.1020 (Atheros/multi-bss)
__ath_attach: Set global_scn[1]
ACBKMinfree = 48
ACBEMinfree = 32
ACVIMinfree = 16
ACVOMinfree = 0
CABMinfree = 48
UAPSDMinfree = 0
Restoring Cal data from Flash
dfs_attach: use DFS enhancements
DFS min filter rssiThresh = 18
DFS max pulse dur = 151 ticks
ath_get_caps[5108] rx chainmask mismatch actual 3 sc_chainmak 0
ath_get_caps[5083] tx chainmask mismatch actual 3 sc_chainmak 0
SC Callback Registration for wifi1
wifi1: Atheros 9580: mem=0x10000000, irq=64 hw_base=0xb0000000
wlan_vap_create : enter. devhandle=0x87bd82c0, opmode=IEEE80211_M_HOSTAP, flags=0x1
wlan_vap_create : exit. devhandle=0x87bd82c0, opmode=IEEE80211_M_HOSTAP, flags=0x1.
VAP device ath0 created
 DES SSID SET=TP-LINK_2.4GHz_B69685
 ieee80211_ioctl_siwmode: imr.ifm_active=131712, new mode=3, valid=1
device ath0 entered promiscuous mode
br0: port 2(ath0) entering forwarding state
 ieee80211_ioctl_siwmode: imr.ifm_active=1442432, new mode=3, valid=1
br0: port 2(ath0) entering disabled state
 DES SSID SET=TP-LINK_2.4GHz_B69685
br0: port 2(ath0) entering forwarding state
br0: port 2(ath0) entering disabled state
br0: starting userspace STP failed, starting kernel STP
br0: topology change detected, propagating
br0: port 2(ath0) entering forwarding state
wlan_vap_create : enter. devhandle=0x86c802c0, opmode=IEEE80211_M_HOSTAP, flags=0x1
wlan_vap_create : exit. devhandle=0x86c802c0, opmode=IEEE80211_M_HOSTAP, flags=0x1.
VAP device ath1 created
 DES SSID SET=TP-LINK_5GHz_B69686
 ieee80211_ioctl_siwmode: imr.ifm_active=66176, new mode=3, valid=1
Found best 11na chan: 44
br0: port 1(eth0.1) entering disabled state
br0: topology change detected, propagating
br0: port 1(eth0.1) entering forwarding state
device ath1 entered promiscuous mode
br0: topology change detected, propagating
br0: port 3(ath1) entering forwarding state
 ieee80211_ioctl_siwmode: imr.ifm_active=852608, new mode=3, valid=1
br0: port 3(ath1) entering disabled state
 DES SSID SET=TP-LINK_5GHz_B69686
br0: topology change detected, propagating
br0: port 3(ath1) entering forwarding state
br0: port 3(ath1) entering disabled state
br0: topology change detected, propagating
br0: port 3(ath1) entering forwarding state
fuse init (API version 7.12)
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
Port Status 1c000004
ath-ehci ath-ehci.0: ATH EHCI
ath-ehci ath-ehci.0: new USB bus registered, assigned bus number 1
ehci_reset Intialize USB CONTROLLER in host mode: 13
ehci_reset Port Status 1c000000
ath-ehci ath-ehci.0: irq 3, io mem 0x1b000000
ehci_reset Intialize USB CONTROLLER in host mode: 13
ehci_reset Port Status 1c000000
ath-ehci ath-ehci.0: USB 2.0 started, EHCI 1.00
usb usb1: configuration #1 chosen from 1 choice
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
SCSI subsystem initialized
usb 1-1: new high speed USB device using ath-ehci and address 2
usb 1-1: configuration #1 chosen from 1 choice
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 4 ports detected
Initializing USB Mass Storage driver…
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
 GPL NetUSB up!
kc   86 : run_telnetDBGDServer start
kc  223 : init_DebugD end
INFO1758: NetUSB 1.184, 0002061F : May  7 2012 10:36:59
INFO175A:  AUTH ISOC
INFO175B:
usbcore: registered new interface driver KC NetUSB General Driver
INFO0076:  init proc : PAGE_SIZE 4096
INFO17B4: Check mac address
INFO162C:  infomap 8654c220
INFO162F:  sleep to wait br0 to wake up
INFO02D0:  use dev Name br0
INFO1638:  sleep to wait br0 end.
INFO1651:  UDP_BROAD 7437 tcpPort:625868800
INFO02D0:  use dev Name br0
INFO1538: tcpConnector() started…
TP_RULE_NAT:enable hardware nat
IPv6 over IPv4 tunneling driver
(tp_mroute_enable_write)140, tp_mroute_enable = 1
INFO1415: Bind to br0[/code]
Continue Reading