<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
<?xml-stylesheet type="text/css" href="http://www.strapp.co.uk/styles/feed.css"?>
<title type="html">peter strapp</title>
<link rel="alternate" type="text/html" href="http://www.strapp.co.uk" />
<link rel="self" type="application/atom+xml" href="http://www.strapp.co.uk/atom.xml" />
<updated>2009-01-20T01:18:12+00:00</updated>
<author>
<name>Peter Strapp</name>
<uri>http://www.strapp.co.uk</uri>
</author>
<id>http://www.strapp.co.uk/</id>
<generator uri="http://nanoblogger.sourceforge.net" version="3.3">NanoBlogger</generator>
<entry>
<title type="html">Zhone Patch Updated</title>
<author>
<name>Peter Strapp</name>
</author>
<link rel="alternate" type="text/html" href="http://www.strapp.co.uk/archives/2009/01/20/index.html#e2009-01-20T00_33_35.txt" />
<id>http://www.strapp.co.uk/archives/2009/01/20/index.html#e2009-01-20T00_33_35.txt</id>
<published>2009-01-20T00:33:35+00:00</published>
<updated>2009-01-20T00:33:35+00:00</updated>
<category term="Openmoko" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[<p>
I've made a few changes to my zhone patch. 
</p>

<p>
Added features:
<br />
<ul>
  <li><b>Send USSD requests</b> - 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.</li>
  <li><b>Recieve USSD messages</b> - Displays operator messages e.g. current balance</li>
  <li><b>Re-lock phone</b> - This complements the 'unlock screen on incoming calls' patch by re-locking the phone if you miss a call.</li>
  <li><b>SMS not sent warning</b> - 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).</li>
  <li><b>SIM card full warning</b> - Displays a message when your sim card is full.</li>
</ul>
</p>

