How To Configure Wireless / WiFi Networking in Ubuntu via the Command Line (CLI)

There are a number of tutorials available on-line for sorting out WiFi in Ubuntu via the CLI, but most of them seem quite outdated, so I decided to do my own.

I did this on a minimal install of Ubuntu Lucid, so it is as up-to-date as possible. The PC I was using has no Windows Manager of Graphical Display Manager, just the good old terminal so all this is done via the CLI only. I did this using a USB WiFI dongle, but it should be the same whether you use an internal card or a USB card.

First, you need to install the relevant software. You need to have a wired connection at this point, otherwise this wont work.

sudo apt-get install wireless-tools wpasupplicant

If you are connecting to an open network, you wont need wpasupplicant. Next, you need to “bring up” (essentially this means activate) your WiFi interface. So, issue:

sudo ifconfig wlan0 up

Next, to make sure your wireless device is working as it should issue:

iwconfig
and then
sudo iwlist scan

This should show you some wireless networks as proof that the WiFi device is working, if something goes wrong here, then there is a problem with your device or driver and you need to get googling.

If you are accessing a secured network and you really should be, you need to access the correct version of your WiFi key. To get your key, issue this command:

wpa_passphrase YOURSSID YOURWIFIPASSWORD

This will result in something that looks like this:

network={
ssid="YOURSSID"
#psk="YOURWIFIPASSWORD"
psk=fe727aa8b64ac9b3f54c72432da14faed933ea511ecab1 5bbc6c52e7522f709a
}

