pavelmachek's Journal

Recent Entries

You are viewing 25 entries, 75 into the past.

5th September 2006

12:08am: Daniel Drake offered thinkfinger hosting...
...thanks, Daniel. And good luck with that biometric effort.

SUSE Czech celebrated its anniversary yesterday... with a laser game. Playing doom in real life was quite nice, but I guess I liked paintball a bit more. In paintball you at least know you were hit (and have some idea who/how hit you).

31st August 2006

3:25pm: collie charging now (somehow) works
...so if missing charger was preventing you from testing 2.6 on collie, now is the time. Tree is available using git ("linux-z") from kernel.org.

On a related note...any ideas how to run spitz without li-ion battery? Hardware can certainly do that, and I'd like to power spitz from 4xAA batteries. I already fried one charger during experiments...

25th August 2006

3:59pm: fingerprint scanner: help wanted
So... I have fingerprint driver that works for me (see previous livejournal entries), and works for some other people, but not to all of them.

I guess I need one of affected people to fix it... Verify it does not work for you, then get binary-only version working, capture dumps, and figure out what needs to be changed. (I guess I can help with last two steps).

If someone is willing to maintain fingerprint scanner app, let me know, too. There's plenty of work to do, and I'm not really using it myself, so I'm not too interested.

3rd August 2006

3:15pm: Smart knot for smart (?) horse
There's a very nice mare called Hawkey in Zernovka stables. Unfortunately, she has few drawbacks. One is that she sometimes tries to attack people coming near her. Unfortunately, she only ever does that if you are not holding her, making it impossible to explain her that such behaviour is not welcome. Then she likes to quickly move sideways when she senses danger, making it "interesting" for a rider. (Of course, her danger-sensing has a bit too much false positives, to make it more interesting).

Anyway, I guess no knot is going to solve that, but there's one more problem. She generally tends to stand where you leave her, but when noone is paying attetion, she of course tends to move to the nearest grass. If you tie her somewhere using leading rope... it usually is okay... until she senses danger, tries to move back, senses un-comfortable pressure at back of her head and panics. Usually, halter, rope or something breaks and she is free. If not, she'll retry.

I've created leading rope where critical part is made of few centimeters of smaller rope -- hoping that I'll only have to replace those few centimeters next time something bad happens, but it got me thinking: it would be more elegant if even those few centimeters did not have to be replaced.

"Smart" knot would help: something that holds tight when the force is less than, say, 1kN (~100kg), but lets go when force is over 1.5kN or so. I created some strange knots that have similar properties, unfortunately for way lower forces, and I think that my creations would untie themselves over time.

Does practical "smart" knot exist? I guess it would be useful for more than just horses...

31st July 2006

1:39pm: hdaps documentation
IBM has an article at their developerworks website, describing how to use hdaps sensors in their thinkpads to enter "knock codes". (Pretty useless and potentially harddisk damaging feature, but hey, it looks like nice toy).

Unfortunately, the same IBM did not provide documentation to the sensors, and drivers had to be reverse-engineered from some IBM person describing code in plain english. We have half-working driver (does not work for my x60) that can't be properly supported because we have not seen the docs.

And now IBM uses the same (undocumented, reverse-engineered) driver to show how cool they are. Am I the only one to find it insulting?
1:54am: USB sucks
First I thought it is Linux that sucks. We did some quick measurements
with AC ampermeter; Windows ate 10W at minimum backlight and Linux ate
-- wait for it -- 15W during installation, 17W during runtime. Ouch.

(To put it into perspective, that means 7.5 hours with extended
battery on Windows, versus 4.4 hours with Linux/GNOME).

I promptly deleted both Windows and GNOME, but still, on console, with
self-compiled kernel, I was getting power consumption in range of
14.6W (5.1 hours). I started to investigate WTF is going on... then
realized I have this small fingerprint reader on USB.. and that
probably forces USB to stay on and wastes power.

And yes I was right. USB removed, and we are down to 11W (6.8
hours). So what does USB suck? 2 hours of my battery life...

