You are viewing pavelmachek

pavelmachek's Journal

Recent Entries

You are viewing 25 entries, 25 into the past.

9th November 2012

2:12pm: Apparently you are no longer allowed to disagree
If you try to disagree with Valerie Aurora or Matthew Garrett, you are automatically anti-woman, because all statistics are flawless and anyone who disagrees with them is a heretic and should be burned. Too bad.

23rd October 2012

3:05am: gpsd for maemo (nokia n900)
I'm currently playing with openstreetmaps, n900 and rana to report when I exceed speed limit... And to get rana to run, I had to write my own gpsd. I did that, but I don't like the end result too much (it is gpsd.py). Is there better solution?

(And is there some right way to hack rana? I have bunch of changes now, but attaching patches to wiki discussion page is "funny").

21st October 2012

2:23pm: How to connect android over n900's internet connection
Stock android does not support ad-hoc wifi networks. Fortunately, you can replace wpa_supplicant (iirc) with hacked version.

n900 will not support tethering by default, but fortunately you can install kernel-power which has iptables enabled. And for a good measure I installed u-boot, too. Big thanks to Pali Rohar for doing the hard work.

7th October 2012

1:48pm: Units madness
These days I'm playing with Rana openstreetmap navigation. Even while hacking the kernel, I was wondering why programming languages have so bad support for physical units. In kernel, we have long jiffies, long time_in_msec, long time_in_usec, long time_in_nsec... while I always feld we should have jiffies time, msec_t time, usec_t time, nsec_t time; preferably with compiler support to warn and possibly automatically convert...

But situation in rana is much crazier than that. Data comes from location module. Horizontal speed in km/h, vertical in m/s. Ouch. Then it gets converted to knots... because that's what gpsd uses. Double ouch. Rana was written in U.K. .. so it uses mph. But max speed in openstreetmap is... back in km/h. Triple ouch.

5th October 2012

9:04pm: Nokia n900 to HTC Dream (aka T-Mobile G1) comparison
(To set straight rumors of me torturing hardware:)

HTC Dream (g1) did not even fall into the sea. But somehow it did not like salty/humid air...
Display would work for a few seconds after power-up. More if I stored it in very dry place. So I removed the battery and let it in the car on direct sunlight. Display now works.

I have both to compare now... and I must say I like Dream hardware more. Capacitive display on Dream is nicer to work with. Stylus on n900 is useful for old applications. Dream has better GPS, and triangulation using GSM that actually work. n900 has powerful flashlight. Dream has way better keyboard and is lighter. But n900 has operating system you don't have to fight with, and storage that actually works and is reasonably fast. (All SD cards I had were in "obviously broken" and "just very slow" range). Remote access was never-ending fight, it just works on n900.

Now, sl4a port would be nice. And there's no backup/recovery system on n900 AFAICT. I assumed backing up contacts/calendar from n900 would be easy... it is possible but not that nice.

It turns out
scp pavel@10.0.0.8:./.osso-abook/db/addressbook.db .
# https://github.com/runejuhl/N900-address-book-to-vCards/blob/master/parsecontacts.py
db_dump -p addressbook.db > dbout.vcf
./parsecontacts.py


Does the trick, but it took a while to figure out. (Does anyone keep tools suitable for working with Maemo phones?)

Tethering Dream was quite easy, lets see if I can figure it out with n900.

23rd September 2012

11:12pm: Current weather in Czech republic on Nokia N900
Hacking on N900 is way more fun that hacking on Android... so here's first application. When ran in Czech republic, it determines your location, and opens web page from CHMI with current rain & short term forecast. It is in TUI repository.