You need to make a note of the long phrase after psk= (NOT #psk=) as this your WiFi password in hex format.

Next, you need to edit your interfaces file, so issue:

sudo nano /etc/network/interfaces

At the end of this file, you need to add your WiFi configuration. Here are the options you can add.

auto wlan0     #change this to the name of your WiFi interface
iface wlan0 inet dhcp     #this is normally fine, if you want a static IP address replace “dhcp” with “static”
netmask 255.255.255.0     #change this as appropriate for your network, this value is usually right
gateway 192.168.1.1     #change this as appropriate for your network
address 192.168.1.100     #only needed for a static IP address
dns-nameservers 192.168.1.1     #only needed for a static IP address
wpa-driver wext     #you shouldn’t need to change this
wpa-ssid YOURSSID     #just type the name of your SSID here
wpa-ap-scan 1     #if the name of your SSID is hidden usually, type 2 instead of 1
wpa-proto WPA    #if you use WPA1 type WPA, if you use WPA2 type RSN
wpa-pairwise CCMP     #if you use AES type CCMP, if you use TKIP type TKIP
wpa-group CCMP     #if you use AES type CCMP, if you use TKIP type TKIP
wpa-key-mgmt WPA-PSK     #usually WPA-PSK (if you share a key) but sometimes WPA-EAP (for enterprises)
wpa-psk YOURHEXKEYFROMABOVE     #the hex key that you generated earlier

Thus, since I am using a WiFi card that is identified as wlan0 and am connecting to a WPA1 AES encrypted network called MYPLACE that isn’t hidden without a static IP address, this is what I added:


auto wlan0
iface wlan0 inet dhcp
netmask 255.255.255.0
gateway 192.168.1.1
wpa-driver wext
wpa-ssid MYPLACE
wpa-ap-scan 1
wpa-proto WPA
wpa-pairwise CCMP
wpa-group CCMP
wpa-key-mgmt WPA-PSK
wpa-psk 71c81a844973ae7bb1243141e5caa7b6bb0e2d7eetcetcetc

Finally, comment out the top section so it looks like this:

#auto eth0
#iface eth0 inet dhcp

This stops your wired network from working. This helps to ensure there are no conflicts. Remember, if you want your wired network to work again, remove these two comments (the #).

Finally, save the file by pressing CTRL and X and then pressing Y to save to the file. Now, reboot and your network should come up. Yay!

Some people have found that this doesn’t always work, so the next thing to do is to edit the configuration file for the wpasupplicant program. Do this by issuing:

sudo nano /etc/wpa_supplicant.conf

Basically, you add pretty much the same information here as you did to the interfaces file, except without the wpa- part. So, my file looks like this:


ap_scan=1
ctrl_interface=/var/run/wpa_supplicant
network={
ssid="MYPLACE"
scan_ssid=0
psk=71c81a844973ae7bb1243141e5caa7b6bb0e2d7eetcetcetc
key_mgmt=WPA-PSK
proto=WPA
pairwise=CCMP
group=CCMP
}

As far as I am aware, the options are the same. So, edit this file as necessary, make sure you add the ctrl_interface and network={ at the beginning and the } part at the end. Save it and try restarting again. If it still doesn’t work, then kick your PC, wish you had installed Windows 7 instead and go off and do some Googling. You’ll find the answer on the Ubuntu forums and you’ll be happy again.

Best of luck!

Friday, June 25th, 2010 How To, Linux, WiFi 6 Comments

FINALLY: A Bash Progress Indicator for ffmpeg that WORKS

I decided to write a progress indicator for ffmpeg video conversions. This was much much much harder than I ever anticipated. I was in for a tough time. Annoyingly, for what ever reason, ffmpeg doesn’t use Carriage Returns and Line Feeds in the expected way when it outputs its output during a conversion, resulting in two days of stress for a noobie bashophile like me.

Eventually, after hours of googling, I came across the solution. This script should be a very accurate indicator of the progress of a ffmpeg video conversion. It currently only tells you how far the conversion has progressed as a percentage, but I will soon add an ETA and time to it as well (now added, see update below). It does this, by looking at the number of frames your input video file has, and then reading what frame ffmpeg is currently on every ten seconds, and printing out the percentage.

You have to put in your own ffmpeg command if you want, mine is just for converting .mpg DVB-T recordings from MythTV to mkv files.
To use the script, call the script with the full path of the file to be converted afterwards, e.g.: “./ffmpeg-progress.sh /home/prupert/FIVE.mpg” and it gives you something like this:

UPDATE:

I have now added an ETA function, which, as far as I can tell, should be pretty accurate, I’ll be testing it tomorrow to see how well it works. It is based on the remaining number of frames to process and the current fps that ffmpeg is working at. I also plan to convert the script to python, if possible, to make it cross platform and give it a GUI. It will also be called YAFF (Yet Another Ffmpeg Frontend).

Essentially, the script turns ffmpeg output from this:

frame=42992 fps= 21 q=29.0 size= 217692kB time=1717.72 bitrate=1038.2kbits/s dup=12 drop=0
frame=43002 fps= 21 q=29.0 size= 217692kB time=1718.12 bitrate=1038.0kbits/s dup=12 drop=0
frame=43018 fps= 21 q=29.0 size= 217756kB time=1718.76 bitrate=1037.9kbits/s dup=12 drop=0
frame=43036 fps= 21 q=29.0 size= 217788kB time=1719.48 bitrate=1037.6kbits/s dup=12 drop=0
frame=43050 fps= 21 q=29.0 size= 217820kB time=1720.04 bitrate=1037.4kbits/s dup=12 drop=0
frame=43062 fps= 21 q=29.0 size= 217852kB time=1720.52 bitrate=1037.3kbits/s dup=12 drop=0
frame=43078 fps= 21 q=29.0 size= 217884kB time=1721.16 bitrate=1037.0kbits/s dup=12 drop=0
frame=43090 fps= 21 q=29.0 size= 217916kB time=1721.64 bitrate=1036.9kbits/s dup=12 drop=0
frame=43106 fps= 21 q=29.0 size= 217948kB time=1722.28 bitrate=1036.7kbits/s dup=12 drop=0
Last message repeated 2 times
[mpeg2video @ 0x8f7ebf0]ac-tex damaged at 15 0
[mpeg2video @ 0x8f7ebf0]concealing 90 DC, 90 AC, 90 MV errors
frame=43122 fps= 21 q=29.0 size= 217981kB time=1722.92 bitrate=1036.4kbits/s dup=12 drop=0
frame=43140 fps= 21 q=29.0 size= 218045kB time=1723.64 bitrate=1036.3kbits/s dup=12 drop=0
frame=43155 fps= 21 q=29.0 size= 218077kB time=1724.24 bitrate=1036.1kbits/s dup=12 drop=0
frame=43168 fps= 21 q=29.0 size= 218141kB time=1724.76 bitrate=1036.1kbits/s dup=12 drop=0
frame=43182 fps= 21 q=29.0 size= 218205kB time=1725.32 bitrate=1036.1kbits/s dup=12 drop=0
frame=43194 fps= 21 q=29.0 size= 218237kB time=1725.80 bitrate=1035.9kbits/s dup=12 drop=0
frame=43207 fps= 21 q=29.0 size= 218269kB time=1726.32 bitrate=1035.8kbits/s dup=12 drop=0

In to this:

/home/rupert/Downloads/Village of the Damned.mpg..mpg has 172447 frames, now converting
ffmpeg PID = 24868
ffmpeg: 43062 of 172447 frames, progress: 24% and ETA: 1h 42m 41s

Which must be a good thing in anyone’s book ;)

The script is hosted at github, enjoy:

Creative Commons License
YAFF by Rupert Plumridge is licensed under a Creative Commons Attribution-Non-Commercial-Share Alike 2.0 UK: England & Wales License

Tuesday, May 11th, 2010 Code, Linux, Scripts, Transcode 10 Comments

Python Android Weather Forecast Script

I am a proud owner of an HTC Hero Android phone.  I’ve recently  been messing around with one very cool looking application, that allows you to run your own scripts on the phone. This app is called Android Scripting Environment (ASE) and it is truly ace. You can use it to write and run your own Python, Shell (Bash), Lua and Ruby scripts directly on your phone. It also hooks into various Android features, allowing you to make use of various cool Android functions, one of which is getting your location and doing cool things with that information.

I’ve been wanting to get into Python for a long time and I decided that now was a good a time as any. ASE comes with a few sample scripts to get you going, one of which gets the current weather conditions for your current location and speaks it outloud (say_weather.py which calls weather.py). As cool as this is, being told the current conditions isn’t that useful, I wanted to know the forecast for the next day. I thus delved in and did lots of Googling, mainly using this awesome page that teaches you how to parse XML files (which is the format Google delivers its weather forecast info in). The biggest issue was the XML feed from Google doesn’t clarify the difference between the five day forecasts until you get to an actual data reading. The XML feed looks like this:

<xml_api_reply version="1">
      <weather module_id="0" tab_id="0" blah>
		<forecast_information>
			<city data="Bristol, Avon"/>
                        <postal_code data="bs167eb"/>
                        <latitude_e6 data=""/>
                        <longitude_e6 data=""/>
			<forecast_date data="2010-04-28"/>
                        <current_date_time data="2010-04-28 12:50:00 +0000"/>
                        <unit_system data="US"/>
		</forecast_information>
		<current_conditions>
			<condition data="Clear"/>
			<temp_f data="64"/><temp_c data="18"/>
			<humidity data="Humidity: 52%"/>
			<icon data="/ig/images/weather/sunny.gif"/>
			<wind_condition data="Wind: S at 16 mph"/>
		</current_conditions>
		<forecast_conditions>
			<day_of_week data="Wed"/>
			<low data="51"/>
			<high data="66"/>
			<icon data="/ig/images/weather/chance_of_rain.gif"/>
			<condition data="Chance of Rain"/>
		</forecast_conditions>
		<forecast_conditions>
			<day_of_week data="Thu"/>
			<low data="46"/>
			<high data="60"/>
			<icon data="/ig/images/weather/chance_of_rain.gif"/>
			<condition data="Chance of Rain"/>
		</forecast_conditions>
		<forecast_conditions>
			<day_of_week data="Fri"/>
			<low data="48"/>
			<high data="55"/>
			<icon data="/ig/images/weather/chance_of_rain.gif"/>
			<condition data="Chance of Rain"/>
		</forecast_conditions>
		<forecast_conditions>
			<day_of_week data="Sat"/>
			<low data="44"/>
			<high data="59"/>
			<icon data="/ig/images/weather/chance_of_rain.gif"/>
			<condition data="Chance of Rain"/>
		</forecast_conditions>
	</weather>

Now, I know nothing about XML at all, but I found it impossible to get the first actual forecast from the XML data, as each forecast was simply called “forecast_conditions”, using the method in the original weather.py. Thus, after reading the handy tutorial from faqs.org (listed above) I realised I needed to use the nested childNodes function of the xml.dom function that you use in Python to parse XML files.

After lots of trial and error, I worked out the following. A node is a name given to a section named via

<some_name>

. First, you assign a name (in this came dom) to the XML you are reading by doing: dom = minidom.parseString(xml_response), then I want to get information out of the node. To move through the nodes, you use the following command dom1Node = dom.firstChild where dom was the name of the original XML file. All this does is move to the first node and give it a name (dom1Node in my case), thus we are now at

<xml_api_reply version="1">

. You then use dom2Node = dom1Node.firstChild to move to the next node and give it a name, thus we are now at

<weather module_id="0" tab_id="0" mobile_row="0" mobile_zipped="1" row="0" section="0">

. Finally, we have got somewhere, because the childNodes (i.e. the ones beneath the node we are at) are the ones with interesting info, such as

<forecast_information>

and most importantly

<forecast_conditions>

. So, finally, we can now assign names to these childNodes that we want. So we use current = dom2Node.childNodes[1] for the node (the numbering starts at 0 not 1) and forecast = dom2Node.childNodes[2] for the first forecast. Finally, to get the actual data out of those nodes, we use the following command data['flow'] = forecast.getElementsByTagName('low')[0].getAttribute('data'). What this does is give the name “flow” to the data element with the Tag name “low” from the “forecast” node that we defined just above. So, essentially, it navigates to and extracts the value “51″ from it.

Thus, using this technique, you can get all the forecast data you want. I therefore ended up with this script, forecast.py, to replace the weather.py, to return forecast data:
And I then edited the say_weather.py to say the forecast as well as the current conditions, resulting in say_forecast.py:

The only problem I had with this was that the Google XML feed only appears to give the temp in fahrenheit, not celcius. I can see that you can set the iGoogle to display the temp in celcius, but I couldn’t see how to get that info from a feed.

Now, the next thing on the cards is to make a widget that displays this data on the homescreen. I was thinking of saving the output of the python script to a text file and then make a widget that reads that text file and displays the data. If I can do that, I can then modify the python script to do all sorts of cool things (get news, info from my mythtv HTPC etc).

Sadly, it seems on my version of Android (Cupcake (1.5)) you can’t call ASE scripts automatically via Locale or Tasker, since I get an ASE Force Closed message whenever I try to :( So these currently have to be run manually. Still, this is my first piece of Python coding and it was much easier than I thought it would be, once I got my head round it all.

Wednesday, April 28th, 2010 Android, Code, Python 2 Comments

locale VS Settings Profile VS Tasker

One of the awesome things about Android is that you can customise it how you want and not how that floppy-shoe-wearing-control-freak Steve Jobs decides. There are various apps out there designed to let you change various settings and run various things based on various conditions. The most well known is locale, which was and is very popular, although the $10 cost of moving from the free 0.X beta to v1.X with a subsequent loss of function p!ssed a lot of people off! There are also two main competitors that I know of, Setting Profiles and Tasker. All of them have their strengths and weaknesses, some of which I will go through now.

locale

locale is generally pretty cool, yes, it is pretty expensive for an app, I think they kinda got greedy there, but it still works very well. Recent changes seem to have drastically improved battery life and it is very easy to set up.

You create a new situation, by first adding a condition, such as a time of day, your location (based either on GPS, WiFi or cellular) or orientation.

Then, you add a setting, some of which you can see from the screenie on the right. The cool thing is that locale operates a rather awesome plugin system, allowing you to expand the settings you can change and conditions that you can set. There are loads of plugins available on the market, some free, some paid. They allow you to enable and disable syc, give you fine control over volumes and even make http GET and POST requests, for example. My main gripe with locale is that to get decent functionality out of it, you have to use lots of different plugins, each one using up additional memory. On it’s own, locale doesn’t have that many options, which is a shame. Secondly, in order for it not to be shut down by Android, it leaves a notification icon in the taskbar. Some people find this very annoying, I personally find it useful since it means you can check what locale is doing. Oh, and also that it’s name is in italics ;)

Setting Profiles

The next app, Setting Profiles, is pretty similar to locale, but it doesn’t rely on a plugin infrastructure so much, having many more built in settings. The setup is very similar to locale, in that you create a profile, based on various conditions, of which there are many more than in the default version of locale. Then, you create rules that that profile will run, the rules can either be changing various settings (on the right), of which there are more options than in default locale, or running an app or posting a message. Overall, there are more built-in options and settings than in locale, making it more flexible. My only gripe with Settings Profile is that it doesn’t come with integration with Astrid, the awesome task (to-do) manger. Also, since it can’t be expanded with plugins, you are limited to the in-built features, though it does integrate with some other apps, such as APNdroid.

Tasker

Tasker is the final app in this showdown and one that I am least familiar with, having only used it for a few days. It is free, but still in beta and not yet available on the market. It seems there are plans to make it available on the market and for a price similar to Setting Profiles (so about half the cost of locale). It operates in a similar way to the other two, in that you set up profiles based on various conditions and then each profile carries out various actions. What is AWESOME about Tasker, is that is has so many built in conditions and actions, apparently it has almost 100 built in actions (see right), PLUS, it uses the locale API, so it can use locale plugins as well. For me, it is by far the most powerful out of the three and I have only begun to scratch the surface with it. However, I have found that not all the locale plugins work (for example the ASE and Astrid plugin) but I think these are known issues.

Overall, if I had to choose one, it is Tasker, which is the one I am currently using. It seems to have the most potential, the dev has lots of ToDos which all seem interesting and it is the most flexible. This isn’t to say the other two aren’t great, both locale and Setting Profiles are powerful good apps, I just prefer all the options that Tasker gives me. So, thumbs up to Tasker.

Wednesday, April 28th, 2010 Android, Review 5 Comments

How To Make An Advanced Wireless Video Baby Monitor

So, a while back, I wrote about making your own video baby monitor. This has worked very well, with one exception: at night. The webcam I used doesn’t cope very well at night, and since you are going to want to monitor your baby mostly at night, then I guess that is pretty fail. So, I got myself a new IP / Network webcam, this time a real cheapo Chinese joby from eBay.  One of these:

Now, this camera actually isn’t half bad. It’s got 10 IR LEDs for night vision, it claims to be 10MP, but I am not so sure about that, however the picture quality is fine. It also has audio in and out. Now, sadly, the audio in is pretty terrible, very smothered and fuzzy. I think that is partly down to the low bit rate it uses, but also because the microphone is blocked by the bodywork, which I’ll try and fix one day. The cool thing is that it has pan and tilt built in, so you can move it around to get something in picture, so you haven’t got to get up to move the camera if your baby has moved around somewhere.

The only issue I came across, was getting a video feed WITH audio out of this thin on Linux. It offers an ActiveX solution for IE, but only a video feed for FireFox, without audio (the fact it offers any FireFox compatibility at all is pretty cool). Now, the webcam doesn’t advertise what it is, since it turns out it is a rip off a webcam made by Fosscam. It is actually a Netwave IP camera. This was my major hurdle in working out how to use it. After literally hours and hours or googling and posting on metafi I finally found out how to get an video stream with audio out of it. It turns out the solution is quite simple, you just use this address in VLC’s streaming media source input:

http://IPADDRESS:PORT/videostream.asf?user=admin&resolution=32

Of course, if you changed the username, change it here and if you have a password, then add &pwd=PASSWORD or whatever it is. I found this address from an awesome PDF that lists all the Fosscam’s cgi commands and since the Netwave is a ripoff of the Fosscam, it uses the same commands.

You can find the PDF here: http://www.drivehq.com/file/df.aspx/publish/bubbah/PublicFolder/IPCAMCGISDKV1.7.pdf

There are loads of other options, you can basically configure the whole camera through cgi calls, though, beware, you can mess up and lock yourself out of the camera if you don’t know what you are doing. Here are a snippet of some of the commands:

Take a photo: /snapshot.cgi[?user=&pwd=&next_url=] Parameters user:username pwd:password next_url:the name of snapshot

Use server push mode to send videostream (no audio) /videostream.cgi[?user=&pwd=&resolution=] Parameters user:username pwd:password Resolution:8:320*240 32:640*480

Send videostream in asf format, only support vlc player and mplayer (with audio): /videostream.asf[?user=&pwd=&resolution=] Parameters user:username pwd:password Resolution: 8:320*240 32:640*480

Get device status info: /get_status.cgi Parameters now:The count of seconds form 1970-1-1 0:0:0 to now alarm_status: 0:no alarm  1:motion alarm 2:input alarm ddns_status:DDNS status upnp_status:UPNP status

Get camera params: /get_camera_params.cgi[?user=&pwd=] Parameters user:username pwd:password Resolution: 8: 320*240 32: 640*480 Brightness: 0-255 Contrast: 0-6 Mode: 0: 50hz 1: 60hz 2 outdoor format Flip: 0: initial 1: vertical rotate 2: horizontal rotate 3: vertical + horizontal rotate

Set misc parameters of camera:  /set_misc.cgi?[led_mode=&ptz_center_onstart=&ptz_auto_patrol_interval=&ptz_auto_patrol_type=&ptz_patrol_h_rounds=&ptz_patrol_v_rounds=&next_url=]
Parameters Led_mode: 0:mode1 1:model2 2:shut off the led Ptz_center_onstart: =1 Ptz_auto_patrol_interval, =0: no auto rotating Ptz_auto_patrol_type: 0:no rotate 1:horizontal 2: vertical 3: horizontal + vertical

I can also access the camera through it’s http interface or by using an Android app called IP Camera Lite, which allows me to pan and tilt the camera remotely.

Anyway, using this method, I now have a remote controllable camera that has really good night vision and with audio, all viewable via VLC. Sample nigh time pictures to follow ;)