30th July 2006

11:42am: x41 fingerprint scanner testers wanted
Fingerprint scanner now works for me on thinkpad x60, but according to the records it is broken on x41. If someone could install it / try to debug it, that would be great. Debugging is quite easy: just dump sequences -- kernel has support for dumping everything to syslog, and compare what closed driver does with open source version... then fix the open version to match :-).

Another nice test would be: create .bir file with closed driver, remove len-=2 hack from open driver, and try if it recognizes your finger.

25th July 2006

12:12am: thinkpad X60 fingerprint scanner works (should work on x41, too)
Thanks to vsu_alt, that crc really was udf-crc. So now fingerprint scanner works for me. Download thinkfinger.c and follow instructions in comments.

Some good place to host this would be nice (I guess that it is too small to be worth of sourceforge.net project).

Ugh.. and some amusing email reached my inbox. Apparently IRS wants to give me $64, or something. Someone is phishing at http://ns0.msl.ne.jp/~takeshi/%20/%20/index.html ... that redirects you to nicely-done phishing formular at http://ap.ro/~gutandgross/ . How do you shut such bastards down? Or are they only victims of some worm? (Probably should be shat-down anyway). (Be very careful when visiting above urls with anything other than telnet XXXX 80).

24th July 2006

7:05pm: thinkpad fingerprint scanner -- sources and help wanted
So... fingerprint scanner seems to work, with one -- hopefully last --
glitch. Protocol seems to include 16-bit checksum, and I do not know,
how to compute it. Without that, I can only replay packets I seen
before. (Still, that allows me to check my own fingerprint, and enroll
fingerprints).

Checksum seems to be in the last two bytes, and here are some
sequences that otherwise differ only in 1 nibble. Any ideas? (You can
also see it begins with "Ciao" :-).

43 69 61 6f 00 00 08 28 05 00 00 00 00 30 01 5e 20
43 69 61 6f 00 10 08 28 05 00 00 00 00 30 01 c8 b4
43 69 61 6f 00 20 08 28 05 00 00 00 00 30 01 53 19
43 69 61 6f 00 30 08 28 05 00 00 00 00 30 01 c5 8d
43 69 61 6f 00 40 08 28 05 00 00 00 00 30 01 44 52
43 69 61 6f 00 50 08 28 05 00 00 00 00 30 01 d2 c6
43 69 61 6f 00 60 08 28 05 00 00 00 00 30 01 49 6b
43 69 61 6f 00 70 08 28 05 00 00 00 00 30 01 df ff
43 69 61 6f 00 80 08 28 05 00 00 00 00 30 01 6a c4
43 69 61 6f 00 90 08 28 05 00 00 00 00 30 01 fc 50
43 69 61 6f 00 a0 08 28 05 00 00 00 00 30 01 67 fd
43 69 61 6f 00 b0 08 28 05 00 00 00 00 30 01 f1 69
43 69 61 6f 00 c0 08 28 05 00 00 00 00 30 01 70 b6
43 69 61 6f 00 d0 08 28 05 00 00 00 00 30 01 e6 22
43 69 61 6f 00 e0 08 28 05 00 00 00 00 30 01 7d 8f
43 69 61 6f 00 f0 08 28 05 00 00 00 00 30 01 eb 1b
43 69 61 6f 00 00 08 28 05 00 00 00 00 30 01 5e 20

I did some experiments with crc16, and it does not seem to be
this.. or maybe I just need to use some strange initialization value,
or not checksum over whole packet, or something?

Any ideas?

(Oh, and if you want to play with the software, see my outgoing
directory
. Interesting files are thinkfinger.c, little.bir,
little.log and sequences.clog).

22nd July 2006

3:57pm: thinkpad fingerprint scanner...
...is a pretty clever hardware device, that does all the processing itself. That explains why fingerprint can be used instead of power-on password, and means that device is reasonably easy to handle.

