pavelmachek's Journal

Recent Entries

You are viewing 25 entries, 25 into the past.

31st May 2007

5:01pm: gps works in phase0 openmoko
...if you use may-31 kernel packages and may-30 filesystem packages from buildhost. Of course, you'll need to copy gllin driver from phase1 openmoko. (

while gps now works, there's a new today screen that hides all the useful functionality (and I have yet to figure out how to get rid of it), and I still can't get audio to work.

28th May 2007

11:47pm: OpenMoko time-traveling gps
So I managed to turn openmoko into bluetooth GPS. I used simple script:

mknod /dev/rfcomm0 c 216 0
echo 1 > /sys/devices/platform/s3c2410-i2c/i2c-0/0-0008/gta01-pm-bt.0/power_on
sleep 1
hciconfig hci0 up name linuxgps
sleep 1
sleep 1
sdptool add SP
        while true; do
        rfcomm listen /dev/rfcomm0 1
        sleep 1
) &
        while true; do
        tail -f /tmp/gps.nmea > /dev/rfcomm0
        sleep 1
) &

And it kind-of worked. Unfortunately, I managed to create time-travelling GPS: it shown possition ten minutes ago, with time sometimes going too slow, sometimes too fast. I guess the strace overloaded poor ARM cpu?

(And yes, gllin was shipped in binary-only form on phase1 openmokos. See hammerhead protocol in

25th May 2007

10:51pm: OpenMoko's gps
Ok, so I played a bit more with hammerhead, and it seems that its GPS is above average. It was able to get indoor lock near window, where my old Fortuna bluetooth GPS never got anything. (OTOH it was not able to get a fix for hour and half when I tried to use it for real -- and that wood was not that thick).

It took me quite a lot of time to figure out how to make nmea recording to work. Apparently, low level test is required before stuff works. Here's the script:

echo 1 > /sys/class/leds/gta01\:vibrator/brightness
killall gllin cat
sleep 1
echo 0 > /sys/class/leds/gta01\:vibrator/brightness
mknod /tmp/nmeaNP p
cat /tmp/nmeaNP | tee /media/card/gps.nmea >> /tmp/gps.nmea &
/home/root/DM2/gps/gllin -low 5
strace /home/root/DM2/gps/gllin >> /tmp/gps.strace 2>&1

22nd May 2007

10:24am: Fun with openmoko
After not-so-funny experience with UPS (they send you pictures, ask you to fill them in -- which in itself is not-so-nice task with gimp), then have misconfigured machines so they can't receive the response (they even gave me gmail-like address in the end), I have phase1 openmoko near me.

Good stuff is that gps finally works -- with binary-only application :-(. It is not a bad receiver, but do not expect miracles; it will not catch signal indoors, and it probably will not get signal in closed trunk of car as their marketing suggests.

Unfortunately, hacking for openmoko is not exactly easy -- crosscompiling is pain to set up, and we are talking gtk cross compiling here :-(. [Does anyone have python working on openmoko?] I resorted to some simple shell scripts for mp3 player. [Is there way to make gtkterm2 use bigger font, and run custom command?]

Put this into /usr/bin/hack-mp3:

#modprobe s3cmci
alsactl -f /home/root/DM2/audio/play_wav_earphone.state restore
#mknod /dev/mmc0 b 254 0
#mknod /dev/mmc1 b 254 1
#mount /dev/mmc1 /media/mmc1
mount /dev/mmcblk0p1 /media/card
aplay /home/root/DM2/audio/bru93q.wav
madplay -z /media/card/mp3/*  /media/card/mp3/*/* /media/card/mp3/*/*/* /media/card/mp3/*/*/*/*

Put this into /usr/share/applications/hack-mp3.desktop:

[Desktop Entry]

I hope I made and error, but it seems that battery was empty after 6 hours of mp3 playing :-(.

13th May 2007

12:25am: Some horsey pictures
While debating differences between US and Europe, I was called crazy because of this hack:

And here are some other "interesting" pictures:

Pony that thinks he is a dog.

Plus one old, but non-working trick:

Enjoy the pictures! (You can find many more in my czech blog.)

10th May 2007

8:55pm: jPhone, openmoko, opensource and Sun
Hmm, so Sun plans Java-based cellphone, based on Linux kernel. That's a good news. Apparently, they are prototyping on openmoko, see this article. That's good. But they plan to keep it closed-source. That's stupid. Sun still had not learned anything. (I'd still like to see the demo.)

Plus, they want to create something called JavaFX script, probably to replace javascript... Somehow I doubt this is good idea, javascript should have no problems on mobile devices, and if you need to redesign your web-pages for JavaFX script, anyway... you can just use simplified javascript.

Ouch, and it seems that even Sun now realized that Solaris is irrelevant old toy. This is probably good news for Solaris users, because they may get an operating system that will be actually usable -- w/o installing ton of GNU packages by hand. But perhaps... rather than trying to create Linux look-alike, they should just use the real Linux?

3rd May 2007

2:01am: Decoding hammerhead gps has some info, and I've uploaded some scripts (hh.c and hhdecode) to Some interesting packet structure seems to be there:


...looks like "LEN20" packet are when ephemeris data is decoded by the gps.

2nd May 2007

1:18pm: Map of Prague -- help wanted
Using sattelite imaginery, doing basic map of Prague streets was pretty easy. Now.. we need interested people to fill in the names of streets into the openstreetmap. Pencil and paper is enough to do that, no GPS needed.

You can of course get current data at Prague currently looks like:

All the gray streets need their names/classifications filled in.

On a related note, there's some development on routing software for linux going on, near the qgis project. It would be nice to have data to test on :-).

26th April 2007

12:13pm: O2 helps fraud
So I had a call on landline. "Hello, this is important message... you have won $10000... call (very expensive number) to collect".

I called O2 to complain. They agree it is fraud, but are unwilling to disclose number that called me, and are not willing to tell me where do money from (expensive number) go... Which is actually not that surprising. If I called the fraudsters, O2 would split money with them.

Great, one more reason to disconnect the landline, and in the meantime, I hope O2 bankrupts.

11th April 2007

12:04pm: native-compiling kernel on olpc
...was apparently bad idea, it takes 3minutes just to do make (when everything is clean), and 3hours to compile moderately-big configuration of kernel. Oops.

Plus it looks like I'll have to update everything to get working suspend-to-RAM. 300MB download is going to take a while... (I have not figured out how to do "update the ROM, only".)

On the openmoko side... I had my own kernel running there at one point, but it was stripped down way too much. Now I was able to patch my linux-z tree with _everything_, but result unfortunately does not work on openmoko.

29th March 2007

11:57pm: Another kitchen appliance trying to commit suicide
Long time ago, we had hot-air oven... It was obviously controlled by CPU, it even had reset button (labeled "clear"). When nearby appliances were turned on/off, its CPU would reboot, proving its power supply was pretty flakey. One night, this oven turned on the heating without turning on the fan, cooking itself. (We have seen it do weird once stuff before, fortunately we were able to stop it back then).

Yesterday, microwave oven tried to set itself on fire... and I was partly responsible. This beast is really misdesigned, one knob to select microwaves/gril, second knob to select time. Microwaves are _way_ more powerful than grill. To make toasts you need to gril for 5 minutes at max power. Unfortunately 5 minutes of microwaves at full power is enough to make toasts catch fire, as I found out yesterday.

The UI part of this microwave should definitely fixed, and I guess some safety mechanism would be nice, too. Like, how hard would it be to place few drops of water in sealed container, with temperature sensor, in microwave, and shut down when it goes >100C?

On topic of GPL violations...

I believe we should start suing obvious violators. If someone distributes linux kernels without written offer for source code, and they do not reply to friendly "I want to see the sources" warning, they deserve lawsuit.

Next step are vendors of proprietary modules that took GPLed module as an example and derived from it. They deserve warning, then lawsuit.

That should send reasonable "don't mess with GPL" signal, while really only hitting the bad boys.

22nd March 2007

2:41pm: Note to self: getting bluetooth to work on spitz
...editing of /etc/pcmcia/bluetooth is needed; 2.6.16 kernel/modules work okay as distributed. One entry needs to be added, but old/invalid entry needs to be deleted. Starting syslogd helps with debugging.

20th March 2007

8:50pm: Yearly pm flamewar just came to the linux-pm list...
...and this year it includes pearls such as:

You interact with hardware entity when interacting with a clock,
so interacting with a corresponding software entity by appropriate
driver of software entity is the only meaning for now.
Making software entity to be cross-platform also makes sense. it only me, or does it sound like product of automatic-technical-paper-generator?

19th March 2007

1:20pm: GPRS working on openmoko
After _long_ fight, I got GPRS to work on openmoko (with great help of Jiri Kosina). Problem turned out to be... you actually need to pass username/password to the GPRS modem to get the link working. Ouch. I'll create page on openmoko wiki describing how to do it.

15th March 2007

7:28pm: tui now can call on openmoko
My text-mode phone-hack ( can now call on openmoko... adding missing "telephone" functionality. I guess I should add some kind of ringing, and I may be looking at something almost usable.

I was trying to test batery life on phase-0 hardware, and it was <10 hours; phase-0 hw is known broken, but <10 hours is still too low. Plus I found theres voltage in the headset even when openmoko is "off" -- which is strange.

11th March 2007

11:20pm: Openmoko: I hate EABI
...or whatever it is that causes my binaries to immediately fail with illegal instruction on openmoko.

/scratchbox/compilers/arm-gcc-3.3.4-glibc-2.3.2/bin/arm-linux-gcc --version
arm-linux-gcc (GCC) 3.3.4 (Debian)
Copyright (C) 2003 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO

...and I was thinking I could get my text-mode phone interface ( working on openmoko :-(.

10th March 2007

12:57am: One Laptop Per Developer
I wrote this down so I guess I should post it somewhere...

I got beta version of one laptop per child to play with, here are some
impressions. (This is beta hardware, so 'reviewing' it is not quite

(insert photo of "keep away from children" bag it came in)

It is pretty much impossible to open the lid... it took me few minutes
to figure out. You have to open the antenas first (it is also
unobvious how to do that), then it is possible to open the
lid. Unfortunately laptop has no embossing to make it easier. It gets
worse; if you move antenas not enough, lid is locked and impossible to
open. If you move them too far, they open the lid for you (wow),
unfortunately they do not seem designed for that, and it looks like it
would damage them. (Issue seems to be in the bugzilla already, hope that gets changed)

Battery is nice and small (will have to figure out the voltage),
connected by three wires. Unfortunately, it is about .5mm smaller that
the case, so it moves there a bit. I guess that can be fixed by soft
sticky tape? (I guess I should just hack my hw).

SD slot is nice (and works!), but it is very hard/tricky to insert the
card... and it is impossible to remove it. You just can't do that,
without using some sharp tool and damaging the card. Better place for
a slot would be nice. ...hmm, it actually works much better with mmc
card. It fits in the slot, so the slot's sprint allows you to remove
the card, too. Seems like my SD card is somehow too big for olpc's
slot?! Even inserting it is hard.. it works okay in other hw, so it is
probably too small slot. Aha, and MMC card can be inserted both ways,
appearing to be inserted properly each time. Bad. (Aha, I learned how
to insert and remove SD card. You have to insert it very straight, and
push it all the way to the latch. Then press it some more for removal). (It is in bugzilla, too).

Display is _really_ cool. Keyboard is not too good, but I guess that's
price for its weatherproofing. (Keyboard is obviously
designed for children, and it is toy-like. Do not expect to type fast
on it. Maybe it is even worse than zaurus keyboard, because big keys
like enter do not always react correctly. I guess that key click sound
would help a lot?) The keyboard even has a frontlight, wow. (Should I add my wish for keyclick somewhere?)

I did not figure out how the touchpad is supposed to work, only middle
area does, and there's nothing to tell your finger that you are
outside the working area. Something on the touchpad, so that you can
feel where the active area is, would be very nice. Perhaps I should
just place a sticky tape over non-working areas? Ouch and touchpad
makes mouse jump around sometimes. ... aha, if you press the "outside"
area hard enough, it will actually detect a click. (What to do with this one? Being able to feel going out of capacitive area would be nice.. is it feasible to do that somehow?)

Hmm, touchpad senses my finger even when I'm not touching it. (Hmm, ALPS. Never seen good ALPS touchpad, and this is not an exception).

Machine boots and works, but Sugar is presently almost unusable -- for
me, anyway. Software is very non-intuitive with someone used to linux,
and it is way too slow for nice. I guess I'll have to figure out how
to get OpenEmbedded running on it. (Any other suggestions what to run there?)

Firmware is "interesting" and takes a bit long to boot. Guess I should
start getting suspend to work :-). (Actually it works ok.)

Plus sides: it has no moving parts. Charges from 12V. Slightly smaller
than thinkpad x60, and can probably survive more abuse. All the hw is
supported by linux. Digital camera is cool. (Auto-adjust screen
backlight based on digital camera input?)

Ouch... screen... It is nicely readable even in almost direct
sunlight. Unfortunately machine is white, so if you go to the direct
sunlight, case will reflect sun just to your eyes.

It would be nice to include some hint that tells user which way it is
okay to swivel the screen. Screen only swivels in some positions,
which is not quite intuitive.

Ok, enough ranting. It is actually quite impressive machine.

26th February 2007

2:47pm: Thinkfinger
Me and Timo had a short talk about fingerprint scanners on Fosdem, and I had a talk with Stefan on suspend. Based on reactions in this blog, I expected fingerprint talk to be crowded, but it was actually okay. Talks should be online at , as swsusp2007.odp, and thinkfinger.odp.

Anyway, that long-standing bug where thinkfinger did not work on half a machines should be now fixed (thanks to Timo), just download latest code from sourceforge.
10:40am: FOSDEM, and wonders of CYA security
FOSDEM in Brussels was nice. Air trip there was uneventful; I missed
'bomb' on the way there by few hours, and bottle of water was
confiscated from me.

I decided to take a trip from central station to hotel by foot; and
wow Brussels looked cool. I did not realized I was passing through the
nicest parts of city at that point...

IBIS is nice small hotel... advertises "wireless internet access in
public areas"... which in their version of english means "you can pay
orange to access internet". Hmm, in that case stables in Zernovka have
"wireless internet acces in all the areas, and surrounding woods,
too"... you can pay eurotel to get your gprs working there. At least
they did not have minibar armed with microswitches.

Airtrip back was uneventful, too. Another bottle of water confiscated...
only at home I realized I was traveling with pocket knife all the time :-).

16th February 2007

12:21pm: Yes, kde uses slaves
(this is reaction to prejudiced article at free software magazine. Read it for some good laugh...)

...and it probably also kills them from time to time. You should really switch to Gnome.

You now, unix is a cruel operating system, sometimes parent kills its children, and what it worse, it sometimes turns them into zombies. I guess you should really go and use politically-correct system from Redmond.

Or maybe you should go and create your own politically-correct distro :-).

29th January 2007

11:53am: Infineon bluetooth trouble, and digital cameras
Dave: your lazyweb results are here. You probably want to get ultrazoom camera (with digital viewfinder). Some of those beasts have pretty interesting manual controls, and are reasonably fast, too.

Now.. does anyone know how to properly initialize infineon PMB8760 bluetooth module? I'm trying hciattach -s 115200 /dev/ttyS0 csr 230400 (with different speeds), but have no luck. And infineon's web pages ( does not seem to contain anything interesting :-(.

Plus, when I try to google, I'm getting pages from my own blog and/or from all the places where it is mirrored over the network. Is there way to tell google "give me something about , but not stuff _I_ wrote?"? I guess not :-(.

27th January 2007

12:40pm: ppp still unusable on sx1
Something strange is going on with ppp on sx1. It somehow connects,
and small packets tend to flow pretty much okay, but big packets have
less chance of getting through. That's bad.

Lowering gsmmuxd's frame size and pppd mtu/mru helps... somehow, but connection is still unusable for TCP. I tried compiling my own gsmmuxd, but was not able to hook it into target system properly, yet.

Plus, I found out that ipc_* daemons are neccessary for sx1 to keep talking to me after PIN entry...

17th January 2007

4:07pm: sx1, ppp and bluetooth
I tried ppp again today, and it worked way better -- as in ping actually working. Strange -- maybe it has something to do that I was not logged in over USB cable today?

Bluetooth... could not get that one to work yet. I enabled support in kernel, should have right userland, but did not seem to get it to work. SX1 should include Infineon PMB8760 on ttyS0, but after some play with hciattach I was not able to get it detected. Any ideas what proper commandline for PMB8760 is?

10th January 2007

12:40pm: sx1: first ppp connection
Good news is that ppp now works for me on siemens sx1... and I implemented SMS reading few days ago. Bad news is that it looses 33% packets for some reason... and I'm not sure how to debug that one.

64 bytes from icmp_seq=39 ttl=55 time=621.0 ms
64 bytes from icmp_seq=43 ttl=55 time=821.1 ms
64 bytes from icmp_seq=44 ttl=55 time=621.0 ms
64 bytes from icmp_seq=46 ttl=55 time=701.0 ms
64 bytes from icmp_seq=47 ttl=55 time=2540.9 ms
64 bytes from icmp_seq=48 ttl=55 time=1541.4 ms
64 bytes from icmp_seq=49 ttl=55 time=561.5 ms
64 bytes from icmp_seq=50 ttl=55 time=641.3 ms
64 bytes from icmp_seq=51 ttl=55 time=601.3 ms
64 bytes from icmp_seq=52 ttl=55 time=601.3 ms
64 bytes from icmp_seq=53 ttl=55 time=781.3 ms
64 bytes from icmp_seq=54 ttl=55 time=761.3 ms
64 bytes from icmp_seq=55 ttl=55 time=741.3 ms

--- ping statistics ---
56 packets transmitted, 37 packets received, 33% packet loss
round-trip min/avg/max = 511.1/798.4/2540.9 ms
~ #

2nd January 2007

1:50pm: Mobile Java now free software
Thanks to Sun! And yes, it actually makes sense; mobile java is the only programing interface for 90% of phones out there. It also makes free software for phones closer to reality...
Powered by