Planet maemo: category "feed:3443cd3b09dca3afd960884d779d28f3"

Raul Herbster

Back!!!

2012-10-26 23:20 UTC  by  Raul Herbster
0
0
After a loooong break, I am back to this. I have to confess that I had had several new/cool stuff during this pause: new projects, mind-blowing findings, exciting/stressful experiences, lovely/irritating people. And all of this had consumed a lot of my free time. I am not saying that I hadn´t had time at all: I had done some new/different things with such slots of time than only writing about technical stuff.

Well, but anyway, let´s keep track of new stuff. The main reason to start blogging again was the simply fact that I am not used to describe all solutions for tricky problems in general: how to cross-compile certain applications for ARM devices, how to set up a smart CI environment, and so forth. I swear I have tried it really hard, but my evil side always tells to myself: "if you need it some other day, you will remember it". So, this is also a kind of "Raul´s Recipes Book".

I am really convinced that it will work :-)

As part of my next posts, I will describe a bit more about how lovely is a CI environment for a relative huge project (of course, how you can set up all of this and put the pieces together). Specially, when it has such different clients, such as iOS, Android and QT applications.
Raul Herbster

DBus - How to pass dict as parameter

2010-11-18 14:02 UTC  by  Raul Herbster
0
0
This tutorial is designed for those ones that need DBus but suffer a lot to find documentation even about simple things, such as how to pass a dictionary as parameter.

Initially, I had to invoke a Bluez method that needs a dictionary as parameter. But how could I do it? It not easy at all to find a detailed documentation about it and I had to look for a solution at BlueZ source code.

In this case, I'm using the newest BlueZ Health API (support for HDP/MCAP). The following piece of code shows


static char *start_health_session(DBusConnection *conn)
{

DBusMessage *msg, *reply;
DBusMessageIter args;
DBusError err;
const char *reply_path;
char *path;

msg = dbus_message_new_method_call("org.bluez",
"/org/bluez",
"org.bluez.HealthManager",
"CreateApplication");

if (!msg) {
printf(" network:dbus Can't allocate new method call\n");
return NULL;
}

// append arguments

dbus_message_iter_init_append(msg, &args);

if ( !iter_append_dictionary(&args, DATA_TYPE_VALUE,
ROLE_VALUE,
DESCRIPTION_VALUE,
CHANNEL_TYPE_VALUE) ) {
printf(" network:dbus Can't append parameters\n");
dbus_message_unref(msg);
return NULL;
}

dbus_error_init(&err);

....
}

A DBus dict type needs a message iterator, which is properly initialised before it is used.

Once the message iterator is properly created, let's open it and add tuples to it.


static int iter_append_dictionary(DBusMessageIter *iter,
dbus_uint16_t dataType,
const char *role,
const char *description,
const char *channelType)
{
DBusMessageIter dict;

dbus_message_iter_open_container(iter, DBUS_TYPE_ARRAY,
DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
DBUS_DICT_ENTRY_END_CHAR_AS_STRING, &dict);

dict_append_entry(&dict, "DataType", DBUS_TYPE_UINT16, &dataType);

dict_append_entry(&dict, "Role", DBUS_TYPE_STRING, &role);

dict_append_entry(&dict, "Description", DBUS_TYPE_STRING, &description);

dict_append_entry(&dict, "ChannelType", DBUS_TYPE_STRING, &channelType);

dbus_message_iter_close_container(iter, &dict);
}


At first, you have to open the container and specify the data type of each tuple. In this case, the dictionary consists of tuples , , , and . Once the value data type for each tuple varies (uint16 or string), we declare it as a variant. Therefore, the dictionary data type definition is:


DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
DBUS_TYPE_STRING_AS_STRING DBUS_TYPE_VARIANT_AS_STRING
DBUS_DICT_ENTRY_END_CHAR_AS_STRING


Finally, you simply add the basic data type to message iterator (the dictionary itself).


