Home

pavelmachek's Journal

Recent Entries

You are viewing the most recent 25 entries.

9th November 2009

9:35am: 5 years in jail for wrong bits of data
Is possible in the U.S.. Time to fix your stupid child porn laws? Guilty until proven innocent is stupid...

2nd November 2009

2:20pm: Debugging MMC is easier...
...if you have MMC card inserted. Oops. I added enough of registration infrastructure and GPIO support to dream that mmc controller is detected, but it is still not enough to get card recognized.
11:37am: Dream booting
With Brian's help, I got recent kernel to boot on HTC Dream. Patches will follow.

27th October 2009

11:15pm: umount: /mnt2: device is busy.
I hate this part of unix behaviour. I'm root, yet some forgotten bash in some xterm somewhere prevents me from unmounting device. Yes, lsof exists, and it often works, but... I hope we can get revoke support soon and introduce working unmount -f...

26th October 2009

9:10am: fastest clock
Gaining ten minutes in two hours tipped me off a bit -- that's too bad even for $3 clock.

It turned out that the clock can really keep time -- given "good enough" power supply. They were really designed with their small batteries in mind. Give them 2.4V (2x NiMH), and they gain time at 10minutes per two hours (and other glitches, like sometimes going into "time not advancing" mode, when seconds change but get reset to 0 when you stop watching them). Give them 3V (2x primary cell), and they fail to work, producing distorted, blinking display. Give them 1x primary cell, 1x NiMH, and they fail to work, too. But give them 1x new primary cell, and 1x almost empty primary cell, for 2.7V total, and voila, they actually start keeping time...

22nd October 2009

10:57pm: seriously crappy clock
...the clock just gained 10 minutes in little under 2 hours. That's way too much, even for cheap chinese stuff. Perhaps it does not like rechargeable AA batteries? What is going on?
10:33pm: crappy spitz, crappy clock

Well, I'm pretty sure it is not just emacs acting funny. I very probably have hw problems on my zaurus -- because other zauruses do not behave like this few times a day:

  CC      arch/arm/mach-pxa/spitz.o
arch/arm/mach-pxa/spitz.c: In function 'spitz_wait_for_hsync':
arch/arm/mach-pxa/spitz.c:413: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <file:///usr/share/doc/gcc-4.3/readme.bugs> for instructions.


