January 13, 2012
Warp se encargará de impartir los cursos de PHP y MySQL que dan acceso a la certificación Zend PHP 5.3 a partir del 31 de enero de 2012, en el Centro de Tecnologías Avanzadas de Zaragoza. El curso está dirigido a aquellas personas que quieran aprender a programar portales web con dos de las herramientas más [...]
January 08, 2012
Today, January 8th, is my last day working at Warp, bringing to its end an exciting cycle that has taken almost 8 years of my life. After that, other duties await me in Munich, the city where I live now.
Let the future provide even more achievements to Warp and Zentyal all over the world. Many thanks to all of you out there who have been around through these years, full of challenges but also extremely rewarding. See you soon!
Hoy domingo 8 de enero sera mi ultimo día trabajando en Warp, cerrando un ciclo apasionante que ha tomado prácticamente ocho años de mi vida. Tras ello, me aguardan otros deberes en la ciudad en que resido actualmente, Múnich.
Que el futuro depare todavía más éxitos a Warp y Zentyal por todo el mundo. Muchas gracias a los que me habéis acompañado durante estos años, llenos de retos pero inmensamente gratificantes. ¡Hasta pronto!
December 12, 2011
Last week we released version 2.9.2 of WordPress for iOS, and it had a terrible bug which killed the ability to paste text from other apps, which is probably a critical feature for a blogging app.
We should have done a better job at testing it, but somehow the bug escaped our tests and it got released. Most of the feedback on the forums was perfect: users concerned that they can’t use the app properly, but understanding that it can’t be fixed overnight.
But then this happened:
It is unacceptable that I STILL can not use the iphone app. It’s been DAYS! Fix the PASTE issue!!!
Well, it’s definitely unfortunate, but here’s how it goes:
- Dec 5: 2.9.2 released on the app store
- Dec 6, 6AM: first report on the forums
- Dec 6, 11AM: after some testing, it’s confirmed that 2.9.2 broke copy/paste and it’s not an isolated problem.
- Dec 6, 1PM: Went through the list of changes for this version and the only thing that made sense was an update to the Flurry library (used for stats/analytics). Emailed Flurry support to ask if they had similar reports or know how to fix it.
- Dec 7: no reply from Flurry yet, we decide to remove the Flurry library from the app.
- Dec 8: still no reply. Removed library, prepare a new build and test it.
- Dec 9: submitted 2.9.3 to the App Store
- Dec 11: Apple approves 2.9.3. That’s new, I didn’t know they work on Sundays, but I won’t complain
- Dec 12: released 2.9.3 on the App Store
Looking at that timeline, there’s always room for improvement, and we could have just skipped waiting for Flurry to reply (no word from them yet), and remove the library from the app directly. But even then, I’d say 2 hours from noticing a bug until we know what’s wrong and how to fix it is not that bad. Most of the times the bugs are way more obscure and hard to find.
If you’re lucky, 2 business days is the usual wait time for a bug fix release to be reviewed and accepted: I was expecting it to be published on Tuesday (Dec 13).
Goodbye Flurry
I don’t think we’re going back to Flurry after this. It’s enough trouble debugging against a proprietary framework (iOS SDK) to add another binary library to the app.
The problem here was that we had to update the Flurry library, since the old one was getting the app rejected by Apple. And the new one first broke our build server: it needs the 4.3 base SDK and we were using 4.2. And then this.
Plus, I think it collects way more data than we’re interested in. In the end, we want to know how many people is using the app, and what features are more interesting to people. Also, at some point, which kind of devices/versions users have, to know when we can drop support for older platforms.
October 30, 2011
So I am back from the co-located LinuxCon Europe / Embedded Linux Conference Europe 2011!
These were very intense days, full of interesting talks and social events like a visit to U-Fleků Brewery, the oldest brewery in Prague, and Duplex, a club on top of a building in the city’s tourist area (both with “Free as in Beer” beverages and food).
I met some existing and new friends, and managed to attend the talks below:
Although unfortunately I was not as successful as in previous conferences, I won a nice development board, a Snapdragon APQ8060-based DragonBoard, so I guess I cannot complain
Overall, a very nice event, and the co-location offered a whole range of interesting topics for the talks. See you in next year’s LinuxCon/ELCE 2012 at Barcelona!
September 26, 2011
Warp participa en GENIO, como ya se dijo anteriormente, desarrollando su interfaz de acceso. Este mes de septiembre, entre los días 27 y 29, El Instituto Tecnológico de Aragón va a presentar el proyecto en el NEM Summit 2011. Se encontrarán en el stand número 26 y se podrá ver una demostración del estado actual de desarrollo. La interfaz desarrollada por Warp [...]
August 25, 2011
It seems some headers have been relocated in Debian Sid’s packaging without updating other headers referring them or providing a multi-arch solution. This problem may affect Ubuntu too.
For instance, errno.h cannot be found under /usr/include/asm but as:
/usr/include/x86_64-linux-gnu/asm/errno.h
This attempt to build Android 2.2 illustrates this issue:
muon~/devel/git/android-x86 % make TARGET_PRODUCT=s103t usb_img (08-24 18:35)
============================================
PLATFORM_VERSION_CODENAME=REL
PLATFORM_VERSION=2.2.2
TARGET_PRODUCT=s103t
TARGET_BUILD_VARIANT=eng
TARGET_SIMULATOR=
TARGET_BUILD_TYPE=release
TARGET_BUILD_APPS=
TARGET_ARCH=x86
TARGET_ARCH_VARIANT=
HOST_ARCH=x86
HOST_OS=linux
HOST_BUILD_TYPE=release
BUILD_ID=FRG83G
============================================
build/core/base_rules.mk:69: unusual tags systembuilder on badblocks at external/e2fsprogs/misc
host C: acp < = build/tools/acp/acp.c
In file included from /usr/include/bits/errno.h:25:0,
from /usr/include/errno.h:36,
from build/tools/acp/acp.c:22:
/usr/include/linux/errno.h:4:23: fatal error: asm/errno.h: No such file or directory
compilation terminated.
make: *** [out/host/linux-x86/obj/EXECUTABLES/acp_intermediates/acp.o] Error 1
While packaging is fixed, this solution should work when using gcc/g++:
C_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
CPLUS_INCLUDE_PATH=/usr/include/x86_64-linux-gnu
export C_INCLUDE_PATH
export CPLUS_INCLUDE_PATH
August 18, 2011
If you boot live systems from USB sticks regularly, probably you already noticed that some BIOS do not play very well with specific bootloader/filesystem combinations.
For instance, when I try to boot my Lenovo S10-3t netbook with the images generated by Android-x86 -which use GRUB and ext2-, the system gets stuck.
So I created a trivial script which basically replaces ext2 with VFAT, and GRUB with syslinux:
#!/bin/sh
IMGFILE=/home/xtor/devel/git/android-x86/out/target/product/s103t/s103t_usb.img
MBRFILE=/usr/lib/syslinux/mbr.bin
BASEDIR=`mktemp -d`
MNTDIR="$BASEDIR/mnt"
TMPDIR="$BASEDIR/tmp"
DEVICE="/dev/sdb"
PARTITION="${DEVICE}1"
dd if=$IMGFILE of=$DEVICE
mkdir -p $MNTDIR
mkdir -p $TMPDIR
mount $PARTITION $MNTDIR
cp -a $MNTDIR/* $TMPDIR
umount $PARTITION
mkfs.vfat $PARTITION
mount $PARTITION $MNTDIR
cp -a $TMPDIR/* $MNTDIR
cat < < EOF > $MNTDIR/syslinux.cfg
default vesa
timeout 10
prompt 1
label mdpi
kernel /android-system/kernel
append initrd=/android-system/initrd.img root=/dev/ram0 androidboot_hardware=s103t acpi_sleep=s3_bios,s3_mode quiet SRC=/android-system
label vesa
kernel /android-system/kernel
append initrd=/android-system/initrd.img root=/dev/ram0 androidboot_hardware=s103t acpi_sleep=s3_bios,s3_mode quiet vga=788 SRC=/android-system
label debug
kernel /android-system/kernel
append initrd=/android-system/initrd.img root=/dev/ram0 androidboot_hardware=s103t acpi_sleep=s3_bios,s3_mode vga=788 SRC=/android-system DEBUG=1
label install
kernel /android-system/kernel
append initrd=/android-system/initrd.img root=/dev/ram0 androidboot_hardware=s103t acpi_sleep=s3_bios,s3_mode SRC=/android-system INSTALL=1 DEBUG=
EOF
umount $PARTITION
rm -rf $BASEDIR
syslinux -i $PARTITION
dd conv=notrunc bs=440 count=1 if=$MBRFILE of=$DEVICE
This script can be adapted easily to any other system that you are trying to boot from a USB stick.
August 17, 2011
Lennart Poettering’s talk was about the work done in the last Fedora cycle.
systemd’s improvements are not limited to system boot, and Lennart and their team-mates are working in different enhancements like a reliable and unified session infraestructure.
Why systemd in the session?
Because of different reasons that need further explanation, like cleaning things up, consolidate stuff, etc.
The evolution of multi-seat systems
Traditional UNIX multiseat and session tracking was built into the kernel. Then there were terminals. Since the 70s the session concept changed its meaning.
Previously, a seat was composed by a keyboard, a screen, and login/logout from the terminal. Suddenly multiple sessions from one screen appeared.
The problem is that there is no way to know “what a seat is”.
Consolekit is like a super-session where you have all the information consolidated for all the consoles.
Bringing back multi-seat
We should consider a seat is composed of: a keyboard, a mouse, a screen and probably other stuff like a soundcard or a camera.
Modern computers tend to have just 1 seat, but the multi-seat idea is still alive.
They have been working to bring back multiseat.
The goal is having automatic multi seat, instead of having to configure eerything manually for a session (e.g. no support to plug a mouse and let it appear in the right session).
To illustrate a modern “seat”, he showed a USB device with an integrated video card. The idea is plugging these devices and having new seats created.
How it is done
They do it at a very low-level.
Tagging hardware. For each hardware stored there they include its information. Including hardware which hasnt been plugged in yet.
Access Control Management.
No static configuration of seats.
The stuff is completely dynamic. It will just work.
Multi-seat and multi-session in the lower stacks.
Unifying sessions. Quite a lot definitions of what a session is: audit, cgroups, bus, desktop, login, runtime, pam… They wanted to unify everything, and have a unique session id for everything.
XDG_RUNTIME_DIR: xdg base specification. Basically a temporal directory its created on login and removed on logout. It gives applications a place to have a common communication point. Traditionally the sockets where put in /tmp.
Some benefits
Running services as you log in. Everything that you do on systemd.
Running services when you are not logged in. For example you share your files with gnome-bluetooth and you want to have these files available. You cannot give them access to your filesystem.
Ending sessions.
Enforcing limits and balancing resources. You have a limited amount of CPU power. Without a session concept we are not able to assign resources intelligently.
Removal of ConsoleKit. It kept track of the sessions and did other things, but is no longer needed.
Concluding remarks
They did most of the work on the GNOME area. Someone needs to do the work in other desktops.
Going low-level. UNIX is back. What was removed is put on top again.
August 16, 2011
Making GNOME shell cooler
Different timezones
Location awareness
Next deeper location awareness: set empathy geolocation, automatic settings (region, time, format)?
Improving GNOME’s web presence (Vinicius)
Make it translatable and use the GNOME infraestructure. Change language.
Create a new apps section, featuring, GNOME based applications.
Create a community area, tracking everything that is haping there. Every GNOMEr will have information about what he is doing. What is happening in GNOME in a single place.
Polish the developer area.
Port the layouts of wikis etc to the new stuff.
Open Raster (Jon Nordby)
Open Raster is a document format for raster based graphics. under the Create umbrella
It is important because of interoperability and freedom. PSD is the stablished format, but it is not free.
History and status: started in 2006 in the Libre Graphics meeting. 2009 first implementations. 2011 support in many FOSS raster apps.
How to help:
Application support.
Libraries and utilities.
Specification.
MPRIS 2.0 (Alex Merry)
MPRIS is an specification for a D-BUS interface for media players.
It replaces a previous version which had a number of issues like non-standard types, missing signals, or various race conditions.
MPRIS 2.0 is an enhanced version, soon to be in freedesktop.org
Replicating Rapid (Michael Meeks)
reprap.org
Common Printing Dialog
When you click “Print” on a Linux system, right now you get 3 different printing dialogs.
In 2006 some people at the OPS came out with the idea of having a common interface exposing the device capabilites, through D-BUS.
Peter Sikking is a usability expert who has designed the current interface.
Status can be checked at wiki.openusability.org/wiki/printing (not dead, just resting).
Probably done in October
poppler
Poppler is an xpdf fork to make it a library.
It has a backend/frontend structure:
Official backends: splash, cairo, qpainter
Official frontends: glib, Qt4, cpp
Unofficial
Keeping everything in the trees makes everything easier to maintain.
snappy
Minimalistic video player
UNIX way: do one thing and do it very well.
How? GStreamer and Clutter.
Audience: Professionals, developers, spreading the word. People working with special effects who want to watch specific segments. Another use case if you are recording a video.
Grillo
Experimenting with grillo as an easy media browser.
Integrated grillo in the GNOME shell as an extension
Dragon Player 3
Phonon declarative = QtQuick and QML.
Fade in fade out.
Recently viewed reinvented.
OpenGL fullcreen and subtitles.
How to deal with companies
Really good technical point of view.
Need to take another step
Point very important with KDE e.V.
The idea is:
They had an idea in the promo team to know what they need to do.
They need to face some legal problems.
There is going to be a discussion for .
They are starting to think about it. So if you are interested just let them know.
Autotools support in QtCreator (Patricia Santana Cruz)
Before: just open the file
Now: syntax highlighting, project structure, project buttons. So this is what it does know.
They want to implement some other extensions.
Session Management in the 21st century (Chani Armitage)
XSMP is good for a 90s computer. Saves when you logout… if you are able to log out.
Putting the users first: a data-centric approach.
Advantages: transparency, portability, flexibility. Send a session to another device.
Valo-cd.fi/org
Translated to Finnish:
Easy to use, high quality.
Only one program for each usage.
100% free.
For most of the population installing anything is a strain. Solution: a CD with free software for Windows.
Started in Finnish, this year it comes in english.
The user just puts it inside the computer.
It comes in a box that some people things is more reliable than downloading it from the Internet.
1000 downloads per month. But Finland is just 5 million people.
Webodf
Not just about the cloud.
Webodf is a project to have ODF everywhere.
HTML and ODF are similar: xml, styles, images, svg, and other.
Take styles from odf and translate.
webodf.js
webodf.css
+ 3 javascript server
Use cases: publish easily.
August 14, 2011
Towards Marble 2.0 – the journey around a virtual globe / Torsten Rahn
Marble is a virtual globe open-source project which promotes free maps and provides:
- For users: a map application which is easy to use.
- For developers: a map widget and a library.
They released a special Marble version for Berlin Desktop Summit, including, in a single package:
- Offline Open Street Maps maps
- Offline routing
- Offline search data for Berlin
Marble 1.2
He then went on to explain to road to 2.0, where the latest release is Marble 1.2. Among its features, voice samples for voice navigation in different languages and a bookmark manager. With these samples you are able to use Marble as a mobile phone navigator, and the voice tells you instructions about how to go somewhere. Voice samples are licenced CC BY/SA 3.0, and includes even some English cuts from a child
They have lots of languages missing. They need Spanish, French, Chinese and more.
More Marble 1.2 features are offline search, a map creation wizard, etc. In the pipeline for 1.3 they have .osm vector rendering and a touch version.
Marble participates in ESA’s Summer of Code in Space, with the ability to play satellite orbits, useful for instance to viusalize GPS satellites and their availability. This project is developed by Guillaume Martres, and was started the Monday before.
For 2.0 they need to reinvent themselves to stay competitives. For example, they want to reevaluate their manifesto to make sure it is still relevant. They consider a manifesto is important to keep a project on track.
User interface
They want to improve Marble’s user interface, for instance:
- New search query.
- More task driven UI.
- Better integration with smartphones and tablets. It currently runs on devices like Nokia N900 or WeTab.
The technologies involved are QtQuick and QtComponents. Daniel Marth is working in a MeeGo/Harmattan prototype as part of GSOC 2011: Marble Touch. Uses MeeGo Qt Components, and will cover other platforms.
Marble’s map rendering needs to be enhanced and refactored: vector rendering, OpenGL ES mode, and augmented reality (a demo was showed where you can click on elements and get information).
3D support
An OpenGL ES version in development, with Marble moving to true 3D. But they need help!!! OpenGL experts are welcome.
Screenshot with one of the first prototypes with the openGL prototypes showing some volcano in italy. They need people who is knowledgeable about how to use OpenGL. Download their OpenGL repository and have a look!
In order to be future proof they also need to be aware of the things happening around:
- Qt5 integration.
- QML2.
- Scene graph.
- Qt Location for positioning.
- Qt Components for desktop.
Questions and answers
Any work to integrate Marble with the addressbook? so you are able to see your contacts in the map.
Someone was working on that, via Akonadi integration.
August 11, 2011
Claire Rowland’s “UI Design in a Cloud of Diverse Devices” was, in my opinion, one of the most interesting talks, because it offered a very important topic for open source desktops but from an external perspective.
She is not a technologist, nor a designer anymore. She is a user experience researcher, trying to understand how people use computers. Today we are starting to experience a multi device ecosystem, and it is very interesting for a user experience designer to know what “user experience” means in terms of multiple devices.
Our interactions become more complicated, and there are forecasts implying 6 devices per person by 2020 with a total of 50 billion devices.
To introduce this context, she played a very nice video, encompassed in SmarcoS, an EU funded project she is working on:
Service design
Services can be seen as pretty abstract things, e.g. mail services involving different things like stamps, transportation, etc and people working in different roles. But they are perceived as an overall experience (a service), not as different elements.
An app is not a service, but the touch point for the service.
In this new interconnected world, we need a new design metaphor.
In the old usability model, we had one device, and the service was context-independent, static, application centric, offline, and accepted one user at a time, usually through a fat client.
But in the new model, we are facing “interusability”. Multiple devices, some without screens, not just work anymore, context aware, content and activity centric, potential for multiple users, and highly cloud dependent.
Cloud UX x Touchpoint UX = Service UX
Interusability
What makes a good touchpoint?
It needs to be appropiate to the device, doing the right thing in the right device. For instance, a TV was designed to be a passive thing, so maybe mixing a TV and a full-fledged keyboard is not right.
A touchpoint needs to demand only as much attention as it needs. Also does exactly what is needed and no more.
What makes a service feel like a service?
A service needs to have a clear mental model: what is the service, which components does it have, what can you expect from it… Dropbox would be a good example of a clear mental model.
But this model is not related to just communicating the service properties, but also designing things that are easy to understand.
Continuity is also required. While it may be a little bit abstract, continuity imposes that, wherever you resume the service, it is able to continue in the same point you left it.
Continuity must work across interaction modes. E.g. web system and voice interface.
Finally, a service needs consistency, but not only this but also “good consistency”.
What is a good cloud UX?
A good cloud UX supports a graceful degradation on connectivity. Services are very dependant on connectivity, and they should be able to operate when the connection is lost, for instance when a train enters a tunnel.
It needs to offer control of data too: making people know which data it has, how it is shared with other people, etc. And it needs to have some sensible defaults, to avoid people sharing stuff like their sexual activity…
Can a service be part of a free ecosystem?
Not clear, but it is easier to design these services if you control the whole ecosystem.
Questions and Answers
Where do designers hang out?
Usually at designer events
To bring designers to open source, the community needs to package it to make it attractive to designers. Designers love challenges.
In this talk, “Plasma Active – Conquering the Device Spectrum”, Sebastian Kügler introduced Plasma Active and gave a demonstration on a tablet device. Unfortunately I arrived a little bit late, so the first part might be incomplete…
Plasma Active is another shell based on KDE technologies, designed to be used in devices like tablets or handsets.
Share, Like, Connect
For the different elements you are able to share, like or connect it.
Applications
There are some base applications like Calligra’s mobile part, but they allow people to write applications in QML/Qt, and there are also 3rd party applications running with traditional Linux stacks like apps for MeeGo.
Developers
For developers, it is possible to develop and publish platform-independent applications using Plasmate.
With Plasma Quick, applications can also be written in Javascript. For the C++ applications they are using OpenSuSE Build Service.
OS integration
They provide Balsam Professional images by open-slx, and there are also some MeeGo ARM builds available.
Plasma Active Demo
Before starting the demo he he warned that it was alpha software.
We had a look at Plasma Active’s standard user interface prototype shell. It did not sport all the features, but was like a preliminary status update, reflecting 4 months of work on the Plasma Active shell.
Plasma Active’s sliding panel holds different features, like window switching, searching, application launchers or categories.
The web browser is touch-friendly, with flickable views or double tap to zoom.
There is also a news reader (as in RSS not as in NNTP), written completely in QML and architecture independent. It is really small and suitable to be distributed by web services.
Calligra’s presentations software was showcased as well, which is adapted to the form factor and has controls to change the presentation page.
He showed the activity switcher, which has a view of the open windows.
Conclusion
They want to create a truly open ecosystem that Apple and Android are completely lacking.
If you make run your desktop application on Plasma Active, you will gain the ability to reach a wider range of devices.
Plasma Active is trying to deliver something different and very new. They do not have users complaining that they change things, so have more liberty to experiment.
Questions and Answers
When are Plasma Active devices expected to be available for buyers?
They are working very hard to have Plasma devices availables by this year.
Can Plasma Active be run on an iPad?
No, but it runs on ExoPC and other hardware.
Another assistant said it will be nice to have it running on Archos.
He said the demo had been performed on an Atom-based Korean tablet. They also have Plasma Active running on ARM devices, like N9 and N950.
August 07, 2011
In this talk, Aaron Seigo explained some leadership topics using simple language and an easy to understand metaphor: navigators (move from one point to another) and explorers (discover new things).
Leaders are not just natural-born, but in fact leadership is a set of skills that can be learnt. Besides this, there is no “one-size-fits-all” leadership model, but different leadership models which apply to different projects, situations, people, etc.
Using the metaphor of navigation, he reviewed the set of tools a navigator must have: a map, a travel plan with the different harbors he is going to visit, a log to store how things are evolving, etc. It was a nice way to introduce generic project planning and monitoring, management and leadership topics.
Communication is also very important for an effective leadership, especially when applied to conflict-solving.
He finished encouraging people to become leaders of their projects.
Compositing after X – KWin on the Road to Wayland, Martin Graßlin
This was the first of four BDS 2011 talks related to Plasma Active. It had four different parts:
- Architecture of X and Wayland
- State of Wayland and X
- Wayland in KDE Plasma
- Timeline
Architecture of X and Wayland
Under X, the compositor is not able to interact directly with the clients. X was designed for non-composited use cases. There are lots of steps involved, and X is just a proxy. Moreover, the window manager needs to fix X sometimes.
X’s architecture, though allowing compositing systems to be implemented, make things terribly complicated. For instance, from an OpenGL point of view, rotating the screen of a device is trivial, but it is an issue under the X architecture.
So removing the proxy would be the perfect architecture for compositing scenarios, and that is exactly what Wayland is trying to achieve.
State of Wayland and X
X is one of the most successful software projects ever. It has been developed and used for decades now. Therefore, its architecture showed to be very flexible, and made possible to write compositing systems on top of it. But, on the other hand, as it was not developed with these use cases in mind, lots of difficulties arise while implementing composited systems.
Wayland promises to solve these specific problems, but nobody knows if there are also shortcomings with this approach. Qt integration exists through project Lighthouse, and there is also GTK integration -though the build is disabled-, and Clutter integration, which is a little bit outdated. This means that currently nobody is really using Wayland for real use cases and applications, so nobody knows if it will finally succeed.
Martin said last Sunday they were able to run Wayland with the Mesa code. Anyway, he expects many issues still need to be overcomed before we can start using it. So he said integration has to be done carefully, to avoid breaking the desktop, as happened before with other free desktop components like pulseaudio.
Wayland in KDE Plasma
He explained the options they had to evaluate regarding Wayland:
- Ignore it
- Drop X and concentrate on Wayland
- Write a new Wayland compositor alongside Kwin’s X11
- Incrementally port KWin from X11 to Wayland
They decided to reachitect the code to abstract window management, avoiding core dependencies on X. This way, development can proceed incrementally, and they avoid risks related to Wayland’s feasibility. For instance, if Wayland turns out to have any design flaw, they could fallback to X and wait until Wayland2 solves the issue. An additional benefit of avoiding core X dependencies and abstracting window management is that then KWin will be able to support more platforms easily (e.g. Windows). Basically this is like a “KWin Lighthouse” approach.
So in the road to Wayland, there are three incremental phases:
- Wayland under X
- Wayland only: remove X runtime requirements
- X under Wayland
Timeline
“When expect what” depends heavily on the people attending the conference and interested in contributing. To have proper Wayland support there are a lot of changes to be made:
- KWin
- Plasma
- KDM
- Other software (e.g. KSnapshot)
The roadmap is “start now to be ready in years”.
- Phase 1: kwin-wayland is available. First release Winter 2012 (he meant 2012 Q1)
- Phase 2: Only for Plasma Active and early adopters. Summer 2012
- Phase 3: Needs work in other areas first. Do not break the desktop. When it is done it is done.
More information regarding KWin on Wayland is available here.
Q&A
What about gaming support?
Mesa has currently a limitation because of its OpenGL ES support. It may become important in phase3.
To replace X, do they plan to reuse an existing X Server?
Yes, the last thing he wants to do is implementing a new X Server.
Finally, there was a small discussion between Martin and an attendant who claimed Wayland supported the full OpenGL set -and not just GL ES-, and demanded him to work more closely with the Wayland project.
August 06, 2011
“Clutter Everywhere” was a talk with different demonstrations showing Clutter running on different environments, like:
- Animations on Android
- Texture mapping on Windows
- Media application on MeeGo/IntelCE4100 hardware
Intro
The talk, intended to be a recap of Clutter status on different platforms, started with a quick introduction to Clutter, as a toolkit to create dynamic user interfaces. Chris stated that “Clutter is everywhere and where it is not it should be”.
Clutter on Android
Damien showed how to run a small Clutter demo on Android. Basically they provide headers with prebuilt libraries to integrate with Android’s NDK. The steps are more or less:
- Download and uncompress the code
- Add the libraries to your NDK environment variable
- Create the adb package
- Install the adb package on your Android device
- Run the app on Android
Besides this first demo, he also showed a Nyan Cat written with ClutterScript, which is a JSON definition language for Clutter animations.
Clutter on Windows
Neil showed a multi-texturing demo using cogl on Windows.
To install Clutter on Windows they have created a one-click msi installer.
This demo interpolated two images (a white cat and a black one), using an intermediate bright circle, and was compiled from MSCV++ 2010 Express.
Clutter on… Linux
This was a more elaborated demo, performed by Chris and showing different incremental steps to create a nice animation with clouds “moving”. These steps were more or less:
- Start with a Clutter empty window.
- Then you load a texture which is just 2 lines.
- Animate having the cloud moving toward us.
- Create more clouds. Somewhat complicated because you need to destroy each new clouds.
- Make clouds change, to make it more convincing.
- Be able to move the view using the mouse.
Porting Clutter
Neil explained briefly the steps needed to port Clutter to Windows:
- Make a Cogl winsys
- Add clutter backend for events: Unfortunately cogl does not support events yet, so you need to add this.
- Test
Mex (aka Sofatron)
Damien introduced the Cubovision, which is based on Intel CE4100 hardware, supports GL and is targeted at Set-Top-Boxes, and a Clutter based media application: Mex (aka Sofatron).
Mex is a media application designed for users who are comfy on their sofas. It uses different libraries from the GNOME stack, and Tracker besides to Clutter.
He explained some of the details of developing on the CE4100 platform, such as that they have 5 framebuffers, and X goes away. They listen to events from evdev devices, and use xkbcommon to simplify some tasks.
Finally we watched a video of the media explorer running on Intel’s hardware.
Clutter 1.8
The supported platforms are:
- Mac OS X bundle
- Windows MSI
- Android prebuilt libraries
- and Linux
(Expect updates to this post as I review it and add links still got stuff from the other talks to dump)
This talk was entitled “Heart of Blingness: Clutter and GNOME”. It reviewed the last years of development and the future directions.
From Clutter 1.0 to 1.8
Emmanuel started remembering his talk during the previous DS at Gran Canaria. It was back in 2009 and they were presenting Moblin 2.0 and Clutter 1.0. For them it was a great milestone, an a very nice announcement for the summit.
Three years later, in 2011, they have been releasing a new Clutter version each 6 months, reaching 1.8 Lots of stuff has happenned in these years:
- Moved under the GNOME infraestructure. One of the most important things is that it was moved under the GNOME infraestructure. They moved the git repos and BTSs of Clutter and Cogl.
- Cogl moved out of tree. Cogl started as an internal library to abstract the differences between OpenGL and OpenGL ES, and now is a general purpose GPU pipeline programming library. They though it would be a better experience for everyone to move it out of the tree. It was done thanks to the tireless efforts of Neil and Robert. People is encouraged to take a look at it and use it. It is non/strictly GL or GLES (e.g. Direct3D).
- Support modern X extensions. E.g. Xkb for proper keyboard handling. Ready for multitouch.
- Windows, OS X and Wayland. They are more conscious to support different platforms., and also prepared for Wayland, the next generation dm.
State and Animator.
- Class state, state machine. Clutter animator object using concepts like iframes. Move from one state to the other. You can attach a signal to an specific state.
- Actions, Constraints and Effects. Metaclasses which modify the behaviour of an actor. Attach the behaviours to an specific actor. Actors are for user interaction like clicking dropping. Effects adding stuff to animations.
- Deprecations. Lots of deprecations. ClutterScore. ClutterBehaviour: both replaced by the new animation framework. Clutter Shader. clutter_texture_new_from_actor()
87 unique commiters, 3437 commis
Clutter in GNOME nowadays
How is GNOME using Clutter nowadays.
Then he moved on to show how GNOME is using Clutter nowadays.
Desktop Shell is a Clutter application. Everytime you are using GNOME3 and the Gnome Shell you are using Clutter.
Sushi is a small previewer using javascript and Clutter.
Cheese photography application, uses Clutter to render the main video element and the effects.
Totem, uses the same video element but in the future will use Clutter for the OSD.
Media Explorer, not really GNOME but using a lot of GNOME technologies. It is a media explorer user interface using e.g. UPnP videos photos, general media.
The Board: interesting experiment with physical looking uis using Clutter and Javascript.
Clutter 2.0
Where are we going from here?
Removal of deprecated API.
Lessons learnt: asking people to subclass is not a good idea, composition is better.
Platform integration: GNOME is their platform.
One possibe future. Matthias Claessens sent him a message beg of last week and he asked him, what is the future of Clutter and gtk. He answered but it took him 1 week to reply.
This is one possible future: Moving Clutter front and center
-------------------------------------------------------------------------------
GTK+ 4.0 (platform windows widgets)
--------------------------------+
Clutter 2.0 (layout, animation) !
-------------------------------------------------------------------------------
GDK (windowing, input)
-------------------------------------------------------------------------------
Cairo (2D drawing)
-------------------------------------------------------------------------------
cogl (GPU programmming)
-------------------------------------------------------------------------------
x11, wayland, gl, mesa, drm, kernel
-------------------------------------------------------------------------------
But that is just one opinion, he wants people to join the discussion in the mailing lists and watch how the clutter-1.99 branch evolves.
Questions and Answers
In terms of developer experience and artists, what is the plan?
ClutterSmith was presented last year in Guadec, wchic was a ui development tool written by Pippin. Allows ui designers to sketch up interactions. Sadly it has not seen a lot of progress. Adobe HTML5 tool. He thinks we need to see more action in these area.
Integration CLutter inside Gtk.
Essentially any widget can be embedded in any cogl animation layer. Any widgets would be able to be embedded in a Clutter actor. Problems in terms of portability. Cogl, cairo, gtk, cairo, 20 thousands namespaces. Other option is rewriting GTK in terms of Clutter. MX demonstrates that you can, but is not as complete as GTK.
What about Clutter in Cairo
Cairo Cogl backend. It is complicated, there are plans, it would be interesting.
So… It has been a long time since my last post, and today looks like a good opportunity to blog again
I am living in Munich since March, and it has been a pleasant experience so far. Probably I am busier than I expected, but next weeks I expect to start to catch-up…
In the meantime, I will try to blog about the interesting talks I attend at the Berlin Desktop Summit, where I am going to stay for a couple of days.
June 06, 2011
Since I wrote my previous post, UrbanAirship has released the final
version of their android library. Oh well... the new version comes with
some new shiny features like analytics for your app, the means to customize
the look and feel of notifications (including sounds) and the possibility
of using C2DM as your transport medium instead of helium. (It seems this
feature was already present in the version I was using before but the
docs back didn't mention it). Here you can find an updated howto of
how to integrate it into your phonegap project:
AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.example"
android:versionCode="1"
android:versionName="1.0">
<uses-sdk android:minSdkVersion="8" />
<supports-screens
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:resizeable="true"
android:anyDensity="true"
/>
<application android:debuggable="true" android:icon="@drawable/icon" android:label="@string/app_name" android:name=".MainApplication">
<activity android:configChanges="orientation|keyboardHidden" android:name="com.example.MainActivity"
android:label="@string/app_name">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<!-- REQUIRED -->
<receiver android:name="com.urbanairship.CoreReceiver">
<!-- REQUIRED IntentFilter - For Helium and Hybrid -->
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
<action android:name="android.intent.action.ACTION_SHUTDOWN" />
</intent-filter>
</receiver>
<!-- REQUIRED for C2DM and Hybrid -->
<receiver android:name="com.urbanairship.push.c2dm.C2DMPushReceiver"
android:permission="com.google.android.c2dm.permission.SEND">
<!-- Receive the actual message -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
<category android:name="com.example" />
</intent-filter>
<!-- Receive the registration id -->
<intent-filter>
<action android:name="com.google.android.c2dm.intent.REGISTRATION" />
<category android:name="com.example" />
</intent-filter>
</receiver>
<!-- REQUIRED -->
<!-- The 'android:process' parameter is optional. Set it to a value starting
with a colon (:) to make it run in a separate, private process -->
<service android:name="com.urbanairship.push.PushService"
android:process=":com.urbanairship.push.process"/>
<!-- OPTIONAL, if you want to receive push, push opened and registration completed intents -->
<receiver android:name="com.example.IntentReceiver" />
</application>
<!-- REQUIRED -->
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE"/>
<uses-permission android:name="android.permission.VIBRATE"/>
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<!-- REQUIRED for C2DM -->
<!-- Only this application can receive the messages and registration result -->
<permission android:name="com.example.permission.C2D_MESSAGE" android:protectionLevel="signature" />
<uses-permission android:name="com.example.permission.C2D_MESSAGE" />
<!-- This app has permission to register and receive message -->
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
</manifest>PushNotification.js
function PushNotification() {
}
PushNotification.prototype.registerCallback = function(successCallback, failureCallback) {
return PhoneGap.exec(
successCallback, // called when signature capture is successful
failureCallback, // called when signature capture encounters an error
'PushNotificationPlugin', // Tell PhoneGap that we want to run "PushNotificationPlugin"
'registerCallback', // Tell the plugin the action we want to perform
[]); // List of arguments to the plugin
};
PushNotification.prototype.notificationCallback = function (json) {
var data = Ext.util.JSON.decode(json);
Ext.Msg.alert("Success", data.msg);
};
PhoneGap.addConstructor(function() {
if (typeof navigator.pushNotification == "undefined")
navigator.pushNotification = new PushNotification();
});PushNotificationPlugin.java
package com.example;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.util.Log;
import com.phonegap.api.Plugin;
import com.phonegap.api.PluginResult;
import com.phonegap.api.PluginResult.Status;
public class PushNotificationPlugin extends Plugin {
final static String TAG = PushNotificationPlugin.class.getSimpleName();
static PushNotificationPlugin instance = null;
public static final String ACTION = "registerCallback";
public static PushNotificationPlugin getInstance() {
return instance;
}
public void sendResultBack(String msg, String payload) {
JSONObject data = new JSONObject();
try {
data.put("msg", msg);
data.put("payload", payload);
} catch (JSONException e) {
Log.e(TAG, e.getMessage());
}
String js = String.format("navigator.pushNotification.notificationCallback('%s');", data.toString());
//Log.d(TAG, "Sending javascript " + js);
this.sendJavascript(js);
}
@Override
public PluginResult execute(String action, JSONArray data,
String callbackId) {
instance = this;
PluginResult result = null;
if (ACTION.equals(action)) {
result = new PluginResult(Status.NO_RESULT);
result.setKeepCallback(false);
} else {
Log.d(TAG, "Invalid action: " + action + " passed");
result = new PluginResult(Status.INVALID_ACTION);
}
return result;
}
}MainApplication.java
package com.example;
import android.app.Application;
import com.urbanairship.UAirship;
import com.urbanairship.push.PushManager;
public class MainApplication extends Application {
final static String TAG = MainApplication.class.getSimpleName();
@Override
public void onCreate() {
super.onCreate();
UAirship.takeOff(this);
PushManager.enablePush();
PushManager.shared().setIntentReceiver(IntentReceiver.class);
}
public void onStop() {
UAirship.land();
}
}MainActivity.java
package com.example;
import android.os.Bundle;
import com.phonegap.DroidGap;
import com.urbanairship.UAirship;
public class MainActivity extends DroidGap {
/** Called when the activity is first created. */
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
super.loadUrl("file:///android_asset/www/index.html");
// phonegap plugins
super.addService("PushNotificationPlugin", "com.example.PushNotificationPlugin");
}
@Override
public void onStart() {
super.onStart();
UAirship.shared().getAnalytics().activityStarted(this);
}
@Override
public void onStop() {
super.onStop();
UAirship.shared().getAnalytics().activityStopped(this);
}
}IntentReceiver.java
package com.example;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.util.Log;
import com.urbanairship.UAirship;
import com.urbanairship.push.PushManager;
public class IntentReceiver extends BroadcastReceiver {
private static final String TAG = IntentReceiver.class.getSimpleName();
@Override
public void onReceive(Context context, Intent intent) {
Log.i(TAG, "Received intent: " + intent.toString());
String action = intent.getAction();
if (action.equals(PushManager.ACTION_PUSH_RECEIVED)) {
int id = intent.getIntExtra(PushManager.EXTRA_NOTIFICATION_ID, 0);
Log.i(TAG, "Received push notification. Alert: " + intent.getStringExtra(PushManager.EXTRA_ALERT)
+ ". Payload: " + intent.getStringExtra(PushManager.EXTRA_STRING_EXTRA) + ". NotificationID="+id);
String alert = intent.getStringExtra(PushManager.EXTRA_ALERT);
String extra = intent.getStringExtra(PushManager.EXTRA_STRING_EXTRA);
PushNotificationPlugin plugin = PushNotificationPlugin.getInstance();
plugin.sendResultBack(alert, extra);
} else if (action.equals(PushManager.ACTION_NOTIFICATION_OPENED)) {
Log.i(TAG, "User clicked notification. Message: " + intent.getStringExtra(PushManager.EXTRA_ALERT)
+ ". Payload: " + intent.getStringExtra(PushManager.EXTRA_STRING_EXTRA));
Intent launch = new Intent(Intent.ACTION_MAIN);
launch.setClass(UAirship.shared().getApplicationContext(), MainActivity.class);
launch.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
UAirship.shared().getApplicationContext().startActivity(launch);
} else if (action.equals(PushManager.ACTION_REGISTRATION_FINISHED)) {
Log.i(TAG, "Registration complete. APID:" + intent.getStringExtra(PushManager.EXTRA_APID)
+ ". Valid: " + intent.getBooleanExtra(PushManager.EXTRA_REGISTRATION_VALID, false));
}
}
}Follow the rest of the instructions regarding airshipconfig.properties and
you will be set. The folks from UrbanAirship suggested me that I should mention that most of the people will want to use the c2dm transport instead of helium. Check out their plans and decide by yourself what are your requisites and whether the basic plan fits your needs or go premium instead.
This is an example airshipconfig.properties:
developmentAppKey = yourDevelopmentAppKey
developmentAppSecret = yourDevelopmentAppSecret
productionAppKey = yourProductionAppKey
productionAppSecret = yourProductionAppSecret
#transport is "helium", "c2dm" or "hybrid"
transport = c2dm
c2dmSender = authorized-c2dmSender@gmail.com
inProduction = false
You just need now to generate an auth token executing python ua-android-lib-latest/tools/clientauth.py and paste the result in the "C2DM Authorization Token" of your urbainairship app (webpage).
I've uploaded to my github account a sample project that you can use as a base for your app. Please have a look and let me know what you think.
UPDATE: Added UAirship.land() in onStop()
UPDATE2: Mention that c2dm should be used instead of helium, show how to configure a C2DM based app. Add a sample project that summarizes this post.
June 03, 2011
For my new job I had to integrate Urban Airship with an Android Phonegap application.
UA's documentation only provides an example for iPhone apps, so if you are
looking for a way to integrate an Android phonegap with UA look no further!
The task is going to require you to write your own phonegap plugin with a
javascript and a java part, without further ado:
PushNotification.js
function PushNotification() {
}
PushNotification.prototype.registerCallback = function(successCallback, failureCallback) {
return PhoneGap.exec(
successCallback, // called when signature capture is successful
failureCallback, // called when signature capture encounters an error
'PushNotificationPlugin', // Tell PhoneGap that we want to run "PushNotificationPlugin"
'registerCallback', // Tell the plugin the action we want to perform
[]); // List of arguments to the plugin
};
PushNotification.prototype.notificationCallback = function (json) {
var data = Ext.util.JSON.decode(json);
Ext.Msg.alert("Success", data.msg);
};
PhoneGap.addConstructor(function() {
if (typeof navigator.pushNotification == "undefined")
navigator.pushNotification = new PushNotification();
});Note that I'm also using Sencha Touch in this project, you will need a json
decoder to decode the json message sent from java.
PushNotificationPlugin.java
package com.example;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import android.util.Log;
import com.phonegap.api.Plugin;
import com.phonegap.api.PluginResult;
import com.phonegap.api.PluginResult.Status;
public class PushNotificationPlugin extends Plugin {
final static String TAG = PushNotificationPlugin.class.getSimpleName();
static PushNotificationPlugin instance = null;
public static final String ACTION = "registerCallback";
public static PushNotificationPlugin getInstance() {
return instance;
}
public void sendResultBack(String msg, String payload) {
JSONObject data = new JSONObject();
try {
data.put("msg", msg);
data.put("payload", payload);
} catch (JSONException e) {
Log.e(TAG, e.getMessage());
}
String js = String.format("navigator.pushNotification.notificationCallback('%s');", data.toString());
//Log.d(TAG, "Sending javascript " + js);
this.sendJavascript(js);
}
@Override
public PluginResult execute(String action, JSONArray data,
String callbackId) {
Log.d(TAG, "Plugin Called");
instance = this;
PluginResult result = null;
if (ACTION.equals(action)) {
result = new PluginResult(Status.NO_RESULT);
result.setKeepCallback(false);
} else {
Log.d(TAG, "Invalid action: " + action + " passed");
result = new PluginResult(Status.INVALID_ACTION);
}
return result;
}
}MainApplication.java
package com.example;
import android.app.Application;
import android.content.Intent;
import android.util.Log;
import com.urbanairship.push.APIDReceiver;
import com.urbanairship.push.AirMail;
import com.urbanairship.push.PushReceiver;
public class MainApplication extends Application {
final static String TAG = MainApplication.class.getSimpleName();
public void onCreate() {
AirMail am = AirMail.getInstance();
am.acceptPush(this, new PushReceiver() {
@Override
public void onClick(String msg, String payload) {
/*
* Fire up MainActivity when the user clicks the Status Bar
* Notification
*/
Intent intent = new Intent("android.intent.action.MAIN");
intent.setClass(MainApplication.this,
MainActivity.class);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
MainApplication.this.startActivity(intent);
}
@Override
public void onReceive(String msg, String payload) {
// Get a reference to the plugin and send result to js
PushNotificationPlugin plugin = PushNotificationPlugin.getInstance();
plugin.sendResultBack(msg, payload);
}
});
am.setAPIDReceiver(this, new APIDReceiver() {
@Override
public void onReceive(String apid, boolean valid) {
if (valid) {
Log.d(TAG, "Got apid: " + apid);
} else {
Log.d(TAG, "Application registration invalid!");
}
}
@Override
public void onAirMailInstallRefusal() {
MainActivity.register = false;
Log.d(TAG, "AirMail Install Refused!");
}
});
}
}You will need to set up your AndroidManifest.xml and the rest of the settings
as described in the Android docs.
March 21, 2011
Durante las pasadas II Jornadas sobre Tecnologías Libres Milla Digital, organizadas por el Ayuntamiento de Zaragoza se pudo asistir (entre otras) a la presentación sobre el desarrollo de Vive Zaragoza. La grabación completa de la presentación se puede encontrar aquí. Además, se lanzó la versión 1.1 que resuelve algunos errores encontrados en la versión lanzada para [...]
March 10, 2011
Updated: as Blaxter notes, it’s necessary to open a new terminal after editing the bashrc file for the changes to take effect. Also, I’ve replaced the tail -n+2 with the -ss option. Thanks Baron Schwartz!
One of the things I’ve been doing lately is doing some cleanup on my laptop.
There are two things I’m constantly using on the shell:
- Open a project folder
- Connect to a MySQL Database
Bash Functions
I first made a bash function to help me with the projects paths:
function cdp {
case $1 in
"foo")
cd /Users/golo/devel/svn/foo/src ;;
"bar")
cd /Users/golo/devel/svn/bar/src ;;
*)
echo "Options:"
echo ""
echo " foo"
echo " bar"
esac
}
I placed that on my /etc/bashrc , so I write:
$ cdp foo
And it takes me to the foo project folder.
But, as I have lot of open projects, I have to remember “foo” and “bar”, or worse… ¡¡Write “foo” or “bar”!!
Bash Autocompletion
My Lazyness made me learn how to create bash autocompletions. This case is easy as executing “cdp” without parameters you get a list with all possible values. It’s easy to parse
.
The autocompletor should be placed on the file /etc/bash_completion.d/cdp with this content:
_cdp_show()
{
local cur opts
cur="${COMP_WORDS[COMP_CWORD]}"
opts=$(cdp | tail -n+2)
COMPREPLY=( $(compgen -W "${opts}" ${cur}) )
}
complete -F _cdp_show cdp
opts stores all possible options (line per option), and cur stores the text to be autocompleted (not sure). compgen is a helper to create the autocompletion options, and complete is the command that does the autocompletion reading the COMPREPLY variable.
Now I get the following behavior:
$ cdp <tab><tab>
foo bar
$ cdp f<tab>
$ cdp foo
Oh! Amazin!
MySQL Bash Autocompletion
¿What can be more awesome than that? Let me guess… ¡Autocompletion for mysql command!
The goal is to get autocompletion for the mysql databases. No more writing…
$ mysql information_schema
For that, we need a list of all databases on a parseable format, let’s try with SHOW DATABASES:
$ mysql -e "SHOW DATABASES"
+--------------------+
| Database |
+--------------------+
| information_schema |
| mysql |
| performance_schema |
+--------------------+
$ # Let's put this on a better format:
$ mysql -B -e "SHOW DATABASES"
Database
information_schema
mysql
performance_schema
$ # That's better, let's delete the table header:
$ mysql -B -ss -e "SHOW DATABASES"
information_schema
mysql
performance_schema
$ # We are ready!
Disclaimer: I tried mysqlshow but doesn’t accepts the Batch format, also I have the user and password on my /etc/my.cnf so this trick is not suitable for production environments.
Let’s create an autocompletor mixing this command with what we already know. The result is the file /etc/bash_completion.d/mysql:
_mysql_show()
{
local cur opts
cur="${COMP_WORDS[COMP_CWORD]}"
opts=$(mysql -B -ss -e "SHOW DATABASES;" )
COMPREPLY=( $(compgen -W "${opts}" ${cur}) )
}
complete -F _mysql_show mysql
Now you can use <tab>:
$ mysql i<tab>
$ mysql information_schema
Hope it helps! Improvements are welcomed
March 07, 2011
1. Intro
Plunging into Android development was something that I hadn’t done before. The closest thing to it was playing around with Java Micro Edition to target good-old Nokia hardware back in the day.
Making myself familiar with the development of Android applications was definitely an overdue task. Especially after the recent events. I’m back at [...]
March 04, 2011
service is a command-line tool for Android, completely hidden when you a using a GUI, touch-driven device. But when you run Android on anything with a keyboard, for instance using the Android-x86 project, it offers a handy way to interact with system services:
Usage: service [-h|-?]
service list
service check SERVICE
service call SERVICE CODE [i32 INT | s16 STR] ...
Options:
i32: Write the integer INT into the send parcel.
s16: Write the UTF-16 string STR into the send parcel.
You can list the installed services using:
service list
To invoke a particular service you need to know its name and the code of the particular method that you want to address. For instance, the next call, coded 2, will dial a random Spanish (+34) number:
service call phone 2 s16 "+34803466058"
Unfortunately, I was not able to find a complete listing of service codes, but with some ack-grep foo here is an incomplete list of Android’s service codes, with the file where they are defined. It was collected on an Android-x86’s repository using:
ack-grep FIRST_CALL_TRANSACTION
FIRST_CALL_TRANSACTION is defined on src/frameworks/base/include/binder/IBinder.h as:
FIRST_CALL_TRANSACTION = 0x00000001
You may have to look into the particular files to check all the existing codes, because some are not defined relative to FIRST_CALL_TRANSACTION.
Have fun!
March 03, 2011
Product Marketing vs Service Marketing
Companies which sell products usually are able to detach their production and marketing departments, so the people who is manufacturing the final goods and the people who interacts with the customers are not the same. The customer’s perception of the product is mostly related to the salesforce’s customer-facing capabilities.
When it comes to companies selling services, and especially consulting or software development services, there is a completely different picture. As a service is being sold and executed, there are a lot of continuous human interactions, at different levels, between people from the two organisations. Marketing and customer-facing activities are not performed just by the Marketing and Sales department, but also by different management and engineering people. The customer’s perception of the service starts to equate to their perception of the technical team interacting with them. And here is where problems may arise…
Technical or Marketing?
Customer-facing tasks involve relationships with people. However, different studies have found that between 1/2 to 2/3 of the computing/software engineering population is introverted, in the MBTI sense of being more interested in the internal world of ideas than the external world of people and things. What is more, 80% of computer professionals have a preference for thinking over feeling (again using MBTI definitions) compared to 50% of the general population. But feelings, and particularly empathising with others are fundamental to deliver a satisfaying customer experience, instead of BOFH-like episodes.
On the other hand, computers and software are very complicated artifacts, and understanding them thoroughly takes years. Non-technical people may be more social and suited for relationships, but sometimes is unable to understand correctly the context or scope of the work being done or the services being sold. And these misunderstandings may prove fatal.
So, I think there is no silver-bullet, but services should be carefully designed, identifying those technical persons who feel more comfortable interacting with non-technical people, and allowing them to develop this talent. Because, as an statistically rare occurrence, it might be an opportunity for growth
References
More information about the aforementioned studies can be found here:
- McConnell, Steve. "Rapid Development. Taming Wild Software Schedules" 253
- Lyons, Michael L. 1985. "The DP Psyche." Datamation, August 15: 103-109
- Thomsett, Rob. 1990. "Effective Project Teams: A Dilemma, A Model, A Solution." American Programmer, July-August: 25-35
March 02, 2011
- Blue: controlled or influenced heavily by Nokia
- Green: not controlled by Nokia, but workaroundeable
- Red: out of Nokia’s control
|
|
Nokia w/MeeGo
|
Nokia w/Android
|
Nokia w/Windows Phone
|
|
Hardware
|
Nokia
|
Nokia
|
Nokia
|
|
Operating System
|
Linux/MeeGo
|
Linux/Android
|
Windows Phone
|
|
Framework
|
Qt
|
Java/DEX
|
.NET
|
|
IDE
|
QtCreator
|
Eclipse
|
Visual Studio
|
|
Application Store
|
OVI Store
|
Android Market
|
Windows Phone Marketplace
|
|
Search Engine
|
N/A
|
Google
|
Bing
|
|
Maps
|
OVI Maps
|
Google Maps
|
OVI Maps
|
|
Costs
|
- Hardware
- Operating System
- Framework
- IDE
- Application Store
- Search Engine?
- Maps
|
- Hardware
- Operating System?
- Framework?
- IDE?
- Application Store?
- Search Engine?
- Maps?
|
- Hardware
- Operating System
- Framework + IDE
- Maps
|
|
Revenues
|
- Hardware
- Application Store
- Search Engine?
- Maps
|
- Hardware
- Application Store?
- Search Engine?
- Maps?
|
|
February 28, 2011
Android is mostly run on ARM hardware, but thanks to the Android-x86 project, you are able to run it on Intel platforms, like Lenovo S10-3t netbooks.
Bootable Android-x86 USB stick using GRUB2
There are some online instructions to build an USB bootable live image, but I modified it slightly it to use GRUB2 as bootloader.
First, you should follow the aforementioned instructions to build a USB image and store it on the stick. Assuming your device is at /dev/sdc:
make usb_img TARGET_PRODUCT=generic_x86
sudo dd if=out/target/product/generic_x86/generic_x86_usb.img of=/dev/sdc
The code which creates image is in bootable/newinstaller/Android.mk, and by default uses grub4dos:
usb_tmp_img := $(PRODUCT_OUT)/usb_tmp.img
$(usb_tmp_img): $(wildcard $(LOCAL_PATH)/usb/*) $(BUILT_IMG) | $(ACP) $(MKEXT2IMG)
rm -rf $(USB_BOOT)
mkdir -p $(USB_BOOT)$(ANDROID_SRC)
touch $(USB_BOOT)/ramdisk
echo 1 > $(USB_BOOT)/cmdline
ln $(BUILT_IMG) $(USB_BOOT)$(ANDROID_SRC)
$(ACP) -fp $(<D)/* $(<D)/../install/grub/android-x86.xpm.gz $(USB_BOOT)
ln -s grub4dos $(USB_BOOT)/kernel
$(hide) $(call check-density,$(USB_BOOT)/menu.lst)
$(hide) sed -i "s|VER|$(VER)|; s|CMDLINE|$(BOARD_KERNEL_CMDLINE)|" $(USB_BOOT)/menu.lst
num_blocks=`du -sk $(USB_BOOT) | tail -n1 | awk '{print $$1;}'`; \
num_inodes=`find $(USB_BOOT) | wc -l`; \
$(MKEXT2IMG) -d $(USB_BOOT) -b `expr $$num_blocks + 20480` -N `expr $$num_inodes + 15` -m 0 $@
To use GRUB2, as the image size is tailored for the contained files, first you have to resize the partition, and enlarge it by some MBs. You should not have any problem, because the whole system fits in less than 100 MB.
Once the partition is resized, install GRUB2 on the USB stick:
sudo mount /dev/sdc1 /mnt
cd /mnt
sudo grub-install --root-directory=. --no-floppy /dev/sdc
After this step, you should see under /mnt/boot/grub all the files required by the bootloader:
ls /mnt/boot/grub
Then you need a new /boot/grub/grub.cfg file, because grub legacy’s menu.lst syntax has suffered important changes. Try this one:
set default="0"
set timeout="6"
set root=(hd0,1)
# Entry 0 - Load Linux kernel
menuentry "Live USB - Run Android-x86 without Installation (HDPI)" {
set root=(hd0,1)
linux /android-system/kernel root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode video=-16 quiet SRC=/android-system DPI=240
initrd /android-system/initrd.img
}
menuentry "Live USB - Run Android-x86 without Installation (MDPI)" {
set root=(hd0,1)
linux /android-system/kernel root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode video=-16 quiet SRC=/android-system DPI=160
initrd /android-system/initrd.img
}
menuentry "Live USB - VESA Mode" {
set root=(hd0,1)
linux /android-system/kernel root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode video=-16 quiet vga=788 SRC=/android-system
initrd /android-system/initrd.img
}
menuentry "Live USB - Debug Mode" {
set root=(hd0,1)
linux /android-system/kernel root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode video=-16 vga=788 SRC=/android-system DEBUG=1
initrd /android-system/initrd.img
}
menuentry "Installation - Install Android-x86 2011-02-26 to harddisk" {
set root=(hd0,1)
linux /android-system/kernel root=/dev/ram0 androidboot_hardware=generic_x86 acpi_sleep=s3_bios,s3_mode video=-16 SRC=/android-system INSTALL=1 DEBUG=
initrd /android-system/initrd.img
}
Just umount and everything is ready to enjoy your Android-x86 USB stick:
sudo umount /dev/sdc1
Androidified Lenovo S10-3t
When using the generic-x86 image, you need to modprobe the hid-cando module to be able to use the touchscreen. So once the system boots up, switch to a console with Ctrl+Alt+F1 and type:
modprobe hid-cando
Now you can switch back (Alt+F7) and enjoy your Android (2.x) tablet.
Regarding wifi, if your netbook has an Atheros card, it should be working out of the box. Just go to settings, enable wifi and enjoy. Unfortunately, if your netbook is equipped with Broadcom wifi, you will have to resort to their closed drivers.
And… that is it!

February 22, 2011
Entre el 22 y el 26 de febrero de 2011 tendrán lugar las II Jornadas sobre Tecnologías Libres Milla Digital, organizadas por el Ayuntamiento de Zaragoza. Dichas jornadas comprenden una serie de talleres, eventos y ponencias, de contenidos orientados al software, hardware y conocimiento libres. Warp tiene el placer de participar como ponente el día [...]
February 17, 2011
No sabía cuántas cosas tenía pendientes en mi servidor hasta que me he puesto a mirarlo por dentro.
Resulta que con la última actualización de ebox a zentyal, los repositorios de los proyectos dejaron de funcionar, entre otras cosas porque no actualicé la configuración del LDAP. Hoy he estado un buen rato actualizando los tracs y reconfigurando la autenticación.
La configuración de los repositorios subversion la hago a través de apache. Poco ha cambiado desde que escribí Cómo configurar apache para autenticar con el LDAP de Zentyal, sólo he tenido que actualizar la contraseña y los nombres de dominio.
Sin embargo, me ha sido imposible volver a configurar los tracs para que autentiquen correctamente. O yo no conseguía configurar los plugins que existen, o no funcionaban para la última versión de trac.
La solución ha sido sencilla (aunque no muy elegante). Utilizando el AccountManagerPlugin, hay una opción para autenticar mediante una ruta HTTP (HttpAuthStore). Lo que hace el servidor es llamar a una ruta http con el usuario y contraseña que da el usuario. Si la solicitud se lleva a cabo con éxito, el usuario está autenticado.
Perfecto! Como se configurar apache fácilmente para autenticar, puedo usar lo mismo para autenticar los tracs
.

Lo otro que he hecho hoy es un paso previo a la remodelación del css de esta web. Consiste en liberar todos los temas de wordpress que he hecho hasta la fecha. Utilizar un repositorio subversion me facilitará el actualizarlos, y ya de paso publico el código para quien quiera curiosear.
En fin… mañana más
February 12, 2011
Django sitemaps is a great framework to generate sitemaps for your site.
The only problem is that it's not quite ready for static pages -pages where
you use render_to_response because the flatpages app does not meet your
needs.
How can we add them to our sitemap and provide a sound last modification date?
Some approaches I saw on the net returned just datetime.datetime.now() but
that's inaccurate. I ended up coding the following solution:
# Given the following urls.py
from foo.catalog.sitemaps import CategorySiteMap, ProductSiteMap
from foo.static.sitemaps import StaticSiteMap
...
urlpatterns += patterns('foo.static.views',
url(r'^about/$', 'about', {'template': 'static/about.html'}, name='static_about'),
url(r'^faq/$', 'faq', {'template': 'static/faq.html'}, name='static_faq'),
url(r'^mission/$', 'mission', {'template': 'static/mission.html'}, name='static_mission'),
url(r'^terms/$', 'terms', {'template': 'static/terms.html'}, name='static_terms'),
)
sitemaps = {
'categories': CategorySiteMap,
'products': ProductSiteMap,
'static': StaticURLSitemap(urlpatterns)
}
urlpatterns += patterns('django.contrib.sitemaps.views',
(r'^sitemap\.xml$', 'sitemap', {'sitemaps': sitemaps}),
)I created the following class that I include in my sitemaps dictionary:
import datetime
import os
from django.contrib import sitemaps
from django.core import urlresolvers
from django.conf import settings
class StaticSitemap(sitemaps.Sitemap):
"""Return the static sitemap items"""
priority = 0.5
def __init__(self, patterns):
self.patterns = patterns
self._items = {}
self._initialize()
def _initialize(self):
for p in self.patterns:
if getattr(p, 'name', None) is not None and p.name.startswith('static_'):
self._items[p.name] = self._get_modification_date(p)
def _get_modification_date(self, p):
template = p.default_args['template']
template_path = self._get_template_path(template)
mtime = os.stat(template_path).st_mtime
return datetime.datetime.fromtimestamp(mtime)
def _get_template_path(self, template_path):
for template_dir in settings.TEMPLATE_DIRS:
path = os.path.join(template_dir, template_path)
if os.path.exists(path):
return path
return None
def items(self):
return self._items.keys()
def changefreq(self, obj):
return 'monthly'
def lastmod(self, obj):
return self._items[obj]
def location(self, obj):
return urlresolvers.reverse(obj)Now my sitemap includes the static pages with an accurate last modified date.
February 11, 2011
Tras años de estudios, trabajo y mudanzas; mi montaña de proyectos sin acabar ha crecido y empieza a asustar.
Por eso, hoy empiezo un perido de paréntesis. Voy a dedicarme, por cinco semanas, a hacer todo lo que llevo tiempo queriendo hacer.

Proyectos, viajes, experimentos… lo que de tiempo.
Parte de la experiencia consiste en documentar todo lo que haga. Así que estos días habrá bastante movimiento por el blog.
Tengo muchas ganas de empezar, aunque de momento será mejor que recupere el sueño acumulado.
February 01, 2011
After a long hiatus (9 months since my last post) I'm back! Loads of things have happened till my last post... I quit my job and went on a travel around SE Asia, and I'm now -temporary- living in the Philippines.
I've been mostly working on Django and Android projects the last months, so expect some posts about this. Won't bother you with more details, just a quick post to let you know that this is not dead.
January 18, 2011
Linaro is an engineering organization entitled to develop a Linux base platform based on ARM. Its members are ARM, some of its licensees, and Canonical. They release different hw-dependent platforms, where you are able to run user-interface customisations, like "headless", "netbook", "handset"…
Andrea Gallo, ST-Ericsson’s TSC Member for ST-Ericsson at Linaro and MeeGo Business Development at ST-Ericsson, gave a talk during MeeGo Conference 2010 (video available), showcasing ST-Ericsson’s involvement with Linaro and MeeGo, and the way they plan to integrate Linaro and MeeGo releases.
MeeGo on U8500
ST-Ericsson’s U8500 platform is a smartphone platform, based on SMP Dual Core ARM Cortex-A9.
Andrea explained the extent of ST-Ericsson’s work on this platform for Linux, which encompassed:
At the time, they were targeting MeeGo using a customised kernel for U8500. It was expected for this year, and you can follow its development on:
Linaro and MeeGo
Then he went on explaining Linaro’s focus on engineering alignment, especially regarding ARM on Linux’s:
- Kernel
- Power management APIs
- OpenMAX
- X11 DRI framework
The overall goal is accelerate their upstream releases, and their vision is explained in the next figure:

The MeeGo specific process he outlined was:
- Make Linaro work on particular hardware
- Add required binaries (e.g. codecs)
- Release MeeGo images
ST-Ericsson, GStreamer and Android
Finally, Andrea mentioned some criticisms regarding ST-Ericsson backed GStreamer on Android integration (i.e. "a blog post not very happy").
He stated that ST-Ericsson appreciated the feedback, and that they were working to improve it.
Since then, it seems they fulfilled their promises, and released their gst-android, gst-plugins-bad (Audioflinger sink) and build system on public repositories.
I think it was an exemplary way to deal with criticism, and keep a healthy relationship with the open-source ecosystem, so kudos ST-Ericsson!
January 11, 2011
In a recent post, I reviewed a MeeGo Conference talk related to MeeGo TV, and now it is time to know what was said about its automotive applications.
Rudolf Streif talked about the MeeGo In-Vehicle-Infotainment working group, and the talk’s video is available online. Anyway, I am going to summarise the main topics discussed below.
Automotive applications are one of the hot embedded topics, especially in Europe, with an estimated market of 9 billion euro in 2012. IVI is a broad concept, which started with car radio systems a long time ago.
A key difference from a technical point of view is that IVI systems are usually componentised and distributed: processing units, sensors, actuators, etc:

Nowadays, smartphones are eclipsing IVI systems. For instance, hands-free telephony systems.
One of the biggest problems with automotive computer systems is related to the fact that cars have a planned life of 10 years, in sharp contrast to the planned life of mobile phones, that operators are used to renew very often (e.g. each year). This is a challenge in terms of accomodating new features or hardware units.
Currently, MeeGo IVI needs to improve:
On the other hand, some of the interesting requirements for innovative scenarios will have to wait until MeeGo 1.2:
- CDMA and LTE (data and voice)
- DLNA
- IPv6 (with everyone talking about 15 billon devices by 2015, we are running out of IPs
)
And remember, IVI is not just for cars!

January 06, 2011
To be customised with your project’s parameters:
-
Create project
android create project \
--target 15 \
--path ./AppProject \
--activity AppActivity \
--package com.example.app
-
Create test project (inside main project’s directory)
android create test-project \
--path ./TestApp \
--main ../App
-
Run emulator
emulator -avd Android-9 &
-
Make
ant debug
-
Install on emulator
adb install -r App.apk
-
Run on emulator (app)
adb shell \
am start \
-a android.intent.action.MAIN \
-n com.example.app/com.example.app.App
-
Run on emulator (test)
adb shell \
adb shell am instrument -w \
-e class com.example.app.AppTest \
com.example.app.tests/android.test.InstrumentationTestRunner
December 28, 2010
QML (Qt Meta-Declarative Language) is one of the recent additions to Qt, allowing to easily declare user interface:
- Layouts and elements
- Behaviour
Layouts and elements
Declaring the user interface instead of coding it is not a new idea, but QML uses a human-friendly approach rather than computer-friendly XML verbosity. For instance, on Android we are used to type:
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical">
. . .
</LinearLayout>
whereas using QML we can achieve the same definition with just:
Column {
. . .
}
Plain QML widgets are too "low-level" for some common user-interface tasks. For instance, you need to define your own "button" widgets as rectangles with a particular style, mouse interaction behaviour, etc.
Luckily, projects like QtComponents are addressing this problem, providing a set of sensible widgets to speed-up even more application development with Qt.
Behaviour
Static user interfaces belong to the past. As hardware and interaction models have evolved, users got used to fancy, organic effects that require a behavioural definition (e.g. transitions, interactivity, etc).
QML allows to include Javascript methods on the same UI definition files, so user-interface’s structure, style and behaviour are "self-contained" in a single file. This code implements methods, signal handlers, or other behaviour like this conditional property:
color: {
if (mouseArea.pressed)
return activePalette.dark
else
return activePalette.light
}
Of course, using signals and slots you are able to define behaviour in other source code files (e.g. C++), and connect your QML and code files. However, in my opinion, for any non-trivial project, you should define clear rules to keep non-UI logic out from the QML files…
December 24, 2010
... Dreaming of a #FFFFF Christmas
December 23, 2010
During the last MeeGo Conference, Dominig ar Foll, as Amino Communications‘ CTO, presented one of the keynotes, entitled "How to Speed Time to Market for Embedded Devices".
Amino is responsible for one of the first MeeGo TV success cases, through their deal with Telecom Italia regarding a hybrid/OTT STB based on Atom (Intel CE4100). Dominig showed an interesting point of view, about how open source platforms, like MeeGo or Ubuntu, help to reduce time-to-market.
Defining a MeeGo TV set-top-box
First, he outlined the kind of things people want to do with their 21st century TV sets (which, by the way, are a subset of some GENIO’s use case assumptions):
- See whatever you want, whenever you want
- Download and store music, pictures, home videos…
- Use Wikipedia to resolve familiar disputes
Some of their specific requirements were:
- Merge protected and open content legally
Planning for a set-top-box
Following the standard approach for an embedded development, such a system would have involved:
- 4 months of hardware development (non standard)
- 12-18 months of software development on the previous hardware base platform
Using MeeGo, they were able to deliver in just:
- 4 months of hardware development
- 4+2 months of parallel software development
Probably, here a picture is worth one thousand words:

He mentioned one of his "bad experiences" with hardware/software interactions on supposedly compatible platforms. It seems they were ready to release a product based on a hardware platform, when the "next generation" hardware was released and a customer requested them to use the newer one. So it took 8 months for a team of 10 guys to port the software to a platform which was advertised as "compatible"…
Choosing MeeGo
At first, they evaluated different Linux OSs, because of some advantages:
- Start working on software without waiting for the hardware platform to be ready
- Package management system
- Releasing quicker and more often
However, they were aware of some drawbacks with this approach:
- Requires 5-10% more power
- Graphics customisation is unavoidable
- RAM usage, and its reflection on costs: it is expensive, and may require a production above 1 million units to be cost-effective.
Finally, they selected MeeGo because they found especially important:
- Capability to work with upstream.
- Don’t break compatibility with upstream.
- Connection management. Internet sharing.
Tools and technical choices
Amino uses standard open source development tools for this product:
- GNU toolchain, git, Qt, Python, PyQt (Riverbank Computing bindings)
- Webkit
- GStreamer: it is not easy, but it works.
- Kickstart + MIC creator + OBS
One of the technical choices that he highlighted was using interpreted languages for some components, like user interfaces, instead of having 100% of the code base compiled.
Open SuSE Build Service
He praised Open SuSE Build Service as a somewhat unknown and hidden tool, but that allows to rebase the code very quickly, and has a UI for basic usage and a CLI for scripting.
Rebasing Amino’s kernel, toolchain and 700 packages took them 5 hours, although a equivalent operation needed 5 weeks some time ago.
Summary
The presentation ended with some remarks:
- A project of this kind can be done in 6 months (they did it).
- Using scripting languages for the UI is a good idea.
- OpenGL and X11 on SoC systems are still a little bit immature.
The presentation is available online. Dominig now works at Intel’s Open Source Tecnology Center, and is pushing MeeGo’s Connected TV Working Group.
December 22, 2010
Warp aporta al proyecto su expertise en tareas orientadas a la creación de interfaces adaptables, intuitivos y multimodales.
December 21, 2010
Calendario primer semestre 2011 Formación certificada oficial Oracle University Modalidad 100% presencial (Zaragoza- España) MySQL SQL-4501 – MySQL for Developers: 28 de febrero al 04 de marzo SQL-4405 – MySQL and PHP-Developing Dynamic Web Applications: 7 al 10 de marzo SQL-4502 – MySQL for Database Administrators: 14 al 18 de marzo SQL-4402 – MySQL Performance [...]
December 03, 2010
I found the instructions to flash a WRT54GV8.0 with DD-WRT too complex and Windows-specific, so here is my summarised version, provided the router is not your only Internet connection, and you are using Ubuntu or Debian.
- Power cycle
- Unplug and plug the router again.
- Wait 2 minutes.
- Hard reset (use a timer)
- Press the reset button.
- After 30 seconds, unplug the router.
- After 30 seconds more, plug the router again.
- After 30 seconds more, stop pressing the reset button.
- Download the firmware files
wget http://www.dd-wrt.com/dd-wrtv2/downloads/others/tornado/Gv8/vxworkskillerGv8-v3.bin
wget ftp://dd-wrt.com/others/eko/BrainSlayer-V24-preSP2/01-16-10-r13637/broadcom/dd-wrt.v24_micro_generic.bin
- Flash from the web interface using the VxWorks killer firmware
chromium-browser http://192.168.1.1
- Username / password: root / admin
- Wait 2 minutes.
- Make sure you can not access the web interface and the router pings you back ping 192.168.1.1 Otherwise, flash again.
- Flash via TFTP using the DD-WRT firmware
tftp 192.168.1.1 <<EOT
mode binary
rexmt 1
timeout 60
put dd-wrt.v24_micro_generic.bin
EOT
- Wait 2 minutes.
Voilà!
December 01, 2010
So… Two weeks ago I attended the MeeGo Conference 2010 in Dublin, and after travelling through three different countries since then, at last I am able to share some of my thoughts and experiences.
New toys!
For me, from a freebies standpoint it was the most successful conference ever, because I came back home with:
- A Lenovo S10-3t IdeaPad convertible netbook, which was awarded by Intel and Nokia to every attendee (but their own employees).
- A Nokia N900 from Nokia.
- A PandaBoard, sponsored by Texas Instruments, that I earned after winning their idea contest on Tuesday.
Here I am, happy with my new toys

Conference and sessions
The event showed the huge traction created by Intel and Nokia, MeeGo’s main corporate sponsors, who were joined by AMD this conference. Among the sponsors, it was also noticeable the involvement of Texas Instruments, the company behind OMAP, the ARM platform used by Nokia.
We missed the Early Bird events, but it seems they enjoyed building bridges, which is a really nice metaphor for a project like MeeGo, where a lot of different views and technologies are being integrated in the open. Probably we often miss the novelty and importance of having huge companies like Intel and Nokia behaving this way, and taking the risks involved with it.
Sessions were interesting and covered a wide variety of topics. I hope to post some of my notes in the coming weeks, because unfortunately I had some problems with my laptop’s wifi at the time. But some handy pencils and paper notebooks helped me to keep an analogic record
aMeeGos, Guinness, etc
It was also an opportunity to meet up old and new friends, and social events included my second visit to the Guinness Storehouse, a reception at the Aviva Stadium, and some fun at Dublin’s city centre. Anyway, I missed our particular Bilbili-Irish guide, who was touring the US at the time.
Almost every night we ended up at the hacker’s lounge, were an apparently unlimited supply of beer, soft drinks and food was waiting for us. People were also playing a game called Werewolf. Werewolf, Mao… I bet regular people mistake our "games" with some kind of mental disorder
Well, that is enough for today, I will try to dump more stuff soon, stay tuned…
P.S.: yes, "Warp-up" is intentional
October 27, 2010
Todavía estas a tiempo de inscribirte en el curso certificado MySQL para Desarrolladores! Lugar: Calle Don Jaime I, 33, 3ro derecha, Zaragoza. Fecha: 08 al 12 de noviembre de 2010. ¿Quieres aprender como utilizar MySQL en tus aplicaciones? ¿Necesitas usar procedimientos almacenados, triggers o vistas? ¿Quieres crear informes complejos, o utilizar consultas avanzadas para obtener [...]
October 13, 2010
Por primera vez en su historia las Fiestas del Pilar 2010 lucen su lado más virtual a través de los teléfonos inteligentes. El Ayuntamiento de Zaragoza encargó el desarrollo tecnológico de la aplicación ViveZaragoza a Warp Networks. La nueva aplicación que pone a disposición de los usuarios el Ayuntamiento de Zaragoza ofrece a los usuarios [...]
Os informamos de los cursos públicos JAVA y MySQL, que se van a impartir en el segundo semestre de 2010, en Zaragoza. Warp Networks como partner oficial de Sun Microsystems, imparte formación certificada MySQL y JAVA. También puede proveer a los interesados de vouchers para certificaciones Sun. FORMACIÓN JAVA EN ZARAGOZA: Programación Java (SL-275-SE6): Septiembre [...]
September 06, 2010
¿Qué puede ser peor que te hallen culpable tras un svn blame (o comando análogo de tu VCS favorito)?
Que te dediquen un error y lo distribuyan en millones de terminales móviles de todo el mundo
#include <utils/Errors.h>
namespace android {
...
enum {
OK = 0, // Everything's swell.
NO_ERROR = 0, // No errors.
UNKNOWN_ERROR = 0x80000000,
...
JPARKS_BROKE_IT = -EPIPE,
...
TIMED_OUT = 0x80000005,
UNKNOWN_TRANSACTION = 0x80000006,
};
Por suerte, ahora mismo no hay ningún error con ese valor, pero están todas las puertas abiertas para poderle echar la culpa a alguien
Un saludo a JParks!
September 05, 2010
As Chippy reports, a German joint-venture has just showcased the WeTab, an iPad competitor and, provided ther rumours get confirmed, the first MeeGo-based tablet available.
The interesting point here, assuming WeTab OS is actually a customised MeeGo version, would be that it is capable of runnning Android applications. It was tried before for Ubuntu, but they faced some problems because Google was not open sourcing crucial Android components.
But the WeTab is not restricted to Android apps; instead, it uses a meta-store, supporting native, Java, Linux, Adobe AIR® and Android Apps.
WeTab is also based on Intel Atom, so another distinctive point is that would be the first commercial contender fulfilling fundamental Android x86 project goals: port vanilla Android, which has important ARM dependencies in core services and libraries (e.g. instruction set architecture optimizations), to Intel Architecture platforms and its streaming SIMD instructions.
These facts, and the customized UI (showed in the above video), may be interpreted as side-effects of platform commodization: differentiation efforts and value-added proposals. I bet the future deserves us these sort of offers, at least from the heavy-weight contenders in the mobile arena.
And, while I am writing these lines, the WeTab has already become the best selling Tablet-PC in Amazon.de!
September 04, 2010
Although Android’s developer documentation is basically clear and well organised, sometimes you come across tips like:
"To use something other than TextViews for the array display, for instance, ImageViews, or to have some of data besides toString() results fill the views, override getView(int, View, ViewGroup) to return the type of view you want".
And then you have an insightful and extensive method description like:
public View getView (int position, View convertView, ViewGroup parent)
So… how do I override getView to make everything work as expected?
The best answer lies, as usual, in the Android Framework’s Java implementation. Using the getView original code as a template, it is really easy to figure out the details of your reimplementation:
public View getView(int position, View convertView, ViewGroup parent) {
return createViewFromResource(position, convertView, parent, mResource);
}
private View createViewFromResource(int position, View convertView, ViewGroup parent,
int resource) {
View view;
TextView text;
if (convertView == null) {
view = mInflater.inflate(resource, parent, false);
} else {
view = convertView;
}
try {
if (mFieldId == 0) {
// If no custom field is assigned, assume the whole resource is a TextView
text = (TextView) view;
} else {
// Otherwise, find the TextView field within the layout
text = (TextView) view.findViewById(mFieldId);
}
} catch (ClassCastException e) {
Log.e("ArrayAdapter", "You must supply a resource ID for a TextView");
throw new IllegalStateException(
"ArrayAdapter requires the resource ID to be a TextView", e);
}
T item = getItem(position);
if (item instanceof CharSequence) {
text.setText((CharSequence)item);
} else {
text.setText(item.toString());
}
return view;
}
To search and browse Android Framework’s code, a very useful tool is Google’s codesearch. For instance searching for "android arrayadapter getview" points us directly to the ArrayAdapter.java getView code, and there we can use the left-hand "Outline" tab to browse the different methods… (Of course, real men grep -r their local git)
August 27, 2010
A principios de mes proponía un Acertijo Java.
¿Qué sale por pantalla al ejecutar la clase FooBar?
import static java.lang.System.*;
public class FooBar {
public FooBar() {
out.print(" Instance ");
}
static {
out.print(" Static ");
}
public static void main (String args) {
out.print(" Main ");
new FooBar();
}
}
Simplificando, lo que ocurre es lo siguiente:
- Se carga la clase FooBar en memoria
- Se ejecutan los bloques estáticos: static{}
- out.print(” Static “); está en un bloque estático
- Una vez cargada la clase, ya se pueden ejecutar métodos estáticos como main
- out.print(” Main “); está dentro del método main
- Se crea una instancia de la clase FooBar en el método main
- Para ello se ejecuta el constructor
- out.print(” Instance “); está en el constructor
Siguiendo este razonamiento, la opción correcta sería la c: “Static Main Instance”.
La opción c parece correcta, pero no se llega a ejecutar el método main. Recordemos la firma que tiene que tener el método main para ser la entrada de un programa java:
public static void main (String[] args) {}
Ha de ser esa o equivalente. ¿Ves la diferencia? El parámetro args tiene que ser un array [] de String, ya que representa los argumentos introducidos por línea de comandos. En la clase FooBar el parámetro args es simplemente un String.
Por ello, el código no se ejcutará. Java mostrará un error indicando que en la clase FooBar no existe un método main. Es por ello que la opción correcta era la f: No se ejecutará
En el día a día, un programador no sólo tiene que saber traducir ideas a código. En algunas ocasiones el código no se comporta como queremos y es cuando hay que buscar el detalle.
La agilidad con la que uno detecta pequeños detalles marca la diferencia. Algunos factores que afectan a esta agilidad son, la paciencia, saber escribir código claro, y sobre todo el conocimiento de las herramientas con las que uno trabaja.
Igual que hice en el otro post, animo a cualquiera a ponerse a prueba estudiando la certificación de Programador Java o acudir a uno de los cursos oficiales que imparto, es toda una experiencia.
August 26, 2010
Below is a bootchart showing an Aava Mobile’s bootchart using MeeGo Handheld. I used the meego-handset-ia32-aava-mtf-1.0.80.15.20100813.1-sda.bin image.
To generate the bootchart, you just need to mic-chroot and install these two packages (the default kernel has process accounting enabled):
yum install bootchart acct
Then, just copy the image to the boot media, and turn the power on
Your chart will be stored in /var/log/bootchart-YYYYMMDD-HHMM.svg

(Click to enlarge)
August 16, 2010
Being fully aware of what’s happening on your system, since the very first stages, is one of the things that I really love about open source software.
I used to spend hours and hours dissecting different live cd systems, or setting up network boot scenarios, so it was likely that I would end up doing the same with this lovely Aava Mobile running MeeGo Handset
In this post, I will explain just the first stages of its boot sequence, involving the boot loader, the kernel and the initial ramdisk. Details about the system and the graphic session initializations will be presented in next posts.
Boot loader
MeeGo Handheld uses kboot as bootloader, and a two-step boot sequence. Basically, it involves booting the kernel, and then running an intermediate, ramdisk based system, before loading the root filesystem and letting the classic UNIX system init process start.
Kernel
MeeGo Handheld kernel’s default parameters are:
ro pci=noearly console=tty1 console=ttyS0 earlyprintk=mrst loglevel=8 nosplash s0ix_latency=160
An brief explanation for each parameter is included below:
ro: mount root device read-only on boot.
pci=noearly: skip any early type 1 scanning.
console=tty1: set tty1 as output console device.
console=ttyS0: set ttyS0 (serial) as output console device.
earlyprintk=mrst: early printk feature (mrst => Moorestown) for debugging during the early stages of the bootup. It allows to use printks even before the real console drivers are available.
loglevel=8: full debug. Any kernel message will be printed to the console.
nosplash: not used by the kernel, but forwarded to the root filesystem’s system init.
s0ix_latency=160: related with the advanced power management capabilites of the Moorestown platform.
Ramdisk
Once the kernel is loaded, it enters the ramdisk initialization sequence. Its main goal is finding and mounting a suitable root partition, so you don’t need to hardcode it, and the same image can be reused regardless you are storing the root partition on an SD, USB or NAND device.
MeeGo Handheld ramdisk is based on Fedora’s. It includes a basic selection of early user space commands, but -surprisingly for an embedded environment-, it is not Busybox based, sporting a complete bash shell and the full-fledged version of these tools.
Filesystem layout
The ramdisk contents are a bare bones UNIX system, stripped down to contain just the basic stuff:
├── bin
│ ├── bash
│ ├── cat
│ ├── chmod
│ ├── cut
│ ├── dd
│ ├── dmesg
│ ├── echo
│ ├── env
│ ├── grep
│ ├── kill
│ ├── less
│ ├── ln
│ ├── ls
│ ├── mkdir
│ ├── mknod
│ ├── mount
│ ├── rm
│ ├── sed
│ ├── sh -> bash
│ ├── sleep
│ └── umount
├── dev
├── etc
│ ├── fstab
│ └── udev
│ └── rules.d
├── init
├── lib
│ ├── ld-linux.so.2
│ ├── libacl.so.1
│ ├── libattr.so.1
│ ├── libcap.so.2
│ ├── libc.so.6
│ ├── libdl.so.2
│ ├── libpcre.so.0
│ ├── libpthread.so.0
│ ├── librt.so.1
│ ├── libtinfo.so.5
│ ├── terminfo
│ │ ├── a
│ │ │ └── ansi
│ │ ├── d
│ │ │ └── dumb
│ │ ├── l
│ │ │ └── linux
│ │ └── v
│ │ ├── vt100
│ │ ├── vt100-am
│ │ ├── vt100-nav
│ │ ├── vt102
│ │ ├── vt200
│ │ ├── vt220
│ │ └── vt52
│ └── udev
│ └── rules.d
├── proc
├── sbin
│ ├── blkid
│ ├── blockdev
│ ├── chroot
│ ├── dmsetup
│ ├── insmod
│ ├── killall5
│ ├── losetup
│ ├── lsmod
│ ├── modprobe
│ ├── pidof
│ ├── run-init
│ ├── udevadm
│ └── udevd
├── sys
├── sysroot
└── usr
└── lib
├── libblkid.so.1
├── libdevmapper.so.1.02
└── libuuid.so.1
/init script
Once the kernel loads, it starts executing the /init script, that:
- Sets up the basic environment
- Parses kernel command line options
- Sets up root filesystem
- Transfers control to the root filesystem’s init
We are going to walk through this small piece of code, skipping some setup and debug sections for clarity’s sake.
1. Set up the basic environment
First, it redirects standard output and error to /dev/console. This is important for debugging, as the console device /dev/console is handled by the kernel, and we can change it using boot params, e.g. to access display-less devices using a serial interface.
Then, the minimal facilities are set up. An initramdisk is a very early, almost "naked" user-space, so we need a way to interact with the operating system: some device files and the Linux kernel’s pseudo filesystems. From this point on, any executable on the ramdisk has a way to perceive and interact with the system. Basically, this stage involves:
- Setting up udev’s basic environment under /dev (mount udev and create basic device files under /dev: console, null, kmsg, pts, shm, fd, stdin, stdout, stderr)
- Mounting pseudo filesystems (/proc and /sys)
- Disable the usermode helper hotplug mechanism (it relies on udevd instead)
2. Parse kernel command line options
It parses the command line options, and then:
- Overrides the default values if any specific ones are provided.
- Blacklists any module that may interfere with the system.
- Handles the kernel module options, writing them on the ramdisk’s modprobe.conf
The main variables used by the script are detailed below:
init: specifies the program which will be executed once the initial ramdisk stage ends.
ro, rw => root_ro, root_rw variables, control wether the root file system is mounted read-only or read-write.
quiet: enable or disable boot process debug messages.
shell: if enabled, drops the user to a shell, just after setting up /dev/root.
eshell: if enabled, drops the user to a shell, just before init.
Other variables, like live_ram, live_locale, overlay or check, are not used.
3. Set up root filesystem
Most of the /init script code handle setting up the root filesystem.
The detection has two clear execution paths, depending on the "autodetect" variable’s value. This variable is not defined or processed from the kernel’s command line, so it seems it’s just some dead code from another MeeGo initrd.
First, three variables are initialized from the embedded /etc/fstab file, or the related kernel command line options:
root
rootflags
rootfstype
For instance, the default /etc/fstab file, stored inside the ramdisk, holds this root filesystem definition:
/dev/sda1 / ext3 defaults,noatime 0 0
Once these variables are set, if autodetect is enabled, it adds different udev rules, depending on how the root filesystem is specified via the root variable, like /dev/disk/by-label, /dev/disk/by-id, CDLABEL, LABEL, UUID, etc. It just does nothing if root is specified by another /dev/* path.
If autodetect is not enabled (or not defined, which seems the case), it just starts udev, waits for it to be settled, and then searches for a filesystem at:
- SD devices:
mmcblk0, mmcblk1, mmcblk2, mmcblk3
- USB devices:
sda, sdb, sdc, sdd, sde, sdf
- NAND devices:
nda, ndb, ndc
After this process, the thingtomount variable must be set, or an error has occurred.
(At this point, if the "shell" parameter is enabled, the user is dropped on a bash shell)
The final stage of the root filesystem setup involves making sure the device specified by thingtomount holds a suitable root file system, composing mountoptions with rootflags, root_rw and root_ro, and, finally, mounting the root filesystem at /sysroot
4. Transfer control to the root filesystem’s init
Once the new root filesystem is available, the process is almost done. The script just:
- Sets wether or not to pass kernel cmdline to the root filesystem’s init (because init can be overriden by a kernel parameter)
- (At this point, if the "eshell" parameter is enabled, the user is dropped on a bash shell)
- Kills udevd to enable the new system to take control of the plugging events.
- Calls
/sbin/run-init "$@", which is in charge of this little piece of black magic:
#!/bin/bash
cd /sysroot
mount --move . /
exec /sbin/chroot . "$init" "$@"
At this point, everything is ready for the system initialization to start…
August 12, 2010
Since I started to play with Atom based devices, this is the first time I have a real “handheld” in my hands: the Aava Mobile.
It’s still a little bigger than a Nexus One, but anyway, it’s amazing how they managed to miniaturize a complete computer into a SOC:



Since mid 2007, a device like a Samsung Q1 Ultra has reduced four times its size, sporting some new goodies like a bunch of sensors (ambient light, proximity, 3D compass, accelerometer…).
MeeGo for Handhelds is under heavy development, and Intel and Nokia efforts for creating a compeling environment for users, but also for developers, are going to be really, really interesting. Exciting times ahead!
August 02, 2010
Volvemos después de la resaca de año nuevo con un acertijo java.
Suponiendo que el contenido del archivo FooBar.java es el siguiente… ¿Qué saldrá por pantalla al ejecutar la clase FooBar?
import static java.lang.System.*;
public class FooBar {
public FooBar() {
out.print(" Instance ");
}
static {
out.print(" Static ");
}
public static void main (String args) {
out.print(" Main ");
new FooBar();
}
}
- Main Static Instance
- Instance Static Main
- Static Main Instance
- Main Instance
- No compilará
- No se ejecutará
Hagan sus apuestas…
Antes de empezar a preparar la certificación SCJP (Sun Certified Java Programmer) no había caído en la cuenta de cuántas cosas desconocía de programación.
Estés preparando o no la certificación de programador, recomiendo la guía de Kathy Sierra. Además, si quieres que un experto en java (modestia aparte) te asista, puedes invitarme a tomar una cerveza, o apuntarte al curso oficial que impartiré en septiembre: SL-275-SE6 Java Programming Language
¡Date prisa, al tercero que me invite a una cerveza ya no hablaré coherentemente, y el curso tiene las plazas limitadas!
Un Saludo!
Actualizado: Puedes encontrar la solución aquí.
August 01, 2010
Private clouds for Agile teams was the name of a brief introduction to some existing cloud technologies, held last Thursday in SkillsMatters by Toby Hobson from Raptor Consultants.
The first half of the talk outlined some of the features and practical problems of cloud computing. For instance, the lack of a suitable licensing scheme from some OS/application vendors, the difficulties integrating legacy systems, or the concerns about the security of production environments. This problems, especially the last one, are limiting cloud deployments to development and integration environments, using private cloud technologies.
Then he went on comparing some of the main offerings for the deployment of these sort of clouds:
3Tera: easy to use GUI, most suited to non-techies.
Red Hat: good support, but probably you still need to buy professional services. Best option for Red Hat shops doing strategic investment.
OpenQRM: not just a private cloud system but a more general datacenter management solution. Suited for environments involving legacy systems. Complex to configure, but offering an excellent and customer focused support.
Ubuntu Enterprise Cloud: excellent EC2 support (using Eucalyptus, hi Mårten!
), easy to setup, good documentation and excellent support. The best option to deploy quickly a private cloud.
Regarding the “for Agile teams” part, unfortunately the talk didn’t delve deeper into development topics, but it mentioned build and test automation, and the need for a good scripting platform/API.
You can find the podcast here.
July 23, 2010
Yesterday, I attended The Business Analyst’s role on Agile projects at Skills Matters. Allan Kelly spoke about “business analysis” and how it fits in an agile project.
He talked about how naive some of the Extreme Programming and Agile original principles were, regarding analysis activities. Replacing “the customer” in make the customer always available with a business analyst (a customer proxy) is the way he proposed to deal with this problem. E.g. in an SCRUM team, he proposed a Product Owner role encompassing technical leadership, product management and business analysis duties.
I liked his explanation -with actual data from the MIT Sloan review-, of why, in an organizational improvement context, doing the things right before is better than doing the things right at first. (Slide 18, The Alignment Trap)
When he talked about Just In Time Requirements, I was confronted with the same thoughts I have most of the times I apply this technique: clients, especially top management, are reluctant to this kind of uncertainty. It takes time, and a tactful approach, to convince them.
I don’t agree, at least as a general definition, with his standpoint of SCRUM as a “project management method without a project manager”. Besides pure managerial tasks (like some staffing details), I think a separate person is still needed to have a full (not iteration-centric) management view of projects, and most important, to avoid distractions and cope with unplanned or non-deterministic events (e.g. chasing equipment providers or busy external stakeholders).
The slides and video are available.
June 09, 2010
Es verdad, hay que confesarlo. Tengo un problema con los aparatos… No puedo estar quieto con ellos.
Hace menos de un mes acabó cayendo en mis manos un lector de tinta electrónica Sony PRS.900. El aparato en sí está bastante bien. Una pantalla de 7′, pantalla táctil (aunque admito todo tipo de críticas acerca de los reflejos que produce) e incluso 3G que permanece el 99,999% del tiempo desactivado porque no sirve para nada excepto para comprar libros en la tienda online de Sony. Para más INRI, el aparato es “Sold in USA”, por lo que el 3G sólo funciona en el país yankee.
Para hablar acerca de editoriales, libros, precios, gobiernos o de por qué hay bestsellers en Amazon Reino Unido que cuestan un 40% lo que cuestan en la Fnac, ya hay otras páginas. Yo he venido aquí a hablar de mi libro… o sea, de mi problema… o sea, de dejar quieto un aparato sin meterle la zarpa, actualización, firmware, flash, update o una sarta de bits que le provoquen convulsiones y deje de funcionar como debía.
Desde el principio el tema que más me picó fue el tema del 3G. Tener un aparato que funciona al 99% está bien, pero saber que nunca vas a poder usar ese 1% es terrible. Eso sí, conseguir que funcione ese 1% aunque jamás necesites utilizarlo es la bomba. Por tanto, había que conseguir que funcionase el 3G.
Como primer paso, busqué lo que había disponible sobre el aparato. Encontré unos firmwares de unos rusos muy listos (o desesperados) que habían traducido el interfaz a la lengua de las muñecas Matroskas. Genial, la parte dificil estaba hecha. Más si habían metido fuentes cirílicas. Para lo que me interesaba: la gente ya sabía “flashear” un dispositivo de estos.
El Sony PRS-900 contiene un sistema Linux (LinuxLink) de TimeSys. El sistema contiene un sistema de ficheros de tipo cramfs y con algunos pequeños tutoriales, es razonablemente sencillo cambiarlo. El mayor problema es que para flashearlo es necesario un equipo con windows (hay que hacer llamadas a una DLL de windows para entrar en modo recovery).
Pim Pam Pum, lector flasheado. Si había funcionado la primera vez con un firmware ruso, la siguiente podía funcionar con un firmware Made in Spain. Así, descomprimí la imagen cramfs y me puse a mirarle las tripas al aparato. Por dentro del directorio /opt/sony/ebook/application… se encuentra la mayor parte del software que ve el usuario. Parece una aplicación bastante flexible, que supongo que será la piedra angular de Sony para sus lectores. Muy probablemente, un sólo software podrán utilizarlo para el PRS-300, PRS-500, PRS-505, etc ya que afecta a todo el dispositivo; desde el cambio de hora, hasta las características soportadas por el dispositivo, pasando por la configuración del APN del 3G (uhmmm
).
Me propuse cambiar ese valor para “esquivar” el APN que tienen en consorcio Sony y AT&T en Estados Unidos, y lo cambié por el de movistar (junto con una SIM). Además, quité la configuración del proxy que también estaba presente, ya que parece que la tienda que muestra el PRS-900 es a través de un navegador web reducido.
Hechos los cambios, nueva imagen, y a flashear. Fracaso total. El lector no conectaba y lloraba pidiendo que le quitase esa SIM del infierno.
Los rusos listos también habían encontrado el modo de pruebas de hardware del equipo. Gracias a una pequeña combinación de botones, se puede acceder a todo un menu interno del aparato para probar pantalla, calibrarla, y/o acceder a otra información o configuraciones. Lo mejor de todo es que algunas de las opciones mostraban un volcado de los registros del aparato. Click. Volcado a la SD. A investigar…
En los logs del sistema (nada parecido a un log Unix), aparecen 3 tipos de archivos. Los que están en formato binario puro (ya si eso les voy pidiendo el manual a Sony…), los que traducen el formato binario a un formato legible, aunque mediante códigos (o llamo a un egiptólogo para que me lo descifre por asociaciones), y por último, los que muestran esos códigos traducidos a cosas más humanas.
Como ejemplo:
0, Wed 31 Dec 1969 19:00:08, 883687, CM, Call API, Create Instance, 0, 0, 0
1, Wed 31 Dec 1969 19:00:09, 36165, log, start, 0, 0, 0, 0
2, Wed 31 Dec 1969 19:00:09, 43897, pm, stateChangeLockReq, Run, 0, 0, 0
3, Wed 31 Dec 1969 19:00:09, 69969, pm, doStateChange, Off, Run, 0, 0
4, Wed 31 Dec 1969 19:00:09, 70066, pm, deviceStateChange, Start, Run, 0, 0
5, Wed 31 Dec 1969 19:00:09, 71506, pm, deviceStateChange, Finish, Run, 0, 0
6, Sat 10 Jan 2009 03:30:36, 116727, subCPU, send, system, bootFinish, 0, 0
7, Sat 10 Jan 2009 03:30:36, 124550, subCPU, send, key, onOff, 822083584, 0
8, Sat 10 Jan 2009 03:30:36, 134396, subCPU, send, touchpanel, onOff, 822083584, 0
9, Sat 10 Jan 2009 03:30:36, 144468, subCPU, send, touchpanel, sampling, 50331648, 0
10, Sat 10 Jan 2009 03:30:36, 154418, subCPU, send, touchpanel, breaktime, 16777216, 0
11, Sat 10 Jan 2009 03:30:36, 164455, subCPU, send, LED, LED, 0, 0
12, Sat 10 Jan 2009 03:30:36, 174444, subCPU, send, battery, queryLevel, 0, 0
Bastante aceptable…
Ahora era cuestión de investigar qué narices estaba pasando con el módulo 3G
CM, Received UR, [*EMRDY: 1]
CM, State, Radio Off, 0, 0, 0
CM, Sent ATCom, ATE0, OK, 0, 0
CM, Sent ATCom, AT+CMEE=1, OK, 0, 0
CM, Sent ATCom, AT+CPIN?, OK, 0, 0
CM, Info, Sleep Mode, Can Sleep, 0, 0
WAN, getInfo, 0, 0, 0, 0
WAN, stateChange, partialOn, 2, 2, 8
CM, Sent ATCom, AT+CGSN, OK, 0, 0
CM, Call API, Get Info, 0, 0, 0
WAN, getInfo, 0, 0, 0, 0
WAN, lock, 1, 0, 0, 0
CM, Sent ATCom, AT+CRSM=176,12258,0,0,10, OK, 0, 0
WAN, unlock, 0, 0, 0, 0
WAN, lock, 1, 0, 0, 0
Call API, Stop, 0, 0, 0
WAN, stop, 0, 0, 0, 0
WAN, stateChange, waitStop, 2, 2, 7
CM, Sent ATCom, AT+CFUN=0, OK, 0, 0
A grosso modo, lo que se ve es que el dispositivo despierta (*EMRDY: 1), oculta el eco local (ATE0), activa los errores numéricos del módulo (AT+CMEE=1) y consulta si necesita PIN (como lo tenía desactivado, todo sin problemas). Después, solicita el número de serie del aparato (normalmente se hace para mostrarlo en algún menú para información del usuario), y llega a un punto en el que lee de forma binaria la SIM, haciendo:
AT+CRSM=176,12258,0,0,10
comando que lee el número de identificación de la SIM (ICCID). Tras esta lectura (teoricamente fructuosa), se ve mucho “Stop” y un AT+CFUN=0 que acaba apagando el módulo de telefonía.
Hasta este punto, es común tanto para la SIM de Movistar como para la de AT&T.
Si seguimos indagando, parece que con la SIM de AT&T, el módulo ya no sigue progresando. Recibe notificaciones para intentar despertarse de nuevo y seguir conectando, pero no hay más comandos AT, sino sólo estos intentos en vano. Sin embargo, con la SIM de Movistar, se puede ver:
CM, Received UR, [*EMRDY: 1]
CM, State, Radio Off, 0, 0, 0
CM, Sent ATCom, ATE0, OK, 0, 0
CM, Sent ATCom, AT+CMEE=1, OK, 0, 0
CM, Sent ATCom, AT+CPIN?, OK, 0, 0
CM, Sent ATCom, AT+CREG=1, OK, 0, 0
CM, Sent ATCom, AT+CGREG=1, OK, 0, 0
CM, Sent ATCom, AT*E2CFUN=1, OK, 0, 0
CM, Sent ATCom, AT+CFUN=1, OK, 0, 0
CM, Received UR, [*E2CFUN: 1, 1, 0
CM, State, No Service, 0, 0, 0
CM, Sent ATCom, AT*EIAD=0, OK, 0, 0
CM, Sent ATCom, AT*EIAC=1, OK, 0, 0
CM, Sent ATCom, AT+CSCS=IRA, OK, 0, 0
CM, Sent ATCom, AT*EIAPSW=1,1, OK, 0, 0
CM, Sent ATCom, AT*EIAAUW=1,1, OK, 0, 0
WAN, stateChange, on, 2, 2, 4
CM, Received UR, [*ESTKSMENU: mo
CM, Received UR, [+CREG: 1]
CM, Received UR, [+CGREG: 1]
CM, State, Attached, 0, 0, 0
WAN, notifyState, registered, 0, 0, 0
CM, Received UR, [*EMWI: 1, 0]
CM, Received UR, [+PACSP0]
CM, Sent ATCom, AT*E2OTR=1, OK, 0, 0
CM, Sent ATCom, AT+CIND?, ERROR, 100, 0
CM, Sent ATCom, AT+CIND?, ERROR, 100, 0
CM, Sent ATCom, AT+CIND?, ERROR, 100, 0
CM, Info, Sleep Mode, Can Sleep, 0, 0
CM, Sent ATCom, AT*ERINFO=1, OK, 0, 0
CM, Sent ATCom, AT*ERINFO?, OK, 0, 0
CM, Sent ATCom, AT*E2NAP=1, OK, 0, 0
CM, Sent ATCom, AT*ENAP=1,1, OK, 0, 0
CM, Info, Sleep Mode, Can not Sleep, 0, 0
WAN, notifyState, error, 0, 0, 0
CM, Received UR, [*E2NAP: 2]
CM, Sent ATCom, AT*E2CFUN=1, OK, 0, 0
WAN, stateChange, waitOff, 7, 2, 6
CM, Sent ATCom, AT+CFUN=4, OK, 0, 0
CM, Sent ATCom, AT*E2OTR=0, OK, 0, 0
WAN, unlock, 0, 0, 0, 0
CM, Sent ATCom, AT*ERINFO=0, OK, 0, 0
CM, Received UR, [*E2NAP: 0]
CM, Error, Connection, 0, 0, 0
CM, Received UR, [+CREG: 4]
CM, Received UR, [*E2CFUN: 1, 4, 0
CM, State, Radio Off, 0, 0, 0
CM, Sent ATCom, AT+CFUN=0, OK, 0, 0
CM, Info, Adjust State, Radio Off, 0, 0
CM, State, Module Off, 0, 0, 0
Se puede analizar con calma todos los comandos. Aproximadamente el formato es:
accion,comando,parametros_recibidos
o
accion,comando,respuesta,codigo_de_error
Básicamente, se activan notificaciones, sensores de temperatura, se reinician los contextos de conexión a internet, se crean nuevos (incluso con mis datos cambiados del APN), así todo correcto hasta que se llega al a línea:
CM, Sent ATCom, AT+CIND?, ERROR, 100, 0
La cual quiere decir: AT+CIND Indicator control (ver. 5) – Check the current status of indicators and states in the phone, for example, check if a charger is connected, check the current state for a call setup, and so on. Comprueba ciertos estados internos del teléfono y ¿como respuesta?, da un ERROR. Cagada. Como error CME asociado a esta respuesta el número 100… Miramos la tabla de errores, y ¿qué encontramos? Error 100: Unknown. Doble cagada con tirabuzón.
En resumen, cabe la posibilidad de que el dispositivo esté bloqueado para SIMs de AT&T. Puede que incluso esté bloqueado para que sólo funcione con la SIM que venía con el lector. Puede que se hagan comprobaciones en el software, además de en el módulo de telefonía, para saber si el aparato debe funcionar en España… Al menos hay una cosa a agradecer, el módulo no es CDMA, lo cual sería posible que funcionase en redes GSM europeas (de hecho, eso dice en las hojas de especificación, aunque la página de Sony diga lo contrario). Pero ahora… pueden ser tantas cosas que el siguiente paso es incierto. Una opción podría ser tratar de conseguir un módulo Ericsson F3507G liberado de operadoras, para ver si únicamente está bloqueado. No es una locura, pero tampoco es barato. También se podría intentar colocar otro módulo distinto de otro fabricante, aunque entonces implicaría perder toda la integración del software (y tener que compilar un módulo del kernel como mínimo, o un kernel nuevo)… muy arriesgado.
Quizá también podría estar quietecito por una vez con estos aparatos, pero… entonces no tendría el problema que me ha hecho escribir el post
Referencias: Información sobre el módulo del lector, una pequeña introducción sobre los comandos soportados, Manual de comandos AT GX64 y la lista de comandos AT para teléfonos Sony Ericsson
May 16, 2010
For the final project of my computer-science degree at Universidad de Zaragoza, I am developing a complete navigation system for Lego Mindstorm robots. Using all the sensors availible for this kind of robost, my goal is to study how trustly can these robots be.
I used Lejos OS for the robot brick, and I developed a visual application for PCs that using a bluetooth connection can monitor the robot sensors, the position and the speed of the robot. It is also a remote control to the robot, if you don’t want to trust in its artificial intelligence.
It navigates using a preload map, and helped with the camera and the ultrasonics sensor it can update the map with the obstacles it detects. When you send a command with the position you want the robot will go, it calculates the best path to go, and if it detects an obstacle while is moving, it updates the map, recalculates the path and send all information to the control application on the PC by bluetooth. It uses a closed-loop control movement, based on its calculated path on a cell based map.
This is a video of the robot avoiding obstacles and getting into the goal position.
Using a camera, it is also able to follow color objects, like a red ball. And based in the size of what it sees, it open and close a clamp to catch it, here it is a video of a demostration of it.
This robots has a diferncial movement, now I am working in a car-like robot, I will upload more information as soon as possible.
May 12, 2010
Caribou is a text entry and UI navigation application being developed as an alternative to the Gnome On-screen Keyboard. The overarching goal for Caribou is to create a usable solution for people whose primary way of accessing a computer is a switch device.
The initial goal is to make an in-place on-screen keyboard suitable for people who can use a mouse but not a hardware keyboard. This on-screen keyboard may also be useful for touch screen or tablet users.
With the funding from the Consorcio Fernando de los Rios from Junta de Andalucia (Spain), Warp is developing improvements to Caribou keyboard like predictive text, spanish layouts or the posibility of use with a switch device.
Warp has an early implementation of a DBUS service that provide prediction to the keyboard (or any application) using Presage prediction library, and using a patch developed by Joaquim Rocha we have a different keyboard layout specified with a JSON file.
This is a little video-demo of what is able to do at the moment.
I will report on progress of the project in the coming days.
Hello all!!!
The aim of this blog is to report my advances and my ideas and my thoughts on various subjects that I like.
I hope to publish many posts but no promises…
May 11, 2010
Tal y como contábamos, se celebró la semana pasada en Zaragoza el GNOME Marketing Hackfest. Gracias a los sponsors, un grupo de GNOME Marketing se reunió en la Biblioteca del Agua de Zaragoza para preparar el lanzamiento de GNOME 3.
Primero se definió una campaña de marketing, con muchas actuaciones a atacar. Todo está planificado con fechas concretas y gente a la que perseguir, lo que ayudará a que se vayan cumpliendo todos los puntos.
También se comenzó el diseño de la página web de presentación de GNOME 3. Ya salieron unos cuantos bocetos, y realmente puede quedar muy limpia y ordenada. Genial!
Otra de las iniciativas interesantes fue la preparación de los vídeos para la web. La idea es preparar unos pequeños spots mostrando las novedades que traerá GNOME 3. Además, se ha preparado un how-to para que cualquiera que quiera ayudar o localizar los vídeos, pueda hacerlo de manera sencilla (aunque requieren bastante material
)
Hubo más temas a tratar e ideas geniales, pero alguna sorpresa hay que guardar… Os invito a que entréis a las páginas del wiki para descubrir todo lo que se habló.
Y aquí está la foto de la gente que estuvo en el Hackfest

GNOME Marketing Hackfest
Además de lo que fue trabajo 100% GNOME, también hubo presentaciones de casos de éxito tanto de la Administración local como de la regional, así como de las empresas de aquí. Mención especial a las empresas del sur (Yaco y Emergya) que se vinieron a pasar un ventoso día con nosotros. Éstas, junto con Onirica, Warp y con el Consorcio Fernando de los Ríos son quienes ahora mismo quieren darle un empujón a la Accesibilidad de GNOME. ¡A ver hasta donde se llega!