Yet another iPhone running in New Zealand

, , 5 Comments »

I am lucky enough to be one of the many New Zealanders using an iPhone. Many have gone before and many more will follow. The first hacked iPhone may belong to John Ballinger of Bluespark Interactive as described at Andrew James Sommervell’s blog.

The Red Ink Scribbles iPhone Review Part II: The Unlocked Phone blog post contains the best instructions I’ve seen to configure the iPhone correctly for New Zealand after it has been unlocked. It contains instructions to:

  • Configure GPRS access for Vodafone (not full blown EDGE, just it’s baby sister equivalent)
  • Configure the Voicemail button so it dials 707 to access Vodafone voicemail
  • Change the phone number formating to suit New Zealand phone numbers. I’ve further updated the ABPhoneFormats.plist phone number formats to also handle 8 digit prepay phone numbers (the weird ones that look like 021 027xxxxx).

Other changes are also needed so Caller ID matches the locally stored contact phone numbers correctly. The Fix International Caller ID thread at ModMyiPhone contains instructions to fix this.

On the lookout for a new WordPress theme

2 Comments »

I’m a bit over the old theme and have been on the lookout for a 2 column fluid layout theme for the site that is simple and clear with good typography. For the moment the site is using Vertigo, which will need some tweaking to show useful things like the name of the site and to fix some of the overflow errors in the footer.

Using the WordPress theme viewer got a bit tedious as there are over a thousand themes and not many appear to have been tagged very well.

Watch this space for a new and improved look in the coming weeks.

Configuring a Shuttle SD32G2 to wakeup using ACPI from Linux

, Comments Off

I recently configured my Shuttle SD32G2 MythTV PVR server to automatically wakeup when it needed to record a scheduled TV recording. Many of the examples on the web for doing this from MythTV used NVRAM. However, after installing NVRAM it didn’t recognise the BIOS. Given how NVRAM splashes about in sensitive memory in the BIOS I wasn’t too keen to try my luck getting that to work.

Some other web pages such as ACPI Wakeup mentioned being able to use the Linux Advanced Configuration and Power Interface (ACPI) instead. This was a much better option and I soon had everything working using simple command line scripts.

To configure your Shuttle SD32G2 server to work with ACPI all you need to do is:

  1. Start the machine up and go into the BIOS configuration (hold down Delete while the machine boots)
  2. Select Power Management Setup
  3. Change the Resume By Alarm option to Enabled
  4. Save the BIOS configuration change and reboot the machine

This configures the BIOS so it will indeed wake up when the alarm is set.

The following are notes that relate to configuring the use of the ACPI alarm in Linux (based on Kubuntu Feisty Fawn 7.04)

  • The date format for the ACPI alarm for the SD32G2 appears to be yyyy-MM-dd hh:mm:ss. The date format can be confirmed by executing cat /proc/acpi/alarm and looking at the alarm time that is already set in the BIOS.
  • The SD32G2 doesn’t appear to support setting the day of month for the wakeup alarm. This should be fine for TV recording with my configuration since the machine will simply boot up on the specified time on the next day and then shut down 2 minutes later if it doesn’t start recording.
  • If the day is set to 0 (which always seems to appear), then than means start up at the specified time on every day.
  • The wakeup alarm can be set using echo "2007-06-11 16:23:00" > /proc/acpi/alarm if run as root or inside a script executed using sudo
  • The wakeup alarm can be set using sudo sh -c "echo '2007-06-11 16:23:00' > /proc/acpi/alarm" if using sudo. Trying to simply do a direct sudo echo always gave me a permission problem.
  • Content located at ACPI Wakeup is quite useful. The Shuttle BIOS did not need any modifications to the hwclock.sh script though and don’t bother with the clumsy script to alter the time from local time to UTC. Just alter the BIOS clock to use the local time.
  • The BIOS time can be changed from UTC to local time in Kubuntu by opening the /etc/default/rcS file and changing UTC=yes to UTC=no. Much easier all round.
  • The BIOS clock can be set from the system clock using sudo hwclock -systohc. I’m reasonably sure the Kubuntu does this on shutdown.

MythTV server now starts up and shuts down automatically

, , Comments Off

