Oct 25, 2009

Build your own expandable NAS box !

One more step towards a networked home, I needed a NAS server where I could keep adding disks as necessary with no restrictions ! Every ready made NAS server in the merket has its own restrictions like huge cost, missing RAID capabilities, not expandable to more than four disks, missing NAS/Samba mixed usage and so on.

So build my own NAS box was the mantra. What I needed:


1. Cheap processor with low power consumption

I already had a dual core 330 Atom board at home, just had not found a use for it. This CPU would be perfect for the NAS.

http://www.newegg.com/Product/Product.aspx?Item=N82E16813121359
Cost Rs 3500.



2. Small cabinet that does not take up space or power and makes no noise.

This was the tough one, especially in India. After a lot of research, I zeroed in on the Panache T3300 as the cabinet. It is small, in fact really compact and runs off a DC power board. This means that there is no PSU in the case (hence no fan/noise) and it runs off a DC adapter like a laptop. Disadvantage is the lack of a DVD drive.



Note the Panache box kept next to a WD external hard disk and a encyclopedia to get a idea of its size ! :bleh:

http://panache.co.in/store/product_info.php?products_id=111
Cost Rs 3200.


3. Operating system for the NAS box

Lot of options here. Windows embedded, standard linux distros and more. But what caught my eye is the FreeNAS distribution. It is a embedded OS that runs off a 200mb image, configured completely from the web and works like a charm on the Atom. More importantly, very configurable and very expandable. Just perfect for my needs ! :hap2:

http://www.freenas.org/
Cost Rs 0 !


4. Install disk for the OS on the NAS box

An 3.5" disk is out of question on the small panache box. A 2.5" disk is acceptable, but still draws 4-8 watts of power for no reason. And the minimum size is 40gb when I just need one GB of space.

A little more research got me onto a fantastic solution. I found out that there are IDE adaptors for compact flash cards for about Rs 100. The bad news is that a compact flash card is expensive. But here also, I stumbled across a great solution. A CF adaptor that used cheap SD cards internally !!!



A 2GB disk for a grand total of Rs 1000 and uses 0.2 watts of power!!!

http://dealextreme.com/details.dx/sku.711
Cost Rs 100

http://dealextreme.com/details.dx/sku.22338
Cost Rs 700 + Rs 200 for a SD card (Be a little carefull when you buy a SD card. It has to support DMA access, otherwise the OS will not install on the disk)


5. Memory. Less is more in this case !!!

A 512 DDR2 stick would have been plenty, but I had a spare 1GB stick with me and used it. Can hardly see any difference in performance between this and a 2gb stick.


All set, I assembled the Atom box and made sure everything is working.




Now is the time to download the FreeNAS OS and boot off the OS with a external DVD drive. There is a nice option to install the embedded system to the disk. Choose this and install the embedded FreeNAS OS to the attached compact flash drive.

Attach the external USB drives that you want to share, assign a IP address and reboot the machine. When the machine is up, you can connect to the headless machine from a browser at http://myfreeNASipAddress and configure the machine, the attached drives, the network shares, the services and everything else from the web !!!

You are all set. The network access is extremely fast and you can add as many USB drives as you want and share them on the network either cvia NFS or Samba. You can even setup software raid for the drives that need protection.



The NAS box up and running, attached to a monitor. See the power being drawn on the side. Just 0.11 Amps, which translates to a grand total of 25watts for a fully running NAS box. :hap2:

Total cost of the setup was Rs 9k without the external hard disks. For a NAS server that is expandable to as many USB disks as you want with RAID and multiple share options, this is worth it !

Oct 23, 2009

Hack the WDTV into a networked snazzy media player and Linux box !

I had a lot of spare time yesterday and thought, what the heck, it is time to hack the one device that I have not yet touched in the house

The WDTV has been a great media player for me over the last year, plays every damn file I throw at it, but I do not quite like the UI and more importantly, it is a pain to keep shuttling the attached hard disk to the computer to update the movies. So here is how I hacked my WDTV into a networked snazzy little linux box !!!


Step 1: The simplest and best hack for the WDTV :

http://b-rad.cc/wdlxtv

Just download the binary firmware file and place it in the root of a USB stick and reboot the WDTV. It should pick up the new firmware and update it. Step one done with the full fledged linux running on the WDTV !