Tuesday, April 27th, 2010 Uncategorized 5 Comments

Ubuntu Lynx (10.04 LTS)

I’m a regular user of Ubuntu, using it now on my laptop, one of my work PCs (the other runs XP for Microsoft Office compatibility), my HTPC and my XBMC box. Yeah, I know, I have too many PCs.

It seems Canonical (the developers of Ubuntu) are keen to push the next release, called Lucid Lynx, or 10.4 LTS (Long Term Support). To help the push, they have published a number of badges for websites.

Here are all of them, since I love Ubuntu so much ;)

Ubuntu: For Desktops, Servers, Netbooks and in the cloud

Tuesday, April 27th, 2010 Linux, Operating Systems, Update No Comments

Simple Bash Progress Script

So, I wanted a way to monitor the progress of a Bash script I was running, since it could take a long time to run on occassion and I wasn’t sure if it had failed or not.

After some Ubuntu Forum googling, I came up with this:

#!/bin/bash
time=( $(tac /var/log/rsback/work-daily | grep -m 1 "total runtime" | awk '{ print $6 }') )
echo "last running time was" $time
/bin/rsback -v work-daily >> /var/log/rsback/work-daily &
pid=$!
trap "
#[ -e /proc/$pid ] && kill $pid
#" EXIT


while [ -e /proc/$pid ]; do
sleep 10
runtime=( $(ps ax | grep -m 1 zenity | awk '{print $4}') )
echo "#" $runtime
done | zenity --width 500 --progress --pulsate --title="work-daily running time: $time" --text="running time:" --auto-close
retval=$?


