Zhone Patch Updated

Posted on 20/01/2009 by Peter Strapp

I've made a few changes to my zhone patch.

Added features:

  • Send USSD requests - You can now request network messages. This works by looking for phone numbers that start with a '*'. Let me know if you find a more precise way of recognising a USSD number.
  • Recieve USSD messages - Displays operator messages e.g. current balance
  • Re-lock phone - This complements the 'unlock screen on incoming calls' patch by re-locking the phone if you miss a call.
  • SMS not sent warning - Alerts to the fact that an SMS can't be sent when your SIM card is full (Before you had no way of knowing whether the message had been sent).
  • SIM card full warning - Displays a message when your sim card is full.

The patch can be downloaded here: Latest zhone patch.

Zhone Patch

Posted on 13/01/2009 by Peter Strapp

Below are a couple of small patches that I apply to Zhone, the freesmartphone.org framework testing app. The first locks the phone if you miss a call (To prevent accidental use whilst in your pocket). The second patch alerts you to the fact that an SMS can't be sent when your SIM card is full (Before you had no way of knowing whether the message had been sent). It also displays a message when your sim card is full. You can download the patch here.

--- zhone       2009-01-13 15:01:54.000000000 +0000
+++ zhone       2009-01-13 19:59:46.000000000 +0000
@@ -249,6 +249,8 @@

     def update_status(self, status):
         self.part_text_set( "label_description", status )
+        if status == "release" and self.status == "incoming":
+            self.main.groups["lock"].activate()
         if status == "outgoing":
             self.part_text_set( "label_left", u"" )
             self.part_text_set( "label_right", u"cancel" )
@@ -368,7 +370,9 @@
             self.busy = True

     def cbStoreError( self, e ):
-        logger.warning( "error while storing message" )
+        logger.warning( "error while storing message - %s" % e.get_dbus_name() )
+        if e.get_dbus_name() == "org.freesmartphone.GSM.SIM.MemoryFull":
+            self.main.groups["error"].activate( "Failed to send message - SIM Memory Full", [("OK")] )

     def cbSend1( self, selected, cb_data ):
         self.main.groups["text_edit"].setup(
@@ -480,6 +484,10 @@
                         textblock_escape( message[3] ).replace( '\n', '<br>' )
                     )
                 )
+            if dbus_object.gsm_device_obj:   
+                messagebookInfo = dbus_object.gsm_sim_iface.GetMessagebookInfo()
+                if messagebookInfo["used"] == messagebookInfo["last"]:
+                    self.main.groups["error"].activate( "Warning: SIM Memory Full", [("OK")] )

     def cbMessagebookError( self, e ):
         logger.warning( "error while retrieving messagebook" )
@@ -1951,9 +1958,10 @@
     def on_edje_signal_button_pressed( self, emission, source ):
         id = int( source.split( "_", 1 )[1] )
         self.deactivate()
-        self.cb( self.part_text_get( "label_%i" % id ), self.cb_data )
+        if self.cb_data is not None:
+            self.cb( self.part_text_get( "label_%i" % id ), self.cb_data )

-    def activate( self, description, buttons, cb_data, cb ):
+    def activate( self, description, buttons, cb_data = None, cb = None ):
         self.buttons = buttons
         self.cb_data = cb_data
         self.cb = cb

XBox 360 HD-DVD Drive in Ubuntu

Posted on 29/09/2007 by Peter Strapp

I bought an XBox 360 HD-DVD drive last week, not to use with an XBox, I don't own one, instead I intend to use it with my PC in Linux. I had hoped that when I plugged the drive in that Ubuntu would automatically detect it and mount the HD-DVD. Unfortunately this didn't happen. I was able to read CDs and DVDs but not HD-DVDs. Ubuntu detected the drive but couldn't mount the volume. This is because the Linux kernel included in Ubuntu doesn't support UDF 2.5.

This can be fixed by downloading a patched udf.ko kernel module and placing it in the /lib/modules/2.6.2x-xxx/kernel/fs/udf/ directory. This will only work if you are using one of the kernels listed below. If you use a 64 bit kernel then you should follow the instructions in 1b. You can find out what kernel you have by typing uname -r at a terminal.

  • 2.6.24.19-generic
  • 2.6.22.11-generic
  • 2.6.22.12-generic
  • 2.6.22.13-generic
  • 2.6.22.14-generic

1a. Copy and paste the lines below into a terminal:

wget http://www.strapp.co.uk/files/udf-$( uname -r ).ko
sudo mv udf-$( uname -r ).ko /lib/modules/$( uname -r )/kernel/fs/udf/udf.ko

1b. If you aren't using one of the above kernels then follow the instructions below to build a kernel module for your machine.

sudo apt-get install linux-source
cd ~/
cp /usr/src/linux-source-2.6.24.tar.bz2 .
tar -xf linux-source-2.6.24.tar.bz2
cd linux-source-2.6.24

wget http://www.strapp.co.uk/files/UDF_2.50-linux-2.6.24.patch

patch -p1 < UDF_2.50-linux-2.6.24.patch

make menuconfig
make

sudo cp fs/udf/udf.ko /lib/modules/$( uname -r )/kernel/fs/udf/

2. Restart. Lets see if its all worked... If you have a HD-DVD in the drive then entering the below command should result in something like this:

dmesg | grep UDF

[ 471.844000] UDF-fs: Partition marked readonly; forcing readonly mount
[ 472.384000] UDF-fs INFO UDF 0.9.9.1 (2007/01/03) Mounting volume 'HDDVD', timestamp 2007/04/12 05:46 (103c)

3. Navigate to the HD-DVD mount point as root (You MUST be root else all you will see are 4 restricted "files" that are actually folders) and you should hear the drive spin up and away you go:

sudo su
cd /media/hddvd
ls -l

total 8
dr--r--r-- 2 4294967295 4294967295 1032 2007-04-12 05:46 AACS
dr--r--r-- 2 4294967295 4294967295 972 2007-04-12 05:46 AACS_BAK
dr--r--r-- 2 4294967295 4294967295 1056 2007-04-12 05:46 ADV_OBJ
dr--r--r-- 2 4294967295 4294967295 1932 2007-04-12 05:46 HVDVD_TS

If the HD-DVD still failes to mount:

1. Manually create a mount point:

sudo mkdir /media/hddvd

2. Find the device id of your your drive:

dmesg | grep scsi

3. In my case the XBox drive (TOSHIBA DVD/HD) was /dev/sr0. Now edit your /etc/fstab file to include the line below: (Substituting /dev/sr0 for your device)

/dev/sr0 /media/hddvd udf user,noauto 0 0

The latest of seba_manciulea's udf patches can be found at this Sourceforge page. Hopefully they will soon be included in the Ubuntu kernel and there will be no need to patch.