By the way, there are quite a few options for hacking the WDTV. Two of the options I have listed below are for the advanced users who love to fiddle around in linux.

http://b-rad.cc/wdtv-firmware-dvd-enabled


http://wiki.wdtv.org/doku.php?id=ext3-boot-releases

Blow away the firmware files from the USB stick, from here on you will need the USB stick for your hacks.



Step 2: You need logs from here on to see what is happening on the WDTV.

Download : http://b-rad.cc/log-saver.app.bin

Place it on the root of the USB stick, boot the WDTV and when you shutdown, you should be able to see the boot log files on your USB stick.



Step 3: You need to buy a USB wireless network adaptor for the WDTV to go wireless !

There are a limited set of options here for what adpator you can use. See:
USB Wireless adaptor support

It seems like any adaptor that uses the rt2870 chipset is your best bet. The rt73 seems to be the easiest to get in India. The Dlink DWA-110 (1.4k) and the Dlink DWA-140 (2k+) adaptors are both available in ebay India for your reference and both use chipsets that work well on the WDTV.

I personally have the BELKIN Wireless G Plus MIMO Network Adapter which uses the rt2870 chipset :

http://www.newegg.com/Product/Product.aspx?Item=N82E16833314026




Step 4: You need the driver pack for the network adaptor.

See this thread:

http://wdtvforum.com/main/index.php?topic=1029.0

Follow the thread properly, get the dat file and the bin file for the adaptor drivers and drop them into the root of the usb key. Now reboot and if you have done the steps properly, you should see the adaptor lighting up and connecting to your router. I personally use WPA-AES encryption on my router and it works perfectly.



Step 5 : Install Samba server and NFS client on the WDTV

This is the part where I screwed up a lot as I had a lot of trouble trying to get the Samba server to export the USB devices. Anyways, it was just a matter of editing the smb.conf file to export your USB devices and bingo, the USB device attched to the WDTV is now visible on the network from any Windows box. Now I copy new movies sitting on my computer to the hard drive attached to the WDTV. It takes time as the processor is slow, but what the heck is 10 minutes extra when it saves me from moving the hard disk all over the place every second day.

Follow this post and you should be able to setup Samba pretty easily:
http://b-rad.cc/609/wdlxtv-app-pack-samba

Note that it is possible to mount NFS drives to the WDTV so that you can view media remotely, I have not yet attempted that. That is a experiment for another day, another time !



Step 6: Making the WDTV interface look better !!!

This was the fun part. Use custom packs to snazzy up the UI.

http://wdtv.free.fr/osdmod/


This changes the icons and makes the WDTV menus look snazzy. Like this:





Step 7: Show movie information for every movie.

This is something that I always wanted, go to a movie folder and get all information about the movie before I play it !!! There is a program called tvixie that does this. Download the point it to the movies folder in your hard disk and it downloads all the information in JPG form for all the movie to the same movie folder. And this is how it looks:




Here is the link : http://www.tvixie.com/



Step 8: Use the TVIXIE information on your WDTV.

See this thread below and use the plugin. As simple as that !!!

http://wdtvforum.com/main/index.php?PHPSESSID=d914fdbda1cd13578366c3a7941c1262&topic=1039.0

When you do this, this is how you browse your movies :




And clicking on any movie gives this screen full of info :




This was the way the WDTV was meant to be used !!!




P.S : I have provided links to the original author's webpage wherever there was a need to refer to someone else's work. This means that they have the full credit for their work and I do not mean to infringe on anyone's copyright.

Aug 22, 2009

The 24 hour torrent downloader plus file server !

I have been obsessed with power consumption for a little while and have been considering ways to bring down the same in my home. One of the big power drainers was the downloading of movies via torrents. The PC used to be up all night downloading movies using up a full 140 watts with a super fast quad core processor and a graphics card drawing good amount of power while just idling. So I was looking for ways to prevent this.

The second issue I had was with the sharing of data between the multiple devices at home and having too much redundant data across drives for various purposes. The ideal solution was to have a network drive which allows all the devices to talk to the drive over the network. But NFS drives are prohibitively expensive and come with too many caveats. So I wanted something simple and cheap.

So here is one great solution. I purchased the ASUS WL-500g Premium V2 wireless router for Rs 5.5k and this one device does all that I want and consumes less than 8 of power for all the wonderful work it does. Here is the router :



