Belkin Wireless USB Adapter without NDISWrapper

August 30th, 2008

In my last post I described my adventure using a USB Belkin wireless adapter with ndiswrapper. But it seems there’s a newer way to get it to work. DelGurth has the details over on his blog.

As a side note, I haven’t had much time for updates, but I’m planning on posting a bit more often. Maybe something other than the usual “How to do X in Linux” article?

Using Belkin N Wireless USB Adapter with Ubuntu

May 21st, 2008

I picked up a wireless N router and adapter a while ago–both from Belkin–and decided to get them working with Ubuntu.  This is how I got it to work.

Get the driver

Step number one is to download the driver from Belkin’s website.

Extract the driver files

The download from Belkin results in an executable from which the necessary driver files cannot be extracted using cabextract. To get at them, you need to actually run the install program using wine, so install wine first.
$ sudo apt-get install wine

Now you need to go to the directory where you downloaded the drivers and run it.
$ wine f5d8053v3_ww_02.0.0.04_w2.exe

Afterwards, the relevant files will be found inside your .wine directory, but I’ll get back to that later. First you need to install something that will let you use a Windows driver.

Make your Windows driver speak Linux

You now have a driver designed to control your wireless adapter, but it was also designed to run exclusively on Windows. This calls for ndiswrapper, whose job is to act as translator for the Windows driver and Linux system. As far as Belkin’s driver is concerned, it’s running on a Windows system. Note that you can also use ndisgtk–a graphical version of ndiswrapper–for this purpose.
$ sudo apt-get install ndiswrapper

Now we’ll go into the directory that the setup program created in wine.
$ cd ~/.wine/drive_c/Program\ Files/Belkin/F5D8053/XP2K

Now it’s time to wrap up the driver and load it up.

$ sudo ndiswrapper -i rt2870.inf
$ sudo ndiswrapper -m
$ sudo depmod -a
$ sudo modprobe ndiswrapper

In a few moments, it should show up in the Network Manager applet, where you can now connect to your network using you Belkin N Wireless USB Adapter.

Note: Network Manager will probably not show the correct speed you’re connected at, but transfer a file over the network with your new adapter and you’ll see that it’s definitely going at N-wireless speeds.

Transfer and Play TiVo Shows and Movies on Linux (TiVo to Go)

May 13th, 2008

Being able to transfer shows and movies from my TiVo and play them on my laptop has been a really useful feature when I know I’m not going to be home for a while, but the only official software that supports this only runs on Windows. With the goal of doing this with my Ubuntu Linux installation, I set out to find a solution. What I found involves a couple steps, but it works just fine.

Getting the video off the TiVo

Point your favorite web browser to your IP address using https. Mine was 192.168.1.101, so I directed Firefox to https://192.168.1.101. It will ask you for a username and password, which is “tivo” and your media access key, respectively. You can find your access key by either looking through your TiVo’s settings menus or logging into your TiVo account online. Just click on the download link next to the show or movie you want, at which point it may ask you for a username and password again (just enter the same thing as before). Using this method, you could conceivably use a static public IP or a DDNS service like dyndns.org to transfer programs over the Internet from wherever you are.

What to do with your new .TiVo file

At this point, the video is encrypted in a .TiVo file, so you’ll have to do something about that. I found a project called TiVo File Decoder that decodes your previously useless TiVo files into standard mpeg video. You can download what you need at the project site. Once you have that, untar it and move it to /usr/bin/.

$ tar xzvf tivodecode-0.2pre4.tar.gz
$ cd tivodecode-0.24pre4
$ sudo mv tivodecode /usr/bin/

After that, you use tivodecode to unencrypt your TiVo files using your media access key.
$ tivodecode -m your-media-access-key -o mpeg-output-file your-tivo-file

Replace your-media-access-key, mpeg-output-file, and your-tivo-file with the self-explanatory information.

Note: I’m developing a graphical script to make this command more user-friendly, and will add a link to it here when it’s finished.

Play the video

Now just play the video. The default movie player in Ubuntu seemed to have trouble with the resulting mpeg files, but the VLC media player had absolutely no trouble with it.

Getting Suspend Working with nVidia in Ubuntu 8.04 (Hardy Heron)

May 1st, 2008

I had just installed Ubuntu’s newest release on my HP laptop, and all was well until I went to suspend. It’s not to surprising that it didn’t resume, as Ubuntu has a long history of suspend and hibernate problems as configured out of the box. To be fair, about 99.9% of the time the fault lies with the driver; however, it’s still incredibly annoying. The following chronicles the journey to fully functioning suspend.

Note: Read the article on installing the nVidia driver in Ubuntu if you don’t already have it installed.

The journey begins!

The first step I took was to make the usual changes in acpi-support that has historically worked in the past. Change /etc/default/acpi-support to resemble the following using your favorite editor (I’ll show gedit for those new to Linux).

$ sudo gedit /etc/default/acpi-support

SAVE_VBE_STATE=false
POST_VIDEO=false
# It may not be necessary to set USE_DPMS to false, but it doesn't hurt.
USE_DPMS=false

It still doesn’t work?!

Having made those changes, I restarted to find that suspend still didn’t work. Further digging revealed that I needed to explicitly use the AGP module (evidently it handles PCI Express as well) by adding a driver option.

$ sudo gedit /etc/X11/xorg.conf

Insert the following line under the Device section:

Option "NvAGP" "1"

Note: You may also have to add agpgart to your blacklist to stop it from loading. Credit goes to buckminster.
$ sudo gedit /etc/modprobe.d/blacklist

Add the following line and save:
agpgart

It works! Well, it kind of works…