<p>
The patch can be downloaded here: <a href="/files/zhone-peppertarts.patch">Latest zhone patch</a>.
</p>]]>
</div>
</content>
</entry>
<entry>
<title type="html">Zhone Patch</title>
<author>
<name>Peter Strapp</name>
</author>
<link rel="alternate" type="text/html" href="http://www.strapp.co.uk/archives/2009/01/13/index.html#e2009-01-13T00_06_00.txt" />
<id>http://www.strapp.co.uk/archives/2009/01/13/index.html#e2009-01-13T00_06_00.txt</id>
<published>2009-01-13T00:06:00+00:00</published>
<updated>2009-01-13T00:06:00+00:00</updated>
<category term="Openmoko" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[<p>
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 <a href="/files/zhone-peppertarts.patch">here</a>.
</p>
<div class="nbcode">
<pre>
<span class="Type">--- zhone       2009-01-13 15:01:54.000000000 +0000</span>
<span class="Type">+++ zhone       2009-01-13 19:59:46.000000000 +0000</span>
<span class="Statement">@@ -249,6 +249,8 @@</span>

     def update_status(self, status):
         self.part_text_set( &quot;label_description&quot;, status )
<span class="Identifier">+        if status == &quot;release&quot; and self.status == &quot;incoming&quot;:</span>
<span class="Identifier">+            self.main.groups[&quot;lock&quot;].activate()</span>
         if status == &quot;outgoing&quot;:
             self.part_text_set( &quot;label_left&quot;, u&quot;&quot; )
             self.part_text_set( &quot;label_right&quot;, u&quot;cancel&quot; )
<span class="Statement">@@ -368,7 +370,9 @@</span>
             self.busy = True

     def cbStoreError( self, e ):
<span class="Special">-        logger.warning( &quot;error while storing message&quot; )</span>
<span class="Identifier">+        logger.warning( &quot;error while storing message - %s&quot; % e.get_dbus_name() )</span>
<span class="Identifier">+        if e.get_dbus_name() == &quot;org.freesmartphone.GSM.SIM.MemoryFull&quot;:</span>
<span class="Identifier">+            self.main.groups[&quot;error&quot;].activate( &quot;Failed to send message - SIM Memory Full&quot;, [(&quot;OK&quot;)] )</span>

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

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

<span class="Special">-    def activate( self, description, buttons, cb_data, cb ):</span>
<span class="Identifier">+    def activate( self, description, buttons, cb_data = None, cb = None ):</span>
         self.buttons = buttons
         self.cb_data = cb_data
         self.cb = cb
</pre>
</div>]]>
</div>
</content>
</entry>
<entry>
<title type="html">XBox 360 HD-DVD Drive in Ubuntu</title>
<author>
<name>Peter Strapp</name>
</author>
<link rel="alternate" type="text/html" href="http://www.strapp.co.uk/archives/2007/09/29/index.html#e2007-09-29T11_01_49.txt" />
<id>http://www.strapp.co.uk/archives/2007/09/29/index.html#e2007-09-29T11_01_49.txt</id>
<published>2007-09-29T11:01:49+00:00</published>
<updated>2007-09-29T11:01:49+00:00</updated>
<category term="Linux" />
<content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml">
<![CDATA[
<p>
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.
</p>

<p>
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 <i>uname -r</i> at a terminal.
</p>


<ul>
<li>2.6.24.19-generic</li>
<li>2.6.22.11-generic</li>
<li>2.6.22.12-generic</li>
<li>2.6.22.13-generic</li>
<li>2.6.22.14-generic</li>

</ul>

<p>
<b>1a.</b> Copy and paste the lines below into a terminal:
</p>
<p class="code">
wget http://www.strapp.co.uk/files/udf-$( uname -r ).ko
<br />
sudo mv udf-$( uname -r ).ko /lib/modules/$( uname -r )/kernel/fs/udf/udf.ko
</p>


<p>

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

<p class="code">
sudo apt-get install linux-source<br />
cd ~/<br />
cp /usr/src/linux-source-2.6.24.tar.bz2 .<br />
tar -xf linux-source-2.6.24.tar.bz2<br />

cd linux-source-2.6.24<br />
<br />
wget http://www.strapp.co.uk/files/UDF_2.50-linux-2.6.24.patch<br />
<br />
patch -p1 < UDF_2.50-linux-2.6.24.patch<br />
<br />
make menuconfig<br />

make<br />
<br />
sudo cp fs/udf/udf.ko /lib/modules/$( uname -r )/kernel/fs/udf/
</p>

<p>

<p>
<b>2.</b> 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:
</p>

<p class="code">

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

<p>
<b>3.</b> 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: 
</p>

<p class="code">

sudo su<br />
cd /media/hddvd<br />
ls -l<br />
<br />
total 8<br />
dr--r--r-- 2 4294967295 4294967295 1032 2007-04-12 05:46 AACS<br />

dr--r--r-- 2 4294967295 4294967295  972 2007-04-12 05:46 AACS_BAK<br />
dr--r--r-- 2 4294967295 4294967295 1056 2007-04-12 05:46 ADV_OBJ<br />
dr--r--r-- 2 4294967295 4294967295 1932 2007-04-12 05:46 HVDVD_TS
</p>

If the HD-DVD still failes to mount:
<br /><br />
<b>1.</b> Manually create a mount point:
</p>

<p class="code">

sudo mkdir /media/hddvd
</p>

<p>
<b>2.</b> Find the device id of your your drive:
</p>

<p class="code">
dmesg | grep scsi
</p>

<p>
<b>3.</b> 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)
</p>


<p class="code">
/dev/sr0       /media/hddvd   udf user,noauto     0       0
</p>

<p>
The latest of <i>seba_manciulea's</i> udf patches can be found at <a href="http://sourceforge.net/tracker/?group_id=295&atid=300295">this Sourceforge page</a>. Hopefully they will soon be included in the Ubuntu kernel and there will be no need to patch.
</p>]]>
</div>
</content>
</entry>
</feed>

