OM NewRotate’s new home

I was going to place my OpenMoko project on projects.openmoko.org but because the OpenMoko guys couldn’t solve my problem commiting files (hopefully because they’re finally working on the really important stuff) and I wanted to outsource the project’s hosting, I moved it into Google Code, so this is it’s new home: http://code.google.com/p/omnewrotate/

Currently, the code has integrated some of Fabian Henze‘s source code changes, but quite sadly he considers our aims as being too different for further collaboration in one project.

OpenMoko newRotate checks brightness

Oscar Casamitja patched the old rotate program to change brightness on rotate in order to better hide xrandr’s artifacts. That’s actually a very good idea.

This new version reads from actual_brightness and set into brightness, which you can find in /sys/class/backlight/pcf50633-bl/ , in order to skip packet reading when the screen is dimmed, which is the next best thing to checking wether the screen is locked.

I run into a problem, though: it seems that if I open() actual_brightness once, I never again read an updated value, which makes me have to read on every loop 🙁

Enough talk, get it here: rotate-0.3.0.tar.gz (ascii sig) [now, if only this bug was fixed on projects.openmoko.org…]

Hope you’re enjoying it… 🙂

$ head -2 ChangeLog
2008-10-14 - 0.3.0
	* dims while rotating and doesn't rotate if dimmed, sleeping for 5s
$ cat KNOWN_ISSUES
Known Issues:
	* I'm not getting updated results if I only open
	  /sys/class/backlight/pcf50633-bl/actual_brightness once
	  which means I need to open it on every cycle.
	  Since it's in memory and not an actual file, wast should
	  not be too much
	* some heuristic values may need fine tunning

Portuguese dictionary for OpenMoko’s Illume keyboard

Hi, taking advantage of a word list composed from one million words of a Portuguese newspaper, I filtered, and filtered and filtered the garbage (and I have a strong idea it still has a lot of garbage), to generate a Portuguese dictionary for OpenMoko’s Illume keyboard.

Since UTF-8 support is still borked, I have replaced special characters like é with a plain e. Yeah, it’s like using an US keyboard for writing Portuguese, but one’s gotta work with the eggs one has in order to make an omelet.

Enjoy: Portuguese (ASCII).dic

Just do:

bunzip2 "Portuguese (ASCII)-0.1.0.dic.bz2"
scp "Portuguese (ASCII)-0.1.0.dic" root@192.168.0.202:Portuguese\ \(ASCII\).dic
ssh root@192.168.0.202
mv Portuguese\ \(ASCII\).dic \
   /usr/lib/enlightenment/modules/illume/dicts/Portuguese\ \(ASCII\).dic

With a lot of thanks to Alberto Simões for pointing me to http://www.linguateca.pt/ACDC/ and Rasterman for the hints about the (quite simple) file format.

OpenMoko Rotate 0.2.1

Yes, it’s out, release early, release often, yadada yadada. I’m grumpy because of less sleep time than usual, and a whole day of ITIL Foundation V3 lesson (3 more days of it, plus an exam later on).

Get it here: rotate-0.2.1.tar.gz (signature)

Anyway, here’s the good news:

$ head -5 ChangeLog
2008-09-22 - 0.2.1
        * more heuristic fixes (hopefully really fix when laying around, and
          turned up)
        * workaround with alarm() for the accelerometer read-hang problem
        * sleeping for 100ms seems to get cpu usage quite low (0% to 0.9%)

OpenMoko Rotate 0.2.0

Woke up 2h earlier because of a problem, solved quickly, took the extra time to greatly improve the heuristics.

If you haven’t tried it before, now it’s the time to try. If you did, NOW is the time to try again 🙂

Fetch it now: rotate-0.2.0.tar.gz (signature)

$ head -3 ChangeLog 
2008-09-22 - 0.2.0
	* greatly improves heuristics
	* fixed heuristics when laying around, and turned up

First brown paperbag release of new Rotate

Oops, heuristics were bad, very bad. Still has quirks, but at least now they’re not so shameful.

There’s a new release: 0.1.1 (signature)

$ head -2 ChangeLog 
2008-09-21 - 0.1.1 - First brown paper bag release
	* improves heuristics
$ cat KNOWN_ISSUES 
Known Issues:
	* reading from the accelerometer hangs after X time/reads
	* some heuristic values may need finetunning (specially when
	  laying around, turned up)

New Rotate for OpenMoko

As said before, since I’m not entirely happy with the previous version of Rotate for OpenMoko, also using it as a way to learn how to write programs for it, I’m writing a new version of Rotate for OpenMoko.

I’m now announcing the first results: release 0.1.0 is out (signature)! The tar.gz file contains both source and a binary suited to run on Om200x.y (at least 2008.9 should work).

Be careful, it bytes.. 🙂

$ cat ChangeLog
2008-09-21 - 0.1.0 - First release.
	Current Features:
	* makes some rotations

	Known Issues:
	* reading from the accelerometer hangs after X time/reads
	* some heuristic values may need finetunning (specially when
	  laying around, turned up)

	Near Future:
	* don't rotate when screen is locked
	* change profile to silent/meeting when phone is turned down
	  and revert when it is turned back up

Getting ready for Rotate rewrite

So… following up on my patch for a better xrandr rotation on Rotate, I’ve been learning how to read the accelerometers, and it’s a lot of fun, actually. I’m so thrilled… I really missed programming 🙂

Now, the good news is that in a couple of days (hopefully) I’ll be posting a completely new Rotate. I’m collecting some positioning data from the second accelerometer, and right now I already know a few positions, at least my little test program is guessing some positions quite right…

s/guess position/libxrandr rotate/ and you get the new Rotate 🙂