(Check out CHMI's nowcast here.)

21st September 2012

10:40pm: Documenting a crime should not be a crime
Current laws are simply broken.

12th September 2012

9:36pm: Yachting on Ari
Sailing in chroatia was fine... everyone survived. We went on Palagruza island on my first trip as a skipper. One odd thing was that Garmin GPS actually showed Palagruza island shifted by about 200 meters. Rest of places seemed to be ok...

Oh, and one day we tried to rescue inflatable dingy (unsuccessfully). I guess that's why Queen Victoria refused our offer for help on the next day ;-).

Unfortunately, my HTC Dream (aka T-Mobile G1) did not seem to survive the sailing. Screen blanks after few seconds of use. If I leave it in hot car, screen will blank after few minutes of use. I guess there's some salt inside...?

So I got Nokia n900 to play with. It is a bit big, but at least it has X running there.

24th July 2012

12:17pm: TI Chronos: is someone still working on it
I ported my Chronos emulator to OpenChronos code base... but it starts to feel like noone is developing on Chronos any more.

And another weird thing. The "remote mouse" ("ACC") control... did button clicks ever work for you? I believe I remember them working, but they don't now, and either the code in Chronos Control Centre is very confusing to me, or it just does not emulate clicks at all.

Ideas? Developers? Mailing lists? IRC?

17th July 2012

12:45am: u-SD followup, chronos
So... u-SD cards do work better with just one partition, and if you want to put anything but single DOS partition on u-SD card, avoid Kingston cards. Sandisks seem to work.

TI Chronos may be cool... but it seems like it is 30 years old technology. See historical Seiko watches. And yes, alphanumeric display would be useful.

And yes, that means that I do have some ideas what to do with TI chronos to make it more usable. In mychronos project, emulator is implemented (now with SDL output, thanks to metan), and I'm playing with user interface.

Major UI problem on Chronos is that the two lines of display are controlled separately. So... you can select that you want to display height and "SYNC" message. Or variometer and temperature. (But variometer will not work in this case). In mychronos firmware, I make it behave like traditional watch: just one mode. Where there would be unused line on display, I display time... it is watch after all. Now, I'll just have to fix all the glitches, and probably merge it with OpenChronos project. [Perhaps someone willing to help is reading this? Testers and "yes that would be nice" messages would be helpful ;-).]

Another idea I'd like to explore is automatic connections to the computer. Like... TI Chronos is watch, but it does not keep time too accurate. Once-a-day synchronization with computer (which hopefully synchronizes via NTP) would make it very accurate again... also opening possibilities such as your appointments on your watch.

20th June 2012

12:43pm: Do u-SD cards work better with just one partition?
I'm trying to use Debian in chroot on my android cellphone. With 2GB u-SD card and filesystem mounted using loopback, it worked very slowly, but ok. Then I lost the cellphone... and the u-SD card, and got 16GB one... and made a decision to partition the card to avoid loopback.

Well, the resulting setup did not work at all, and the card failed in PC after a while, too, so it went back to the manufacturer.

But the next 16GB card was acting funny in the same setup, too (this one pretended not to exist after brief period of load). But this time I decided to repartition it back to single partition and put ext2 back into loopback... And now it works.

Weird, but my phone just got much more useful.

15th May 2012

3:36pm: Multi-monitor setup using notebook
I'm right handed. I'd like to use notebook with big monitor, docking station, external mouse and keyboard.

Question is, what is the reasonable setup? For now, I have notebook to the left of the big monitor, with X set up to use both monitors, and notebook "to the right" of the big monitor. Yes, it is usable, but moving mouse right to get to the display that is to the left of the screen is strange.

If I put notebook to the right of big monitor, I'll have no place for the mouse.

So... is there clever solution?

(I'd still like to undock and be able to use the apps I've opened.)

11th May 2012

1:11pm: mbank.cz: insecure by default
So you want to get a debet card. It comes by email, with instructions, that you need to activate it over the web. So you do activate it. Then you realize that all limits are way too high... like $50000 per day for payments over the web. Oops. So you go to change it quickly. At this point, authorization SMS fails to come, so you can't. Nice.

What about having reasonable limits by default, dear mbank?

4th May 2012

1:07pm: 17.98 km/h average over 5 kilometers
16.37 km/h average over 10 kilometers. Yes, my fjord horse just likes to run. And no, I can't compute, which meant missing the deadline by 15 seconds, and not doing too well in 20km race.

10th February 2012

12:43pm: What does electric heating pad and electric chair have in common?
To keep myself warm, I purchased nice "beurer hk25" heating pad. According to their manual, it is "thoroughly tested" and "high-quality" product. It was supposed to have three temperature
settings... but in fact it has three power settings, with emergency overtemp fuse that renders the pad useless. Uncool :-(. [Pad is connected by two wires to the control unit]. It was not exactly cheap, either.

I expected some kind of switching/tyristor control, but apparently control unit just contains resistors, so it "may heat up" and "may not be covered". Oops. I thought that controlling 100W of heat is not a rocket science.

But that was not biggest surprise. Biggest surprise was that heating pad is actually able to induce enough electricity in the human body to be felt. Just touch another person, and her skin appears appears to vibrate very rapidly.

Now, the manual does have a lot of warnings; but "don't touch another person while using this" is not there. (Ok, the warnings mostly say "this can not be used at all"). One of warnings describes possible pacemaker interference, and lists electrical specs: 5000V/m electric
field strength, 80A/m magnetic field strength, 0.1mT magnetic flux density.

Except that values listed are not actual values produced by the pad, but limits from health regulations. So this does not do help me determining if this device is designed to introduce interesting sensations, or if my device is somehow faulty.

(Not sure how I should be measuring this, anyway. So far I know that multimeter indicates cca 2V AC between me and ground when it is on, so I know I'm not imaginging this, but....)

Now, I don't think this is unavoidable. Including AC/DC converter would be one possible solution... right?

21st August 2011

10:11am: ntp vs. hibernation
My work machine has ntpd running; still times go off; last time I checked it was off by 11 seconds.

Looks like ntp is one application where "hey, we have just woken up from sleep" notification could be useful... or perhaps ntp should just monitor how much time passed between invocations, and do full resync at that point?

30th July 2011

11:09pm: Androids doing endurance racing
So we won endurance race for 22km in Borotin with my little pony^Wfjord. And now I've seen the results... and we should have been 9th. For some reasons, in 'hobby ZM' they time you between finish and veterinary check. You have minimum speed set, but still...

Timing between start and finish encourages you to push the horse to the limit (which I did, anyway, but...), so I understand that is not suitable at the lowest level. I'd understand timing between start and veterinary check... but what is rationale for timing finish to vet check only?

Anyway, there's now app for that. Endurance riding app. Beware that GPS and wheel-based trail measurement often differ by 10% or so...

20th July 2011

10:36pm: New 16GB sdhc card...
...and of course it does not work too well. PC fails to recognize it sometimes, HTC Dream consistently will not recognize it when present during boot. I guess it goes back to ALZA, but I'm not looking forward to dealing with them...

mmc0: card claims to support voltages below the defined range. These will be ignored.
mmc0: SD card claims to support the incompletely defined 'low voltage range'. This will be ignored.
mmc0: error -84 whilst initialising SD card


AData microSDHC, 16GB. When it works, it is

mmc0: new SDHC card at address b368
mmcblk0: mmc0:b368 SD    15.4 GiB 
 mmcblk0: p1 p2 p4

10th July 2011

9:37pm: yookos: what kind of scam is this?
I'm periodically spammed by "[Yookos] Announcement"s. Yookos apparently thinks my email address corresponds to Peter Hedlund. What kind of scam is this?

5th July 2011

6:08pm: OpenMoko dead battery tip
Quite often, if you leave battery in OpenMoko for too long, it goes totally dead -- OV on terminals, internal protection kicked in, impossible to charge in OpenMoko. But put it into nokia 6230 (yes, it fits)
connect charger. Voila, battery that had 0V on its terminals now has something over 3V, and can be (very slowly) charged in OpenMoko.

3rd July 2011

2:35pm: Open Source light
HexBright. Yep, it is open source, but it was definitely not the first one. Ok, maybe my tinylight never got such a nice case, and only one was ever made, but...

29th May 2011

9:44pm: How do you deal with good camera
So I got myself Sony Alpha A200 DSLR. Before, I was able to take 100 2-megapixel photos with historical Kodak toy, deleted half of them, hand-selected 5 really nice photos, and everything was fine.

Today, I took 920 photos, 2.5GB total (and that is far from max resolution). How the hell I'm supposed to sort that?

Oh, and my sister got driving lesson after not driving for few years. Pala (== Skoda Forman), which implies difficulty = high. Original motivation was empty battery... Which was bad news #1: you may not let the engine die, because we'll not be able to restart it. Bad news #2 was relatively innocent: parking brake does not stick in the "parked" position. And then came bad news #3: engine temperature reached the red line, so electrical cooling is probably broken and you may not go too slow.

Congratulation to my sister, because she was able to drive for 30 minutes without incident, and without engine dying. She should be able to drive any kind of trash with four wheels from now on.

(And she probably believes me that car is way safer than a horse).

21st May 2011

12:31pm: windowmaker with dualhead
So... doing xrandr to add second monitor is easy and works well. But... moving windows to the second monitor is not easy, if you are using windowmaker -- as soon as the mouse crosses the monitor boundary, it switches to next virtual desktop. Ouch. Is there handy setting somewhere? Or should I just switch to some more modern window manager?

19th May 2011

3:54pm: Java, Androids and ALSA
So this is why I hate java: MediaPlaybackService.java. See especially the "reverse hexadecimal" part. Half of the code is trivial functions hiding internal variables, and the other half is working around the fact that Java is just too slow...

Single process eating 100% cpu seems to be enough to make Dream unusable. (Is that normal?) I guess I should use nice extensively... But I wonder why it is so sensitive, Linux scheduler is normally clever enough to deprioritize those.

Oh and tip of the day: if ALSA mysteriously stopped working for you (but /dev/dsp emulation still works ok), you may want to disable "SND_DYNAMIC_MINORS" option... or maybe finally install udev.
Powered by LiveJournal.com