[maemo-developers] Setting system time
Does anyone know what function(s) are available for setting system time on the Nokia 770 (IT2006) from inside an application? GNU C time functions will not work I think because time can only be set by a privileged user. And according to the documentation the libosso function osso_time_set doesn't do anything. Any ideas? Steve Hill ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] Including library files in deb package for app installer
Is it possible to include library files in an application installer package? If so, could someone explain how it is done? Thanks, Steve Hill ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] IT2006 library installation
Is there a way to write a .deb package that the Application Installer in IT2006 will understand that only installs a library? Because the only way to install missing libraries into the filesystem is to install xterm, become root somehow (like use becomeroot) and use apt-get install Most general users won't want to do this. Any ideas from the experts? Steve Hill ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] Application catalog from repositories
On Mon, 2006-17-07 at 11:21 +0300, Tommi Komulainen wrote: Hi, I hacked together a small script which reads the Packages.gz files from a configured set of repositories and generates a catalog page showing all packages, grouped by sections. Maybe someone finds this useful. Example page: http://www.iki.fi/tkomulai/maemo/mistral-application-catalog-2006-07-16.html Script source: http://www.iki.fi/tkomulai/maemo/generate-catalog.py One thing you may notice is that there's little consistency between packages currently. Personally I think any application catalog should be able to handle and collect the mandatory information (sections, name, version, description) automatically so that the data is taken straight from the packages where it has to be anyway. That should encourage using repositories instead of links to files as well as increase package metadata quality. Would just need a way nice way to integrate the package data with screenshots, comments, etc. Maybe Debian or Ubuntu already have one, I don't know. Of course once you crawl multiple repositories like this you could even mirror all the packages in one repository and save the user the trouble of configuring several of them in the application installer. I checked out your applications catalog, and I see that under libraries there should be a libsqlite0 package, but when I look in my app installer list it is not there - I have all the repositories in my catalog, including kernelconcepts that are the source of the package, but the library is not listed - any idea why? Steve Hill ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] Need some help with debian file for IT2006 device
Hello: First, I am not an experienced Linux person, but I have been developing on the Nokia for several months, with some success. I am flying by the seat of my pants as they used to say. I am porting my application to IT2006, and have done that successfully, but the app depends on libsqlite0, which is part of the root fs on the i386 side, but not on the device itself, so I have to find a way to install it. I managed to do this after a lot of poking around - I think I had to use the becomeroot application to get root privileges, and then I could use apt-get install to get the package from the repository. This left a copy of libsqlite0_2.18.3-2_armel.deb in the cache, so I downloaded this file to another location, thinking that others could use it to install the library. However, when I try to install this library using that file and the application manager, I get the message that it is an incompatible package. I cannot attach the file to this message because it would make it too big for the list- could someone please give me some advice as to why this package will not install on an IT2006 device ( I could send the file to you if it would help)? Thanks, Steve Hill ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] Help! - how to static link single library
Hello: Could someone please help me out - I am using autogen.sh to compile and link a project - here is a listing: #!/bin/sh set -x glib-gettextize --copy --force libtoolize --automake intltoolize --copy --force --automake aclocal-1.7 autoconf autoheader automake-1.7 --add-missing --foreign The input files are makefile.am and configure.ac (they are attached). The project links in several libraries dynamically. I would like to link the SQLITE library statically - how would I modify the input files to link SQLITE statically? Thanks Steve Hill AC_INIT(Makefile.am) AM_INIT_AUTOMAKE(LoginApp, `date +%Y%m%d`) AM_CONFIG_HEADER(config.h) AC_CANONICAL_HOST AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LIBTOOL AC_HEADER_STDC CFLAGS=$CFLAGS -Wall -ansi -pedantic -Wmissing-prototypes -Wmissing-declarations OSSI_TARGET_BOARD=`echo $OSSI_TARGET_BOARD` AC_SUBST(OSSI_TARGET_BOARD) PKG_CHECK_MODULES(HILDON, hildon-libs = 0.9.50 hildon-fm libossohelp) AC_SUBST(HILDON_LIBS) AC_SUBST(HILDON_CFLAGS) PKG_CHECK_MODULES(OSSO,libosso = 0.8.4 gnome-vfs-2.0 = 2.2 gnome-vfs-module-2.0 = 2.2) AC_SUBST(OSSO_LIBS) AC_SUBST(OSSO_CFLAGS) PKG_CHECK_MODULES(OSSOIC, osso-ic) AC_SUBST(OSSOIC_LIBS) AC_SUBST(OSSOIC_CFLAGS) PKG_CHECK_MODULES(SQLITE, sqlite) AC_SUBST(SQLITE_LIBS) AC_SUBST(SQLITE_CFLAGS) PKG_CHECK_MODULES(LIBXML, libxml-2.0) AC_SUBST(LIBXML_LIBS) AC_SUBST(LIBXML_CFLAGS) PKG_CHECK_MODULES(OSSOSETTINGS, osso-af-settings = 0.8.4) hildondesktopentrydir=`$PKG_CONFIG osso-af-settings --variable=desktopentrydir` hildoniconthemedir=$HOME/.icons/hicolor AC_SUBST(desktopentrydir) AC_SUBST(hildondesktopentrydir) AC_SUBST(hildoniconthemedir) AC_OUTPUT( Makefile \ data/Makefile \ src/Makefile ) # # This file is part of loginapp # # Copyright (C) 2006 SH Scientific Systems Ltd. # # This software is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public License # as published by the Free Software Foundation; either version 2.1 of # the License, or (at your option) any later version. # # This software is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this software; if not, write to the Free Software # Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA # 02110-1301 USA # EXTRA_DIST = \ autogen.sh \ intltool-extract.in \ intltool-merge.in \ intltool-update.in \ debian/loginapp.links \ debian/copyright \ debian/control \ debian/rules SUBDIRS = src data INCLUDES = $(DEPS_CFLAGS) deb:dist -mkdir $(top_builddir)/debian-build cd $(top_builddir)/debian-build tar zxf ../$(top_builddir)/$(PACKAGE)-$(VERSION).tar.gz cd $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) dpkg-buildpackage -rfakeroot -rm -rf $(top_builddir)/debian-build/$(PACKAGE)-$(VERSION) ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] IT2006 development problems - HildonProgram and HildonWindow
In the documentation for the new UI using HildonProgram and HildonWindow, we see the following, both in the porting instructions and in the developing new application doc: /* Begin the main app */ gtk_widget_show ( GTK_WIDGET ( program ) ); gtk_main(); where program is a pointer to HildonProgram - this statement generates a pile of run-time errors because HildonProgram is not a GTK_WIDGET and has no visible properties. Obviously this is wrong. In addition - the old UI with HildonApp had the very useful method hildon_app_set_appview What is the replacement of this with HildonProgram and HildonWindow? - I see only methods like hildon_program_add_window and ...remove_window, but how do we know which of the registered windows is the window that is currently being shown by HildonProgram?? This new UI is confusing to me... can anyone help clear up the confusion? Steve Hill ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] SQLITE development in IT2006
Hello all: Can anyone tell me either: 1. Where I can find an ARMEL version of libsqlite3-dev to use when developing for the Nokia 770 IT2006 version, OR 2. Where I can find a port of the libsqlite0 package to the ARMEL IT2006 version. Failing that, how do I install the libsqlite0 package to a Nokia 770 device running IT2006? I know that the package is available at the repository, but can't figure out how to get at it using the package installer!!! Steve ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] How to keep app running indefinitely
On Tue, 2006-14-03 at 09:04 +0200, Kalle Valo wrote: Steven Hill [EMAIL PROTECTED] writes: Good. But actually disabling the idle timer is just a workaround. It seems that the real problem is the application crashing whenever a disconnect from a network happens. I agree, but it is not clear what is happening. The messages I am seeing from my application are: Received status_changed to DISCONNECTING notification for IAP shss Received status_changed to IDLE for IAP shss Segmentation fault The OSSO_IAP_DISCONNECTED event in the iap_callback function does not appear to be reached, because it should print a brief message on entry. Ok, so this points to a bug in libosso-ic.so (the library providing the IC API) and I'll have to investigate this more. Can you give any instructions how to reproduce it? I haven't seen this before so I suspect there's something special needed for triggering this bug. What 770 software version are you using? Do you know where the status_changed messages are being generated? It's printed from libosso-ic.so. To be precise from src/ic-api.c line 104 which is in debian source package osso-ic-oss. I am running this app on (I believe) the most recent production version of the 770 (downloaded and installed using the Windows flasher - according to the Device information it is 3.2005.51-13. I have attached my network.c file and two header files. The connection code is based on the osso-ic example with a few changes and additions. Network connection is made with a call to get_connected. Let me know if this helps... Steve Hill /* * This file is part of DayCareLogin * * Copyright (C) 2006 SH Scientific Systems * * This software is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public License * as published by the Free Software Foundation; either version 2.1 of * the License, or (at your option) any later version. * * This software is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this software; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA * 02110-1301 USA * */ #ifndef LOGINAPP_APPDATA_H #define LOGINAPP_APPDATA_H #include libosso.h #include network.h #include hildon-widgets/gtk-infoprint.h #include hildon-widgets/hildon-app.h #include sqlite.h #include gtk/gtk.h #include libgnomevfs/gnome-vfs.h #include libgnomevfs/gnome-vfs-utils.h #define dbaseFileName ~/securetrak_data.db #define IPaddrFileName ~/defaultIP.txt #define XMLFileName ~/temp.xml #define OutXMLFileName ~/out.xml #define PINGTIME 3 /* Time in milliseconds between pings */ typedef struct _AppData AppData; typedef struct _PwdData PwdData; /*typedef struct _OutBufData OutBufData;*/ typedef struct _AppContext AppContext; typedef struct _ChildChkWindow ChildChkWindow; typedef struct _AttendCheck AttendCheck; typedef struct _ThanksWindow ThanksWindow; typedef struct _StaffWindow StaffWindow; struct _StaffWindow { HildonAppView *staff_view; GtkWidget *Name_label; GtkWidget *Time_label; gchar *name; gchar *ID; gchar *In; }; struct _ThanksWindow { HildonAppView *thankyou_view; GtkWidget *Comment_label; GtkWidget *Time_label; }; struct _AttendCheck { gboolean in; /* if TRUE, checkin in status */ GnomeVFSHandle *xmlOut; /* Pointer to handle of file holding XML login/out info */ gchar *gid; /* The guardian ID as a string */ }; struct _AppContext { const char *host, *port; char iap_name[IAP_LENGTH]; APPState appstate; READState readstate; GIOChannel *channel; guint read_watch, write_watch; gboolean server_connected; gboolean recent_io; }; struct _PwdData { guint8 pwd_digits; /*Number of digits entered in password */ gchar pwd[4]; /*The password string*/ }; struct _ChildChkWindow { HildonAppView *child_checkin_view; GtkWidget *Guardian_name; GtkWidget *Date_label; GtkWidget *Time_label; GtkTreeView *Checked_in_view; GtkTreeView *Checked_out_view; gchar *Guardian_id; }; struct _AppData { HildonApp *app; /*handle to application */ AppContext *connection; /* handle to the network connection context */ HildonAppView *login_view; /*handle to the login view */ ChildChkWindow *child_checkin; ThanksWindow *thanks; StaffWindow *staff; gint Timeout_tag; /*pointer to allow destruction of timeout callback */ osso_context_t *osso;/*handle to osso */ PwdData* pwdPtr; /*pointer to password information */ GnomeVFSHandle *xmlOut; /* Pointer to handle of file holding XML login/out info */ }; #endif #include appdata.h #include osso-ic.h #include libgnomevfs/gnome-vfs.h #include libgnomevfs/gnome-vfs-utils.h extern
Re: [maemo-developers] How to keep app running indefinitely
On Mon, 2006-13-03 at 12:17 +0200, Kalle Valo wrote: ext Steven Hill [EMAIL PROTECTED] writes: You assume that this is a desired functionality, but it's not. There's a bug somewhere, that just needs to be found. We don't kill applications just for fun :) Thanks for replying - see my replies to your comments above - I will verify that setting WLAN idle time to unlimited solves my problem. Good. But actually disabling the idle timer is just a workaround. It seems that the real problem is the application crashing whenever a disconnect from a network happens. I agree, but it is not clear what is happening. The messages I am seeing from my application are: Received status_changed to DISCONNECTING notification for IAP shss Received status_changed to IDLE for IAP shss Segmentation fault The OSSO_IAP_DISCONNECTED event in the iap_callback function does not appear to be reached, because it should print a brief message on entry. Do you know where the status_changed messages are being generated? ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
Re: [maemo-developers] How to keep app running indefinitely
On Thu, 2006-09-03 at 12:01 +0200, Kalle Valo wrote: Steven Hill [EMAIL PROTECTED] writes: I tried this method, and it did not work. If the internet connection is dropped due to inactivity, the app also stops. Like Kimmo said, there shouldn't be anything killing you application. This smells like a bug. Let's try find it, but to do that you have to provide some more information. Can you get any output from your application. Does it crash or what? Are there any errors and if yes, what? Do you use libosso-ic-preload.so library with LD_PRELOAD, osso_socket() or IC API? I use the osso-iap-connect method to open a connection (the IC API) Please note that with the first two methods (libosso-ic-preload.so and osso_socket() all sockets are closed with shutdown(2) if the Internet connection is dropped. Does your application handle this gracefully? This is the first thing I would check. (With IC API this doesn't happen, with that method it's the applications responsibility to close the sockets.) I came up with a workaround that pings a socket every 30 seconds - that keeps the app running with screen dimming and blanking still functional. But what do I do if my socket crashes or I lose my internet connection due to a wireless router malfunction or whatever?? I agree, that's just a hack and nowhere near a proper solution. Applications shouldn't die when connections drop. With mobile devices connections drop all the time and we need to handle it properly. BTW, are you aware of that you disable connection idle timer from the Connectivity Control Panel applet? OK, I think you just solved my problem - I had the WLAN idle time set to 60 minutes, and I did an experiment to see how long my connection lasted, and it was exactly 60 minutes. I will set my WLAN idle time to unlimited, and I bet I will not lose my connection. There must be a method that will intercept the system call to shut the app off and ignore it, but I have not found such a thing discussed in the maemo docs. You assume that this is a desired functionality, but it's not. There's a bug somewhere, that just needs to be found. We don't kill applications just for fun :) Thanks for replying - see my replies to your comments above - I will verify that setting WLAN idle time to unlimited solves my problem. ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] Playing wav sounds using hildon
Hello: I am using hildon sounds to play sounds through: hildon_play_system_sound(ui-key_press.wav); when this line is executed I get the following errors: Audio File Library: could not open file 'ui-key_press.wav' [error 3] GLIB_WARNING ** default - error while caching sample. But the sound is playing, so obviously the file is being opened. Should I be concerned about these errors? ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] Why my app does not work
Hello all: I figured out why my app does not work on the production version of the Nokia 770 - the development system has sqlite 2.8.13-2 installed, but the production system does not. There is a port of sqlite available, but it is version 3 of sqlite, so my app will not be able to use those libraries. I have found the package for sqlite 2.8.13-2 in the maemo repository and downloaded it to the Nokia, but cannot install it from xterm because that requires superuser privileges which I do not have as a regular user on the Nokia. Can anyone tell me how to build my application package so that it includes the necessary sqlite libraries in the expected locations as part of the installation package? I have no idea how to do it, the documentation of package building is arcane... Thanks, Steve Hill ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] App runs on development 770, not on production 770
Hello all: I am developing an application for a group that is across the continent from me. I am using a Nokia 770 with the development file system. My app runs perfectly on the 770 with the development system, but when I put the .deb file on an ftp site for them to download and install, all goes OK with the install, and the app is in the EXTRAS folder, but when they click to start up the app, nothing happens. Does anyone have any clue why this might happen? I could learn a lot more if I could run the app from the install directory, but the file system will not let me get there using the xterm app on the production 770 - any ideas how to overcome that? Any help would be greatly appreciated Steve Hill ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
RE: [maemo-developers] SQLite installation
Hello: Thanks for your reply. The package installed with no problem using the application installer in the control panel. The problem is that when I followed the instructions in the Wiki, i.e. type 'sqlite3' in Xterm, the response is that no executable is found. Shouldn't libraries and command line executables be somewhere other than /var/lib/install/usr/...? Probably I don't understand the file structure of the system well enough - I am very new to Linux... On Wed, 2006-08-02 at 07:55 +0200, [EMAIL PROTECTED] wrote: Hi, it seems that you're trying to install an osso-application-installer package. You can't do that with dpkg from the command line on the 770. Instead, use app-installer-tool, like this: Nokia770:/# app-installer-tool install sqlite_3.2.7_arm.deb Did you check the error messages when trying to install the package with the application installer in control panel (there's a button for this)? If so, what did it report as the error? Regards, - Pete - -Original Message- From: [EMAIL PROTECTED] on behalf of Steven Hill Sent: Tue 2/7/2006 10:26 PM To: maemo-developers@maemo.org Subject: [maemo-developers] SQLite installation Can anyone tell me how SQLite should be installed on the Nokia 770? I first installed it using the package installer in the control panel, but then typing sqlite3 in Xterm (as suggested in the library section in the Wiki) did not work. So I removed it, again using the control panel app, and installed it from the root after signing in as root using SSH, but then I got the following: Nokia770:/# dpkg -i sqlite_3.2.7_arm.deb Selecting previously deselected package sqlite. (Reading database ... 5689 files and directories currently installed.) Unpacking sqlite (from sqlite_3.2.7_arm.deb) ... dpkg: dependency problems prevent configuration of sqlite: sqlite depends on maemo; however: Package maemo is not installed. dpkg: error processing sqlite (--install): dependency problems - leaving unconfigured Errors were encountered while processing: sqlite But it does seem to be installed, as is shown in the next output: Nokia770:/# sqlite3 SQLite version 3.2.7 Enter .help for instructions sqlite .q Can anyone tell me if this last way of installing SQLite is the correct way, in spite of the error messages? ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] SQLite installation
Can anyone tell me how SQLite should be installed on the Nokia 770? I first installed it using the package installer in the control panel, but then typing sqlite3 in Xterm (as suggested in the library section in the Wiki) did not work. So I removed it, again using the control panel app, and installed it from the root after signing in as root using SSH, but then I got the following: Nokia770:/# dpkg -i sqlite_3.2.7_arm.deb Selecting previously deselected package sqlite. (Reading database ... 5689 files and directories currently installed.) Unpacking sqlite (from sqlite_3.2.7_arm.deb) ... dpkg: dependency problems prevent configuration of sqlite: sqlite depends on maemo; however: Package maemo is not installed. dpkg: error processing sqlite (--install): dependency problems - leaving unconfigured Errors were encountered while processing: sqlite But it does seem to be installed, as is shown in the next output: Nokia770:/# sqlite3 SQLite version 3.2.7 Enter .help for instructions sqlite .q Can anyone tell me if this last way of installing SQLite is the correct way, in spite of the error messages? ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] package is built-in?
I am trying to install a package on my Nokia 770 device. I download the .deb file to my /home/users/MyDocs directory and then use the package installer on the device (through control panel) to install the package. But I get a message that says: Installation of failed. Display details? ( is my package name) When I look at the details, I get: Unable to install . Component is built-in Obviously my package is not a built-in component. Can anyone explain to me what this message means, and how to get my package installed? Thanks... ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] Sounds
Could someone explain to me how to code the production of a sound - for example, in the callback function for a button press event, have a click sound produced. ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] Internet connectivity
According to the maemo tutorial, one is supposed to install some software using apt-get install osso-ic-oss to include scripts, etc. to enable automatically starting up the connection manager when establishing a socket from within an application. But when I try that, I get the following: [sbox-SDK_PC: ~] apt-get install osso-ic-oss Reading Package Lists... Done Building Dependency Tree... Done E: Couldn't find package osso-ic-oss I am new to Linux, and not familiar with the whole package concept. I think I found the required package for osso-ic-oss in the pool directory at the maemo repository. I assumed that when the development system is installed that the appropriate links etc are built. I recently upgraded to Maemo1.1 by doing a dist-upgrade according to the instructions at http://maemo.org/maemowiki/HowTo_DistUpgrade I would appreciate any help in understanding how to get the osso-ic-oss package installed. ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers
[maemo-developers] Automatic internet connection
I am new to linux development, working with the Nokia 770. I have two related questions about internet connectivity. 1. I have followed the instructions in the tutorial to run a script including the line export LD_PRELOAD=/usr/lib/libosso-ic-preload.so before calling the executable in the script. But when my application starts (this is on the actual device, not the PC simulator) and looks for a connection which has not yet been made, the connection manager does not start up automatically. If I manually set up a connection before running the application then everything proceeds with no problem. Shouldn't the connection manager start up automatically if no connection exists? 2. On the PC simulator rootstrap, one is supposed to install some software using apt-get install osso-ic-oss to include the same functionality as outlined above for ARM development. But when I do that, the installer cannot find the package, and I cannot find any references to it anywhere. The closest I have found is a package called osso-ic-lib_0.35_i386.deb but I don't know if it is the right package, or if it is, what to do with it. Can anyone give me some advice and guidance on these issues? ___ maemo-developers mailing list maemo-developers@maemo.org https://maemo.org/mailman/listinfo/maemo-developers