All this without running the risk of seeing this software banned (like the iDictatorPhone), where it seems some programmer got his application banned on the iDictatorPhone because it competed with Mail.App. Nice one, Apple, you’re only proving us, Free Software activists, right. Again. 🙂

The following is the current output as I pick it up from the table and place it from turned up into turned down.

Postion (90,90,1026):  horizontal turnedUp
Postion (90,72,990):  horizontal turnedUp
Postion (36,54,990):  horizontal turnedUp
Postion (-36,36,990):  horizontal turnedUp
Postion (18,18,972):  horizontal turnedUp
Postion (18,936,0):  upsideDown
Postion (18,36,882):  horizontal turnedUp
Postion (36,36,900):  horizontal turnedUp
Postion (18,18,1008):  horizontal turnedUp
Postion (-36,1080,0):  upsideDown
Postion (-36,-36,1080):  horizontal turnedUp
Postion (72,1134,0):
Postion (54,18,1314):  horizontal
Postion (54,54,1386):  horizontal
Postion (18,144,1404):  horizontal
Postion (-36,198,1386):  horizontal
Postion (-72,234,1296):
Postion (-54,108,1152):  horizontal
Postion (-396,-72,936):  horizontal turnedUp
Postion (-864,-198,1080):  horizontal left turnedUp
Postion (-504,-36,918):  horizontal turnedUp
Postion (-504,54,1026):  horizontal turnedUp
Postion (-414,54,1098):  horizontal turnedUp
Postion (18,-54,774):  horizontal
Postion (234,-288,378):
Postion (180,-666,18):
Postion (414,-720,216):
Postion (-36,-1080,0):  vertical
Postion (90,-774,-72):
Postion (126,-270,-216):
Postion (234,702,360):
Postion (-360,378,-2304):
Postion (864,1170,-918):  right turnedDown
Postion (126,702,-1800):
Postion (288,558,-1494):
Postion (270,288,-1314):
Postion (54,108,-1206):  horizontal
Postion (108,162,-1098):  horizontal turnedDown
Postion (288,108,-882):  horizontal turnedDown
Postion (342,162,-792):  horizontal
Postion (270,72,-828):  horizontal turnedDown
Postion (306,36,-972):  horizontal turnedDown
Postion (306,90,-1188):  horizontal
Postion (270,324,-1332):
Postion (180,396,-1278):
Postion (126,450,-1386):
Postion (-36,522,-1674):
Postion (36,270,-1404):
Postion (180,90,-1080):  horizontal turnedDown
Postion (72,72,-1044):  horizontal turnedDown
Postion (54,90,-1044):  horizontal turnedDown
Postion (-18,72,-1080):  horizontal turnedDown
Postion (18,72,-1026):  horizontal turnedDown
Postion (18,36,-1080):  horizontal turnedDown
Postion (18,36,-1134):  horizontal
Postion (36,36,-1098):  horizontal turnedDown
Postion (54,36,-1098):  horizontal turnedDown
Postion (90,54,-1080):  horizontal turnedDown

OpenMoko Rotate now using libxrandr

As I peeked into the code of OpenMoko’s Rotate (a program that rotates the screen acording to the current tilt), I noticed it made use of system to launch the xrandr program with appropriate arguments.

Well, system costs a lot in terms of processing power, not to mention launching another program, and that means even less battery time. I didn’t like that, so I wrote a patch that alters the current rotate.c into a new rotate.c in order to use librandr and get it to rotate the screen without the costly system+xrandr duo from hell.

I also built a binary of rotate, which you can download from this link and place on your OpenMoko Neo Freerunner with 2008.8 or 2008.9 (I haven’t the foggiest idea if it works on other versions).

Hopefully, you might want to verify the sha1sums:

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

afc833b7cd2c874c1c815a0cb9f7c38a65998ff5  rotate
efcc6277080b2aadc3306a000a97ab202ca2bece  rotate.c
c1eb847d05cd36e0e9f31b5e5f6eb9337f730d0f  rotate_libxrandr.patch
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)

iD8DBQFI1ES1o+C50no0+t4RAjSrAJ41N0KpD7JaY3WfiRViexn4CvQw7QCePNr3
G8Z3ejIwprpK7J7unjMaS1A=
=anNm
-----END PGP SIGNATURE-----

I realise the way I wrote didn’t make it very obvious, so here’s a listing of the files:

O ataque à Red Hat/Fedora em Links

  1. Os sistemas deixam de estar disponíveis. Um posterior (alguns consideram tardio) aviso na Fedora Announce denúncia um problema de segurança com pacotes «as a precaution, we recommend you not download or update any additional packages on your Fedora systems»
  2. Enquanto a investigação prossegue à porta fechada, possivelmente por motivos legais, os sistemas vão lentamente voltando a funcionar
  3. Finalmente (8 dias depois do anúncio oficial) revelam o que aconteceu: alguém conseguiu penetrar no sistema de compilação automática de software.
  4. Conseguiram submeter pacotes de OpenSSH assinados com a chave da Red Hat, mas em princípio não chegaram a ser distribuídos. Publicaram novos pacotes de OpenSSH e um script para verificar se por azar algum um cliente de Red Hat Enterprise Linux chegou a descarregar esses pacotes.

É mau? Sim, é mau. Mas o pior que aconteceu foi um beliscão na imagem da Red Hat. Já passo.

Sem dúvida seguir-se-ão as piadas do costume na Internet (Debian passou por isso recentemente, embora no seu caso tivesse sido bem mais grave), até que a moda canse ou seja substituída por outro evento.

Felizmente foi detectado atempadamente e, mais importante ainda, não conseguiram acesso às chaves da Red Hat. Estão preservadas num HSM (High Security Module), apenas conseguiram submeter pacotes corrompidos para o sistema de assinatura automática.

Move along…