Another restart later, suspend worked, but only once until the next reboot. Further searching revealed another solution involving putting a script in /etc/acpi/suspend.d/. I’m thinking that there’s a mystery script somewhere that setting the settings we changed in acpi-support back to the old values. Here’s how I created the script (use a different two-digit number for you script if there’s one with a lower number, as we want this to be the first thing to run).

$ sudo gedit /etc/acpi/suspend.d/05-nvidia-override-post.sh

Make the script mirror the following:


#!/bin/sh

SAVE_VBE_STATE=false
POST_VIDEO=false
# Once again, I’m not sure if setting USE_DPMS to false is necessary.
USE_DPMS=false

Fully working suspend is mine (and now yours)!

Now the first action taken during suspend is to change all those settings set in acpi-support back to what we need them to be. Suspend now works no matter how many times you do it!

Installing Latest nVidia Driver in Ubuntu 8.04 (Hardy Heron)

May 1st, 2008

The two ways to install the latest nvidia driver is to use the installer from nVidia’s download page or use Envy. If installing manually, simply run the installer as shown below, replacing the name of the installer if different. Then follow the instructions from nVidia’s site.


$ chmod 754 NVIDIA-Linux-x86-169.12.pkg1.run
$ sudo ./NVIDIA-Linux-x86-169.12.pkg1.run

If using Envy, you just need to install it, run it, and follow the instructions Envy gives you.

$ sudo apt-get install envy

Note: If you want suspend, please read the article to get suspend working with nVidia in Ubuntu.

Speeding up Synaptic Package Manager Downloads in Ubuntu

May 1st, 2008

Downloads from Ubuntu repositories can be maddeningly slow, but you can make things flow much smoother by choosing a different server to download from.  This is a demonstration of how to do just that.

With the recent release of Ubuntu 8.04 (Hardy Heron), the Ubuntu repositories and mirrors are stressed to the max with an unprecedented number of users upgrading to the new release.  To relieve some of the pressure and dramatically increase your own download speed, it’s best to spread out the load a little.

The first step is to open up the Synaptic Package Manager and make your way to the repository preferences.
Synaptic Package Manager window

  1. Choose Other… from the dropdown list.
    Software Sources window
  2. Choose a Download Server dialogClick on the Select Best Server button. Synaptic will perform a series of tests on all the mirrors (see screen of progress dialog to the right).
  3. After the tests are complete, the server that ranked highest will be selected.  Click the Choose Server button and close the Software Sources dialog.  Synaptic will give you a message notifying you that the repositories have changed, and suggests that you update them.  Close the message and click on the Reload button in the toolbar to load the repository information from the new server.

Result of server test

Videogame Updates and Low Frame Rates In Windows Vista

January 8th, 2008

A couple months back I decided to upgrade Windows XP on my gaming laptop to Vista.  Unfortunately, my games didn’t appreciate that too much.  Most of the updating problems were solved by setting the “Run this program as an administrator” under the Compatibility tab in the executable’s properties.

Another hitch I ran into was the horrible performance of these games, frequently dropping to frame rates so low as to make them unplayable.  You have to go to Power Options in the Control Panel, select “High Performance,” and make sure the CPU’s speed isn’t limited by clicking “Change plan settings” under the selected power plan.  Vista was choking off my CPU performance at 50%, leading to predictably bad performance.

XM Radio Online Portal for Windows Mobile Devices

November 30th, 2007

I had just finished watching my first YouTube video on my Samsung i730 (see my previous post on how to do that). And yet I wanted more. I wanted my XM Radio on my device, without paying for and installing extra software to do it. I had to search around for nearly half an hour, but I finally stumbled across a website that would let me play my XM Radio Online channels to my heart’s content. If you already have an XM account, point Pocket Internet Explorer to mobile.musicdock.com and log in. Then select a category and tap a channel. Media Player will open up and start playing (XM Liquid Metal for me!).

YouTube on Windows Mobile

November 30th, 2007

The iPhone has been out for a while, and one if its most attractive features aside from the slick interface has been the ability to watch any video from YouTube right on the device. Of course I wanted this feature for myself, but was unwilling to slap down the sizable wad of cash for Apple’s shiny toy and switch carriers. Since I have a Windows Mobile phone (the Samsung i730), I decided to find out if it was possible to add this functionality to the phone I already have.

Google to the rescue! Searching Google for a few minutes brought me to a page describing how to play videos not only from YouTube, but Google Video and a handful of others (even EskimoTube for all you pron fiends). Now I just go to the YouTube site, tap on one of the videos, and either tap “play” or “save,” and the video opens up in TCPMP (a movie player) and starts playing. The version of TCPMP that you need can be found on their testing downloads page. Once you’ve downloaded and installed the appropriate version for your device, you need to have some way of opening up the video from Pocket Internet Explorer. Someone has written a plugin called Flash Video Bundle to do just that, so head over there next. After downloading and installing the Flash Video Bundle, reset your Windows Mobile device. Once it’s back up, visit YouTube, and tap a video. A menu will pop up with options for playing the video, saving the video (Let’s see iPhone do that!), and opening up the page that the video is on (so you can view comments and more information about the video). Mmm…YouTube.

What To Expect from Ubuntu Hardy Heron

November 3rd, 2007

Development is in its starting stages for Hardy Heron, and some details about the direction Ubuntu is heading for this release was revealed recently at Ubuntu Developer’s Conference. Ubuntu Hardy Heron, tentatively scheduled for final release in April next year (8.04), will focus more on robustness and stabilization rather than features; something that’s become expected for LTS (Long-Term Support) releases.

The one new “feature” they did refer to during the conference is a major overhaul of the artwork for Ubuntu. The development team wants to strive towards creating icons that jive more with Gnome’s Tango theme (using SVG!) and a brand new theme that accentuates the features of Compiz Fusion, a fancy-looking window manager introduced in Gutsy Gibbon.

Read more over at Ars Technica.