After few surprises (every packet starts with "Ciao"), I'm able to verify my own fingerprints (replaying traces of binary-only blob). Enrolling fingerprints works, somehow, too, but I'll still need figure out packet format so I can use newly-enrolled fingerprints, too.

Now, question is "is there suitable software repository somewhere"?

21st July 2006

4:45am: Kernel summit, OLS and fingerprints
Kernel summit was nice, as expected, there was some flamewar about
swsusp. I also expected huge flamewar about AppArmor, and yes it
happened, but I could not participate -- Linus and Christoph did all
the flaming.

At the beggining of the OLS, I realized why I was flamed for swsusp
not working: it works in Fedora -- in about 50% of cases :-(. We
debugged it a bit with Peter Jones (LVM really makes debugging swsusp
"interesting"), tried to do experiments with SuSE10.1 (known to work
more than 50% times :-), ended up physically swapping harddrives, and
yes, kernel compiled by me did work as expected (but it does not use
LVM and many other goodies). Hopefully Peter can debug it now.

I got a new x60 to play with, here are first results: Suspend to RAM
and to disk seems to work, provided you apply AHCI fixes (see
lkml). It is fairly nice machine, unfortunately it still uses the CPU
fan even when idle. Unlike x32, weight on this machine is on the back,
so when you attempt to open the lid single-handed, you lift the front
of the machine, instead. It also makes machine seem heavy when lifting
at the front area (as I was used to).

Oh and you need to disable checksum code on e1000 if you want your
ethernet to work.

x60 has nice fingerprint scanner. I could get binary-only modules to
run that one, but... I would prefer not to do that. Does anyone did
any work at reverse-engineering that beast? I did a little googling
but could not find much.

13th July 2006

12:46am: Canada: visa and what to do in Ottawa
I hate Canadian embassy. They do annoying personal search at entry, so they obviously care about _their_ security... and completely ignore yours. How hard is it to get someone else's passport? Very simple. You only have to know his name.

Anyway, does someone have any ideas what to do in Ottawa? I'm not sure if I'll be able to move outside area serviced by public transport... Some horses would be nice, but I guess that would require a car :-(.

And... I actually managed to get battery sensing code into quite usable state on collie. I even measured internal battery resistance (~1Ohm, unfortunately it changes with battery charge :-(); that should enable better measurements with different backlight levels. It would be nice if someone calibrated temperature sensors. (Changes should get into linux-z git tree overnight).

12th July 2006

2:28pm: Why-chroot-on-spitz
First... I'd like to say big "thank you" to openzaurus team... it is really great piece of software, making zaurus machines usable.

OTOH I like Debian/arm and am comfortable with it; apt-get works nicely, and I know that it is possible to update such distro easily. Also it contains software I use -- like gpsdrive. I do not think openzaurus should try to replace Debian/arm.

Also, by using two-installations setup with chroot, it means I can easily update openzaurus part while keeping my data intact.
1:05pm: Collie charging
I searched web a bit to find what li-ion thresholds are. I ended up with

/*
{ 420, 100 },
{ 417, 95 }, means it will report 100% between 418 and 420
*/

/* It looks like these values are in deciVolts */
struct battery_thresh collie_battery_levels_acin[] = {
{ 420, 75}, /* 75% full and 100% full li-ion battery can not be told by voltage, but by amps... */
{ 417, 70},
{ 415, 65},
{ 410, 60},
{ 405, 55},
{ 400, 50},
{ 390, 35},
{ 385, 20},
{ 375, 7},
{ 360, 3},
{ 340, 1},
{ 0, 0},
};

/* See for example http://www.kokam.com/english/biz/rc.html for
* voltage/capacity characteristic. I assume it is going to be
* reasonably similar to li-ion used in collie.
*
* Collie with frontlight level 2 will last ~2.5 hours, so we are at
* ~0.5C. */
struct battery_thresh collie_battery_levels[] = {
{ 395, 100},
{ 390, 90},
{ 385, 85},
{ 380, 80},
{ 375, 70},
{ 370, 60},
{ 365, 50}, /* From sharp code: battery high with frontlight: 368 */
{ 362, 40},
{ 360, 30},
{ 358, 20}, /* From sharp code: battery low with frontlight: 358 */
{ 356, 10}, /* From sharp code: battery verylow with frontlight: 356 */
{ 0, 0},
};

If any has any ideas where to get better numbers... please let me know. Also it would be interesting to know how much different parts of collie take; all I know is this pretty old list; not sure about its accuracy.

132mA base system
+103mA for 25% backlight
+155mA for 50% backlight
+270mA for 75% backlight
+450mA for 100% backlight
+284mA for audio + cpu (mp3 playback)

Comments?

4th July 2006

3:14pm: Battery status now works on collie
Thanks to Dirk for mcp fix, then I added some delays/repeats, and now battery reading seems to work. Now I'll have to figure out some percentages.

Congratulations to your new machine, Harald (zaurus sl-3200, if you do not read his blog). I hope you like it... If you install gpe on it, you can run full debian/arm distribution in chroot, with X still working. It is very convenient, but I guess it is quite far of what you are likely to get on cellphone...

11th June 2006

8:56pm: Zaurus zImage
I got some requests for 2.6 zaurus zImage... it should be in http://atrey.karlin.mff.cuni.cz/~pavel/outgoing/zaurus/collie.5.zImage . Now... does anybody know how to compile 2.6-compatible gpe-based initrd for collie? (Yes, I should really learn bitbake).

10th June 2006

12:16am: Collie touchscreen is now usable in 2.6...
...with very dirty hacks. Look at linux-z tree.

8th June 2006

10:52am: oz funnynes
.../dev/hda2 has been mounted 260 times without being checked...

Okay, so I have oz 3.5.4.1-rc1 on spitz here. Few rants:

Kernel messages may be ugly, but splashing them with blank screen is very bad idea. Outdoors, you get no feedback that power button worked until init boots. No, staring at blank screen is not nice. (Indoors, you can tell that machine is doing something because backlight turns on).

It would be nice to include fsck in initscripts. I know that fscking PDA is "interesting", but it is polite thing to do. Besides, my /dev/hda1 tells me:

.../dev/hda1 contains a file system with errors, check forced.
Inodes that were part of corrupted orphan linked list found. Fix

not including periodic checks is one thing, but ignoring "needs check" flag is positively bad.

7th June 2006

12:05am: Sharp Zaurus SL-A300
My new coworker, Erik Hamera, found old A300 in second-hand-shop somewhere, and after long fight, even managed to make it working (some soldering iron was involved).

Unfortunately, that beast is not supported by openzaurus and very little useful information could be found on the web. It is small compared to collie (sl-5500), and so it lacks keyboard and compactflash slot, but it looks positively sweet.

Now, openzaurus support was planned at some point.. I assume it is known how to flash this beast? Any test-kernels available somewhere?

22nd May 2006

10:18pm: Olympus c-765 user interface...
...is horrible. I thought my camera had broken flash. Not so, I just selected "hispeed multi" mode (which makes camera react at useful speed), unfortunately which disables flash in pretty un-obvious way.

Olympus, could you do some user testing perhaps?
12:11pm: "Fan failure is critical" nonsense
People seem to be scared when their fan fails and/or when their CPU temperature reaches 80C. Don't be, it is okay:

a) ACPI specifies that hardware should protect itself from damage. If CPU temperature reaches 95C or so, machine is shut down _by hardware_. If operating system is able to interfere with that (it should not be), your hardware was trash in the first place. This failsafe actually tends to work on most machines. I tested it multiple times by sticking piece of paper into the fan, then loading CPU with kernel compilations while machine was covered in bad. And machines actually tend to survive that.

a1) okay... CPUs survive that, but watch your harddrive temperature. If it happens once in a while, it is probably okay, but running machine in this state for 8 hours is a bad idea. I did it few times and harddrive did develop some bad sectors (old HP omnibook).

b) CPUs are specified up-to 95/100C in common cases. Look at the datasheet. It does shorten the life of the CPU... but your CPU is still specified to run at 95C for three years in a row. So you can safely ignore that.