# If the progress bar was canceled, give a warning.
if [ $retval -ne 0 ]; then
zenity --title="work-daily rsback" --error --text="the work-daily rsback was cancelled" || exit 1
kill $pid
fi
time=( $(tac /var/log/rsback/work-daily | grep -m 1 "total runtime" | awk '{ print $6 }') )
zenity --info --title "Work rsback" --text "work rsback done in $time"
exit

It seems to work pretty well, though obviously this is customised for my particular needs (so it uses the command’s own log location etc). I thought I would share it with the world, since it took me a while to figure out. When I get the chance, I’ll update it to it can work with any command or script ;)

Wednesday, April 21st, 2010 Code, Scripts No Comments

32% Of The Top 25 Software Companies Are Gaming Companies

I came across this little table during my work today and was totally blown away. Almost a third of the Top 25 Software Companies (based on revenue) are in the Gaming Industry (source). It is crazy that people who game are still regarded as Geeks and Social Recluses and there is still no decent Computer Games program here on terestial TV in the UK (whilst Property Porn shows dominate the TVerse (since most Media Execs have invested all their cash in Property and are desperate to artificially prop up a market that has been over-valued for decades…)). Makes.You.Sick.

<disclosure>I am a PS3, PSP, PC and Wii gamer.</disclosure>