static void append_variant(DBusMessageIter *iter, int type, void *val)
{
DBusMessageIter value;
char sig[2] = { type, '\0' };

dbus_message_iter_open_container(iter, DBUS_TYPE_VARIANT, sig, &value);

dbus_message_iter_append_basic(&value, type, val);

dbus_message_iter_close_container(iter, &value);
}

static void dict_append_entry(DBusMessageIter *dict,
const char *key, int type, void *val)
{
DBusMessageIter entry;

if (type == DBUS_TYPE_STRING) {
const char *str = *((const char **) val);
if (str == NULL)
return;
}

dbus_message_iter_open_container(dict, DBUS_TYPE_DICT_ENTRY,
NULL, &entry);

dbus_message_iter_append_basic(&entry, DBUS_TYPE_STRING, &key);

append_variant(&entry, type, val);

dbus_message_iter_close_container(dict, &entry);
}

Categories: dbus
Raul Herbster

CUnit on ARM platforms.

2010-08-16 17:33 UTC  by  Raul Herbster
0
0
Let's use this stuff :P Anyway, it's a good tool and I need to put some ideas anywhere.

So, today's tip is how to compile your CUnit tests on Embedded platforms - in this case, on a N900 (ARM) with MeeGo installed on it.

You should download the CUnit source code from http://sourceforge.net/projects/cunit/ (I only tested versions 2.0.X and 2.1.X). The process is very simple: download the code, copy to your development environment, and build it (./bootstrap && make). However, things are not soooo easy as it seems :P

Probably, you'll face problems at initial steps.

If you have any problems on , execute the following command to change modification time/time:


find /path/to/files -exec touch {} \;



It seems to work.
Categories: arm
Raul Herbster

Give us your opinion!

2009-08-11 12:05 UTC  by  Raul Herbster
0
0
IDE Integration 2nd edition is comming soon, including new PluThon Eclipse product. It comes with new and interesting features, such as ltrace integration. However, we know that Maemo community has a lot of valuable feedback and ideas that certainly improves PluThon and any other IDE Integration components (ESbox, PC Connectivity, etc.)

Please, visit PluThon 2nd edition web site, check how features you´d see implemented on PluThon and provide a feedback to eclipse-integration AT maemo DOT org. Your comments are welcomed!
Categories: maemo
Raul Herbster

Pluthon - how to easily create debian packages

2009-07-07 12:29 UTC  by  Raul Herbster
0
0
Hi,

IDE Integration Beta 2 has been released, including Pluthon Beta 2 release :)

Since PluThon uses Internet Tablet environment as programming environment, most of programming tasks (except coding) are performed on your device. Then, launching/debugging are done directly on Internet Tablet.

Generally, we use distutils utilities for pymaemo to generate Debian packages on device. On this method, you need to create a setup.py script and insert a lot of information regarding to your project. You may face some problem during your first experience on debian package creation or even you may forget to insert some important information. Once your setup.py is properly created, you need to generate your debian package using pymaemo python interpreter.

PluThon also helps you to create Debian package from your project with distutils for maemo utilities. With helpfull graphical wizards, you can create Debian packages from your projects at a glance ;) For more information about this interesting feature, you can check it at PluThon User´s Help.

Try PluThon and give us your feedback!!
Categories: maemo
Raul Herbster
ESbox Beta 1 release comes with a very interesting feature: graphical installers for Scratchbox 1, Scratchbox (1 and 2) targets and Nokia binaries (which are mandatory for Fremantle, for example). ESbox also flashes your Internet Tablet with latest image.

For more information about these features, you can visit Forum Nokia Blog page.
Categories: maemo
Raul Herbster

Customizing your Maemo SDK Virtual Image

2009-05-24 23:15 UTC  by  Raul Herbster
0
0

Hi,

Maemo Eclipse Integration 2nd Edition Beta 1 was just released, including Maemo SDK Virtual Image :)

On a recent post on Forum Nokia blog, I described about how Maemo SDK VM can help you to properly configure your Maemo programming environment, specially on those cases that you have to configure a lot of machines for a Maemo programming workshop, for example.