And now I have some crappy clock, too. I got myself a keychain led-projection clock -- well for $3 so I probably should not complain -- with intention to make them run 24/7. (Many people are assembling them fromparts, like this, but I'm not enough of hardware hacker to do that.)

So I replaced tiny button batteries with rechargable AAs, thinking that hopefully it will work for few days... Well, I should have done the maths. Batteries were pretty much empty after few hours :-(... but I got nastier surprise: my $3 clock is gaining like 10 minutes a day :-(... which is even worse than clock in my notebook, loosing like 2 seconds a day.

2 seconds per day is bad, 10 minutes a day is unusable. At least I will not have to build proper power supply for the projection clock...

20th October 2009

10:16am: So I survived that peach
...but my zaurus is unwell.

pavel@toy:/usr/src/linux-rc$ emacs arch/arm/mach-pxa/spitz_pm.c
*** glibc detected *** emacs: corrupted double-linked list: 0x00482320 ***
Fatal error (6)Aborted (core dumped)
pavel@toy:/usr/src/linux-rc$ emacs arch/arm/mach-pxa/spitz_pm.c
Fatal error (11)Segmentation fault (core dumped)
pavel@toy:/usr/src/linux-rc$ emacs arch/arm/mach-pxa/spitz_pm.c


(This was with 2.6.31.2).

Emacs actually started on the next try. And yes, I get various weirdness from gcc, too. In fact, I learned to run overnight compilations as "time make; time make; time make", so that it finishes...

Are other zauruses broken, too? Is there some good memory test for arm -- besides gcc?

19th October 2009

12:41am: Peach
I ate peach. Single peach. In about 10 minutes, my lips shrank, and I started to feel pretty bad. In about 10 more minutes, they grew. Swelling? I wonder what happens next.

15th October 2009

4:11pm: Some Spitz / Zaurus C-3000 power answers
Ok, so I think I know what is going on with zaurus charging slowly when powered up: misterious "half charge" mode is actually used every time machine is not suspended.

That explains why it gets away with 1A wall charger -- when collie used 2A charger. Also... wifi card I'm using is nastier than I thought. It draws 220mA when active, which would be kind-of expected, but it also draws 70mA when not active. Ouch.

Plus, I got zipit z2 to play with. So far, I'm not too impressed. Yes, device is light and probably cheap, but... it uses obscure miniSD card format, and not even its keyboard works properly -- as soon as you start typing faster, it will loose keystrokes or confuse them. Not good for IM machine...

14th October 2009

12:13pm: Spitz / Zaurus C-3000 power questions
I did some measurements of spitz battery subsystem; maybe they are
useful for someone.

Unfortunately, concistent numbers are quite hard: longer/thinner
cables mean lower voltage and also lower currents :-(. I get quite
consistents 5V at power supply, but it goes down to 4.5..4.2V when it
reaches zaurus behind ampermeter. (Is zaurus even able to charge
battery properly from such low voltage?)

One big surprise was wlan CF card, eating +200mA when initialized.

I'm working on drivers/power/spitz_battery driver, and I'll need to
know conversion between ADC readings and milivolts; does someone have
those?

Does someone have better/more reliable/other power consumption numbers?

Idle, charging, no backlight, linux 2.6.26: 200mA @ 4.8V
                bl 1:                   310mA
                bl 10:                  315mA
                bl 20                   340mA
                bl 30:                  390mA
                bl 40:                  440mA
                bl 47:                  445mA
disk is spinning:                       +50mA
find /:                                +200mA
cat /dev/zero:                         +100mA
make:                                  +240mA

charging, powerdown:                    380mA..440mA
charging, ROM menu:                     550mA
D+M monitor, not charging:              170mA
D+M monitor, half charging:             280mA
D+M monitor, full charging:             480mA..550mA

Charging in ROM, from empty @ 8:35:     610mA
                              8:38:     555mA
                              8:45:     545mA
                              8:50:     540mA
                              9:01:     540mA
                              9:18:     530mA
                              9:36:     520mA
                              9:45:     505mA
                              9:51:     480mA
                             10:15:     365mA
                             10:48:     250mA
                             11:01:     225mA
                             11:31:     180mA
                             11:38:     170mA
                             12:48:      80mA, charger LED is off.

Measured @ li-ion battery.
ROM                                     <7mA
Linux 2.6.26 suspend:                   7.5mA, 10mA?!
Linux 2.6.26, fully running, charger connected: 50uA :-(
                                                100mA charge

5th October 2009

4:00pm: Horse safety
There are simple "gun safety" rules, repeated in small variations just about everywhere (from wikipedia):

1. All guns are always loaded.
2. Never let the muzzle cover anything you are not willing to destroy.
3. Keep your finger off the trigger until your sights are on the target.
4. Be sure of your target and what is beyond it.
—Jeff Cooper


Now... I'm looking for similar set of rules for horse safety, but it seems there is none. Of course some lists do exist, but they are long -- too long to remember or even to repeat to someone before riding lesson... plus I don't really accept all the "rules". (According to those, night canter without bridle is a no-no...). Is there short set of "rules" somewhere?

2:53pm: Looking for a Dream job
As you may have noticed, I have lost my pavel@suse.cz address some
time ago. I had nearly a dream job at suse: working on mainline, on
stuff that makes sense (mobile devices) during the nights, and riding
horses during the days.

Then I took long holidays, hacking Zaurus and Dream handhelds, and
taking some freedom out of free horses.

And now... I'm looking for a Dream job. Hacking kernel mainline kernel
from home would probably fit the bill, with bonus points if that is
some interesting hardware ... like HTC Dream :-).

(And yes, it also means that if you have a short term kernel/Linux
work you need done, you may want to contact me. My email address is in the MAINTAINERS file.)

29th September 2009

7:27pm: Good reason to avoid Palm Pre, tamagotchiware
jwz's fight with appstore should be warning for you.

And yes, there are good reasons to avoid nokia n900, too. Yes, Nokia considers their charging code too secret to release :-(.

Not that android is without problems; but at least you can get unlocked/flashable Google Dev 1. (And jailbreaking G1s should be very easy now due to kernel bugs uncovered in the meantime. That may work even on HTC Hero, check kernel versions.)

Not that android app store is without problems... the one that annoys me is that it fails to distinguish between free/opensource programs, and proprietary software costing $0.

While demo versions are usually marked properly (so I can simply avoid them), I managed to install applications I'd call tamagotchiware... locale and andnav2 fall into that category. They periodically "expire" -- usually at the moment when you need them and have poor network connection -- and force you to reinstall. Locale is particulary annoying, as it does not even let you go back to default settings.

28th September 2009

8:39pm: Don't wait for GSM Palm Pre
mickeyl suggests to wait for Palm Pre for openmoko-style hacking. Well, I don't quite agree.

HTC Dream (and similar) devices are already being sold for close to a year or so, and no, I don't think they are outdated. Kernel drivers are huge due to "interesting" architecture, but they are GPLed and getting them merged should be just simple matter of programming. (Please help :-) And we even have friendly (but severely overloaded) Google people to talk to...

17th September 2009

11:16pm: Easiest way to corrupt ext2/3 filesystem

Step 1: Okay, this is /data partition, I want my user to be able to manipulate it. chown pavel.users /data.

Step 2: Hmm, I created some backup directories here, lets move them to common place.

cd /data; mkdir backup; mv * backup


(do you spot it now?)

Step 3: Verify the filesystem is still ok... it is not:

root@amd:~# time fsck -f /dev/sdb2
fsck 1.41.3 (12-Oct-2008)
e2fsck 1.41.3 (12-Oct-2008)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
/lost+found not found.  Create? no

Pass 3A: Optimizing directories

Pass 4: Checking reference counts
Pass 5: Checking group summary information

/dev/sdb2: ***** FILE SYSTEM WAS MODIFIED *****

/dev/sdb2: ********** WARNING: Filesystem still has errors **********


Now... essentialy unpriviledged user "corrupted" my filesystem. Was I too stupid to give him access? Should missing /lost+found not be treated as filesystem error? Should kernel refuse users rm-ing /lost+found? Should maybe lost+found be named .lost+found, so the "corruption" is not as easy to trigger?

In retrospect, yes I should have expected it. But... did you spot it after step 2?

9th September 2009

12:57am: Zaurus battery charging
Besides my spitz C-3000 segfaulting about 3 times per kernel compile (do all of them do that, or is just mine affected?), I have some problems with charging. It seems to charge very very slowly why turned on. I learned to shutdown back to Sharp bootloader for charge, but I still forget sometimes.

I have been looking at battery code, and it seems it still leaves something to be desired. First, it goes from 100% to 60% way too quickly (and yes, it may be my cell just going old. OTOH, at this point, most of the cells are old :-). While compiling kernel, brigness 31, I unplugged AC power at 10:00. Before unplug, indicated battery was 219, 100%. Immediately after that, it went to 204, 78% and continued to decline rather quickly:

10:01				  202,  73%
10:04				  199	65%
10:06				  197	60%
10:10				  194	53%
10:13				  193	50%
10:14				  192	48%
10:19				  190	43%


Other problem seems to be in the charging code; it only checks battery temperature once, and only seems to stop charging if temperature is too high. But li-ions should not be charged in too low temperatures, either. (I have summer here just now, but could someone mamybe get temperature values from spitz at cca 5 degrees Celsius?)

15th August 2009

12:44pm: trivial weather nowcaster gets better, tee sucks
Trivial weather nowcaster (at SourceForge, CVS only, no file releases) is now getting useful -- as in predicting rain 15 minutes ahead :-). I also learned a bit of python on it; by using array manipulation properly, code sped up 50 times.

But... it shows how much
tee
sucks. I want to run the simulation with
nowcast | tee results
, so that I can both see the results and have a log file -- simulations are few hours in some cases. Unfortunately, libc buffering and tee conspire to make that unusable :-(.

13th August 2009

1:02am: Palm Pre: spyware preinstalled
Palm Pre has some spyware preinstalled ...and you get priviledge to pay for the spying, and for the crashes. With O2 Czech announcing "great new" pricing of GPRS/UMTS data ($1 per 10 minutes, only about 240times more expensive than Vodafone Czech), that would be about $1 per crash. Be careful when GSM version comes...

And no, having "privacy policy" does not make it okay. Even spyware comes with encrypted EULAs...

31st July 2009

10:57pm: Trivial weather nowcaster...
...for use with radar data in Czech Republic is now at SourceForge (CVS only, no file releases). It is very very slow (python, and stupid algoritms), but appears to work a bit.

Is there similar/better software available somewhere?

Most important missing piece is mapping from lat/lon to pixels on chmi's radar data.

26th July 2009

9:49am: wget and weather nowcasting
There are rahter nice data from weather radar at chmi.cz. I'd like
to use them to predict "next" picture and ultimately warn me when
storm is closing. Now...

Writing simple predictor should not be that hard, but surely someone
did that before me?

Is there an easy way to find place (by given lat/lon) in the picture?

Are there similar radar pictures available for more countries? (Something is on weather.org, both Poland covering big part of Czech republic and Slovakia covering southeast is available).

Also... I'm currently downloading pictures with
wget -r -l 1
http://www.chmi.cz/meteo/rad/rad_data.php
. Unfortunately, it
keeps downloading pictures it already has over and over and over again
-- with each update, new pictures are linked from the site, but many
pictures are already downloaded. Surely there must be a way to suppress that
behaviour?

19th July 2009

10:49pm: (not so) Bad luck with horses

It seems like Harald had some bad luck. Well I believe blown engine is not nearly the worst thing that can happen at 190kph.

Ok, so I was having fun, too. Few years ago, I was riding a young stallion, near the top speed at about 25kph (:-). We just went past small path to the right. At that point the horse decided that we should have turned to the right... and did the sharp turn, still near top speed, missing the path and running straight into the fallen tree. He attempted to jump over the tree at the last moment, but did not make it.

The tree was damaged a bit, but fortunately the horse was not, so I did not have to carry him home :-).

3rd July 2009

12:14am: According to yr.no, world is going to end tommorow
...at 14:00 Prague time.

.

([Un]fortunately, prediction was already updated).

Oh and BTW... weather predictions seem to be quite a way off in the last few days. Always predicting rain... and then there's a sunny day with storm in a distance. (Ok, yesterday we got storm very close, and we did not make it to the stables fast enough -- could not gallop with all the children -- so we were totally wet, but....) I guess storms are hard to predict?

28th June 2009

10:43am: Weather forecasting
As you may know, 'interesting' weather hit czech republic. Heavy rains
followed by floods claiming lives. What is more interesting, the
weather forecasting went crazy, too. yr.no normally works pretty well,
but these days, it oscillates crazily as model is recomputed with new
data. (fridays forecast basically said 'saturday mostly nice with
light rain in the morning, sunday rainy; saturdays forecast says
'heavy rain in the evening, only light rain on sunday).

Now, forecasts got better. We used to use simple 'sunday rainy at 20C'
predictions, then medard-online came where you actually see data from
the model. Unfortunately browsing them is quite time consuming. yr.no
helps there: you select place and it shows you 3 day of prediction on
graph.

But it still lacks a lot: it only tells you expected values for the
predictions, and not the expected deviations (aka the ammount of
certainity in the prediction). "Easy" way to solve that would be to run the simulation few times, slightly varying input variables each time; then dispalying both mean values and deviations calculated.

....but I'm told that's not feasible, because weather forecast is already computationaly intensive, as is. OTOH, weather forecasting is already repeated, once every few hours, when new data become available. The solution may be as easy as displaying the "old" predictions, too: if they are similar to the "new" prediction, the prediction is probably reliable. If not, well...

This should be all easy to modify/check if weather modeling software was open source and did not require super computer... is there such beast? (I believe model running medard is opensource, but fortran and the supercomputer is probably needed... plus where to get the source data?)

On the similar wein... extremely short term forecasts (< 3 hours) should also be extremely reliable. I'd really like android to use its gps, then warn me if the rain is coming... Maybe it is as simple as predicting cloud motion from weather radar? Is there maybe similar software/service already?
1:08am: android improvements
Android market lists both free software and closed source as
'free'. What is worse, demo versions are market 'free', too. It would
be nice to use 'free', $0', 'demo', 'adware' categories, because they
are very, very different.

On a related note, I now have (slightly stripped down) 2.6.31-rc1 booting on Dream, along with keymap that actually makes it useful. (Unfortunately, I used Zaurus userland, and some init script remaps keys back. I did a bit of grepping, but did not yet have the time to identify the culprit).
Powered by LiveJournal.com

Advertisement