That's a lot of Gaming Companies.

Wednesday, April 21st, 2010 Games, Rant No Comments

Automatically Update FFMPEG and x264 From Source / SVN In Ubuntu

Whenever I wish to install and use the rather excellent video and audio transcode programs ffmpeg and x264 I have used FakeOutdoorsman’s excellent How To from the Ubuntu Forums. However, constantly typing out all the commands, especially when updating, is a pain in the arse.

I thus decided, with FakeOutdoorsman’s permission, to write some scripts to automate the task. They are, I hope, fairly comprehensive and allow a user to build and install the latest version of ffmpeg and x264, from source for Ubuntu Hardy, Intrepid, Jaunty, Karmic and Lucid. They allow this to be done automatically, after a few questions have been answered.

There are four scripts in total, one for the initial install, one for keeping everything up-to-date, one to reverse the changes with minimal impact and one to completely reverse all changes (this one I recommend no-one using, hence it is depreciated, but it is there in case some one wants it).

I am certainly not the best at bash, but I have done lots of Googling and I think the script is fairly robust, though I am sure there are errors.

I will be adding to the script over time, adding new features, combining things, adding better error checking etc, so for now consider them BETA releases. They have been tested on Lucid and Karmic only, but they appeared to work.

Please submit any questions here or at the project hosting page.