I’ve spent the last few nights playing with the wonderful world of Linux Advanced Configuration and Power Interface (ACPI) so that the MythTV server will now automatically start up to record a scheduled TV show, and automatically shut down afterwards if there are no logged in users.

This is pretty cool because it means I won’t miss recording any more of the Americas Cup Highlights because I didn’t get out of bed early enough to turn on the server.

It was a pretty arduous task with a number of steps based on content from a number of different web-sites to get things to work. After all the research though it’s not actually that complicated to setup. At a high level the following was done (subsequent blog posts will cover off some of the more tricky bits in more detail):

  1. Configure Power Management in the BIOS of your machine to allow being resumed by alarm
  2. Install appropriate bits for Linux to support ACPI
  3. Alter the Linux configuration so the BIOS uses local time rather than UTC time (since MythTV works using local time)
  4. Ensure that the ACPI alarm interface works as expected when set
  5. Create a small script to set the ACPI alarm given a date
  6. Create a small script to check to see if it is OK to shutdown the server
  7. Configure MythTV to use the two scripts created above
  8. Alter the sudo permissions for the MythTV user so the scripts can be executed without permission problems
  9. Alter the login permissions so only root can shut the server down (to prevent accidental shutting down when the server is recording

Updated EPG instructions for MythTV in New Zealand

, 1 Comment »

I’ve been learning a bit more about Linux over the last few weeks and updated my electronic program guide (EPG) configuration to better reflect “standard” file location usage. The changes work better for my backup strategy as well as I do not backup any directory that starts with a dot.

  1. The location of the EPG script has changed. The EPG related scripts are now in the /home/mythtv/epg directory. Within that directory are two further directories. One for the old xmlTVNZ EPG configuration and the other for the new nice EPG configuration.
  2. The name of the EPG script has been changed. It is now simply called nice.sh and lives in the /home/mythtv/epg directory.
  3. The nice.sh script has been modified to log to the /var/log/mythtv directory:
    cd /home/mythtv/epg/nice
    wget http://nice.net.nz/epg/listings.xml.gz
    gunzip -f listings.xml.gz
    rm /var/log/mythtv/mythfilldatabase.log
    mythfilldatabase --no-delete --file 1 -1 listings.xml --update > /var/log/mythtv/mythfilldatabase.log

Setting up an EPG for MythTV in New Zealand

, 3 Comments »

One of the most important things to get right for your MythTV installation is the Electronic Program Guide (EPG). The EPG lets MythTV know when all of the programs are on so it know when to record your favourite show like “The Best of Top Gear”.

I’ve been using xmlTVNZ for some months now reasonably successfully. xmlTVNZ is a command line tool that scrapes various web-sites for the TV listings. The specific web-sites that are scraped depend on the command line parameters passed to it, which depend on which channels you are interested in getting EPG data for. Because of it’s scraping nature, it’s prone to falling over when a web-site that it scrapes changes. I think that problem may of occurred last night because all of the TV3 listings going forward disappeared. I managed to eventually get it working again by modifying the command line parameters to scrape TV3 off the Sky web-site instead of XTRA (which now appears to be Yahoo!).

I’ve also belonged to the Myth TV in NZ mailing list for some months and recently there was talk of some other common EPG methods. At the time I didn’t look into it because xmlTVNZ had been working fine. Given the recent problems though I looked into both the “Hairy” and “Nice” EPG listing methods.

The “Hairy” EPG is located at http://hairy.geek.nz/epg/ but when I looked last night there was some other strange directory listing there. The “Nice” EPG is located at http://nice.net.nz/epg/ and was all up when I looked last night. Both the Hairy and Nice EPG’s are based of the DVB program guide broadcast by Sky. The Nice one appears to have at least better information than obtained by xmlTVNZ because after updating there was lots of information updated after running mythfilldatabase for the same number of days.

Below is a set of instructions for getting the Nice EPG running within MythTV. This just covers the analog stations that I am recording since I don’t have a satellite dish installed but should work for any set of stations that you are tuning.

  1. Login as the mythtv user.
  2. Open the /home/mythtv/.mythtv/ directory
  3. Create a new directory called epg in that directory. This new directory could be created anywhere within the mythtv users home directory. I just put it in the .mythtv directory so it’s out of the way and next to the other MythTV related configuration directories like channels, which contains my channel icons.
  4. Create a new shell script file called nice.net.nz.sh in the epg directory. This will be used to script the download of the Nice EPG and to then populate the MythTV program database. This script could be named anything you like.
  5. Populate the newly created shell script with the following:
    #!/bin/bash
    wget http://nice.net.nz/epg/listings.xml.gz
    gunzip -f listings.xml.gz
    mythfilldatabase --no-delete --file 1 -1 listings.xml --update
  6. Alter the XMLTV ID values within the MythTV configuration for the channels that you want to have updated by the Nice EPG. This can be done using mythtv-setup or by using mythfilldatabase passing the --manual flag rather than --update. The XMLTV ID values I am using based on the Nice EPG are below.
  7. Analog Channel ID mappings to Nice EPG XMLTV Channel ID
    Channel Analog Channel ID Nice EPG XMLTV ID
    TV ONE 2 1031.dvb.guide
    TV2 4 1032.dvb.guide
    TV3 7 1033.dvb.guide
    C4 9 1034.dvb.guide
    Juice TV 57 1007.dvb.guide
    Prime 59 1037.dvb.guide
  8. Open up KCron or any other Crontab editor of your choice.
  9. Schedule the newly created shell script nice.net.nz.sh to run daily at a suitable time as the mythtv user. Since it doesn’t do any web-site scraping it is much faster than xmlTVNZ so could be run at any time of the day without any problems. Based on the last time the listings.xml.gz file was updated on nice.net.nz (~5:30 AM) it would be good to schedule it sometime after 6 AM.

Windows implodes back to Windows 95 look and feel and then back to XP

2 Comments »

Windows has been running pretty mental on my laptop at home for some time. This morning while downloading the latest and greatest podcasts through iTunes it went into spastic mode again. This is one party trick I haven’t seen before though. Parts of the Window dressing got confused and reverted back to the Windows 95 look and feel. Then it magically went back to XP. All the while consuming ridiculous numbers of CPU cycles.

No operating system should become so unreliable over time. Only iTunes is now stopping me from tossing Windoze out the door. Perhaps I should just buy a Mac. Windoze is normally pathetically slow and when it decides to have one of these fits it invariably wastes five or more minutes of my life.

Getting XBMC MythTV to work with Kubuntu Feisty Fawn (7.04)

, , , , 8 Comments »

After upgrading to Feisty Fawn (7.04) of Kubuntu I thought I had made all the necessary changes for my XBMC (XBox Media Center) MythTV frontend to talk to the Kubuntu server running the MythTV backend. Part of the Kubuntu upgrade altered the /etc/mysql/my.cnf configuration file for MySQL. This alteration required me to change the bind-address from localhost to the static IP addess of the server.

I thought that this change would be sufficient but it turns out that it wasn’t. The MythTV frontend on my XBox failed to connect to the MySQL database on the MythTV backend for completely non-obvious reasons. If the error output in the MythTV frontend was better I probably would of identified the problem much more quickly. After some hours of looking closely at the MySQL configuration changes and various other network related settings in Kubuntu it looked like it might have something to do with the MySQL password handling.

The old /etc/mysql/my.cnf had a old_passwords = 1 setting in it. The new configuration file did not. In addition, within the newly added configuration import directory /etc/mysql/conf.d there was an old_passwords.cnf file that explicitely set old_passwords = false. This gave me enough clues to see if the MythTV front end for the XBMC was in fact using the old password authentication mechanism (no longer supported by the server with this configuration). I found plenty of references to versions of PHP needing to use the old password authentication mechanism for MySQL and wondered if there was a similar issue with Python (the language used for the MythTV frontend on the XBMC). That information was enough to convince me to try and find out how to configure the server to continue to use the old password mechanism to see if that changed anything.

Based on instructions in the MySQL reference documentation at Client does not support authentication protocol I first tried to get the MySQL daemon mysqld to start with the --old-passwords parameter so it worked like it would have prior to the upgrade. I couldn’t get this to work (the MySQL documentation is a bit sparse on how to set some of the configuration options) so I tried to set the password for the mythtv user using the OLD_PASSWORD() function instead of the PASSWORD() function. By a stroke of luck that actually worked. That’s where I’m leaving it too.

If it aint broke, don’t fix it.

So, at the moment the MySQL configuration is exactly the same way as it was after upgrading to Kubuntu Feisty Fawn (7.04) apart from the bind-address being set to the static IP address of the server. In addition, the MySQL password for the mythtv user has been reset using the OLD_PASSWORD() function.

  1. Login to MySQL as the root user
  2. mysql -u root -p
  3. SET PASSWORD for mythtv = OLD_PASSWORD('mythtv'); - where ‘mythtv’ is the password that is configured in the MythTV settings on the XBox.
  4. Test the settings in MythTV on the XBox
  5. Pat yourself on the back when it works and then go to bed…

This was pretty frustrating to have to deal with. If the error getting spat out of the MythTV frontend on XBMC was better this problem would have been much easier to find with a bit of searching on Google.

Ripping DVDs on Linux using AcidRip

Comments Off

One of the main reasons for moving to Linux from than Windoze was to be able to use the Linux based MythTV PVR (Personal Video Recorder). Since the Linux machine will hold lots of recorded TV it might as well hold a bunch of ripped DVDs as well. Finding a good Linux DVD ripper that gives you just enough control to get a great rip was harder than I thought it should be.

I’ve been playing around with AcidRip for a while now - playing with lots of the settings after reading about all the ins and outs of video encoding. AcidRip does some really useful stuff for you like automagically doing crop detection so you don’t end up wasting oodles of disk and time encoding the black bars at the top and bottom. It also lets you do a preview as well, which is mighty useful for checking that you’ve got the right crop settings and that you’ve actually chosen the correct sound track. Another bonus is that it encodes directly from the DVD. Under the hood it uses mencoder which is the other half of the popular video player mplayer. This means you can play with your hearts content with the huge array of settings that mencoder supports.

If you are happy using the LAVC or XVID encoding algorithms then AcidRip should work great for you. There are several articles floating on the internet about how to use it which were useful for the high level bits.

There are some down sides though. It doesn’t look like it’s been updated for a while and support on the AcidRip forum at Source Forge was almost non-existent. Also, it doesn’t really support any of the others encoders very well at all. I tried to use the newer X264 encoding but AcidRip doesn’t understand how to do anything more than a single pass encoding, which is by all means useless if you want a good quality encoding. Fortunately my XBox Media Center doesn’t fully support X264 encoding yet so I’m ripping using XVID, which AcidRip supports pretty well.

Wireless Client Update for Windows XP with Service Pack 2

Comments Off

Windows released the Wireless Client Update for Windows XP with Service Pack 2 in January of 2007. By all accounts it seems to have resolved some of the reasons why I switched to using the Intel PROSet Wireless application.

The Wireless Client Update lets you configure wireless networks as broadcast networks or as nonbroadcast networks. Additionally, Wireless Auto Configuration sends probe requests only for nonbroadcast networks.

Since the latest release of the Intel software caused 100% CPU usage on my machine I ditched and went back to Windows management of wireless.

With this Client Update installed I haven’t had any problems so far with my wireless network that isn’t broadcasting the SSID. Excellent. Thanks to the Non-broadcast Wireless Networks with Microsoft Windows article for providing the link to this breakthrough.

Setting up the nonbroadcast network isn’t as simple as it was for the Intel wireless management, but at least it’s possible without the machine going into a tailspin:

  1. View the wireless networks that are available. More than likely the nonbroadcast network won’t be displayed.
  2. Click on the Change advanced settings link underneath the Related tasks heading in the left hand pane.
  3. Choose the Wireless networks tab.
  4. In the Preferred networks section click on the Add button.
  5. Fill in the SSID that is being broadcast and select the Connect even if this network is not broadcasting checkbox.
  6. Save the changes and then see if Windows tries to connect to the network. This should fail since you haven’t specified the wireless network key. I found that I had to do this before Windows would even let me set the Wireless network key though.
  7. Hopefully now the network shows up in the list of networks that are available. If it does, go into the configuration settings for it again (this time the SSID should be disabled) and specify the correct wireless network secuirty settings for your network.
Design by j david macor.com.Original WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in