Archive for April, 2009
* better and worse people in india
Posted on April 28th, 2009 by jitu. Filed under India.
In India I could observe many times that there are people and others in India. It starts with the differences among e. g. mess workers and students and it goes all the way up. Just today I came across another small example: Recently the Chief Minister of Tamil Nadu, M. Karunanidhi, fasted to urge the Sri Lankan government to stop its military actions against the Tamils living on the island. He was recited that “he was willing to sacrifice himself for the cause of the Sri Lankan Tamils”. This idea is very noble, although I cannot make any comments about how his fast affected the military decision to avoid heavy weaponry in the conflict from now onwards. However the newspaper The Hindu reported today that he stopped his fast. Usually I would not mention this here, but the photo that came with the article, shows an interesting fact:
As you can see, the Chief Minister lies in a bed wearing his usual sun specs. To ease his “sacrifice” it can also be seen that the bed is surrounded not only by lots of people but also by at least three air coolers. It is of no question that the coolers need some electricity and water for vaporization. It is also of no question that the cooled air will vanish immediately due to the open space and hence it is a waste of energy. Did I mention that India is suffering from severe lack of power and that we had just yesterday several power cuts although the power supply is already prioritized? And I thought that elected people should serve as an example.
* candy for change
Posted on April 23rd, 2009 by jitu. Filed under India.
It seems there is a shortage of coins in India. If the change is 1 or 2 Rupees, you often will get a candy instead of the money. No matter if you like it or not, the shopkeeper basically sells the sweet to you instead of giving you the change. After a refreshing lime juice, the best thing to chew on is a rubber-like chocolate/coffee candy in 35°C midday temperature gluing your teeth together. Hmmmmmmmmmmmmmm…
It would be interesting to see, if the shopkeeper accepts it as a payment once you collected enough candies.
* thunderbird/icedove and inline pdf attachments
Posted on April 23rd, 2009 by jitu. Filed under Linux.
Recently I experienced problems with PDF attachments in Thunderbird or Icedove as it is called in Debian. The document is inlined, but also sent as attachment. In Thunderbird extracting the attachment is not a problem. However other mail clients do not recognize the PDF as attachment and display lots of garbage in the message text.
It might look like this:
This is a test mail.
%PDF-1.3
%Çì¢
5 0 obj
<>
stream
xœÍ}[sÇ‘f„çM/óðl=]÷ªyZÛ’RçWrSf×áüyýu}q)6ï´päϯ/Älêü}þ³õç?_\*£6çÄù}{zOµß<ýö¤ƒÎœoHo¦ O¿ÁŸ»ße8ÿzsV)þ=ûê¿bzSJžÿº½P;Öå©×{8Ó†F~¾]HeéÐÛ|ŸÅ_úzQÿ\XÀŠâÆX¹y}v k.ý.Òú–!©aÝô&Ín,°Ývüñ7ææö]èïRC[»Hƒ‡§ÒxÜ€òÂóöÂ[x*ã*ÉM›ÝXúÇÖMý…£½
The problem is that the PDF is attached as “text/pdf”. If the message is displayed as source (go to “View” -> “Message Source”) you can check it by yourself. Somewhere in the mail you can find something similar to this:
[...]
————–050800000902000902020904
Content-Type: text/pdf;
name=”PDFdocument.pdf”
Content-Transfer-Encoding: base64
Content-Disposition: inline;
filename=”PDFdocument.pdf”JVBERi0xLjMKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURl
Y29kZT4+CnN0cmVhbQp4nM19W3Mdx5FmhOdNL/MX8AhsCD1d96p5WtuSPFprZa/NidgIjR5A
[...]
The last 2 lines above are the actual attachment represented in base64 encoding. The section should read
[...]
————–050800000902000902020904
Content-Type: application/pdf;
name=”PDFdocument.pdf”
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename=”PDFdocument.pdf”JVBERi0xLjMKJcfsj6IKNSAwIG9iago8PC9MZW5ndGggNiAwIFIvRmlsdGVyIC9GbGF0ZURl
Y29kZT4+CnN0cmVhbQp4nM19W3Mdx5FmhOdNL/MX8AhsCD1d96p5WtuSPFprZa/NidgIjR5A
[...]
to work. So somehow the Content-Type setting got messed up. The solution to this problem is quite easy:
- Close Thunderbird/Icedove
- Go to the working directory of the Thunderbird/Icedove installation. On my machine that is
cd ~/.mozilla-thunderbird/98j7l74z.default/. - Move
mimeTypes.rdfto a new file name:mv mimeTypes.rdf mimeTypes.rdf.bak. It will be regenerated the next time Thunderbird/Icedove starts. - Start Thunderbird/Icedove and check, if it works.
* tips and tricks for shr on freerunner
Posted on April 22nd, 2009 by jitu. Filed under openmoko.
In this post I would like to collect some tips and tricks copied from the Shr-devel mailing list so that I do not have to search everytime for a solution in the list. Basically I started to collect links to solutions for problems, I experienced so far and I though, it might be useful for others too. This list might change over the time or get expanded. I will try to remove old tricks and tips which do not apply to the current testing branch anymore. But if you found an outdated entry, let me know.
- Incoming SMS are not displayed.
mdbus -s org.freesmartphone.ogsmd /org/freesmartphone/GSM/Device org.freesmartphone.GSM.SIM.RetrieveMessagebook 'all'which marks them all as read, so that they can be displayed. - No icons in Illume.
Check in/usr/share/applications/the category of the*.desktopfiles. It should be Applications. - AUX button does not lock display.
Have a look into the illume settings (wrench in the shelf) -> Input -> Key Bindings and bind the AUX button to “Desktop Simple Lock”. - Mofi does not show any networks.
Activate Wifi in the settings first. - When I receive a call, it takes several seconds after hitting the “Accept” button before the call is actually accepted.
There is some delay in the framewark. There is no workaround currently. However it can be eased a little bit by using ringtone encoded in WAV (e.g. Mono, 11025Hz) which reduces the delay. Place the ringtone in/usr/share/soundsand select it in Settings -> Profiles.To convert a WAV file to Mono open it in e.g. Audacity (Tracks -> Stereo to Mono) and save it. Use
mplayer -vo null -vc dummy -af volume=10,resample=11025:0:1 -ao pcm:waveheader:file="outputFile.wav" "inputFile.wav"to set the sample rate and to change the volume. - Volume of caller is too low.
Have a look into this post. - How to backup the NAND before trying out a new release?
Have a look here. However it might be difficult to access the jffs image in case you need a configuration file. So it is a good idea to backup /etc and self written programs in /usr/bin to a separate tar file to ease the access. - TangoGPS does not download tiles from Google Maps.
The wiki of openmoko describes a solution. - Enlightenment constantly consumes 20% CPU.
Delete thedropshadowdirectory inusr/lib/enlightenment/modules/and acknowledge the error message after executing/etc/init.d/xserver-nodm restart - In the current unstable release (20090617) the scenarii (scenarios) are not in
/usr/share/openmoko/scenarios/, but in/usr/share/shr/scenarii/. The setting for the directory can be found in/etc/frameworkd.conf. - opkg crashes with a Segmentation fault.
Shut down the X server with/etc/init.d/xserver-nodm stopto free up memory. As alternative or if it still crashes, consider to provide a swap file or swapt partition on the uSD card. - phonelog crashes
If you startphonelogin the terminal and get something like this (afterexport DISPLAY=:0):phonelog Phonelog
Initialized global vars
Initializing gtk interface
Showing main window
Upright
Traceback (most recent call last):
File “/usr/bin/phonelog”, line 741, in
outgoing.populateList()
File “/usr/bin/phonelog”, line 191, in populateList
print “There’s a corruption in the DB, empty phone number!” + “(” + call[4] + “)”
TypeError: cannot concatenate ‘str’ and ‘int’ objectsYou can replace all
call[4]occurrences withstr(call[4])in/usr/bin/phonelogto figure out the empty phone number. After that you can delete the problem causing entry from the data base.
If that is too much work and you do not care about the content of the data base anyway, you can also deleterm /var/db/phonelog.dband either restart the phone orophonekitd. - Provider information (Service Data) is not displayed.
Some providers send a message through the network stating, how much was the cost of the last call or SMS and how much balance is left (if prepaid). However it seems that sometimes this message comes and sometimes it does not. However, if the balance is checked after booting the phone and registering to the network (that is forcing this kind of message), the message is received after every call/SMS. - To check the currently used scenario, you can use this quick and dirty script. Download it to your phone, make it executable (
chmod +x scenario.py) and execute it in the state, you want to figure out (e.g. during a call) by typing./scenario.pyin the terminal. - A new black/green theme has been created. It is much faster than the original SHR theme, since many fancy icons have been removed from it. Installation manual and download.
- To change the brightness of the backlight by script, do a
echo <brightnessLevel> > /sys/class/backlight/gta02-bl/brightnesswith<brightnessLevel>between 0 (darkest = off) and 255 (brightest). - To prevent the Freerunner from suspending while e.g. tangoGPS is running, copy this script into
/usr/binand change theExecentry in/usr/share/applications/tangogps.desktoptotangogpsStart.sh. - If you are curious where the module for shr-settings are located to derive some hints to configure the system with your own scripts, have a look in
/usr/lib/python2.6/site-packages/shr_settings_modules/ - Currently there is a bug in my shr-settings: I cannot change the ringtone nor its volume. To change these settings manually, edit the file in
/etc/freesmartphone/opreferences/conf/phone/ring.yaml
* reducing display brightness freerunner at boot up
Posted on April 17th, 2009 by jitu. Filed under openmoko.
When the Freerunner of Openmoko boots, the display is very bright sucking out the battery or making you blind in the night
The brightness can be reduced by the command
echo 80 > /sys/class/backlight/gta02-bl/brightness
I put this line into the file /etc/rc.local and set a link S99rc.local to it in /etc/rcS.d to execute it automatically (do not forget to make the file executable with chmod +x rc.local). A little script adjusting the brightness depending on the date time or at the users wishes would be nice. Currently the display is hardly visible in bright Indian sunlight.
* increase the volume of calls on freerunner
Posted on April 17th, 2009 by jitu. Filed under openmoko.
In all distributions available for the Freerunner of Openmoko, I experienced calls at a very low volume making it impossible to understand the one at the other end in loud environments. I am not talking about very loud environments like a Heavy Metal concert or the platform at the train station. In normal surroundings the voice of the caller simply vanished into the noise sometimes.
Fortunately on FSO based distributions such as the SHR, there is a solution. I know that also Openmoko 2008.12 offers this option as a comfortable regulator during the talk, but I do not know, hoe and if it works. It is possible to access the amplifier of the GSM chip boosting the audio signal. In FSO you can access it through this simple python example:
#!/usr/bin/env python
import dbus#– access dbus
bus = dbus.SystemBus()gsm_device_obj = bus.get_object(“org.freesmartphone.ogsmd”, “/org/freesmartphone/GSM/Device”)
device_iface = dbus.Interface(gsm_device_obj, “org.freesmartphone.GSM.Device”)
print device_iface.GetSpeakerVolume()device_iface.SetSpeakerVolume(80)
print device_iface.GetSpeakerVolume()
This script sets the volume to 80 (from the default of 68) which was sufficient for me. Valid values range from 0 to 100. With the amplification set to maximum in the GSM chip and alsamixer, the speaker is so loud that everybody can hear that someone is talking at the other end in a range of 2 meters and in quite environments. The Freerunner also starts vibrating a bit.
I do not know, if the volume is reset, if the Freerunner is restarted. But starting this script at every boot cycle is the least problem (see this post)
[Update 19/04/2009]
The volume is reset with every restart. Unfortunately it is not that easy to start the script mentioned above automatically with every restart. The resource (namely the GSM chip) is not available at that time and the script fails. As long as I do not figure out a more comfortable way for this script, I made a button so that I can execute the script by hand after boot and after the chip came up. Let me know any better ways…
* dropping to busybox
Posted on April 9th, 2009 by jitu. Filed under Linux.
Sometimes and unpredictable the root filesystem could not be mounted during boot causing the kernel to drop to busybox saying something like:
mount: Mounting /dev/root on /root failed: no such device
mount: Mounting /root/dev on /dev/.static/dev failed: no such file or directory
mount: Mounting /sys on /root/sys failed: no such file or directory
mount: Mounting /proc on /root/proc failed: no such file or directory
Target filesystem doesn’t have /sbin/init
Repeating the same mount commands at the command line worked flawlessly, but drove the kernel into a kernel panic, when the boot sequence continued. I cannot remember why and I did not investigate that further.
However when I removed all parameters given in the kernel line in grub, the boot sequence completed without any problems. Recently I read somewhere that there is a problem in detecting the kind of filesystem used (ext3, ext4, reiserFS, etc) and there is somewhat a mix up. Telling the kernel, what filesystem is used especially for the root filesystem, helped a lot and so far I did not experience this problem again. Just add rootfstype to the kernel boot option so that your menu.lst in /boot/grub/ looks like this:
title Debian GNU/Linux, kernel 2.6.28.8-6
root (hd0,1)
kernel /vmlinuz-2.6.28.8-6 root=/dev/sda5 ro rootfstype=ext4 resume=/dev/sda3
initrd /initrd.img-2.6.28.8-6title Debian GNU/Linux, kernel 2.6.28.8-6 (single-user mode)
root (hd0,1)
kernel /vmlinuz-2.6.28.8-6 root=/dev/sda5 ro rootfstype=ext4 single
initrd /initrd.img-2.6.28.8-6
You need to replace the value (ext4) by your own filesystem.
* freerunner has arrived
Posted on April 8th, 2009 by jitu. Filed under openmoko.
Finally, after so many months of consideration and thinking, I bought the Freerunner in India. Despite the fact that the price is quite high compared to the price in Europe due to the disadvantageous Dollar-Rupee exchange course, I could not resist any more.
After arrival the first illusion that the Freerunner is actually a phone passed away. Well, it is more a Linux box with a call ability. The Settings button did not work at all and when a call was placed, I was not able to hear anything. The next problem is: What can I do about it? I mean, it is well known, that everything can be changed on this phone, but the question raises: How?
Lot’s of reading followed and I found a nice webpage which guides step-by-step through the process to flash the internal NAND memory. For beginners it might be a good idea to consider this NAND as the internal hard disk drive of the Freerunner (to lessen the abstraction). This memory can be flashed uncountable number of times and nothing will happen, if e. g. the power supply is interrupted. Compared to flashing the BIOS or the firmware on a computer, flashing the Freerunner is more a copying of data which can be repeated in case of any problems. Always the same steps are performed regardless the distribution.
So I tried various distributions: FDOM, Debian, Om2008.12 and Om2008.12 blown up with Kustomizer. Currently and hopefully also finally I ended with SHR. I would like to describe shortly my experiences with the various distributions.
Distributions
- FDOM is based on Om2008.9 and brings a huge amount of software (as the name suggests). Most of the preinstalled packages are not needed and it took lots of time to remove the unnecessary stuff. It was nice to see what is possible and to get an idea, what programs are available. However this distributions was to fat for my personal taste.
- Om2008.12 is the latest version of Openmoko. Most of the things should work out of the box. However I experienced problems especially with the standby mode. Sometimes the Freerunner did not wake up anymore, when the power button was pressed. Or worse: It did not wake up, when a call arrived. From the outside it was not visible, if it will wake up or not. Only a reboot could bring it back to life. Beside the suspend issue, everything worked fine out of the box. Messing around with the Alsa settings produced quite audible conversations (though a little bit too low in the volume for my taste).
If you want to have Om2008.12 with many preinstalled packages you should try out the Kustomizer mentioned above. It basically transforms the Om2008.12 into a FDOM based on the latest Openmoko kernel. - I also tested Debian shortly. Most of the distributions support a Ethernet connection via the usb0 device. However Debian uses eth1 for whatever reason. It did not start into any graphical mode and after installation, a SSH connection via USB is mandatory. Despite the fact that I tried to start a graphical user interface I completely failed due to some errors in the python-evas package. Installing the older one as suggested did not help at all and after a day I gave up and removed it again.
- SHR is based on the freesmartphone.org (FSO) middleware which should make many things quite easy to access through the dBus system. SHR is in an early development status and e. g. lacks a manager that can store phone numbers, names, birthdays etc. It is at the moment purely based on the store capabilities of the SIM card which e.g. cannot store 2 different numbers (home, cell, or office) under one name. Fortunately a PIM (personal information manager) is in development. In my opinion it is currently the fastest distribution, but not the one with the flashy icons and beautiful theme. Crashes happen rarer than with Om2008.12. Of all distributions it has the best settings manager, although it is a little bit slow and the suspend mechanism works reliably.
What did I learn?
If you want to change things, it is almost always mandatory to read, read and read. E. g. changing the theme in enlightenment is not as trivial as somebody used to Windows or Ubuntu/Debian might think. The theme has to be programmed and compiled. It can be frustrating, annoying and time consuming. It took me several hours to change the theme in SHR to the one shown below using tango icons and in which the clock shows also the date and week day.
Many packages on e.g. opkg.org are broken and an attempt to install them just gives error messages such as md5 hash mismatch or Terminated. It can be quite frustrating, if the packages are not maintained properly.
Conclusion
The Freerunner is a young and ambitious project and might never target the end consumer market, although it has the potential. People, who want to have a working phone with touch screen, etc should have a look at a phone based on Android (although this has also some unpleasant surprises). E. g. I had to get used to the Dialer, which is an application to dial a number. An application needs to be loaded and is not available instantly (applies to all tested distributions)
However people who want to have the option to dive into the complexity of a today’s phone and do not hesitate to learn about various things; people who are eager to dig around to solve a problem and do not get scared of text output in a console will have lot’s of fun with the phone (assuming they have also a good portion of patience). For two weeks I had my fun. Now I have to do some work for my employer….
Oh, btw, employer: Openmoko cancelled the development of the successor of the Freerunner (GTA03) and reduced the team size drastically. Maybe this is a last chance for a long time to get a real free phone.
Pages:
Categories:
Archives:
- August 2010
- July 2010
- May 2010
- April 2010
- March 2010
- February 2010
- January 2010
- December 2009
- November 2009
- October 2009
- August 2009
- July 2009
- June 2009
- May 2009
- April 2009
- March 2009
- February 2009
- January 2009
- December 2008
- November 2008
- October 2008
- September 2008
- May 2008
- April 2008
- March 2008
- January 2008
- November 2007
- October 2007
- August 2007
- July 2007
- June 2007
- May 2007
- April 2007
- March 2007
- February 2007
- January 2007
- December 2006
- November 2006
- October 2006
