You Are Here:

Community: Blogs

Harri Salminen's Forum Nokia Blog

Simple solutions, huge benefits

widianuser | 30 August, 2007 22:20

All too often developers try to solve problems with the latest and coolest technologies. You probably can recognise the “next feature pack will include THE missed feature” disease and its close relative “this feature is now available in only one terminal model, but wait until it is embedded into base platform”. Stop for a second and think if the current problem could be solved with existing enablers instead of waiting for some new killer-enabler to appear.

The trigger for these thoughts was a small piece of news I saw in a newspaper. The story told how a Finnish hospital had used SMS-based alert system to inform patients about available consulting hours in case previous patient had cancelled the time. Another example was the solution that sends an SMS message to patient asking if any of the available times would be OK before the actual reservation is made.

The estimate of the savings these applications generate is really something to think about: for a smallish hospital these solutions are estimated to save nine person’s work every year. Those nine people can now do their work taking care of patients, not sitting at the office answering to phone calls. Simple applications like this might not be technically the most exciting, but what’s most important - they improve the processes using widespread mobile technologies. And when hospital use is concerned, solutions like this save lives when nurses can concentrate on their jobs.

An Open C test drive

widianuser | 20 August, 2007 22:38

Some time ago I decided to test drive Open C to see how the first release performs. Instead of writing my own code from scratch, I took an existing open source project and tried to port that to Symbian. Because once upon a time I considered writing my own XMPP Symbian implementation, I downloaded sources for Loudmouth, an open source XMPP implementation. Without previous knowledge about Open C or Loudmouth I took the challenge. Below are some notes about my Open C tests. List is not very "scientific" and all comments are more than welcome!

Starting the work was simple: I created a new DLL-type project using Carbide and imported Loudmouth source and header files to correct directories. I was happy to see that MMP-file was updated automatically! After done that, Carbide tried to compile the project and produced a respectable amount of errors and warnings. The reason is that when compiling Loudmouth (or any other source package) to other platforms you'd use provided configuration scripts to create makefiles. For Open C that didn't work and configuration must be done manually. Basically there are two issues to solve:
  • which macros to define for compilation?
  • which libraries are required for linking?

Writing configuration manually is not as bad as it sounds: I created new header file named "configure.h" and copied the initial contents from skeleton file configuration.h.in. Luckily enough, the skeleton file was well commented and after a couple of trials and errors I got a working configuration file.

Because I was compiling a shared library, I had to add EXPORT_C and IMPORT_C directives by hand.

There is a nice set of string conversion utilities in directory s60opencexOpenCStringUtilitiesExLibrary. I didn't find any references to those from documentation.

When compiling the sources I had to make a couple of changes to support Symbian. There were only few places that needed fixing and/or "#ifdeffing" with __SYMBIAN32__ macro:
  • glib/gi18n.h includes libintl.h that wasn't included in Open C package (bug?). I simply commented that line out.
  • For target build there was error "stdapis/machine/endian.h error: impossible constraint in `asm'".  I added new preprocessor directive #ifdef __SYMBIAN32__ #define    _BYTEORDER_FUNC_DEFINED #endif to solve that

For IP-address resolving I found a strange issue: I wasn't able to get getaddrinfo() to work, but gethostbyname() seems to be OK. Can anyone else confirm this?

To run the application in target device, it is a must to install also the Open C runtime libraries, probably the best way to do this is to embed the required SIS files to one big installation file. Open C documentation seems to lack the list of required runtime libraries, but the information can be found from readme-file.

Readme file contains an error: UID for openc_ssl.sis is wrong in readme-file, correct uid is 0x10281F34.

After these steps I was able to run a small test application that linked with Loudmouth XMPP library and sent some XMPP messages to test server. I'm sure there are lots of things to polish if I continue work with this project, after all I haven't really tested the results of my small project. But anyway: getting an XMPP library compiled for Symbian takes much less time than reading and understanding the actual protocol specifiction.
 
 

Rate This

 
 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia