<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>andreas.goelzer.de &#187; Linux</title>
	<atom:link href="http://andreas.goelzer.de/tag/linux/feed" rel="self" type="application/rss+xml" />
	<link>http://andreas.goelzer.de</link>
	<description>Electronics and small programs and other stuff</description>
	<lastBuildDate>Tue, 29 Nov 2011 21:08:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Feeding a screensaver from the digikam database</title>
		<link>http://andreas.goelzer.de/feeding-a-screensaver-from-the-digikam-database</link>
		<comments>http://andreas.goelzer.de/feeding-a-screensaver-from-the-digikam-database#comments</comments>
		<pubDate>Mon, 02 Jun 2008 20:17:09 +0000</pubDate>
		<dc:creator>Andreas Goelzer</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Photography]]></category>
		<category><![CDATA[digikam]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[python]]></category>
		<category><![CDATA[screensaver]]></category>

		<guid isPermaLink="false">http://andreas.goelzer.de/?p=12</guid>
		<description><![CDATA[After several months of living without any screensaver, I decided it just would be nice to once again have something nice to watch and show while idling. I really like the photo slideshow that ships with windows vista, but as &#8230; <a href="http://andreas.goelzer.de/feeding-a-screensaver-from-the-digikam-database">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<p>After several months of living without any screensaver, I decided it just would be nice to once again have something nice to watch and show while idling. I really like the photo slideshow that ships with windows vista, but as my laptop runs linux only that was not possible. The next best thing i found was glslideshow from the <a href="http://www.jwz.org/xscreensaver/">xscreensaver compilation</a>. Like most slideshow programs, glslideshow will look into a given directory, and show files out of it in random order. However, there are downsides to that simple approach: My photo folder contains some private pictures, and also some pictures that are just ugly. So i decided to connect it to my <a href="http://www.digicam.org">digikam</a> database, which was surprisingly simple.</p>
<p>By default, xscreensaver takes the directory out of its configfile ~/.xscreensaver, and passes it to a helper script xscreensaver-getimage-file, which then prints the complete path to a random file in that directory. So all one needs to do to add another source for pictures is to replace that file, there is already <a href="http://jrwren.wrenfam.com/blog/2005/02/20/flickr-xscreensaver-fun/">xscreensaver-getimage-flickr<br />
</a>, which pulls photos off flickr. So I wrote a similar script in python to print a random file from my digikam database. Maybe there are more?</p>
<h4>Installation</h4>
<p>The script is written in python, so that has to be installed (which is usually the case), it also requires sqlite and python bindings for it (apt-get install python-pysqlite2 in debian and ubuntu). If those are installed, backup the original xscreensaver-getimage-file, and copy the script there. Check that it is executable.<br />
the overall process would look like(assuming xscreensaver-glslideshow already works)</p>
<pre>
sudo apt-get install python-pysqlite2
cd ~
wget http://andreas.goelzer.de/download/xscreensaver-getimage-digikam.py
chmod +x xscreensaver-getimage-digikam.py
cd /usr/bin
sudo mv xscreensaver-getimage-file xscreensaver-getimage-file-original
sudo mv ~/xscreensaver-getimage-digikam.py /usr/bin/
ln -s xscreensaver-getimage-digikam.py xscreensaver-getimage-file
</pre>
<p>If you had previously pointed xscreensaver to your digikam photo folder, that should work now. If not, edit ~/.xscreensaver and add a line pointing to that directory, in my case:</p>
<pre>
imageDirectory: /home/goelzera/Documents/Bilder
</pre>
</p>
<h4>Modification</h4>
<p>Right now this is all a bit hacky. at the beginning of the file, there is a line</p>
<pre>bad_tags = "('private','me','Nophoto','Notmeanttobenice')"</pre>
<p>If called, the script will take a random picture out of the database, then check if it has one of those tags. If it is tagged with one of those, it will be dismissed, similarly, if it has an extension indicating xscreensaver won&#8217;t be able to display it. So, set those line to the tags you do not want in your slideshow. For everything else you need to change the sql queries or the source code.</p>
<h4>Running</h4>
<p>Set your screensaver to glslideshow and wait for it to start</p>
<pre lang="python" line="1">#!/usr/bin/python
# -*- coding: utf-8 -*-
&quot;&quot;&quot;
Script to choose random pictures from the digikam database
Copyright (C) 2008  Andreas Goelzer

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program.  If not, see &lt;http://www.gnu.org/licenses/&gt;.


This program takes one random picture out of a sqlite-database
made by digikam.
This is useful for screensavers, xscreensaver-glslideshow in particular.
&quot;&quot;&quot;

#import sys;
#ef=open('/home/goelzera/Documents/Programme/python/xscreensaver-errlog','a')
#sys.stderr = ef

good_extensions = ('jpg', 'jpeg', 'pjpeg', 'pjpg', 'png', 'gif', 'tif', 'tiff', 'xbm', 'xpm')
bad_tags = &quot;('private','me','Nophoto','Notmeanttobenice')&quot;
#good_tags = &quot;('public')&quot;
good_tags = &quot;&quot;
attempts = 200


import sqlite3;
from sys import argv, exit;
from os.path import splitext;

digikamversion = &quot;4&quot;;

if(len(argv) &gt; 1):
	dirname = argv[len(argv) - 1]
else:
	dirname = &quot;/home/goelzera/Documents/Pictures&quot;
	
con = sqlite3.connect(dirname + &quot;/digikam&quot; + digikamversion + &quot;.db&quot;)
if(digikamversion == &quot;4&quot;):
	url = &quot;relativePath&quot;
	dirid = &quot;album&quot;
else:
	url = &quot;url&quot;
	dirid = &quot;dirid&quot;
	
#from time import time
#f=open('/home/goelzera/Documents/Programme/python/xscreensaver-log','a')
#f.write(str(time()) + '\t' + str(argv) + '\t')

#get tagids for bad tags
def getTagIdsFromNames(names):
	tag_ids = ' ';
	for row in con.execute(&quot;SELECT id FROM Tags WHERE name IN &quot;+ names):
		tag_ids += str(row[0]) + ','
	tag_ids = '(' + tag_ids[:-1] + ')'
	return tag_ids

if(bad_tags != &quot;&quot;): bad_tag_ids = getTagIdsFromNames(bad_tags)
if(good_tags != &quot;&quot;): good_tag_ids = getTagIdsFromNames(good_tags)

file = 'none';
#search for images, take a random one out of the db and see if it fulfills the criteria
for attempt in range(attempts):
	#get a random picture, i guess this is the wrong way, performs horrible
	#truely random, but painfully slow
	#row = con.execute(&quot;SELECT id, name, $dirid FROM Images ORDER BY RANDOM() LIMIT 0,1&quot;).fetchone()
	#fast, but not as random
	row = con.execute(&quot;SELECT id, name, &quot;+ dirid+&quot; FROM Images WHERE id &gt;= (abs(RANDOM()) % (SELECT max(id) FROM Images)) LIMIT 0,1&quot;).fetchone()
	#f.write(str(row[0]) + ',')
	
	#check for bad tag
	if(bad_tags != &quot;&quot;):
		if(con.execute(&quot;SELECT 1 FROM ImageTags WHERE imageid = &quot; + str(row[0]) + &quot; AND tagid IN &quot;+ bad_tag_ids).fetchone()): continue

	#check for good tag
	if(good_tags != &quot;&quot;):
		if(not con.execute(&quot;SELECT 1 FROM ImageTags WHERE imageid = &quot; + str(row[0]) + &quot; AND tagid IN &quot;+ good_tag_ids).fetchone()): continue


	#check for invalid extension
	ext = splitext(row[1])
	ext = ext[1][1:].lower()
	if(not ext in good_extensions): continue
	
	#not rejected, get directory
	drow = con.execute(&quot;SELECT &quot;+url+&quot; FROM Albums WHERE id = &quot; + str(row[2])).fetchone()
	file = dirname + drow[0] + '/' + row[1]
	break

print file.encode('utf-8')

#f.write(file.encode('latin-1') + '\n')





</pre><hr /><a href='http://andreas.goelzer.de/download/xscreensaver-getimage-digikam.py'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-source-alt.png" width="16" height="16" alt="filetype" class="icon16" /> xscreensaver-getimage-digikam.py</a> (3.29 kiB, 2009-08-06)<br/><hr />
]]></content:encoded>
			<wfw:commentRss>http://andreas.goelzer.de/feeding-a-screensaver-from-the-digikam-database/feed</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Debian Sarge GNU/Linux on a Fujitsu-Siemens Amilo M7425 Laptop</title>
		<link>http://andreas.goelzer.de/debian-sarge-gnulinux-on-a-fujitsu-siemens-amilo-m7425-laptop</link>
		<comments>http://andreas.goelzer.de/debian-sarge-gnulinux-on-a-fujitsu-siemens-amilo-m7425-laptop#comments</comments>
		<pubDate>Fri, 29 Feb 2008 09:55:06 +0000</pubDate>
		<dc:creator>Andreas Goelzer</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.goelzer.de/andreas/wordpress/?p=6</guid>
		<description><![CDATA[This is my Guide to a working Installation of Debian Sarge GNU/Linux on the Amilo M7425. It may be useful for other distributions too, i used a kernel.org 2.6.10 kernel. <a href="http://andreas.goelzer.de/debian-sarge-gnulinux-on-a-fujitsu-siemens-amilo-m7425-laptop">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Abstract</h2>
<p>This is my Guide to a working Installation of Debian Sarge GNU/Linux on the Amilo M7425. It may be useful for other distributions too, i used a kernel.org 2.6.10 kernel. I&#8217;m not yet finished, but it runs well enough. If you are using Suse, check out the <a href="http://www.lugoland.de/amilom7425suse91.html">Lugoland Amilo M7425 manual</a>. Since I don&#8217;t use debian any more, this page wo&#8217;t be updated again.</p>
<h2>Some notes to Ubuntu</h2>
<p>I recently switched to ubuntu. I was impressed how fine this machine works with ubuntu, no need for a selfcompiled kernel, WLan works during the installation process. All I had to do was adding &quot;ac&quot;, &quot;battery&quot;, &quot;speedstep_centrino&quot; and &quot;cpufreq_ondemand&quot; to /etc/modules and activate my little speedstep script (&quot;update-rc.d speedstep defaults&quot;).</p>
<h2>Installing the Base System</h2>
<p>A short test run with Knoppix indicated Linux should work on this machine, so I decided to install it. My first try was a failure. I reduced the size of the preinstalled Windows Partition using Knoppix&#8217; QTParted and installed Debian at the last 10GB of the HD. It failed to load grub stage 1.5 at boot, and as i tried using Lilo this also failed. It was a surprise as i inserted the Rescue CD shipped with the laptop in order to get Windows back into the MBR, but the Rescue CD didn&#8217;t want to do anything. It just said &quot;Setup untersucht die Hardwarekonfiguration ihres Computers&quot; and afterwards showed pure blackness. So I reformated and installed Linux at the first 10GB of the HD. Now Linux worked, but the Rescue CD failed as before. I also tried a standard XP-CD and my old Win98-CD, all failed. I called the fujitsu-siemens hotline who gave me the &quot;advice&quot; to reformat using knoppix. It actually hurt to format a working linux installation, but i tried it. It really helped.</p>
<p>I still don&#8217;t know what the actual problem is. The rescue CD shows the blue setup screen if i insert it in my desktop PC, even if there is only a broken harddisc in it or no hd at all. I finally succeeded by creating a small /boot partition at the beginning of the HD and the windows partition as partition 2.</p>
<h2>Working in a unmodified Debian Distribution</h2>
<p>Once debian was installed it worked well. Sound worked, Ethernet worked, Synaptics Touchpad worked(you have to modify the /etc/X11/XF86Config-4 in order to use the Touchpad and a usb-mouse simultaneously &#8211; see files at the end). USB worked, probably more.</p>
<h2>Accelerated 3D Graphics</h2>
<p>the standard X11-driver &quot;ati&quot; does not (yet?) support the 3D-Acceleration of the Radeon Mobility 9600(or whatever it is called). If you want that Acceleration you need to use ati&#8217;s proprietary drivers, available at <a href="http://www.ati.com">Ati website</a>. They are not free as in &quot;free software&quot; and will &quot;taint&quot; your kernel, so if you intend to become a saint in the church of emacs don&#8217;t use them.</p>
<p>If you however try to install them I haveto warn you they won&#8217;t work with all kernel versions. They are working with an unpatched kernel.org 2.6.10, with the debian 2.6.8, they did not work with a 2.6.11-rc2 and a 2.6.11-rc1-bk6. Unfortunately the Ati drivers are in rpm format. So you&#8217;ll have to apt-get alien(can turn .rpm to .deb) or get the <a href="http://xoomer.virgilio.it/flavio.stanchina/debian/fglrx-installer.html">debian packages from Flavio Stanchina</a>. If you get an error concerning overwriting libGL.so while installing, check <a href="http://www.jimmy.co.at/ati.html">Jimmy&#8217;s homepage</a> or do a dirty dpkg -force-all.</p>
<p>Note that fglrx does not support suspend yet, or at least not without kernel patching and similar stuff.</p>
<h2>TV-Out and external Monitor</h2>
<p>This seems to be difficult. If you boot up with a monitor attached it will work, but you can&#8217;t use fn-f4 to toggle. It&#8217;s probably a feature of the ati driver.</p>
<h2>ACPI</h2>
<p>I installed the acpid package. It does not complain, but i haven&#8217;t tested if it saves energy etc.</p>
<h2>CPU frequency scaling</h2>
<p>This part of the kernel seems to be in a rapid development. Using kernel.org 2.6.10 and the config below, i could do a &quot;modprobe speedstep_centrino&quot; &amp;&amp;<br />
&quot;echo &quot;ondemand&quot; > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor&quot; and then cpu frequency/MHz varies from 600 to 1400. I havent tested the impact on energy consumption yet, but since the fan is not always working the laptop is more silent.
</p>
<h2>Extra Buttons</h2>
<p>Execute the line &quot;setxkbmap -model logiik -layout de -variant nodeadkeys&quot;  or modify the XF86-Config-4 as I have done(see files). Then you can assign the keys &quot;XF86Mail&quot; and &quot;XF86WWW&quot; to actions you need, also the fn-f5/f6 key combinations. I used &quot;Control Center&quot; &#8211; &quot;Regional &amp; Accessibility&quot; &#8211; &quot;KHotKeys&quot; to configure them. I tried DCOP calls to control the volume, but unfortunatel the name of the &quot;Remote Object&quot; changes every restart.</p>
<h2>Network</h2>
<p>No Problems here, the card works fine. I had some Problems with dhcp killing my vpn-connections, but this is possibly a vpnc-problem. It worked after i switched to dhcpcd instead of dhclient. Possibly following this my Laptop now wants a &#8220;ctrl-c&#8221; when booting up and not being attached to a ethernet network.</p>
<h2>Wireless LAN</h2>
<p>This worked well. Using the kernel 2.6.10 i downloaded driver and firmware from <a href="http://ipw2200.sourceforge.net/">ipw2200.sf.net</a> and installed them(driver version 1.0.0, firmware &quot;v0.19-current&quot;. Copy the firmware files *.fw to /usr/lib/hotplug/firmware/ (as advised in the INSTALL of the driver), &quot;make&quot; the driver, turn on wlan and hopefully enjoy a working &quot;modprobe ipw2200&quot;. I haven&#8217;t found out how to automatically load the driver. Note that there is also a package for Debian sid. If this driver does not suit your purpose, try <a href="http://ndiswrapper.sf.net/">ndiswrapper</a>. In order to use wlan with some comfort, try installing &quot;waproamd&quot; and modify /etc/network/interfaces (Every network I use has a dhcp server, so i just copied the lines from eth0) For unknown reasons my wlan device is sometimes called eth1 and sometimes eth2. So configure both devices.</p>
<h2>USB</h2>
<p>USB works fine. Haven&#8217;t checked USB 2.0 yet. In order to access a usb-storage device, create /mnt/usb and add the line &quot;/dev/sda1       /mnt/usb        vfat    user,noauto,dmask=000,fmask=0111&quot; or something similar to your /etc/fstab.</p>
<h2>DVD/CD</h2>
<p>Works fine, burning with k3b is no problem, however the system gets *very* slow while burning.</p>
<h2>Incomplete</h2>
<p>At the moment the boot process and the kernel configuration are a mess. it works, but reports lots of errors and takes some time.</p>
<p>To be tested: Firewire, pc-card reader,&#8230;</p>
<p>If not connected to an ethernet network dhcpcd waits too long at bootup.</p>
<hr /><a href='http://andreas.goelzer.de/download/amilo/XF86-Config.txt'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-text.png" width="16" height="16" alt="filetype" class="icon16" /> amilo/XF86-Config.txt</a> (16.57 kiB, 2005-03-02)<br/><a href='http://andreas.goelzer.de/download/amilo/config_prometheus.txt'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-text.png" width="16" height="16" alt="filetype" class="icon16" /> amilo/config_prometheus.txt</a> (34.47 kiB, 2005-06-24)<br/><a href='http://andreas.goelzer.de/download/amilo/speedstep'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-generic.png" width="16" height="16" alt="filetype" class="icon16" /> amilo/speedstep</a> (614 B, 2005-06-24)<br/><hr />
]]></content:encoded>
			<wfw:commentRss>http://andreas.goelzer.de/debian-sarge-gnulinux-on-a-fujitsu-siemens-amilo-m7425-laptop/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Linux and the BenQ/Siemens S81 phone</title>
		<link>http://andreas.goelzer.de/linux-and-the-benqsiemens-s81-phone</link>
		<comments>http://andreas.goelzer.de/linux-and-the-benqsiemens-s81-phone#comments</comments>
		<pubDate>Fri, 29 Feb 2008 09:51:08 +0000</pubDate>
		<dc:creator>Andreas Goelzer</dc:creator>
				<category><![CDATA[Computers]]></category>
		<category><![CDATA[cellphone]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://www.goelzer.de/andreas/wordpress/?p=5</guid>
		<description><![CDATA[Abstract I didn&#8217;t find much about using the S81 in Linux, so I decided to test it myself, so far it works quite well. About the Phone The S81 is a rather cheap phone, I got one for Fr 100 &#8230; <a href="http://andreas.goelzer.de/linux-and-the-benqsiemens-s81-phone">Continue reading <span class="meta-nav">&#8594;</span></a>]]></description>
			<content:encoded><![CDATA[<h2>Abstract</h2>
<p>I didn&#8217;t find much about using the <a href="http://www.gsmarena.com/benq_siemens_s81-1438.php">S81</a> in Linux, so I decided to test it myself, so far it works quite well.</p>
<h2>About the Phone</h2>
<p>The S81 is a rather cheap phone, I got one for Fr 100 (~60 €), paid another Fr 30 (~20 €) for a 2-GB micro-sd card. It works as a phone, and one can receive and send sms with it. It also works as mp3-player, camera (produces rather low-quality pictures, no comparison to my rather outdated Olympus UZ-700 digicam or even my Logitech Quickcam Fusion) and camcorder(really low resolution and not the best quality alltogether), emergency light, usb storage(only with micro-sd-card inserted, and only with cable always carried along, of course) and hopefully umts modem. One can greatly increase its usability by installing java programs, the most useful addition seemed to be a mobile bookreader, see below. The display is quite nice and well to read, but touch it and you&#8217;ll leave traces. So it&#8217;s perfect to take one&#8217;s fingerprints, but hard to keep it clean and shiny.</p>
<h2>In Windows</h2>
<p>First I tried to connect it in Windows. The original software is a bad joke, can&#8217;t backup all sms, for example. One can use <a href="http://bmc.bezysoftware.net/">Brew mobile commander</a> (can connect at higher speeds than 115kbps) or Bitpim to read out the directories and transfer files, but both cannot sync your contacts or do more than read the file system.</p>
<h2>Firmware update</h2>
<p>Note that all firmware updates carry an inherent risk of destroying your phone or even your Pc or marriage, especially if the instructions are written in a language you don&#8217;t understand, don&#8217;t blame me if it just goes horribly wrong.</p>
<p>With the firmware it came with, the 2GB micro-sd-card caused trouble. I don&#8217;t know if it would work with smaller sizes, one could save stuff to it and read it then in a pc, but the phone didn&#8217;t work as usb mass storage in windows or Linux, and it didn&#8217;t correctly report card memory. For reasons maybe related to the unfriendly stuff that happened to the siemens mobile branch, one cannot get an updated firmware form the german or swiss pages of benq. There is an updated version on the russian and taiwanese sites of benq, i took the latter. Go to <a href="http://www.benq.com.tw/">Benq Taiwan</a>, <a href="http://babelfish.altavista.com/">babelfish</a> might help you, and click yourself to the phone. I got the file named <var>mobile_phone%2Fsoftware%2Fs81%2Fs81_svn1.31_retial.exe</var>, executed it in windows(not sure if it also works somehow in Linux; remove sim card, make sure battery is full, power off phone, start program), at my first attempt i got pretty scared by a failure at 98 %, second run went well, and had a new firmware. Now USB mass storage works, so one can much faster load music, books and stuff onto the phone. A downside is that the phone now only supports English and two weird-character languages, therefore also iTap only works for those languages. Guess some people are going to wonder why i send them sms in english, but most people understand english quite well, so what.</p>
<h2>Bitpim</h2>
<p>I searched for Linux software to access the phone and ended up with <a href="http://www.bitpim.org/">bitpim</a>, just install it using your package manager. I would have preferred a kde program, but I didn&#8217;t find one that can access it. To connect the phone with bitpim, attach it with the usb cable, then set the permissions, or have that done automatically. I followed the bitpim doc by adding a file named <var>60-cell.rules</var> to <var>/etc/udev/rules.d/</var>.
</p>
<pre>
# s81
BUS=="usb", SYSFS{idVendor}=="04a5", SYSFS{idProduct}=="4027", MODE="0660", GROUP="cdrom", SYMLINK+="s81"
</pre>
<p>
This surely isn&#8217;t the right(abusing cdrom group, but seemed reasonable to me, who may use a cdrom may use an attached cellphone) and secure way to do it, but I&#8217;m a bit clueless when it comes to system configuration, and it works. Then, start bitpim, ignore if it complains about not being able to detect a phone. Go to <var>edit&#8211;settings</var>, choose »Other CDMA phone« as phone type (doesn&#8217;t really matter what you choose here), click on »browse« next to »comm port«, You should see something like:
</p>
<pre>
Automatic
===== Available ports =====
USB Device - Vendor Acer Peripherals Inc. (now BenQ Corp.), Product #4027, (Interface #00)
USB Device - Vendor Acer Peripherals Inc. (now BenQ Corp.), Product #4027, (Interface #01)
</pre>
<p>
Click on the second one ( Interface #01), click OK twice, then goto filesystem. By expanding the root directory there, you should now see your phone&#8217;s directory tree. Now you can start using bitpim to load Java applications and backup your sms.</p>
<h3>Loading Java applications</h3>
<p>You might want to enhance your phone by some Java software. To install them, place .jar and .jad file in /brew/shared/. You can get Jars For example at <a href="http://www.getjar.com/software/BenQ-Siemens/S81">GetJar</a>. For example, a bookreader is really nice while waiting for the bus or riding a bus; a nice bookreader is <a href="http://tequilacat.org/dev/br/index-en.html">TequilaCat&#8217;s one</a>, or <a href="http://www.deep-shadows.com/hax/ReadManiac/index.htm">Readmaniac</a>, unfortunately its last update was quite a while ago. Other nice and handy stuff you can add are for example a dictionary, a tetris game, a real calculator(one that can actually do stuff like exp, log and other hard-to-do-in-the-head-stuff), a periodic system of elements or whatever you need.</p>
<h4>Books for the bookreader</h4>
<p>You&#8217;ll find a lot of books on <a href="http://www.gutenberg.org/">Project Gutenberg</a>, for example the stories about Sherlock Holmes and the beautiful books by Oscar Wilde. Readmaniac can read the .zip files directly, so you can save some storage. Gutenberg books are named quite unreadable, for example <var>23059.zip</var>. To name them, I downloaded the <a href="http://www.gutenberg.org/dirs/GUTINDEX.ALL">Gutenberg index</a>, and wrote a short script:</p>
<pre>
#!/bin/bash
if [ "$1" = "" ]; then
	echo "usage: getname [filename]"
	exit 1
fi
number=$(echo $1 | sed 's/[\.-].*$//')
ending=$(echo $1 | sed 's/^.*[\.-]//')

cp $1 "$(sed -n -e "/${number}\r$/s/[ \t]*${number}\r$//p" GUTINDEX.ALL).${ending}"
</pre>
<p>execute it with <var>./getname 23059.zip</var>, and it gets copied to »My Friend The Murderer, by A. Conan Doyle.zip«.</p>
<h3>Backing up your sms</h3>
<p>My old phone could only store 50 SMS, and I always found it sad if i had to delete nice words sent by a friend or loved one. In fact, that was one of the reasons why i bought a new phone. But then I found out the official software couln&#8217;t actually back them up, quite bad. But with bitpim it&#8217;s easy: All sms are stored in <var>/nvm/</var> as files named <var>sms_gw_000XX</var>. You can back them up to your harddisk, right-click on the nvm folder, select backup directory, wait, and you&#8217;ll be prompted to store a zip file to your harddisk.</p>
<h3>Reading your sms on your PC</h3>
<p>Unfortunately, bitpim, as of now, cannot really do more with the s81 than just accessing the directory structure. So you cannot read the sms you stored. I tried adding s81 support for bitpim, but I hardly speak python and it has no similar phones by benq. So i wrote a small c++-program to convert the sms to plain text:</p>
<hr /><a href='http://andreas.goelzer.de/download/sms.tar.bz2'><img src="http://andreas.goelzer.de/wp-content/plugins/kfile/fileicons/file-compressed.png" width="16" height="16" alt="filetype" class="icon16" /> sms.tar.bz2</a> (2.08 kiB, 2008-03-05)<br/><hr />
<pre>
goelzera@prometheus:~/Documents/Programme/cpp/sms$ ./readsms sms_gw_00054
Msg No.   : 54
 Size     : 128
 AP or so : +4179499900
 Sender   : +41XXXXXXXX
 Content  : Noch teistweise eine sms mit 128 Zeichen. bla bla, bar bar, baz baz, foo foo. Hm, ganz schoen viel, hoert das nie auf? oh, doch.
</pre>
<h4>Message format</h4>
<p>The files contain a header of various length (0&#215;21 for inbox files, 0x1d for sent files, 0&#215;17 for draft files). The message itself is encoded in a 7-bit charset, directly concatenated, 7 bytes(octets) contain 8 characters. The charset seems to be the <a href="http://en.wikipedia.org/wiki/Short_message_service">standard gsm charset</a>, date, time and phone numbers are encoded in bcd where the higher nibble contains the second digit. Unfortunately, there seems to be no date/time in messages sent. Apart from the number of the other communicating party a number of probably the network you are connected to is stored, even in drafts. The length of the message is stored in the last byte before the message starts, the folder it belongs to(and therefore the length of the header) is stored in byte 0&#215;6, it is 0&#215;5 for sent messages, 0&#215;1 for messages in inbox, 0&#215;3 for new messages in inbox, and 0&#215;7 for drafts. Multipart messages get no special treatment, the information is contained in the message body(I&#8217;m wondering, for say 20 multipart messages it is quite likely that two will have the same 8-bit-id). For further details see the source or contact me.</p>
<h2>USB mass storage</h2>
<p>The phone has a usb port, but unfortunately uses a special cable to connect to the pc(that way, it is possible to use the analogue headphone shipped with the phone with the same connector). As mentioned above, the phone directory can be accessed by a usb-serial interface in the phone, but that is really slow if you want to transfer some mp3s.</p>
<h3>MP3s</h3>
<p>Load the mp3s to the <var>/MP3/</var> folder on your card. The phone does not look in subfolders, and it has issues with long filenames, so managing a big collection might get difficult. You can use amarok to transcode your <var>.ogg</var> collection automatically on transfering, a quite handy feature.</p>
<h3>Videos</h3>
<p>You can easily record videos and transfer them to the pc, but hearing sound is a bit difficult in Linux. I had to go fetch the <a href="http://www.penguin.cz/~utx/amr">amr libraries</a>, install them and then compile ffmpeg (with options <var>&#8211;enable-libamr-nb</var> and <var>&#8211;enable-libamr-wb</var>) and mplayer to get ffplay and mplayer to play the videos&#8217; sounds. It is also possiple to convert Videos in order to watch them on the phone, i wrote a script, but you can of course also call ffmpeg directly:</p>
<pre>
#!/bin/bash
ffmpeg -i ${1} -ar 8000 -r 15 -b 48k -ac 1 -ab 12.2k -s 176,144 ${1}.3gp
</pre>
<p>To test it, I converted the HD version of <a href="http://www.elephantsdream.org/">Elephants Dream</a> to the tiny stamp format of the phone. Watching videos however isn&#8217;t much fun because of the small size ( can&#8217;t even use the whole screen) and because the format is restricted to a 8000 Hz sample rate, so watching operas on the phone is a lot less fun.</p>
<h2>Problems</h2>
<h3>Filenames</h3>
<p>The phone seems to have some issues with filenames, it doesn&#8217;t like them to be long or contain funny chars, so I had to rename some mp3 files and some jars to see them in the phone menus.</p>
<h2>To be done</h2>
<p>Test modem, find out where contacts are stored, get a phone contracts that allows data transfer.</p>
]]></content:encoded>
			<wfw:commentRss>http://andreas.goelzer.de/linux-and-the-benqsiemens-s81-phone/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Minified using disk: basic
Page Caching using disk: enhanced
Database Caching 3/13 queries in 0.093 seconds using disk: basic
Object Caching 325/343 objects using disk: basic

Served from: andreas.goelzer.de @ 2012-02-05 04:54:58 -->
