12/10/2009

DD-WRT to upgrade your router with open-source router OS

High-end router hack with cheap router from lifehacker:
http://lifehacker.com/software/router/hack-attack-turn-your-60-router-into-a-600-router-178132.php

Quote:

Hack Attack: Turn your $60 router into a $600 router

by Adam Pash

Of all the great DIY projects at this year's Maker Faire, the one project that really caught my eye involved converting a regular old $60 router into a powerful, highly configurable $600 router. The router has an interesting history, but all you really need to know is that the special sauce lies in embedding Linux in your router. I found this project especially attractive because: 1) It's easy, and 2) it's totally free.

So when I got the chance, I dove into converting my own router. After a relatively simple firmware upgrade, you can boost your wireless signal, prioritize what programs get your precious bandwidth, and do lots of other simple or potentially much more complicated things to improve your computing experience. Today I'm going to walk you through upgrading your router's firmware to the powerful open source DD-WRT firmware.

What you'll need:

  1. One of the supported routers. I used a Linksys WRT54GL Wireless router that I picked up from Newegg, and the instructions that follow detail the upgrade process specifically for that router and its close siblings. If you're upgrading one of the other supported routers, you might want to look into instructions specific to your router. These instructions may generally work for other supported routers, but I'm not making any promises.
  2. The generic DD-WRT v23 SP1 mini firmware version located here.*
  3. The generic DD-WRT v23 SP1 standard firmware version located here.*

*You'll be upgrading the firmware twice, first using the mini firmware, then using the standard.

Upgrading your router to the DD-WRT firmware

Check out this gallery for the detailed step-by-step upgrade with screenshots. When you're finished, come back here for some of my favorite tweaks.

Update, October '07: Reader Josh Harris writes in:

All the new WRT54G routers being sold now are v8, and the previous DD-WRT software didn't work on them. However, recent versions added support for the new v8 router— but it's a little more in depth.

Got this to work on the WRT54G v8 (should work on 7 as well, just replace the files with the corresponding 7 version):

First of all, use IE explorer. Firefox didn't work at all on this for me, even after install. Second, go to this page. Read the textfile carefully and follow its instructions. Two edits to the textfile:

1. Make sure you go to command prompt and type ipconfig /all. Record the default gateway, the subnet mask, and the two DNS addresses. When you set the IP address manually on your desktop/laptop to 192.168.1.100 as per the instructions, you will need to set these 4 numbers as well.

2. Don't forget when you do the tftp that you need to be in the folder that contains the downloaded dd-wrt.v24_micro_wrt54gv8.bin file (for example, if it is in C:/Downloads, type /cd C:/Downloads).

Lastly don't forget you need to be on a wire to the router, and download both vxworkskillerGv8.bin and dd-wrt.v24_micro_wrt54gv8.bin before you start. Following this procedure will install the micro version on your router.

After this, switch your laptop/desktop back to receiving your IP address via DHCP rather than the manual configuration you set as per the instructions. You will be able to access the DD-WRt micro install via 192.168.1.1 with the login username root and the password admin. From here, you still need to install the DD-WRT standard.

Unfortunately, you cannot go any farther than this with WRT54G v7 and v8 because Linksys downgraded the physical memory in these recent models. However, micro is still an improvement over the original Linksys firmware.

Boost your wireless signal

The first thing I did after I finished the firmware upgrade was give my wireless signal a much needed boost ("needed" in the sense any signal boosting that can be done needs to be done, right?). Doing so is trivial.

Go to the Wireless tab, then to Advanced Settings. Find the entry labeled Xmit Power, which is set by default at a paltry 28mW, and can be set up to 251mW. To be honest, I don't know much about the science of the whole process, but I do know that 251 is WAY bigger than 28. However, you probably don't want to pump it up to 251mW right away.

The DD-WRT manual suggests that a "safe increase of up to 70 would be suitable for most users." Anything too much above that and you'd be flirting with overheating your router and damaging the life of your router (though I've heard that many people have pushed it up to 100 or above). So go ahead and change your Xmit Power to 70 and click the Save Settings button at the bottom of the page.

I can't measure for sure how the signal boost has improved things for me since I've just moved into this apartment, but I can say that the signal is full bars pretty much anywhere I go. How's that for scientific?

Throttling your bandwidth by program

While most routers treat one request for bandwidth the same as any other, your new $600 router is a step above. By setting up QoS (Quality of Service) rules, you can give priority to your interactive traffic (like VoIP, web browsing, or gaming) while throttling traffic that doesn't require a steady rate of bandwidth to function (like P2P programs).