So, where are the files?

You can get all the scripts here:

http://code.google.com/p/x264-ffmpeg-up-to-date/

Have fun!

Friday, April 16th, 2010 Code, Scripts, Transcode 3 Comments

Pimp Your Wii with Home Brew Apps

About a year ago, I hacked my Wii, installing the Home Brew Channel via the Twilight Hack (it made me buy the game, which is meant to be one of the best on the Wii, so it’s all good Nintendo – though I haven’t really got into the game – I hate the wide eyed characters, its just so clichéd). However, I didn’t really find much use for it and let it die when the Wii updated itself (incidentally, this is a risky thing to do because depending on the version of the hack you installed and what you installed afterwards, a Wii System Update can brick your Wii..).

Recently, after having too many sleepless nights with the baby, I decided I needed to hack something. In my internet travels I came across this program, USB Loader GX, that allows you to backup your Wii Games to an external hard drive and load them all from one USB drive, no need to change discs any more. Now that sounds seriously cool.

So, following the rather detailed excellent ReadMii from USB Loader GX, I was able to re-install the hack, install the Home Brew Channel and then install the USB Loader GX program. A Word of Warning: Doing this invalidates your warranty and seriously risks turning your Wii into a fancy paperweight if you aren’t very careful. Also, do not use the Wii System Update function, since it might also brick your Wii, bear this in mind before proceeding. You can still access the Wii Network and the Shop after installing this hack, at least for the moment.

