All posts by admin

Edimax EW-7728IN IEEE802.11n on Ubuntu

I recently purchased the Edimax EW-7728IN IEEE802.11n Draft 2.0 wireless card. Although I’ve not tested the performance yet, I have managed to get it to successfully connect to my Billion 7300N 802.11n wireless router at a rate of between 270 and 300Mb/sec.

Before I began I read on the Ubuntu forums that many people had problems trying to get the thing to work. I found it was fairly straight forward which is probably a result of the new(ish) drivers on the edimax website for Linux.

You can download the latest source from http://www.ralinktech.com/ralink/Home/Support/Linux.html – I didn’t see any restrictions or licenses on there for the source, so I’ve decided to compile and upload the modules as I need them. You can check back here to pick up the latest if you’re not confident compiling it yourself.

Please don’t try running the modules on kernels that they are not for. This will not work! You will need to compile it against headers for your currently running kernel if you don’t find it listed here.

Date Kernel Download
1st Oct 2008 2.6.24-19-generic rt2860sta.ko.bz2

Then you’ll want to extract the kernel module:

bunzip2 rt2860sta.ko.bz2

Now test that it works before you continue:

sudo insmod rt2860sta.ko

Now run iwconfig to see if the module loaded OK. If so, you should have the ra0 device listed.

If all is well, copy the module to the kernel module directory:

sudo cp rt2860sta.ko /lib/modules/2.6.24-19-generic/ubuntu/net/rt2860/rt2860sta.ko

Now we’d like to tell it to auto-load upon system startup. We can do this by adding the line: rt82860sta to the /etc/modules file. Easy!

Update!!

I’ve recently found a link to a dynamically building kernel module .deb file, which is great because it means you can just install this .deb on your system and it should work. With a bit of luck the Ubuntu team will include the driver in Intrepid, but I wouldn’t hold your breath:

http://www.array.org/ubuntu/dists/intrepid/eeepc/binary-i386/rt2860-dkms_1.7.1.1_all.deb

Central Coast LUG (Linux user group)

Hi, I’ve posted this to my site in order to find people looking for a central coast linux user group (Central Coast, NSW, Australia that is.) Basically, I’ve sort-of found one at http://cclug.com, but it seems to be a bit dead with hardly any info. If you are interested in a central coast LUG, please leave a comment with your email address and I’ll get in touch. Perhaps you can help me find the mysterious CCLUG, or help me establish a new one? Who knows! Either way, it’d be nice to have a LUG that’s not all the way down in Sydney.

Why laconi.ca and identi.ca should be your choice for microblogging

Explaining microblogging is slightly difficult, but I’ll give it a go:

You sign up for a microblogging service like twitter. You ‘follow’ your friends that are already on there, and perhaps some people that aren’t your friends but people who say interesting things. Once you’ve started following your friends, you might download a program for your computer to alert you when they post (or in the case of twitter ‘tweet’), and to allow you to post your own ‘tweets’ without having to visit the twitter website at all. This is great because it allows you to know what your friends are up to, or tell the world what you’re up to, or that you’ve just discovered an amazing new pizza at dominos.

When you post an update on a service like twitter, it’s totally public. You are broadcasting, and people who are following you will be automatically alterted to what you say. It gets really cool when you consider all of it can be done from your mobile/laptop/pc etc..

What’s wrong with twitter?

Now that’s cool, and I’ve used twitter and it’s good. However, there’s one (or two, perhaps three?) major flaws with twitter. The first being that it’s a closed service. Imagine if email was a closed service, eg people on hotmail could only send and recieve email from other people on hotmail and people on gmail could only send and recieve mail to @gmail addresses. This is effectively the problem with twitter, jaiku and all the 100’s of other closed microblogging services – it’s cool, but it’s silly. Oh yeah, the other things wrong with twitter are it breaks often is all closed up.

Laconi.ca

Enter laconi.ca. Laconi.ca is an open source microblogging server program. This means that anyone can start their own microblogging website. Please don’t stop reading here! This is where it gets good. You can easily link your microblogging website to any other laconi.ca microblogging website – adding to a big mesh of microblogging servers.. just like email servers. laconi.ca uses an open standard for communication also meaning that you’re not limited to using laconi.ca as your server.

Why is it better for me though?

laconi.ca does lots of cool things that twitter doesn’t! Firstly, you can use an instant messeging client with it, and post to your feed just by sending the laconi.ca contact a message. Secondly, you can ‘track’ certain words. Say you’re interested in cake, you can type into your IM client: track cake and every time someone posts something with the word ‘cake’ in it (not just your friends!) you’ll get their post. There’s other neat things I haven’t tried yet such as posting attachments and things, but it’s got some killer features that no other microblogging services have.. the best being it’s open.

Find me on identi.ca