Doing so will ensure that even if your network gets clogged with lots of file sharing, you'll still have enough bandwidth left over to make all of your free SkypeOut phone calls. If you've got roommates who tend to sponge up a lot of bandwidth, you can even prioritize by IP address.

What to do if you brick your router

brick.png

If, god forbid, while flashing your firmware you end up "bricking" your router, don't worry - all is not lost. The DD-WRT wiki (a great resource of all things DD-WRT) can help you recover from a bad flash.

Of course, your router will handle securing your network, port forwarding, and all the other things your regular old router does.

Obviously I've just scratched the surface here, so if you decide to try this out, there's a lot of potential for other things you can do. Any readers tricked out a router with DD-WRT or one of the other open source distros? Tell us what tweaks have worked for you in the comments or at tips at lifehacker.com.

XBMC on Media Center!

XBMC build instruction from lifehacker:
http://lifehacker.com/5391308/

Quote:

Build a Silent, Standalone XBMC Media Center On the Cheap

You won't find a better media center than the open-source XBMC, but most people don't have the space or desire to plug a noisy PC into their TV. Instead, I converted a cheap nettop into a standalone XBMC set-top box. Here's how.

In the spirit of our Winter Upgrades theme this week, this guide details how to turn a cheapo nettop (think netbook for the desktop) into a killer settop box running XBMC. It handles virtually any video file I throw at it with ease (including streaming Blu-Ray rips from my desktop), it looks tiny next to my Xbox 360, it's low energy, and it's whisper quiet.

Huge props to this guide on the XBMC forums, which served as the starting point for much of what I did below.