Now... I had some problems with overheats... but I actually used machine with failed fan for a year+. And then I had a funny failure where two notebooks were sitting on one another, and the top one overheated (compaq evo), deforming the case of hp 5000nx below it. Fortunately the case returned to normal after cooldown.

So... don't be scared. Ouch, you can sometimes get to a state where machine will not boot after bad overheat. BIOS actually sees too high temperature and refuses to let it power up. Let it cool for 15 minutes then try again. (I've seen this too few times.)

13th May 2006

10:24pm: Horse stepped on my little toe...
...and the toe is now broken. I'll have to find some way of moving myself. I already know horseback is okay, but it is little hard to move through city on horseback these days. Car is pretty "interesting" to operate: manual transmission really needs both legs. Not sure, maybe bike will work okay?

(My "horse" blog, in czech, I'll get picture of offender there</a>)

11th May 2006

2:41pm: How to charge nokia 6230
Heh, by accident I found out that Logitech's laser mice charger is acceptable voltage (8V, 550mA) to charge nokia, and connector is compatible, too. Plus laser mouse charger is 100V compatible (unlike nokia charger) and much smaller/lighter, too. Good.

9th May 2006

11:52am: How not to write an operating system
Andrew S. Tanenbaum is at it, again, with next part of "how not to write an operating system" series.

Its true that most bugs are in the drivers, fortunately driver bugs usually bring the system down quickly, and so are easy to debug. Also he conviently misses to mention that each user runs less than 2.5 million lines of code -- because he only has very small part of all possible hardware. He proposes few solutions, and first of them might actually be useful for debugging: protect kernel memory at the driver entry point... I'd like to see the patch on linux-kernel list, and preferably also list of bugs it discovered.

Other ideas are basically "add virtualization to separate drivers"... oops, and debug all the hard bugs in virtualization layer, too?

Clasical microkernel approach... and then goes to say it performs reasonably because it can compile itself in 6 seconds. Very wrong benchmark... how long does it take to compile linux on that machine would be reasonable benchmark. But I guess his "super reliable" operating system would probably die before finishing that. (Or perhaps his make process would die because of bugs in emulation; end result is the same).

Next idea is to rewrite os into java. Oops.

...all these approaches conviently forget that most devices (sound card, disk, video card, USB) do DMA these days, and machines do not contain IOMMU, so bad driver can still overwrite anything, and if you poke the buggy hardware the machine dies, anyway.

Oh, and that article actually mentions that "Protecting the kernel against malicious drivers is not a goal. The initial implementation was on Linux, but the ideas apply equally well to other legacy kernels.", yet trumpets security advantages in all that.

So, Andrew, please don't make my machine as reliable as my cellphone is. You know, my Linux machine actually works much better than my cellphone.
"
11:44am: Practical wearable computer, try #4
Try #4 -- Zaurus sl-3000c + Nokia 6230 over bluetooth + Fortuna GPS over bluetooth

Works nicely. Zaurus is great for email and GPS handling with
GPSdrive. 6230 can handle email, too (mujmail) and can handle GPS, too
(javaphone, see
navlet
). Nice combination; I'm only worried that sl-3000c zaurus
contains 4GB microdrive, and that sounds fragile.

Now... it would be nice to figure out how to do track saving
without zaurus, and to improve map displaying capabilities of navlet
-- I don't dare to take zaurus to horseback.

There are some updates on collie side, too:



Status



It boots, display and keyboard works, internal flash works with
extremely ugly hack, pcmcia works, backlight & leds work. Touchscreen
works somehow, but userspace filtering needs to be developed. Have not
played with MMC, IrDA or USB device, yet; I'd assume they don't
work. Battery charging is half-done and broken, so is battery status.

Collie will very slowly charge even without software support,
however, so all is not lost.

Powered by LiveJournal.com