Essentially, the install process is:

  1. Use the Banner Bomb technique to install the Home Brew Channel (Home Brew software) via the HackMii installer.
  2. Install various hacked and custom IOS (essentially Operating Systems) and cISO (custom OSs) on your Wii, giving Home Brew software greater access to your Wii.
  3. Install USB Loader GX.
  4. Prepare a USB hard drive to use (formatted either via Fat, NTFS or WBFS), I chose WBFS as I have loads of spare hard drives and it is the most flexible with the Wii.
  5. Connect the hard drive to the Wii and load USB Loader GX.

Once done, you then need to copy all yours games to your Hard Drive. I found that for some reason the Install function of USB Loader GX (where you copy the game to your hard drive) didn’t work for me. So, instead I used a tool called DVD Dumper, following the tutorial from here. That site actually contains lots of useful guides, I recommend it for a good background read. There is a version 1.3 of the DVD Dumping tool, but the dev has given up development and 1.2 seemed to work well, over WiFi anyway. Bear in mind it takes about 2.5 – 4 hours per disc, depending on the speed of your connection – shame Nintendo never added an Ethernet port really.

The process was pretty easy and basically goes like this:

  1. Load DVD Dumper via the Home Brew Channel.
  2. Choose Network Dump and insert your disc.
  3. On a computer, type your Wii’s IP Address in to FireFox (don’t use IE), your Wii’s IP Address is given to you on screen by the DVD Dumper program.
  4. Click on the link to download the inserted game as an ISO and save the file.
  5. Wait 3 hours and go do something good, go running, mow the lawn, vote Lib Dem.
  6. Connect your already prepared USB hard drive to your computer and load WiiBackupManager.
  7. Copy your ISO from your computer to your hard drive using WiiBackupManager.
  8. Connect your hard drive to your Wii, load USB Loader GX, highlight one of the new cover-less games, press 1 to choose to download the covers, let it do its stuff and finally you are good to go!

It should be noted that this technique can also be used by naughty and bad people to download copies of games from the internet and play them, without paying for them. People, this is stealing. If you didn’t buy it, you have no right to use it or play it. I know these days most internet users feel it is their right to download stuff for free if they want, but, there is no way round it, this is stealing and is only harming the industry you love. Don’t do it. Please only use this program to backup games you already own to a hard drive (this in itself is probably illegal, but as I don’t share my games with anyone, I don’t think I am really doing anything wrong).

The Home Brew Channel also gives you access to loads more cool stuff as well. Simply follow this guide to download and install the Home Brew Browser. It allows you to browse, install and update all the cool stuff that people have written for use on the Wii, including old school game ports, media players (including the GeeXbox) and a load of other weird and wonderful stuff. Get stuck in and be the envy of all your boring Wii System Menu version 4.2 friends, so long as you don’t mess up along the way and end up with a nice white brick ;)

Wednesday, April 14th, 2010 Hacks, How To, Wii 1 Comment

Search

 
If you like what you read, please donate via PayPal;)

Support Me

Get a free Giffgaff Sim

Sponsors

Sponsors