The hardware chip on this router is a broadcom, which means that you can flash plenty of opensource firmwares onto this and make it into a full fledged linux machine. DD-WRT, Oleg and Tomato were the options for firmware and I choose the Oleg's firmware since it closely resembles the Asus factory firmware and is well extensible. Here is the link for the firmware: http://oleg.wl500g.info/

Next step, install "transmission", a torrent client to this linux box. Install the windows agent onto your PC and bingo, you have a torrent downloader running on the router, controllable from the PC. Here is how the PC applicaiton looks like when it connects to "transmission" running on the Asus router.



Im sure you are wondering where the downloaded file is saved ? Now the beauty is that the Asus router has two USB ports. Connect a USB drive to it and the linux OS on the router shares the whole drive on the network as it was a network file system. Works like a charm !

Part two of the project was to make sure that I get a USB device that itself that does not draw too much power. So I opted for a 1.8" hard disk with a external enclosure that consumes 1 watt of power. Gives me space for 60 gigs of download space and also serves as a swap disk for the linux box.



Just for the sake of curiosity, above is a picture that shows four external USB drives, a Verbatim 3.5" disk, a Transcend 2.5" disk, a Diva 1.8" disk and a regular USB flash disk. The 1.8" disk seems to be the best compromise between pocket size, speed and price.

So folks, project succeeded ! I connect to transmission on the router from my PC, start off a any download (FTP, torrent and HTTP) and switch off the PC. Download happens all night and the electricity meter is hardly running. And I can monitor it using the transmission internal webpage from my mobile phone !!!

Do remember that all this does not change the main job of the router and it still functions as a fantastic wireless router.

And to top it all up, I have connected a 1 terabyte external hard disk to the Asus box. I switch it on when I need to and it gives me a 1TB network disk !

Aah the sweet satisfaction of a job well done...

Aug 8, 2009

"Kill A Watt" for 220v !

I have been recently thinking a lot about how to conserve power. Part of this is driven by the ever increasing number of gadgets in the house which are leading to larger and larger electricity bills !

I did a lot on searching on the net to figure out if a device to measure the amount of current being drawn by any device is available on the net. Sure it was, "Kill a watt" is a much used, much loved device to do this exactly. Unfortunately, like most things American, it uses 120v and there is nothing for the 220v side of the world. And one 220v option available for Europe was just ridiculously expensive.

So that set me thinking that this should not be too difficult to build. With the help of a few friends who were good at circuits, I finally built it for just Rs 750 ($15).

Here is the circuit diagram of the same. Remember that the current has to flow in series through the multimeter. The current has to pass through the multimeter and the selected component in series to measure the current flowing through the circuit.



Now for some live photos and DIY steps of how I to made it.

Disclaimer : Remember that we are talking of live current here, so the standard disclaimers apply. If you electrocute yourself or burn down your house, it is all your fault !!! Be careful with the circuits and do not connect anything till you are reasonably confident it is all going to work.

What do you need ? A digital multimeter that can measure current, these are available for Rs 600 in any good electrical shop. Remember that the multimeter's available for Rs 200 cannot measure current. They only work on DC and measure current voltages. (If there is a doubt, check if there is a "A~" option among the options).

This is the one I used:



You also need a ready made switch box, again available in any electrical shop for Rs 50. Make sure you get a 5amps model as I would not be comfortable connecting a 15amps component to the multimeter.

Now, you are ready to connect the multimeter to the switch box. Chop off one end of the multimeter cable so that you can connect it directly to the switch box. Remember to cut the cable from the side which does not connect to the mutimeter (It will be a special molex cable on one end to connect to the multimeter and a sharp pin on the other side. Cut the side with the sharp pins). Current flows from the mains to the box and the multimeter wires are connected in series.

Here is the snap of the same.



Close the box and bring the cables from one side of the box so that no live wires are hanging out. This is how the completed box looks like:



Now connect the multimeter molex cables to the multimeter and leave it there. This is because current will be flowing through the molex ends and you do not want them to touch the ground.

That is it basically. Set the multimeter to the 20amps mode to make sure the fuse does not blow, connect ANY device to the box and plug the box to the mains. Switch on the current and the device and you can start seeing live data on how many amps are being drawn by the device. If you multiply the amps reading with 235, you get the number of watts being drawn by the device. Note that even though India claims to run on 220v, we actually get anywhere between 220v and 240v in the mains. I seem to be getting 235v almost constantly, hence I multiply by 235. You can measure the voltage in your house using the same multimeter at the precise moment you are taking the reading if you want perfect figures, otherwise 235 is a close approximation.