You probably don’t want to have to set up your own laconi.ca server, so why not just use the ‘main’ one! Check out identi.ca and subscribe to me: johnhunt

Move to Australia

Just a quick upadte, john-hunt.com is now hosted in Australia rather than the UK. This is good because it means I don’t have to wait ages for pages to load on my own sites etc..

I’m going to set up a more personal blog, probably at blog.john-hunt.com with posts about life in Aus, photos etc…what I should have sorted out ages ago really.

revalidation failed (errorno =-5)

If you find your system isn’t booting sometimes and you get this funny error message, edit your kernel boot line in /boot/grub/menu.lst:


kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=75a92494-bdae-4715-92d9-f06d1887008e ro all_generic_ide

e.g – Add the all_generic_ide parameter. All should be fine once again. I believe this is a strange Ubuntu kernel bug, although I’m not sure.

MKV (h.264) playback on XBOX360

While it’s not possible to play mkv files directly on the xbox360, you only need to do a few things to remux the video and audio streams into the mp4 format. This means that no re-encoding is done with the video, therefore there is no loss in video quality.

At the time of writing, the xbox360 doesn’t support anything other than 2 channel AAC audio for mp4 streams, so you’ll have to put up with that. It does work well though.

1. Gather video information
mkvinfo movie.mkv
Look for things like the following:

|+ Segment tracks
| + A track
| + Track number: 1
| + Track UID: 1
| + Track type: video
- snip -
| + Default duration: 41.708ms (23.976 fps for a video track)

This shows us track 1 is the video stream. Remember that, it’ll come in handy later. Also, make a note of the fps, if you get the FPS wrong later you’ll have a/v sync issues. Generally track 1 is always the video stream and track 2 is always the main audio stream:


| + A track
| + Track number: 2
| + Track UID: 445320639
| + Track type: audio
- snip -
| + Name: Main audio DTS 1536
| + Audio track
| + Sampling frequency: 48000.000000
| + Channels: 6

Make a note of whether you’re dealing with a DTS stream (as in my example) or an AC3 stream. There is a newer format ACC3 or something..I don’t know much about that.

2. Extract the video and audio streams from the mkv
Remember, mkv and mp4 are just like avi (in some ways.) They are all container formats, not the actual video itself. Now we extract the audio and video streams we want. If you like you could choose different audio and video streams you discovered using mkvinfo.

Extract the video:

mkvextract tracks movie.mkv 1:video.h264

Next we have to do something quite strange in order to make our h.264 file compatible with the xbox360. Run hexedit video.h264 and change the sequence: “67 64 00 33” to “67 64 00 29”.

Now we have our video file ready for muxing, we need to deal with the audio stream:

mplayer movie.mkv -novideo -ao pcm:fast:file=audiodump.wav -channels 2

This gets the audio from the mkv file and saves it as audiodump.wav ready for re encoding using nero’s AACenc program (http://www.nero.com/eng/down-ndaudio.php):

3. Encode the audio dump to AAC format
Now we encode the wav file to AAC:

neroAacEnc -lc -ignorelength -q 0.50 -if audiodump.wav -of audio.m4a

Both the audio and video streams are now ready to be muxed (put together) by MP4Box:

4. Mux the files

Remember to use the correct FPS value we obtained using mkvinfo from earlier!

MP4Box -new output.mp4 -add video.h264 -add audio.m4a -fps 23.976

output.mp4 is now ready to watch!!

Footnotes:
1. I didn’t have any luck getting windows media player 11 to stream the mp4’s to my xbox, I got the all to common ‘format not supported’ thing on the xbox even though they played just fine on WMP11.

2. You’ll want to split your original MKV into just under 4GB chunks if you’re putting the files on anything other than DVD5/DVD9. Do this:
mkvmerge -o output_part.mkv --split 3900M movie.mkv

*note – we leave it just under 4000M for two reasons, firstly fat32 can’t store eactly 4GB, secondly I’m not sure if it’s GiB or GB…!

3. Special thanks to Mike from Linux Love. For some tips that actually worked!

4. I’m not sure if there’s an artificial limit on the file size of mp4s that can be played back, but I will know by this afternoon!

Update:
It appears as though the xbox360 doesn’t like any media files > 4GB, a bit of a shame really. Hopefully the next dashboard update will fix these issues. Until then, looks like we’ll have to put up with split files.

Creating a bridge for VirtualBox / wireless bridging on Ubuntu

Following several guides on setting up a bridge on my laptop between the wireless network interface and VirtualBox for direct networking was simply not working for me. Today after lots of head scratching I finally discovered why.

Turns out that the standard bridge utils are no good for most wireless cards, but there is a workaround.

Check out this guide, and read under the wireless section:
Bridged Networking with VirtualBox on Linux Hosts

What you can do is add those various commands to a little script file in /etc/network/if-up.d/ which will set up the ‘bridge’ upon starting networking.

Woohoo!