What You'll Need

  • Acer AspireRevo: This $200 nettop ships with 1GB of RAM, an Intel Atom 230 processor, 160GB hard drive, Windows XP (which we won't use anyway), and an integrated graphics chip that handles HD video and can output it to HDMI. It also comes with a small wired keyboard and mouse, but once you're done here, you shouldn't need either of them. Oh, and it's tiny. (Other, more powerful nettops will work [like this one's beefier, $330 older sibling], but this is the cheapest one I could find with the NVIDIA ION graphics powerful enough to handle the HD playback.)
  • XBMC Live: This is a Live CD version of XBMC that boots directly into XBMC and has a tiny footprint. Basically all you're running is XBMC, so your media center stays light and snappy. You can find the download specifically set up for these NVIDIA ION machines on this page, you can grab the direct download here, or download via BitTorrent here.
  • A thumb drive: It doesn't have to be huge, but it'll need to be at least 1500MB of capacity, according to the installer. You should also format it to FAT32.
  • An IR receiver/Windows Media Center remote: This isn't strictly necessary, but if you want to control your shiny new XBMC via remote control, you'll need some sort of supported remote with a USB receiver. I bought this $20 remote because it was the cheapest I could find. (Incidentally, it also works like a charm with XBMC as soon as you plug it in.)

Getting XBMC Live up and running on your nettop is a breeze if you follow a few simple steps, so let's get started.

Install XBMC Live on Your Thumb Drive

XBMC Live allows you to try XBMC on any computer from a bootable CD or thumb drive, then optionally install the lightweight, XBMC-focused Linux distro directly to your device if you like. Since our nettop doesn't have a DVD drive, we'll need to first install XBMC to our thumb drive.

(There are ways around this. If you had a USB optical drive, you could probably burn XBMC Live to a disc and go from there. The thumb drive method isn't much more difficult, though.)

Here's how it works:

1. Download the XBMC Live installer with the updated NVIDIA drivers included on this page (direct link, torrent link). Update: Huge thanks to Mike and Aaron for the file hosting and torrent creating. It's a 341MB file, so it may take a while.

2. Burn XBMC Live to a CD
Once the download completes, unzip the xbmc.zip file. What you're left with is an xbmc.iso file—the disc image of the XBMC Live installer. Now you need to burn this ISO to a CD. Install our favorite tool for the job, ImgBurn, then right-click the xbmc.iso file and select Burn using ImgBurn. (If you're running Windows 7, you can use its built-in ISO burner, too, by selecting Burn disc image.)

3. Install XBMC Live to Your Thumb Drive
Now that you've burned XBMC to a CD, you're ready to install it to your thumb drive. To do so, plug in your thumb drive, put the XBMC Live CD in your DVD drive, and reboot your computer. If it's not already your default setting, go into your system BIOS (for most computers hitting Delete at the first boot screen will launch your BIOS) and set your optical drive as the primary boot device.

(All this means is that when your computer boots, it'll first check to see if there's any bootable media in your optical drive. If not, it'll continue booting to your secondary device—generally your hard drive. If your optical drive does contain bootable media—like your XBMC Live CD, for example—it'll boot it up.)

When XBMC Live loads, select "Install XBMCLive to disk (USB or HDD)", then accept the first prompt (by pressing any key). Next you'll end up at the "Choose disk to use" prompt, where you'll tell the installer that you want to install to your USB stick. Be careful here not to choose your hard drive, because it would be happy to overwrite your operating system if you told it to. Remember, your thumb drive is the Removable disk. After you pick the disk you want to use, confirm that you want to proceed and let the installer do its magic. (It'll only take a few minutes.)

Eventually the installer will ask you if you want to create a permanent system storage file, which presumably you'd want if you're not sure whether or not you want to install XBMC Live to your Acer's hard drive. I went ahead and created the system storage (even though we'll install XBMC Live directly to the hard drive in the next step.) Once the installation finishes, you're ready to proceed to the next step.

Set Your System BIOS

You'll need to make a couple of tweaks to your system BIOS to get it working smoothly with XBMC Live. So plug in your thumb drive, boot up your Acer AspireRevo, and hit Delete at the first boot screen to edit your BIOS. Look for the "Boot to RevoBoot" entry in the Advanced BIOS features menu and disable it. While you're there, set your XBMC Live thumb drive as the primary boot device. (You can set the primary boot device back to your hard drive later, after you've installed XBMC Live to your drive.)

Then go to the Advanced Chipset Features menu and set the iGPU Frame Buffer Detect to Manual and set the iGPU Frame Buffer Size to 256MB. (This is detailed here; the actual guide says 512, but that requires that you install more RAM—something I may do in the future, and will detail with a guide if I do. The 512 buffer size will help you stream the larger HD videos without hiccups.)

Now that your BIOS are set, you're ready to try out XBMC Live on your Acer AspireRevo.

Boot Up/Install XBMC Live to Your Hard Drive

At this point, you've got two choices. You can either restart your Acer AspireRevo and boot into XBMC Live to play around a little before you install it to your disk. If you're sure you're ready to install it for reals, just go ahead and run through the exact same installation as you did above, only this time install it to your nettop's hard drive. When you install to the hard drive, you'll also set a system password. This'll come in handy later.

The Final Tweaks

Okay, so far so good. XBMC should boot up directly from your hard drive now, and if you've plugged in your Windows Media Center remote, it should also be working without a hitch. You've just got to make a couple of adjustments to make it shine.

Now, what makes your little nettop work so well is that its onboard graphics processor can handle all the HD business without eating up your regular processor power, so you'll want to enable this in the XBMC settings. So head to Settings > Video > Play, find the Set Render to section, and set it to VDPAU.

Now, depending on how you're planning on hooking up your XBMC Live box to your television, you've got a few more tweaks you'll want to make. Namely this:

If you want to use HDMI for your audio out, head to Settings > System > Audio hardware, then set the audio output to Digital. Set your Audio output device to hdmi, and set the Passthrough output device to hdmi. Last, enable Downmix multichannel audio to stereo.

If you are using HDMI as your audio out (I am, and it's pretty nice), you've got to make one final tweak if you want the audio output to work with menu sounds. (It'll work fine with video without making this tweak, but the click-click sounds that play when you move around the XBMC menu are nice to have.) If that applies to you, create a new text file on your regular old computer (name it asoundrc.txt) and paste the following code (again, this awesome tweak comes from this post):

pcm.!default {
type plug
slave {
pcm "hdmi"
}
}

In the next step, I'll show you how to copy that file over to your nettop (a little trick that'll also come in handy for manually installing plug-ins and copying files to your nettop).

SFTP to Your XBMC Box

If you want to transfer files to your XBMC Live box from another computer, you'll need to get yourself an FTP client (I like FileZilla) and log into your nettop with the password you set when you were installing XBMC Live. To do so, create a new connection in Filezilla that looks something like the screenshot below (the default user is xbmc).

Once you're connected, make sure you're in the /home/xbmc/ directory, then copy over the asoundrc.txt file we made above. (The one you want to use if you're running your audio through the HDMI output.) Once it's copied over, rename the file to .asoundrc, restart XBMC, and the click-click menu sounds should be working along with regular old A/V playback.

The same SFTPing method here will be useful if you ever want to manually install any plug-ins or skins down the road, or just copy over media directly to your nettop's hard drive. (Though we'd recommend streaming—see below.)

Other Options

As I said above, you can buy more expensive, meatier machines, but for my money this Acer nettop has worked perfectly. Apart from upgrading to better equipment, you can also add up to 2GB more RAM if you're up for the job (RAM's so cheap these days, anyway). Like I said, though, so far I haven't seen the need for it.

I also quickly switched the skin to the MediaStream skin, which is the one you see in the photo at the top of the page. For a look at some other great skins you may want to apply to your XBMC box, check out these five beautiful skins—or just head to XBMC's main skins page.

Now that you've got it all set up, you've probably also realized that 160GB isn't all that much space for your media. You'd be right, of course. You've got two pretty good options. First, the nettop should have something like four free USB ports still, so you can easily plug in a big old drive that way. Assuming, however, that you can run an Ethernet wire over to your nettop, your best option is just to connect it to a shared folder on your home network. XBMC works like a charm with Samba shares (Windows shared folders use this).

Whichever method you use, you just need to add your extra hard drive space as a source in XBMC. You can do so through any of the individual menu items (videos, for example), or you can add a default Samba username and password in the settings so it can connect automatically without asking for a password each time you add a new watch folder on that machine.

At this point I could go into more detail on how to use and get the most out of XBMC (it can be a little hard to get your head around at first, even though once you do, it's not actually confusing). We've covered souping up your XBMC—and building your classic Xbox XBMC machine—and both offer some help in those directions. But stick around; tomorrow we'll follow up with an updated guide to some of our favorite XBMC tweaks.

Solution to deal with trouble with your boss

If you have trouble with your boss consider this article:
http://www.lifehack.org/articles/management/what-to-do-if-you-dont-get-along-with-your-boss.html

Quote:

What to Do if You Don’t Get Along with Your Boss

20091204-frustrated

What should you do if you really cannot get on with your boss at work? Maybe there has been a breakdown in trust, in communication or in respect. In any event it is ruining your time at work and making you frustrated and unhappy. Let’s call your manager “John” and see how we can approach the situation. (The advice here works equally well whether your boss is a man or a woman).

1. How do other people find him? Does everyone have a hard time with John or is it just you? Check out how other people get on with him by asking subtle questions – do not rant about how awful he is and see if others agree. If everyone has a problem with him then you have some common ground on which to work. If only you have difficulties with him then you need to examine yourself and your relationship with him.

2. Ask yourself why. List all the reasons why you think things are not working between you. There are probably some big assumptions on your list so you will need to validate them carefully.

3. Have a heart to heart meeting. Schedule a time to meet John when he is not under pressure. Tell him that you want to discuss some important issues. At the meeting explain very calmly and rationally that you do not feel the relationship is working well and that you would like to explore why and how to improve it. Do not go into a long list of complaints and sores. Take a factual example if you can and start from there. Let him do most of the talking. Try to see the situation from his point of view and understand exactly what he sees as the issues. See how many of the problems you listed at point 2 above are real.

4. Agree an action plan. If you can agree a plan for outcomes that you both want then it really helps. What is it that he wants you to achieve? If you deliver it will he be happy with your performance? Even if you disagree on all sorts of other things try to agree on what your key job objectives are. Ideally you should agree actions that each of you will take to improve the working relationship.

5. Try to understand his objectives and motivation. Even if John is lazy, dishonest and spiteful you can still find out what he is keen to achieve and work with him towards his goals. If you can find a way to help him with his objectives then maybe you can work around his faults. A good rule at work is to help your boss to succeed – whether you like him or not. Other people will see you do this and it works to your credit – especially if they know that your boss is difficult.

6. Go over his head. This is a risky option but sometimes it is necessary – especially if most other people share the same problems with John. Have a quiet word with your boss’s boss and say that you feel that the department is not achieving all that it could. Make some broad suggestions about how things could be improved without making direct accusations against John. Let the senior manager read between the lines; he or she probably knows already.

7. Move sideways in the organization. If you cannot move up then move across for a while. Get some experience in another department. Eventually John will move on, be fired or quit. If you are seen as a positive contributor then you may get your chance to do John’s job better than he did.

8. Quit. Life is too short to spend it in a job that makes you miserable. If you have tried all of the routes above and are still blocked and frustrated then find a job elsewhere. There are plenty of good bosses who want enthusiastic and diligent people to work for them.

Sooner or later most of us will get a difficult boss to deal with. Do not become sullen or aggressive. The trick is to figure out a way to get on with the boss in a manner that helps both of you. It can nearly always be done.