See the picture here of my old 17" TFT monitor monitor connected to the circuit.



The 17" TFT monitor is drawing 0.21 amps, which translates to 50 watts of current being used. Note that my new 22" LCD draws a similar amount of current which shows how electronic components are getting more and more power efficient !!!

That is it folks, connect any 5amps device to the circuit and measure the current being used.

A homemade DIY Kill a watt on 220v for Rs 750 !!!

Please leave comments if you find this post usefull !

Apr 10, 2009

Life is all in reverse !!!

The most unfair thing about life is the way we keep growing old and the way it all ends. I mean, life is tough. It takes up a lot of your time and what do you get at the end of it?

A death. What`s that, a bonus?

I think the life cycle is all backward. You should die first, get it out of the way. Then you live in an old age home where you are taken care of with full government benefits. You get kicked out when you`re at the retirement age, you get a gold watch and nice gifts and you start to go to work.

You work 40 years until you`re young enough to enjoy your retirement. You do girls, drugs, alcohol; you party, and you get ready for high school. You then go to primary school, you become a kid, you play, you have no responsibilities.

And then you become a little baby. You suck around all day with no restrictions, sleep when you want and pee and shit where you want. And then you move into the best natural SPA in the world, your mother's womb; you spend your last nine months floating around, everything being taken care off and in complete control.

And then you finish off as an fantastic orgasm !!!

Apr 2, 2009

Six crores to provide security to Kasab

Aaaargh, I wish I could just throw out these ridiculous politicians and their asshole'ish laws to the outer space. People in India people don't get food and thousands of sick people die of hunger, but we are busy guarding an enemy and treating him as a VVIP.

It is not inconceivable to see Kasab contesting elections in India in the far future.

Read furthur...



Ajmal Amir Kasab -- the lone terrorist caught alive in the November 26 attacks in Mumbai-- will get to travel around in special hi-tech secured vehicle.

The Maharashtra government has imported a van costing a whopping Rs 6 crore.

According to media reports, the van will be handed over to Indo-Tibetan Border Patrol, which is providing security to Kasab. The van is fitted with a scanner that will detect any explosive in the periphery of 200 metres.

Meanwhile, as the government spends crores to ensure Kasab's safety, the lawyer defending him will be entitled to receive a meagre Rs 900 (as per the provisions of legal aid) at the end of trial.

Mar 26, 2009

Rules from the male side...

Now here are the rules from the male side. Please note that these are all numbered "1" ON PURPOSE because every one of them is equally important.

1. Crying is blackmail.

1. Ask for what you want.
Let us be clear on this one:
Subtle hints do not work!
Strong hints do not work!
Obvious hints do not work!
Just say it!

1. Yes and No are perfectly acceptable answers to almost every question.

1. Come to us with a problem only if you want help solving it. That's what we do. Sympathy is what your girlfriends are for.

1. A headache that lasts for 17 months is a Problem. See a doctor.

1. Anything we said 6 months ago is inadmissible in an argument. In fact, all comments become null and void after 1 Day.

1. If you won't dress like the Victoria's Secret girls, don't Expect us to act like soap opera guys.

1. If you think you're fat, you probably are. Do not ask us.

1. If something we said can be interpreted two ways and one of the ways makes you sad or angry, we meant the other one

1. You can either ask us to do something Or tell us how you want it done. Not both. And if you already know best how to do it, just do it yourself.

1. Whenever possible, Please say whatever you have to say during commercials.

1. Christopher Columbus did NOT need directions and neither do we.

1. ALL men see in only 16 colors, like Windows default settings. Peach, for example, is a fruit, not a color. Pumpkin is also a fruit. We have no idea what mauve is.

1. If we ask what is wrong and you say "nothing", we will act like nothing' s wrong. We know you are lying, but it is just not worth the hassle.

1. If you ask a question you don't want an answer to, expect an answer you don't want to hear.

1. When we have to go somewhere, absolutely anything you wear is fine. Really.

1. Don't ask us what we're thinking about unless you are prepared to discuss such topics as CRICKET, finance or the next door good looking lady.

1. You have enough clothes. And you have too many shoes.

1. I am in shape. Round IS a shape!