In addition, if you want to customize your Maemo SDK VM for a specific case (for example, distribute an old Maemo SDK release), you can check here the requirements list we've considered to provide Maemo SDK VM version 0.10.

Categories: maemo
Raul Herbster
Embedded Lab has launched the 2nd edition of Effort Competition (website on portuguese), an interesting challenge for undergraduate and graduate students. The main objective is to make that students explore Nokia mobile platforms (maemo, S60, ...) to generate interesting and innovative projects.

The winners will receive Nokia 7310 Supernova devices as prize :) Unfortunately, Effort Competition 2nd edition subscriptions are over, but keep on eye on it - 3rd edition is coming!

You can also check more comments on Forum Nokia Blog.
Categories: maemo
Raul Herbster

IDE Integration for maemo development

2009-05-02 03:10 UTC  by  Raul Herbster
0
0
Hi,

are you looking for an IDE to help you on maemo programming? Or a tool that helps you to get connected with device using different communication interfaces of Internet Tablet (Bluetooth, WLAN or USB)?

IDE Integration project provides a full feature environment with IDEs, programming environments and conectivity tools. Therefore, you can start maemo development a lot quicker (and much easier :).

Take a look at this post on Forum Nokia Blog page.
Categories: maemo
Raul Herbster

Mica Framework

2009-04-26 23:17 UTC  by  Raul Herbster
0
0
Maybe, you've already heard about ESbox and PluThon IDEs for maemo development. They have a lot of things in common: remote launching/debugging, Debian package generation/installation, and much more. But why two different products? Because ESbox needs Scratchbox, but PluThon does not.

That's right... I got it. But since ESbox and PluThon have some features in common, why don't we create a common framework? And so we did :)

Mica (Maemo Integration Common Architecture) framework does not only provide a common architecture for ESbox and PluThon, but also a common plugin architecture for developing maemo development environments based on Eclipse.

If you're planning to create a plugin for Eclipse framework in order to help other maemo developers, you can use Mica. On its official site, you can access useful documentation such as architecture and developer's guide. If you need any other example, you can check Mica-Plugins project. For example, a plugin that finds the Internet Tablets available.

You, as Mica/ESbox/PluThon user/developer, can contribute a lot with such projects! Please, report your suggestions, doubts and any other comments to eclipse-integration at maemo dot org.
Categories: maemo
Raul Herbster

ESbox/PluThon 2.0.0M1 Released!

2008-11-14 18:43 UTC  by  Raul Herbster
0
0
Since the lastest release of ESbox/PluThon (on July 2008), IDE integration team haven't released any other version of the projects (ESbox, PluThon and PC Connectivity). Then, since July 2008, we have been planning, designing and developing the newest 2nd Edition of IDE Integration.

ESbox/PluThon 2.0.0M1 have been released today, including new functionalities and a huge, interesting and well-done refactoring of architecture. Now, both ESbox and PluThon share a common framework, which was designed also to be used as developing maemo development environments based on Eclipse.

Besides ESbox and PluThon, IDE Integration also consists of PC connectivity (http://garage.maemo.org/projects/pc-connectivity) and maemo SDK virtual image (http://garage.maemo.org/projects/maemovmware).

One interesting feature of this first alpha release is support the integration with RSE Eclipse project, which provides heterogeneous remote resources through a concept of pluggable subsystems.
Categories: maemo
Raul Herbster

Back to the blog

2008-11-03 02:20 UTC  by  Raul Herbster
0
0
More than 2 months since my last post in this blog!! But we're back!

To start this new "season", I introduce to you Forum Nokia (http://forum.nokia.com). It consists of a consistent and complete site for Nokia developers. There, you can find information, documentation, tools and SDKs to start developing applications for Symbian, WRT, Python S60, maemo and all the others Nokia platforms.

In addition, Forum Nokia often launches competitions in order to call developers to participate by writing interesting articles, testing new APIs and providing inovative solutions based on Nokia platforms. Winners receive interesting prices ($$ and new devices!) and also they become known contributtors on Symbian, Python S60, Web, WRT and maemo communities :)
Categories: forumnokia