D-link DWL-G122 with WPA under Linux

The D-Link DWL-G122 USB 802.11g (revision B1) wifi adaptor works great for open or WEP encrypted networks and is supported by Ubuntu out of the box. Unfortunately, the open source driver doesn't support WPA2 (and only supports WPA via non-standard iwpriv settings, and even then, the support is flaky).

I was able to get it to connect to a WPA network once, following Jermey's instructions. But the network connection was not reliable (as in, I never got it to connect again).

To make it work with the standard wpa_supplicant package, I had to break down and use ndiswrapper to wrap the windows XP drivers. (I also had to blacklist the default rt2570 kernel module). Hopefully the Open Source rt2x00 kernel module will start to support this device (and others based on this chipset) in the future for WPA/WPA2 security.

Even after I used the ndiswrapper, it would only connect to a WPA Personal / TKIP access point. (I could not get it to work with the AES or AES+TKIP settings on WPA or to work with WPA2 at all.)

To make the ubuntu system auto-load wpa_supplicant on boot, Continue reading

Screen Scraping Amazon Album Art for MythTV

mythtv icon

I wanted to get Album Art for all of my (newly ripped) songs on my MythTV box. 

Thierry has a nice perl script which finds album art on Amazon and automatically downloads it, but unfortunately for me the music plugin for MythTV has upgraded their database schema and the script no longer worked.  I am using the trunk SVN code, so it's a bit more up-to-date than the latest packaged release, but this means that scripts designed for the packaged versions may not work. (This specific script had a problem finding the correct directory to store the album art, so all the album art was stored in the root directory, overwriting itself with each album.)

Luckily, I know just enough SQL and Perl to be dangerous, so I whipped up a few changes to his code that fixed my problem (after exploring the new database format). The updated script is here if anybody needs it.

UPDATE: I also added features that allow you to run the script multiple times (if an albumart.jpg file already exists, it will skip that album) and improved the searching (if "album by artist" is not found, it will try searching by "album" name only).

Updated New File: amazon_album_art_scraper.txt (Thanks to Mike Wilson for updates to Amazon’s HTML!)

OLD FILE: Amazon Album Art Scraper Script

Saving a mms streaming video to a file using mencoder

Copying a streaming video to a file using mencoder.

I wanted to watch Randy Pausch's last lecture on my home media PC as opposed to my laptop. It has MythTV, which can be used to watch any file on the hard disk. Unfortunately, you can't just download the a file, as his lecture is hosted by a streaming server. The specific URL is:

mms://wms.andrew.cmu.edu/001/pausch.wmv  

wget won't work, so I had to use mencoder to download the stream and copy it to a file on my hard disk. The command line I used was:

 mencoder mms://wms.andrew.cmu.edu/001/pausch.wmv -o randy.wmv -oac copy -ovc copy

(The -oac and -ovc are the output audio and video codec specfiers, and I have set it to just copy. If you would prefer the file be transcoded to a different format, you could specify a specific codec (xvid with ogg vorbis sound, for example) and mencoder would transcode the file (possibly losing some quality) at the same time.

 

Encrypted home directory under Ubuntu linux 7.04 & 7.10

Lock on doorUsing directions from Felipe Alfaro Solana, I set up an encrypted home directory in Ubuntu 7.04. I only had one problem, that exhibited an error message as follows:

Command failed: Incompatible libdevmapper 1.02.08 (2006-07-17)(compat) and kernel driver

This was caused by the dm_mod module not being loaded. I fixed it for the session by issuing a  modprobe dm_mod command, and fixed it forever by adding dm_mod to my /etc/modules file.

Continue reading

Listing of Atlanta/Decatur Digital OTA Channels

transmission tower A list of the channels easily avaliable with a small amplified Radio Shack antenna from the Decatur Area:

  • 2-1 -WSB-DT – ABC
  • 2-2 (Blank, no signal)
  • 5-1 WAGA – Fox HD
  • 5-2 WAGA – Fox SD
  • 11-1 WXIA-D NBC-HD
  • 11-2 WXIA-D (NBC Weather, All the time!)
  • 14-(1,2,3,4) – Ion subchannels.
  • 17 – WTBS-HD – TBS
  • 30-1 – PBS
  • 36- WATL-D -MyATL
  • 43-1 WUPA – CW
  • 46-1 – WGCL-HD CBS

RadioShack HDTV antenna, Catalog #: 15-2186

    Parts for a MythTV box

    I've built a MythTV home media PC, attempting to keep the costs down. It's already cost $539, which is more than a Tivo HD ($299), and very close to a Tivo Series 3 ($575). The advantages over buying a TVIO include:

    1. DVD / CD playback and archiving to HD.
    2. Cheaper subscription costs (Free over the air, or 20-40$ a year from Schedules Direct).
    3. Automatic commercial detection.
    4. Open Platform, which allows for easy network mounting of file-systems, administration, and customization.

    Continue reading

    Upgrading the miniPCI wireless card in a Thinkpad X31

    A few years ago when I first bought it, I installed a Lucent Technologies Prism based mini-pci wifi card in my IBM/Lenovo Thinkpad X31 laptop because the prism chipset had good linux support.  But, it does not support WPA2 encryption. I decided the easiest fix was to upgrade to an Intel Pro/Wireless 2100 Lan adapter, which is now supported and works with the wpa_supplicant program to support WPA2 encryption.

    The only problem I ran into durring the procedure was that my laptop BIOS had a "whitelist" of approved cards (those sold by IBM) and when I booted it after installing the new card a warning message came up as follows:

    ERROR

    1802: Unauthorized network card is plugged in – Power off and remove the miniPCI network card.

    and, the laptop wouldn't boot. (I just LOVE vendor lock in….)

    Luckily, somebody had already figured out how to disable the BIOS whitelist and I found the following program in the Linux Kernel Mailing List archive here: http://lkml.org/lkml/2004/6/13/69

    Continue reading

    Finding hosts in new known_hosts files which are hashed

    Older versions of SSH kept a ~/.ssh/known_hosts file which contained the name of each server you had connected to, along with it's public key. If you ever wanted to erase a public key, you simply edited the file with your favorite text editor, found the name of the server, and then deleted that line. (You might do this for example if the server admin had changed the public key of the server, and you wanted to tell SSH that it was ok to grab the new key and use it instead of the old key.)

     New versions of SSH store the server name in a hashed form, so you can't visually identify it (it's not human readable). This is a security feature so that somebody with access to you known_hosts file can't figure out what other machines you have connected to (and that they should try to hack next, etc). But it makes your job harder when you want to delete a single host's key.

    The inelegant solution is to just delete the whole file and then accept new keys from everybody, but this is a security risk. To find out which hashed entry matches the server whose key you are trying to replace, simply run the following command:

    ssh-keygen -F servername.com
     

    Or, even better, to simply remove the server from your known_hosts file all in one command, use:

    ssh-keygen -R servername.com

    Adding custom headers (such as Approved:) to Thunderbird mail

    Sometimes you want to send email or newsgroup posts with custom headers. For example, the Approved: header can be used to post to a restricted "Announce" newsgroup for a class, or you may want to mark your email with an "X-No-Arc: yes" header to prevent a mailing list archive from saving a copy. 

    The easy way to add a custom header to the Thunderbird email/newsgroup compose window is by adding a user.js file to your configuration directory ( .thunderbird/default//user.js ) with the following line in it:

    user_pref("mail.compose.other.header", "Approved");