Re: [pkg-fso-maint] debian install.sh giving wrong partitioning sizes

2011-09-10 Thread Paul Fertser
Timo Juhani Lindfors  writes:
> Sam Tygier  writes:
>> does anyone know of any other fdisks likely to be encountered on an
>> openmoko?
...
> systems. However, I don't also like that we need to rely on some random
> distro that is installed on NAND.

I'd say that it's up to the user to use whatever utilities he
wants to partition and populate the card with filesystem(s). And it
seems like depending only on having a posix-compliant shell, ar, tar, plus
gzip, wget and chroot is a reasonable thing to do and should work
without much hassle on any distribution.

What am i missing here?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: [pkg-fso-maint] debian install.sh giving wrong partitioning sizes

2011-09-10 Thread Paul Fertser
On Sun, Sep 11, 2011 at 09:36:48AM +0300, Timo Juhani Lindfors wrote:
> Paul Fertser  writes:
> > I'd say that it's up to the user to use whatever utilities he
> > wants to partition and populate the card with filesystem(s).
> 
> I'm not sure what you are saing here. Do you mean that install.sh should
> not partition the disk but the user should do it manually instead?

Yes, that's my notion.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: What is the purpose of fso-abyss if I have fso-gsmd?

2011-10-30 Thread Paul Fertser
David Lanzendörfer  writes:
>> From the manual page I read that fso-gsmd handles GSM 07.10 
>> Multiplexing. So what is the purpose of fso-abyss (GSM 07.10 
>> Multiplexer)?
> Maybe to do multiplexing :-)

It was used for that, but now fsogsmd uses the library implementation,
so it does multiplexing on its own by default, fso-abyss shouldn't be
running, basically a common user doesn't need it.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Problem with debian install on Freerunner gta02

2012-04-12 Thread Paul Fertser
Hi,

Jakub Saran  writes:
...
> root@om-gta02 ~ # QI=true SINGLE_PART=true ./install.sh testing time mount 
> debian apt fso tasks="ALL" configuration kernel
...
> sh: sha1sum: not found

opkg install coreutils

HTH
-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: About the future of the freesmartphone.org middleware

2012-08-01 Thread Paul Fertser
Enrico Zini  writes:
> This said, oFono does have one very compelling feature: on my N900, it
> works reliably. Far better than any version of FSO that I ever managed
> to put on my FreeRunner ever did.

If you think that Nokia's N900 firmware is using oFono, you're
wrong. Or do you mean something else?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] fsousaged: properly pass DBUS_SYSTEM_SERVICE_DIR to the sources, fixes shadow resources

2012-11-14 Thread Paul Fertser
Autoconf 2.60 introduced a change that makes it impossible to use
@datadir@ as before. The reason for that is that prefix (and related
variables) is now possible to set at make time (rather than configure
time). So it need to be expanded on the Makefile-level.

With this change shadow resources work again.

Signed-off-by: Paul Fertser 
---
 fsousaged/configure.ac |1 -
 fsousaged/src/plugins/dbus_service/Makefile.am |1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/fsousaged/configure.ac b/fsousaged/configure.ac
index dceda8b..98764d6 100644
--- a/fsousaged/configure.ac
+++ b/fsousaged/configure.ac
@@ -116,7 +116,6 @@ else
DBUS_SYSTEM_SERVICE_DIR="${path_dbusdata}/dbus-1/system-services"
 fi
 AC_SUBST(DBUS_SYSTEM_SERVICE_DIR)
-AC_DEFINE_UNQUOTED([DBUS_SYSTEM_SERVICE_DIR], ["${DBUS_SYSTEM_SERVICE_DIR}"], 
[dbus system service activation dir])
 
 
#
 # data files
diff --git a/fsousaged/src/plugins/dbus_service/Makefile.am 
b/fsousaged/src/plugins/dbus_service/Makefile.am
index fce0c91..70aa1ef 100644
--- a/fsousaged/src/plugins/dbus_service/Makefile.am
+++ b/fsousaged/src/plugins/dbus_service/Makefile.am
@@ -25,6 +25,7 @@ dbus_service_la_VALAFLAGS = \
$(NULL)
 dbus_service_la_CFLAGS = \
-I$(top_srcdir)/src/lib \
+   -DDBUS_SYSTEM_SERVICE_DIR="\"$(DBUS_SYSTEM_SERVICE_DIR)\"" \
$(GLIB_CFLAGS) \
$(GEE_CFLAGS) \
$(FSO_CFLAGS) \
-- 
1.7.10.4


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH 1/2] fsogsmd: allow for fsonetworkd-less configuration by integration with ppp scripts

2012-11-18 Thread Paul Fertser
This introduces an additional [fsogsm] parameter which is supposed to
be set like this (with ip-up from the ppp package):
pdp_helper = /etc/ppp/ip-up

This allows for a clean integration with other services installed on a
typical system, e.g. resolvconf, ntp etc.

To actually assign an address to the interface one needs an additional
script, an example is provided in conf/ppp/ip-up.d/configureif .

This is tested on vanilla Debian unstable system with resolvconf on
gta04.

Signed-off-by: Paul Fertser 
---
 fsogsmd/conf/ppp/ip-up.d/configureif |5 +
 fsogsmd/src/lib/pdp.vala |   26 ++
 2 files changed, 31 insertions(+)
 create mode 100755 fsogsmd/conf/ppp/ip-up.d/configureif

diff --git a/fsogsmd/conf/ppp/ip-up.d/configureif 
b/fsogsmd/conf/ppp/ip-up.d/configureif
new file mode 100755
index 000..8c70eec
--- /dev/null
+++ b/fsogsmd/conf/ppp/ip-up.d/configureif
@@ -0,0 +1,5 @@
+#!/bin/sh
+
+ip addr flush dev $1
+ip addr add $4 peer $5 dev $1
+ip route add default dev $1
diff --git a/fsogsmd/src/lib/pdp.vala b/fsogsmd/src/lib/pdp.vala
index 5c453e8..3d57f56 100644
--- a/fsogsmd/src/lib/pdp.vala
+++ b/fsogsmd/src/lib/pdp.vala
@@ -223,6 +223,8 @@ public abstract class FsoGsm.PdpHandler : IPdpHandler, 
FsoFramework.AbstractObje
 updateStatus( FreeSmartphone.GSM.ContextStatus.ACTIVE, status );
 
 var setupNetworkRoute = FsoFramework.theConfig.boolValue( "fsogsm", 
"pdp_setup_network_route", true );
+var pdp_helper = FsoFramework.theConfig.stringValue( "fsogsm", 
"pdp_helper" );
+
 if ( setupNetworkRoute )
 {
 try
@@ -239,6 +241,30 @@ public abstract class FsoGsm.PdpHandler : IPdpHandler, 
FsoFramework.AbstractObje
 logger.error( @"Can't call offer_default_route on onetworkd: 
$(e.message)" );
 }
 }
+
+if ( pdp_helper.length > 0)
+{
+Pid pid;
+try
+{
+Process.spawn_async( null, { pdp_helper,
+ route.iface,
+ "notty",
+ "0",
+ route.ipv4addr,
+ route.ipv4gateway },
+   { "USEPEERDNS=1",
+ "DNS1=" + route.dns1,
+ "DNS2=" + route.dns2 },
+ 0,
+ null,
+ out pid );
+}
+catch (Error e)
+{
+FsoFramework.theLogger.error ( @"Error calling $pdp_helper: 
$(e.message)" );
+}
+}
 }
 
 public void disconnected()
-- 
1.7.10.4


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[RFC][PATCH 2/2] fsogsmd: bring the interface down after PDP disconnection

2012-11-18 Thread Paul Fertser
This extends sc_deactivate() method with a new output parameter to
enable modem plugins to pass the name of the network interface used
for PDP.

This is needed in case the interface is still visible even after the
modem has actually removed all the connectivity from it (and so the
system will have a route over it unless it is brought down).

Signed-off-by: Paul Fertser 
---
 fsogsmd/src/lib/at/atpdp.vala|2 +-
 fsogsmd/src/lib/pdp.vala |   18 +++---
 .../src/plugins/modem_option_gtm601/pdphandler.vala  |3 ++-
 fsogsmd/src/plugins/modem_samsung/pdphandler.vala|3 ++-
 fsogsmd/src/plugins/pdp_nokia_isi/plugin.vala|2 +-
 fsogsmd/src/plugins/pdp_ppp_internal/plugin.vala |2 +-
 fsogsmd/src/plugins/pdp_qmi/plugin.vala  |3 ++-
 7 files changed, 24 insertions(+), 9 deletions(-)

diff --git a/fsogsmd/src/lib/at/atpdp.vala b/fsogsmd/src/lib/at/atpdp.vala
index 4af3b1d..d92817d 100644
--- a/fsogsmd/src/lib/at/atpdp.vala
+++ b/fsogsmd/src/lib/at/atpdp.vala
@@ -153,7 +153,7 @@ public class FsoGsm.AtPdpHandler : FsoGsm.PdpHandler
 yield setupTransport();
 }
 
-public async override void sc_deactivate()
+public async override void sc_deactivate(out string iface)
 {
 yield leaveDataState();
 /*
diff --git a/fsogsmd/src/lib/pdp.vala b/fsogsmd/src/lib/pdp.vala
index 3d57f56..fff2af0 100644
--- a/fsogsmd/src/lib/pdp.vala
+++ b/fsogsmd/src/lib/pdp.vala
@@ -131,7 +131,7 @@ public abstract class FsoGsm.PdpHandler : IPdpHandler, 
FsoFramework.AbstractObje
 {
 }
 
-protected async virtual void sc_deactivate() throws 
FreeSmartphone.GSM.Error, FreeSmartphone.Error
+protected async virtual void sc_deactivate(out string iface) throws 
FreeSmartphone.GSM.Error, FreeSmartphone.Error
 {
 }
 
@@ -193,8 +193,20 @@ public abstract class FsoGsm.PdpHandler : IPdpHandler, 
FsoFramework.AbstractObje
 throw new FreeSmartphone.Error.UNAVAILABLE( @"Can't deactivate 
context while in status $status" );
 }
 
-yield sc_deactivate();
-
+string iface;
+yield sc_deactivate(out iface);
+if (iface != null)
+{
+try
+{
+new FsoFramework.Network.Interface( iface ).down();
+}
+catch ( FsoFramework.Network.Error err )
+{
+logger.error( @"Could not put network interface $(iface) down; 
" +
+   "still setting context status to RELEASED" );
+}
+}
 var status = new GLib.HashTable( GLib.str_hash, 
GLib.str_equal );
 updateStatus( FreeSmartphone.GSM.ContextStatus.RELEASED, status );
 }
diff --git a/fsogsmd/src/plugins/modem_option_gtm601/pdphandler.vala 
b/fsogsmd/src/plugins/modem_option_gtm601/pdphandler.vala
index 428ba21..2665cfc 100644
--- a/fsogsmd/src/plugins/modem_option_gtm601/pdphandler.vala
+++ b/fsogsmd/src/plugins/modem_option_gtm601/pdphandler.vala
@@ -93,13 +93,14 @@ class Pdp.OptionGtm601 : FsoGsm.PdpHandler
 }
 }
 
-public async override void sc_deactivate()
+public async override void sc_deactivate(out string iface)
 {
 try
 {
 var cmd = modem.createAtCommand( 
"_OWANCALL" );
 var response = yield modem.processAtCommandAsync( cmd, cmd.issue( 
false ) );
 checkResponseOk( cmd, response );
+iface = HSO_IFACE;
 }
 catch ( GLib.Error e )
 {
diff --git a/fsogsmd/src/plugins/modem_samsung/pdphandler.vala 
b/fsogsmd/src/plugins/modem_samsung/pdphandler.vala
index 5427166..00249bb 100644
--- a/fsogsmd/src/plugins/modem_samsung/pdphandler.vala
+++ b/fsogsmd/src/plugins/modem_samsung/pdphandler.vala
@@ -137,9 +137,10 @@ class Samsung.PdpHandler : FsoGsm.PdpHandler
 yield activatePdpContext( modem.data().contextParams );
 }
 
-protected override async void sc_deactivate() throws 
FreeSmartphone.GSM.Error, FreeSmartphone.Error
+protected override async void sc_deactivate(out string iface) throws 
FreeSmartphone.GSM.Error, FreeSmartphone.Error
 {
 yield deactivatePdpContext();
+iface = RMNET_IFACE;
 }
 
 //
diff --git a/fsogsmd/src/plugins/pdp_nokia_isi/plugin.vala 
b/fsogsmd/src/plugins/pdp_nokia_isi/plugin.vala
index f79c75f..ac1a449 100644
--- a/fsogsmd/src/plugins/pdp_nokia_isi/plugin.vala
+++ b/fsogsmd/src/plugins/pdp_nokia_isi/plugin.vala
@@ -64,7 +64,7 @@ class Pdp.NokiaIsi : FsoGsm.PdpHandler
 } );
 }
 
-public async override void sc_deactivate()
+public async override void sc_deactivate(out string iface)
 {
 GIsiComm.ModemAccess isimodem = FsoFramework.DataSharing.valueForKey( 
"NokiaIsi.isimodem") as GIsiComm.ModemAccess;
 isimodem.gpds.deactivate();
diff --git a/fsogsmd/src/plugins/pdp_ppp_internal/plugin.v

Re: [PATCH 1/2] fsogsmd: allow for fsonetworkd-less configuration by integration with ppp scripts

2012-11-19 Thread Paul Fertser
Paul Fertser  writes:
> +Process.spawn_async( null, { pdp_helper,
> + route.iface,
> + "notty",
> + "0",
> + route.ipv4addr,
> + route.ipv4gateway },

Should this also set the 6th parameter to "fsogsmd" to allow ip-up
scripts to distinguish between the possible callers? Then setting the
address could be made conditional. Is that the usual way other
programs do that?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH v2] fsogsmd: allow for fsonetworkd-less configuration by integration with ppp scripts

2012-11-22 Thread Paul Fertser
This introduces an additional [fsogsm] parameter which is supposed to
be set like this (with ip-up from the ppp package):
pdp_helper = /etc/ppp/ip-up

This allows for a clean integration with other services installed on a
typical system, e.g. resolvconf, ntp etc.

To actually assign an address to the interface one needs an additional
script, an example is provided in conf/ppp/ip-up.d/configureif .

This is tested on vanilla Debian unstable system with resolvconf on
gta04.

Signed-off-by: Paul Fertser 
---
 fsogsmd/conf/ppp/ip-up.d/configureif |8 
 fsogsmd/src/lib/pdp.vala |   27 +++
 2 files changed, 35 insertions(+)
 create mode 100755 fsogsmd/conf/ppp/ip-up.d/configureif

diff --git a/fsogsmd/conf/ppp/ip-up.d/configureif 
b/fsogsmd/conf/ppp/ip-up.d/configureif
new file mode 100755
index 000..4e93f75
--- /dev/null
+++ b/fsogsmd/conf/ppp/ip-up.d/configureif
@@ -0,0 +1,8 @@
+#!/bin/sh
+
+[ "x$6" = "xfsogsmd" ] && {
+ip addr flush dev $1
+ip addr add $4 peer $5 dev $1
+ip route add default dev $1
+}
+
diff --git a/fsogsmd/src/lib/pdp.vala b/fsogsmd/src/lib/pdp.vala
index 5c453e8..401783e 100644
--- a/fsogsmd/src/lib/pdp.vala
+++ b/fsogsmd/src/lib/pdp.vala
@@ -223,6 +223,8 @@ public abstract class FsoGsm.PdpHandler : IPdpHandler, 
FsoFramework.AbstractObje
 updateStatus( FreeSmartphone.GSM.ContextStatus.ACTIVE, status );
 
 var setupNetworkRoute = FsoFramework.theConfig.boolValue( "fsogsm", 
"pdp_setup_network_route", true );
+var pdp_helper = FsoFramework.theConfig.stringValue( "fsogsm", 
"pdp_helper" );
+
 if ( setupNetworkRoute )
 {
 try
@@ -239,6 +241,31 @@ public abstract class FsoGsm.PdpHandler : IPdpHandler, 
FsoFramework.AbstractObje
 logger.error( @"Can't call offer_default_route on onetworkd: 
$(e.message)" );
 }
 }
+
+if ( pdp_helper.length > 0)
+{
+Pid pid;
+try
+{
+Process.spawn_async( null, { pdp_helper,
+ route.iface,
+ "notty",
+ "0",
+ route.ipv4addr,
+ route.ipv4gateway,
+ "fsogsmd" },
+   { "USEPEERDNS=1",
+ "DNS1=" + route.dns1,
+ "DNS2=" + route.dns2 },
+ 0,
+ null,
+ out pid );
+}
+catch (Error e)
+{
+FsoFramework.theLogger.error ( @"Error calling $pdp_helper: 
$(e.message)" );
+}
+}
 }
 
 public void disconnected()
-- 
1.7.10.4


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: [PATCH v2] fsogsmd: allow for fsonetworkd-less configuration by integration with ppp scripts

2012-11-23 Thread Paul Fertser
Hi!

Awesome to see you again :) Any hints about when you possibly get
back? ;)

On Fri, Nov 23, 2012 at 12:21:39PM +0100, Dr. Michael Lauer wrote:
> looks good to me. Could you disable the communication with fsonetworkd 
> though, if the
> pdp_helper key is present?

It's already possible by using the appropriate config flag when
desired. I thought some people would want to use both fsonetworkd and
also pass the data to the usual ppp scripts. Or does fsonetworkd run
those itself?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Emacs UI version 0.2 released

2013-01-22 Thread Paul Fertser
Hi,

I'm still using gta02 as my only cell-phone, of course with fso.el, so
I felt like making some improvement to it again :)


What's new:

* Compatibility with the current FSO version (tested on gta02 and gta04)
* Ability to access FSO on remote DBus with dbus-proxy-daemon via a
  custom path, without requiring you to change it for the whole Emacs
  session (seems to require Emacs 24.3 or later)
* Exposure of GSM.Monitor information in a visually-appealing way :)
* Improved documentation

Please see the main wiki page [1], quick start guide [2], and
screenshots [3].

Huge thanks to everybody who is still involved.

Happy hacking!

[1] https://github.com/paulfertser/fso-el/wiki
[2] https://github.com/paulfertser/fso-el/wiki/Quick-start-guide
[3] https://github.com/paulfertser/fso-el/wiki/Screenshots

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Emacs UI version 0.2 released

2013-01-22 Thread Paul Fertser
Hi,

On Tue, Jan 22, 2013 at 06:53:54PM +, Neil Jerram wrote:
> Thanks, it looks really nice!

Thank you! :)

> What's the complete set up?  Do you start from Debian, or from SHR - or
> get all the other distro bits that you need in some other way?

I personally use Debian and self-compile the whole FSO from git on
device + distcc. But it's a major pain so I would suggest against it,
one should simply use pre-packaged Debian versions or the whole SHR
distro, it doesn't matter for fso.el anyway :)

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] fsogsmd: ti_calypso: do not send @POFF ever

2013-01-25 Thread Paul Fertser
Current resource disabling code depends heavily on the modem being
alive. Do not send @POFF to Calypso to be able to properly release and
then request again the GSM resource.

This is likely to leave Calypso up and running on GTA01 even if the
user doesn't need it, increasing power consumption.

Signed-off-by: Paul Fertser 
---
 fsogsmd/src/plugins/modem_ti_calypso/plugin.vala |3 ---
 1 file changed, 3 deletions(-)

diff --git a/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala 
b/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
index 7bc90c7..e26efd5 100644
--- a/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
+++ b/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
@@ -74,9 +74,6 @@ class TiCalypso.Modem : FsoGsm.AbstractModem
 atCommandSequence( "MODEM", "init" ).append( { "%SLEEP=2" } );
 }
 
-// configure power off
-atCommandSequence( "MODEM", "shutdown" ).append( { "@POFF" } );
-
 // sequence for initializing every channel
 registerAtCommandSequence( "CHANNEL", "init", new AtCommandSequence( {
 """E0Q0V1""",
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] fsodeviced: fix races on requesting CPU and Display resources

2013-01-25 Thread Paul Fertser
When CPU is requested while status is "idle", the state transition to
suspend is already scheduled and needs to be cancelled. Similiar logic
applies to the Display resource.

Signed-off-by: Paul Fertser 
---
 fsodeviced/src/plugins/kernel_idle/plugin.vala |   15 ++-
 1 file changed, 6 insertions(+), 9 deletions(-)

diff --git a/fsodeviced/src/plugins/kernel_idle/plugin.vala 
b/fsodeviced/src/plugins/kernel_idle/plugin.vala
index cdb4f78..5589db6 100644
--- a/fsodeviced/src/plugins/kernel_idle/plugin.vala
+++ b/fsodeviced/src/plugins/kernel_idle/plugin.vala
@@ -261,10 +261,10 @@ class IdleNotifier : FreeSmartphone.Device.IdleNotifier, 
FsoFramework.AbstractOb
 {
 // allow sending of suspend
 idlestatus.timeouts[FreeSmartphone.Device.IdleState.SUSPEND] = 
config.intValue( KERNEL_IDLE_PLUGIN_NAME, 
states[FreeSmartphone.Device.IdleState.SUSPEND], 20 );
-// relaunch timer, if necessary
-if ( idlestatus.status == FreeSmartphone.Device.IdleState.LOCK 
)
-idlestatus.onState( FreeSmartphone.Device.IdleState.LOCK );
 }
+// relaunch timer, if necessary
+if ( idlestatus.status == FreeSmartphone.Device.IdleState.LOCK )
+idlestatus.onState( FreeSmartphone.Device.IdleState.LOCK );
 }
 
 if ( r is DisplayResource )
@@ -274,18 +274,15 @@ class IdleNotifier : FreeSmartphone.Device.IdleNotifier, 
FsoFramework.AbstractOb
 {
 // prohibit sending of idle_dim (and later)
 idlestatus.timeouts[displayResourcePreventState] = -1;
-// relaunch timer, if necessary
-if ( (int)idlestatus.status > 
(int)FreeSmartphone.Device.IdleState.IDLE )
-idlestatus.onState( FreeSmartphone.Device.IdleState.IDLE );
 }
 else
 {
 // allow sending of idle_dim (and later)
 idlestatus.timeouts[displayResourcePreventState] = 
config.intValue( KERNEL_IDLE_PLUGIN_NAME, states[displayResourcePreventState], 
10 );
-// relaunch timer, if necessary
-if ( idlestatus.status == FreeSmartphone.Device.IdleState.IDLE 
)
-idlestatus.onState( FreeSmartphone.Device.IdleState.IDLE );
 }
+// relaunch timer, if necessary
+if ( idlestatus.status >= displayResourcePreventState - 1 )
+idlestatus.onState( displayResourcePreventState - 1 );
 }
 
 }
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] rules.yaml: should set brigtness on transition to idle

2013-01-25 Thread Paul Fertser
When a Display resource is requested, the state might transition from
some state without backlight so it needs to be set explicitely.

Signed-off-by: Paul Fertser 
---
 etc/freesmartphone/oevents/rules.yaml |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/etc/freesmartphone/oevents/rules.yaml 
b/etc/freesmartphone/oevents/rules.yaml
index 695f5ff..ea5423f 100644
--- a/etc/freesmartphone/oevents/rules.yaml
+++ b/etc/freesmartphone/oevents/rules.yaml
@@ -153,7 +153,7 @@
 # Idleness Brightness Handling
 #
 trigger: IdleState()
-filters: HasAttr(status, "busy")
+filters: Or(HasAttr(status, "busy"),HasAttr(status, "idle"))
 actions: SetDisplayBrightness("0", 90)
 -
 trigger: IdleState()
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH 1/2] oeventsd: fix CallStatus case-insensitive comparison

2013-01-26 Thread Paul Fertser
This should fix #541 (a failed attempt was
04c66a3768cc5a5a2af0ba0d508daf6cbb391c3f).

Three years later, but better late than never? In fact, I'm not sure
that holds true.

Signed-off-by: Paul Fertser 
---
 framework/subsystems/oeventsd/fso_triggers.py |8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/framework/subsystems/oeventsd/fso_triggers.py 
b/framework/subsystems/oeventsd/fso_triggers.py
index 8c1006c..17ae2e6 100644
--- a/framework/subsystems/oeventsd/fso_triggers.py
+++ b/framework/subsystems/oeventsd/fso_triggers.py
@@ -52,14 +52,16 @@ class CallListContains(WhileRule):
 function_name = "CallListContains"
 
 def __init__(self, status):
-self.status = status
+self.status = status.lower()
 self.calls = {} # The list of current call object
 super(CallListContains, self).__init__(CallStatusTrigger())
 
 def trigger(self, id=None, status=None, properties=None, **kargs):
 logger.debug("Trigger %s", self)
-self.calls[id] = status
-if ( self.status in self.calls.values() ) or ( self.status.lower() in 
self.calls.values() ):
+self.calls[id] = None
+if status:
+self.calls[id] = status.lower()
+if self.status in self.calls.values()
 super(CallListContains, self).trigger()
 else:
 super(CallListContains, self).untrigger()
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH 2/2] oeventsd: improve default, gta02, gta04 rules examples

2013-01-26 Thread Paul Fertser
This should request CPU all the time it makes sense, and keeps the
appropriate sound scenario while at least one call is in active or
outgoing state.

Signed-off-by: Paul Fertser 
---
 etc/freesmartphone/oevents/om-gta02/rules.yaml |   34 +++
 etc/freesmartphone/oevents/om-gta04/rules.yaml |   35 
 etc/freesmartphone/oevents/rules.yaml  |7 -
 3 files changed, 52 insertions(+), 24 deletions(-)

diff --git a/etc/freesmartphone/oevents/om-gta02/rules.yaml 
b/etc/freesmartphone/oevents/om-gta02/rules.yaml
index 8f7e2a7..a056113 100644
--- a/etc/freesmartphone/oevents/om-gta02/rules.yaml
+++ b/etc/freesmartphone/oevents/om-gta02/rules.yaml
@@ -29,8 +29,8 @@
 actions: MessageTone(play)
 
 -
-while: CallListContains("INCOMING")
-filters: Not(CallListContains("ACTIVE"))
+while: CallListContains("incoming")
+filters: Not(CallListContains("active"))
 actions:
  - RingTone()
  - OccupyResource(Display)
@@ -44,20 +44,32 @@
 actions: SetLed("gta02_red_aux", "blink")
 
 -
-#while: CallStatus()
-#filters:
-#- Or(Or(HasAttr(status, "OUTGOING"), HasAttr(status, "ACTIVE")), 
And(HasAttr(status, "INCOMING"), CallListContains("ACTIVE")))
-#- Not(BTHeadsetIsConnected())
-#actions:
-#- SetScenario(gsmhandset)
-#-
 while: CallStatus()
 filters:
-- Or(Or(HasAttr(status, "OUTGOING"), HasAttr(status, "ACTIVE")), 
And(HasAttr(status, "INCOMING"), CallListContains("ACTIVE")))
+- Or(CallListContains("outgoing"), CallListContains("active"))
+actions:
+- OccupyResource(CPU)
+-
+while: CallStatus()
+filters:
+- CallListContains("incoming")
+actions:
+- OccupyResource(CPU)
+-
+while: CallStatus()
+filters:
+- Or(CallListContains("outgoing"), CallListContains("active"))
+- Not(BTHeadsetIsConnected())
+actions:
+- SetScenario(gsmhandset)
+-
+while: CallStatus()
+filters:
+- Or(CallListContains("outgoing"), CallListContains("active"))
 - BTHeadsetIsConnected()
 actions:
 - SetScenario(gsmbluetooth)
-- BTHeadsetPlaying()   
+- BTHeadsetPlaying()
 -
 while: PowerStatus()
 filters: HasAttr(status, "charging")
diff --git a/etc/freesmartphone/oevents/om-gta04/rules.yaml 
b/etc/freesmartphone/oevents/om-gta04/rules.yaml
index 17be995..7fc683c 100644
--- a/etc/freesmartphone/oevents/om-gta04/rules.yaml
+++ b/etc/freesmartphone/oevents/om-gta04/rules.yaml
@@ -29,8 +29,8 @@
 actions: MessageTone(play)
 
 -
-while: CallListContains("INCOMING")
-filters: Not(CallListContains("ACTIVE"))
+while: CallListContains("incoming")
+filters: Not(CallListContains("active"))
 actions:
  - RingTone()
  - OccupyResource(Display)
@@ -42,22 +42,33 @@
 -
 while: UnreadMessages()
 actions: SetLed("gta04_red_aux", "blink")
-
 -
-#while: CallStatus()
-#filters:
-#- Or(Or(HasAttr(status, "OUTGOING"), HasAttr(status, "ACTIVE")), 
And(HasAttr(status, "INCOMING"), CallListContains("ACTIVE")))
-#- Not(BTHeadsetIsConnected())
-#actions:
-#- SetScenario(gsmhandset)
-#-
 while: CallStatus()
 filters:
-- Or(Or(HasAttr(status, "OUTGOING"), HasAttr(status, "ACTIVE")), 
And(HasAttr(status, "INCOMING"), CallListContains("ACTIVE")))
+- Or(CallListContains("outgoing"), CallListContains("active"))
+actions:
+- OccupyResource(CPU)
+-
+while: CallStatus()
+filters:
+- CallListContains("incoming")
+actions:
+- OccupyResource(CPU)
+-
+while: CallStatus()
+filters:
+- Or(CallListContains("outgoing"), CallListContains("active"))
+- Not(BTHeadsetIsConnected())
+actions:
+- SetScenario(gsmhandset)
+-
+while: CallStatus()
+filters:
+- Or(CallListContains("outgoing"), CallListContains("active"))
 - BTHeadsetIsConnected()
 actions:
 - SetScenario(gsmbluetooth)
-- BTHeadsetPlaying()   
+- BTHeadsetPlaying()
 -
 while: PowerStatus()
 filters: HasAttr(status, "charging")
diff --git a/etc/freesmartphone/oevents/rules.yaml 
b/etc/freesmartphone/oevents/rules.yaml
index ea5423f..fcd2739 100644
--- a/etc/freesmartphone/oevents/rules.yaml
+++ b/etc/freesmartphone/oevents/rules.yaml
@@ -75,6 +7

[PATCH] fsogsmd: modem_ti_calypso: disable +CREG unsol by default

2013-01-29 Thread Paul Fertser
By default Calypso has +CREG=1 on channels, so even though the suspend
sequence does disable it on channel 3 it still wakes up the SoC from
suspend coming on channel 2.

This is a regression causing unnecessary wake-ups and power drain
introduced by fa9cdf0455a5a6ca36b4b30f1c715e4cb318b047 May 4 2012.

Signed-off-by: Paul Fertser 
---
 fsogsmd/src/plugins/modem_ti_calypso/plugin.vala |3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala 
b/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
index e26efd5..6a808be 100644
--- a/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
+++ b/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
@@ -80,7 +80,8 @@ class TiCalypso.Modem : FsoGsm.AbstractModem
 """%CUNS=2""",
 """+CMEE=1""",
 """+CRC=1""",
-"""+CSNS=0"""
+"""+CSNS=0""",
+"""+CREG=0"""
 } ) );
 
 // sequence for initializing main channel
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] fsogsmd: do not pollute logs with "ON DATA FROM PPP"

2013-01-29 Thread Paul Fertser
Currently it's output to the logs on INFO level all the time during a
PPP session. It's needed only during low-level debugging so ifdef it
out (the same way the other related code does it).

Signed-off-by: Paul Fertser 
---
 fsogsmd/src/lib/muxtransport.vala |2 ++
 1 file changed, 2 insertions(+)

diff --git a/fsogsmd/src/lib/muxtransport.vala 
b/fsogsmd/src/lib/muxtransport.vala
index c8b8630..83ef05c 100644
--- a/fsogsmd/src/lib/muxtransport.vala
+++ b/fsogsmd/src/lib/muxtransport.vala
@@ -285,7 +285,9 @@ public class FsoGsm.LibGsm0710muxTransport : 
FsoFramework.BaseTransport
 message( "EOF FROM PPP" );
 return;
 }
+#if DEBUG
 message( "ON DATA FROM PPP" );
+#endif
 var bwritten = write( data, (int)length );
 assert( bwritten == length );
 }
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] fsogsmd: allow negative C1 in Calypso's %EM=2,1 response

2013-01-30 Thread Paul Fertser
This is an example of a valid report, the pattern should allow it:
SRC: "%EM=2,1" -> [ "%EM: 
518,-1,29,7,14,37151,23,1,1,0,0,0,0,0,0,26895,0,0,2,255", "OK" ]

Signed-off-by: Paul Fertser 
---
 fsogsmd/src/plugins/modem_ti_calypso/commands.vala |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fsogsmd/src/plugins/modem_ti_calypso/commands.vala 
b/fsogsmd/src/plugins/modem_ti_calypso/commands.vala
index 5728b82..2b72f4c 100644
--- a/fsogsmd/src/plugins/modem_ti_calypso/commands.vala
+++ b/fsogsmd/src/plugins/modem_ti_calypso/commands.vala
@@ -174,7 +174,7 @@ public class PercentEM21 : AbstractAtCommand
 {
 try
 {
-re = new Regex( """%EM: 
(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+)"""
 );
+re = new Regex( """%EM: 
(?P\d+),(?P-?\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+),(?P\d+)"""
 );
 }
 catch ( GLib.RegexError e )
 {
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[RFC][PATCH] fsogsmd: allow to disable URC configuration on specific channels, use for Calypso

2013-01-31 Thread Paul Fertser
Commit fa9cdf0455a5a6ca36b4b30f1c715e4cb318b047 introduced automatic
URC config for +CREG notifications on the main channel.

However, modem_ti_calypso uses a dedicated channel for all URCs and
takes special care to silence them on that channel prior to
suspending. Even though the suspend sequence does disable it on
channel 3 it still wakes up the SoC from suspend coming on channel 2
(main).

This patch allows to add a per-channel flag for individual modems to
specify which channels are suitable for URC (true by default for all
channels) and reverts the previous attempt of fixing this for calypso.

Signed-off-by: Paul Fertser 
---
This needs at least morphis's review.


 fsogsmd/src/lib/at/atchannel.vala|   10 --
 fsogsmd/src/plugins/modem_ti_calypso/plugin.vala |5 ++---
 2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/fsogsmd/src/lib/at/atchannel.vala 
b/fsogsmd/src/lib/at/atchannel.vala
index 321b468..126d632 100644
--- a/fsogsmd/src/lib/at/atchannel.vala
+++ b/fsogsmd/src/lib/at/atchannel.vala
@@ -26,9 +26,10 @@ public class FsoGsm.AtChannel : FsoGsm.AtCommandQueue, 
FsoGsm.Channel
 protected string name;
 private bool isInitialized;
 private bool isMainChannel;
+private bool isUrcChannel;
 private FsoGsm.Modem modem;
 
-public AtChannel( FsoGsm.Modem modem, string? name, FsoFramework.Transport 
transport, FsoFramework.Parser parser )
+public AtChannel( FsoGsm.Modem modem, string? name, FsoFramework.Transport 
transport, FsoFramework.Parser parser, bool isUrcChannel = true )
 {
 base( transport, parser );
 this.name = name;
@@ -39,6 +40,7 @@ public class FsoGsm.AtChannel : FsoGsm.AtCommandQueue, 
FsoGsm.Channel
 modem.registerChannel( name, this );
 modem.signalStatusChanged.connect( onModemStatusChanged );
 this.isMainChannel = ( name == "main" );
+this.isUrcChannel = isUrcChannel;
 }
 }
 
@@ -113,9 +115,13 @@ public class FsoGsm.AtChannel : FsoGsm.AtCommandQueue, 
FsoGsm.Channel
 }
 modem.data().charset = charset;
 
-if ( this.isMainChannel )
+if ( this.isUrcChannel )
 {
 setupNetworkRegistrationReport();
+}
+
+if ( this.isMainChannel )
+{
 gatherSimStatusAndUpdate( modem );
 modem.smshandler.configure();
 }
diff --git a/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala 
b/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
index 6a808be..b12b1c2 100644
--- a/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
+++ b/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
@@ -80,8 +80,7 @@ class TiCalypso.Modem : FsoGsm.AbstractModem
 """%CUNS=2""",
 """+CMEE=1""",
 """+CRC=1""",
-"""+CSNS=0""",
-"""+CREG=0"""
+"""+CSNS=0"""
 } ) );
 
 // sequence for initializing main channel
@@ -183,7 +182,7 @@ class TiCalypso.Modem : FsoGsm.AbstractModem
 {
 var transport = new FsoGsm.LibGsm0710muxTransport( i+1 );
 var parser = new FsoGsm.StateBasedAtParser();
-new AtChannel( this, CHANNEL_NAMES[i], transport, parser );
+new AtChannel( this, CHANNEL_NAMES[i], transport, parser, 
CHANNEL_NAMES[i] == "urc" );
 }
 }
 
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH 4/5] fsogsmd: postpone SMS-related configuration until SIM is ready

2013-02-07 Thread Paul Fertser
Calypso doesn't allow to issue some SMS-related commands too early,
responding with "SIM is busy" error. Delay the whole configuration
(for all the modems) until SIM is known to be fully ready.

Example Calypso response before the patch:
2010-05-11T11:16:34.665705Z [INFO]  libfsotransport <0710:2>: SRC: "+CSMS=1" -> 
[ "+CMS ERROR: 314" ]

This fixes #689 and #722.

Signed-off-by: Paul Fertser 
---
 fsogsmd/src/lib/at/atchannel.vala |1 -
 fsogsmd/src/lib/sms.vala  |1 +
 2 files changed, 1 insertion(+), 1 deletion(-)

diff --git a/fsogsmd/src/lib/at/atchannel.vala 
b/fsogsmd/src/lib/at/atchannel.vala
index 126d632..761167b 100644
--- a/fsogsmd/src/lib/at/atchannel.vala
+++ b/fsogsmd/src/lib/at/atchannel.vala
@@ -123,7 +123,6 @@ public class FsoGsm.AtChannel : FsoGsm.AtCommandQueue, 
FsoGsm.Channel
 if ( this.isMainChannel )
 {
 gatherSimStatusAndUpdate( modem );
-modem.smshandler.configure();
 }
 
 this.isInitialized = true;
diff --git a/fsogsmd/src/lib/sms.vala b/fsogsmd/src/lib/sms.vala
index 7cdfd03..b3583b4 100644
--- a/fsogsmd/src/lib/sms.vala
+++ b/fsogsmd/src/lib/sms.vala
@@ -181,6 +181,7 @@ public abstract class FsoGsm.AbstractSmsHandler : 
FsoGsm.SmsHandler, FsoFramewor
 
 private async void simIsReady()
 {
+yield configure();
 yield syncWithSim();
 }
 
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH 0/5] fix direct message delivery via +CMT

2013-02-07 Thread Paul Fertser
These patches are prepared to restore proper +CMT functionality on
Calypso but are useful on the other modems as well.

For Calypso they're really needed because otherwise the SIM is getting
filled up and the messages can no longer be delivered.   


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH 2/5] fsogsmd: always create all the arrays in +CNMI handler

2013-02-07 Thread Paul Fertser
This is needed to avoid this crash that can happen in case +CNMI
parsing fails:

2013-02-06T19:55:17.190299Z [CRITICAL] fsogsmd : GLib <>: 
fso_gsm_at_sms_handler_choose_from_preference: assertion `supported
!= NULL' failed

Signed-off-by: Paul Fertser 
---
 fsogsmd/src/lib/at/atcommands.vala |4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/fsogsmd/src/lib/at/atcommands.vala 
b/fsogsmd/src/lib/at/atcommands.vala
index 2446e4f..e073fea 100644
--- a/fsogsmd/src/lib/at/atcommands.vala
+++ b/fsogsmd/src/lib/at/atcommands.vala
@@ -889,6 +889,9 @@ public class PlusCNMI : AbstractAtCommand
 
 supported_opts = new HashTable>( null, null );
 
+for ( int n = 0; n < 5; n++ )
+supported_opts[n] = new ArrayList();
+
 if ( !iter.next( "+CNMI:" ) )
 throw new AtCommandError.UNABLE_TO_PARSE( @"Expected prefix +CNMI" 
);
 
@@ -899,7 +902,6 @@ public class PlusCNMI : AbstractAtCommand
 if ( !iter.open_list() )
 return;
 
-supported_opts[n] = new ArrayList();
 while ( iter.next_number( out num ) )
 supported_opts[n].add( num );
 
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH 5/5] fsogsmd: modem_ti_calypso: remove specific SMS-related config

2013-02-07 Thread Paul Fertser
Since it works properly with the generic configuration, remove the
explicit commands and arrange for the necessary commands to be run on
the "urc" channel.

Signed-off-by: Paul Fertser 
---
 fsogsmd/src/plugins/modem_ti_calypso/plugin.vala |8 +++-
 1 file changed, 3 insertions(+), 5 deletions(-)

diff --git a/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala 
b/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
index 6f9298b..b608512 100644
--- a/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
+++ b/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
@@ -114,12 +114,8 @@ class TiCalypso.Modem : FsoGsm.AbstractModem
 """@ST="-26""""
 } ) );
 
-var cnmiCommand = modem_data.simBuffersSms ? """+CNMI=2,1,2,1,1""" : 
"""+CNMI=2,2,2,1,1""";
-
 // sequence for when the modem is registered
 registerAtCommandSequence( "urc", "registered", new AtCommandSequence( 
{
-cnmiCommand,
-"""+CSMS=1""", /* enable SMS phase 2 */
 """%CPHS=1""" /* enable CPHS phase 2 */
 } ) );
 
@@ -219,7 +215,9 @@ class TiCalypso.Modem : FsoGsm.AbstractModem
 {
 return channels["call"];
 }
-if ( query.has_prefix( "+CNMA" ) )
+if ( query.has_prefix( "+CNMA" ) ||
+ query.has_prefix( "+CNMI" ) ||
+ query.has_prefix( "+CSMS" ) )
 {
 return channels["urc"];
 }
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH 1/5] fsogsmd: fix +CNMA response validation

2013-02-07 Thread Paul Fertser
This fixes the warnings:

2013-02-06T20:25:32.676932Z [DEBUG] libfsotransport <0710:3>: Wrote '+CNMA=0'. 
Waiting (5s) for answer...
2013-02-06T20:25:32.692560Z [DEBUG] libfsotransport <0710:3>: SRC: "+CNMA=0" -> 
[ "OK" ]
2013-02-06T20:25:32.693249Z [WARN]  TiCalypsoModem <4C>: Unexpected length 1 
for FsoGsmPlusCNMA
2013-02-06T20:25:32.693618Z [WARN]  FsoGsmAtSmsHandler <250997500793162>: 
Failed to acknowledge SMS message; further SMS messa
ge handling will maybe faulty!
2013-02-06T20:25:32.694284Z [WARN]  FsoGsmAtSmsHandler <250997500793162>: Could 
not acknowledge incoming message

Signed-off-by: Paul Fertser 
---
 fsogsmd/src/lib/at/atsms.vala |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/fsogsmd/src/lib/at/atsms.vala b/fsogsmd/src/lib/at/atsms.vala
index 805fe4e..f2434ce 100644
--- a/fsogsmd/src/lib/at/atsms.vala
+++ b/fsogsmd/src/lib/at/atsms.vala
@@ -227,7 +227,7 @@ public class FsoGsm.AtSmsHandler : FsoGsm.AbstractSmsHandler
 
 var cmd = modem.createAtCommand( "+CNMA" );
 var response = yield modem.processAtCommandAsync( cmd, cmd.issue( 0 ) 
);
-if ( cmd.validate( response ) != Constants.AtResponse.VALID )
+if ( cmd.validateOk( response ) != Constants.AtResponse.OK )
 {
 logger.warning( @"Failed to acknowledge SMS message; further SMS 
message handling will maybe faulty!" );
 return false;
@@ -270,7 +270,7 @@ public class FsoGsm.AtSmsHandler : FsoGsm.AbstractSmsHandler
 return;
 }
 
-assert( logger.info( @"Successfully configure for SMS message 
handling" ) );
+assert( logger.info( @"Successfully configured for SMS message 
handling" ) );
 }
 
 public override string repr()
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH 3/5] fsogsmd: extend +CNMI parser to support ranges

2013-02-07 Thread Paul Fertser
This is needed to handle Calypso's response which is included as a
test.

Signed-off-by: Paul Fertser 
---
 fsogsmd/src/lib/at/atcommands.vala   |8 
 fsogsmd/src/lib/at/atresultiter.vala |   24 +---
 fsogsmd/tests/testatcommand.vala |   22 ++
 3 files changed, 43 insertions(+), 11 deletions(-)

diff --git a/fsogsmd/src/lib/at/atcommands.vala 
b/fsogsmd/src/lib/at/atcommands.vala
index e073fea..8be6630 100644
--- a/fsogsmd/src/lib/at/atcommands.vala
+++ b/fsogsmd/src/lib/at/atcommands.vala
@@ -905,6 +905,14 @@ public class PlusCNMI : AbstractAtCommand
 while ( iter.next_number( out num ) )
 supported_opts[n].add( num );
 
+if ( iter.skip_char( '-' ) )
+{
+int l = 0;
+iter.next_number( out l );
+while ( num < l )
+supported_opts[n].add( ++num );
+}
+
 if ( !iter.close_list() )
 return;
 }
diff --git a/fsogsmd/src/lib/at/atresultiter.vala 
b/fsogsmd/src/lib/at/atresultiter.vala
index cdb0479..a8172b3 100644
--- a/fsogsmd/src/lib/at/atresultiter.vala
+++ b/fsogsmd/src/lib/at/atresultiter.vala
@@ -245,35 +245,37 @@ namespace FsoGsm
 return true;
 }
 
-public bool open_list()
+public bool skip_char( char c )
 {
 int len = _line.length;
 
 if ( _line_pos >= len )
 return false;
 
-if ( _line[_line_pos] != '(' )
+if ( _line[_line_pos] != c )
 return false;
 
 _line_pos++;
 
-while ( _line_pos < len && _line[_line_pos] == ' ' )
-_line_pos++;
+   return true;
+}
+
+public bool open_list()
+{
+if ( !skip_char( '(' ) )
+return false;
+
+while ( skip_char( ' ' ) )
+;
 
 return true;
 }
 
 public bool close_list()
 {
-int len = _line.length;
-
-if ( _line_pos >= len )
+if ( !skip_char( ')' ) )
 return false;
 
-if ( _line[_line_pos] != ')' )
-return false;
-
-_line_pos++;
 _line_pos = skip_to_next_field( _line, _line_pos );
 
 return true;
diff --git a/fsogsmd/tests/testatcommand.vala b/fsogsmd/tests/testatcommand.vala
index a03384a..543c3e2 100644
--- a/fsogsmd/tests/testatcommand.vala
+++ b/fsogsmd/tests/testatcommand.vala
@@ -384,6 +384,28 @@ void test_atcommand_PlusCNMI()
 assert( cmd.supported_opts[4].size == 2 );
 assert( cmd.supported_opts[4].get(0) == 9 );
 assert( cmd.supported_opts[4].get(1) == 0 );
+
+cmd = (FsoGsm.PlusCNMI) atCommandFactory( "+CNMI" );
+cmd.parseTest( "+CNMI: (0-2),(0-3),(0,2),(0,1),(0,1)" );
+assert( cmd.supported_opts.size() == 5 );
+assert( cmd.supported_opts[0].size == 3 );
+assert( cmd.supported_opts[0].get(0) == 0 );
+assert( cmd.supported_opts[0].get(1) == 1 );
+assert( cmd.supported_opts[0].get(2) == 2 );
+assert( cmd.supported_opts[1].size == 4 );
+assert( cmd.supported_opts[1].get(0) == 0 );
+assert( cmd.supported_opts[1].get(1) == 1 );
+assert( cmd.supported_opts[1].get(2) == 2 );
+assert( cmd.supported_opts[1].get(3) == 3 );
+assert( cmd.supported_opts[2].size == 2 );
+assert( cmd.supported_opts[2].get(0) == 0 );
+assert( cmd.supported_opts[2].get(1) == 2 );
+assert( cmd.supported_opts[3].size == 2 );
+assert( cmd.supported_opts[3].get(0) == 0 );
+assert( cmd.supported_opts[3].get(1) == 1 );
+assert( cmd.supported_opts[4].size == 2 );
+assert( cmd.supported_opts[4].get(0) == 0 );
+assert( cmd.supported_opts[4].get(1) == 1 );
 }
 catch ( Error e )
 {
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] fsogsmd: modem_ti_calypso: send +CNMA on the URC channel

2013-02-07 Thread Paul Fertser
Calypso expects the +CMT: confirmation on the same channel it was sent
on.

This fixes the issue with messages filling the SIM card.

Signed-off-by: Paul Fertser 
---
 fsogsmd/src/plugins/modem_ti_calypso/plugin.vala |4 
 1 file changed, 4 insertions(+)

diff --git a/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala 
b/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
index b12b1c2..6f9298b 100644
--- a/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
+++ b/fsogsmd/src/plugins/modem_ti_calypso/plugin.vala
@@ -219,6 +219,10 @@ class TiCalypso.Modem : FsoGsm.AbstractModem
 {
 return channels["call"];
 }
+if ( query.has_prefix( "+CNMA" ) )
+{
+return channels["urc"];
+}
 return channels[ "main" ];
 }
 
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH 2/3] oeventsd: default opreferences config should have message-loop set to false

2013-02-08 Thread Paul Fertser
Message notification is called only once and no StopSound is ever
emitted so it doesn't make any sense whatsoever to loop it.

Signed-off-by: Paul Fertser 
---
 etc/freesmartphone/opreferences/conf/phone/default.yaml |2 +-
 etc/freesmartphone/opreferences/conf/phone/ring.yaml|2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/etc/freesmartphone/opreferences/conf/phone/default.yaml 
b/etc/freesmartphone/opreferences/conf/phone/default.yaml
index e02e6cf..efdbbb6 100644
--- a/etc/freesmartphone/opreferences/conf/phone/default.yaml
+++ b/etc/freesmartphone/opreferences/conf/phone/default.yaml
@@ -1,4 +1,4 @@
-message-loop: true
+message-loop: false
 message-tone: "female_message.wav"
 message-volume: 10
 message-vibration: true
diff --git a/etc/freesmartphone/opreferences/conf/phone/ring.yaml 
b/etc/freesmartphone/opreferences/conf/phone/ring.yaml
index 0770fd9..02dd89e 100644
--- a/etc/freesmartphone/opreferences/conf/phone/ring.yaml
+++ b/etc/freesmartphone/opreferences/conf/phone/ring.yaml
@@ -1,4 +1,4 @@
-message-loop: true
+message-loop: false
 message-tone: "female_message.wav"
 message-volume: 10
 message-vibration: false
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] specs: clarify "loop" parameter of org.freesmartphone.Device.Audio.PlaySound

2013-02-08 Thread Paul Fertser
In fact it's the amount of iterations to be made - 1.

Signed-off-by: Paul Fertser 
---
 org.freesmartphone.Device/org.freesmartphone.Device.Audio.xml.in |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/org.freesmartphone.Device/org.freesmartphone.Device.Audio.xml.in 
b/org.freesmartphone.Device/org.freesmartphone.Device.Audio.xml.in
index 36b7fa8..1520cad 100644
--- a/org.freesmartphone.Device/org.freesmartphone.Device.Audio.xml.in
+++ b/org.freesmartphone.Device/org.freesmartphone.Device.Audio.xml.in
@@ -37,7 +37,7 @@
 
   
 
-  Loop. Set this to 1, if you want the sound resource to be restarted, 
once it ends. 0, otherwise.
+  Loop. The sound will be played this many times plus one. Set to 0 to 
play it just once.
 
   
 
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH 1/3] oeventsd: intepret -loop parameters as booleans

2013-02-08 Thread Paul Fertser
According to the config schema file those are booleans so when set to
true the sound should be played many times, not just two (as it is now
as true is casted to 1, i.e. play and then repeat once).

Hopefully 1024 is enough to meet user expectations.

Signed-off-by: Paul Fertser 
---
 framework/subsystems/oeventsd/fso_actions.py |4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/subsystems/oeventsd/fso_actions.py 
b/framework/subsystems/oeventsd/fso_actions.py
index c0a29dd..9df0d87 100644
--- a/framework/subsystems/oeventsd/fso_actions.py
+++ b/framework/subsystems/oeventsd/fso_actions.py
@@ -330,7 +330,7 @@ class UserAlertAction(Action):
 elif k == "%s-volume" % self.eventname:
 self.volume = int(value)
 elif k == "%s-loop" % self.eventname:
-self.loop = int(value)
+self.loop = 1024 if bool(self.loop) else 0
 elif k == "%s-length" % self.eventname:
 self.length = int(value)
 elif k == "%s-vibration" % self.eventname:
@@ -379,7 +379,7 @@ class UserAlertAction(Action):
 
 self.tone = str(self.tone)
 self.volume = int(self.volume)
-self.loop = int(self.loop)
+self.loop = 1024 if bool(self.loop) else 0
 self.length = int(self.length)
 self.vibrate = int(self.vibrate)
 
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH 3/3] oeventsd: gta01, gta02 default rules: use UnreadMessagesTrigger

2013-02-08 Thread Paul Fertser
For the modems that use direct messages delivery IncomingMessage() is
never called as it indicates only SIM-related event. So use
UnreadMessagesTrigger() instead which is called on any opimd
UnreadMessages counter update.

Unfortunately, that means that the notification would be also emitted
when deleting new messages or marking them as old, but there's no
better trigger available currently.

Signed-off-by: Paul Fertser 
---
 etc/freesmartphone/oevents/om-gta01/rules.yaml |2 +-
 etc/freesmartphone/oevents/om-gta02/rules.yaml |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/etc/freesmartphone/oevents/om-gta01/rules.yaml 
b/etc/freesmartphone/oevents/om-gta01/rules.yaml
index 0971dc6..82c6776 100644
--- a/etc/freesmartphone/oevents/om-gta01/rules.yaml
+++ b/etc/freesmartphone/oevents/om-gta01/rules.yaml
@@ -25,7 +25,7 @@
 #
 # Call -> Audio Scenario Handling
 #
-trigger: IncomingMessage()
+trigger: UnreadMessagesTrigger()
 actions: MessageTone(play)
 
 -
diff --git a/etc/freesmartphone/oevents/om-gta02/rules.yaml 
b/etc/freesmartphone/oevents/om-gta02/rules.yaml
index a056113..38f760d 100644
--- a/etc/freesmartphone/oevents/om-gta02/rules.yaml
+++ b/etc/freesmartphone/oevents/om-gta02/rules.yaml
@@ -25,7 +25,7 @@
 #
 # Call -> Audio Scenario Handling
 #
-trigger: IncomingMessage()
+trigger: UnreadMessagesTrigger()
 actions: MessageTone(play)
 
 -
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] oeventsd: use fsogsmd's SMS IncomingTextMessage signal for notifications

2013-02-08 Thread Paul Fertser
Thanks to Sebastian Krzyszkowiak for his review and patch suggestion!

Signed-off-by: Paul Fertser 
---

Please apply this instead of "[PATCH 3/3] oeventsd: gta01,
   gta02 default rules: use UnreadMessagesTrigger"

 framework/subsystems/oeventsd/fso_triggers.py |   15 +++
 1 file changed, 7 insertions(+), 8 deletions(-)

diff --git a/framework/subsystems/oeventsd/fso_triggers.py 
b/framework/subsystems/oeventsd/fso_triggers.py
index a098fea..45112ab 100644
--- a/framework/subsystems/oeventsd/fso_triggers.py
+++ b/framework/subsystems/oeventsd/fso_triggers.py
@@ -210,8 +210,7 @@ class UnreadMessages(WhileRule):
 class IncomingMessageTrigger(DBusTrigger):
 ##
 """
-A custom dbus trigger for org.freesmartphone.GSM.SIM.IncomingStoredMessage
-TODO: change to opimd interface
+A custom dbus trigger for org.freesmartphone.GSM.SMS.IncomingTextMessage
 """
 
 function_name = 'IncomingMessage'
@@ -221,13 +220,13 @@ class IncomingMessageTrigger(DBusTrigger):
 super(IncomingMessageTrigger, self).__init__(
 bus,
 'org.freesmartphone.ogsmd',
-'/org/freesmartphone/GSM/Device',
-'org.freesmartphone.GSM.SIM',
-'IncomingStoredMessage'
+'/org/freesmartphone/GSM/SMS',
+'org.freesmartphone.GSM.SMS',
+'IncomingTextMessage'
 )
-def on_signal(self, index):
-logger.info("Receive IncomingMessage on index = %s" % index)
-self._trigger(index=index)
+def on_signal(self, number, timestamp, contents):
+logger.info("Received IncomingMessage from = %s" % number)
+self._trigger(number=number)
 
 def __repr__(self):
 return "IncomingMessage"
-- 
1.7.10



___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] fsogsmd: atcommand.vala workaround fucking segfault with logging

2013-11-26 Thread Paul Fertser
On gta02 if one releases an already released call, fsogsmd segfaults. This
should workaround that. Fixes #723.

Signed-off-by: Paul Fertser 
---
 fsogsmd/src/lib/at/atcommand.vala |6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/fsogsmd/src/lib/at/atcommand.vala 
b/fsogsmd/src/lib/at/atcommand.vala
index 3805d82..a0c58a0 100644
--- a/fsogsmd/src/lib/at/atcommand.vala
+++ b/fsogsmd/src/lib/at/atcommand.vala
@@ -176,7 +176,11 @@ public abstract class FsoGsm.AbstractAtCommand : 
GLib.Object, FsoGsm.AtCommandQu
 return Constants.AtResponse.CONNECT;
 }
 
-assert( modem.logger.debug( @"Did not receive OK (instead 
'$statusline') for $(Type.from_instance(this).name())" ) );
+#if !NDEBUG
+   if (modem != null)
+   modem.logger.debug( @"Did not receive OK (instead 
'$statusline') for $(Type.from_instance(this).name())" );
+#endif
+
 var errorcode = 0;
 
 if ( ! ( ":" in statusline ) )
-- 
1.7.10


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[Debian/FSO] openmoko-panel-plugin: inflexibility in events processing

2008-11-23 Thread Paul Fertser
Hello everybody!

First of all, thanks to all the developers and users who made
FreeRunner possible and who constantly improves the functionality of
this cool device.

Special thanks to the Debian team. Installation was very smooth and
easy. Could have been easier if install.sh supported creating one
root/boot partition to make Qi happy. Nevertheless, i repartitioned my
SD by hand, mounted it, created /boot and used the remaining steps
from install.sh. Also i needed to copy the kernel to an appropriate
name.

Ok, now to the topic:

The default installation of fso-frameworkd provides quite sensible
rules.yaml, that can be customized to one's needs. By default it
suspends the system on short power button press. But
openmoko-panel-plugin wants to show a menu on the same event. Doesn't
make sense to me ;) Moreover, the problem is that the only way to
disable the menu i found is to modify the source. Not quite cool. I
think that handling (i.e. performing actions) events is not a job a
panel-plugin should do at all. We already have oeventsd, which is
flexible enough, i think. Moreover the menu presented doesn't make
sense. "apm -s" is not what i want to perform for suspending
(appropriate dbus method is). And "sudo shutdown ..." is not very
useful in the absence of sudo (i don't mind running as root... yet).

The other problem is the virtual keyboard handling. Again, i don't
think it's appropriate for a panel-plugin to react on a button for
showing keyboard. And it's not configurable. Imagine i want to use two
keyboards with different layout concurrently for some time. I need to
customize the pkill command to close only one keyboard, not both. And
then i need another button for another action. And so on.

What do you think about it?

OT: Why can't i fine-tune the "star" menu of fbpanel (the part to show
.desktop files)? It seems that Category list is hard-coded.

Good luck!
-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: [Debian/FSO] openmoko-panel-plugin: inflexibility in events processing

2008-11-24 Thread Paul Fertser
Hi,

Sebastian Ohl <[EMAIL PROTECTED]> writes:
[snip]
> hope i'll find time to alter this piece of code. but our first concern
> is the conversion to a plugin architecture. 

And btw, i have seen some stability problem: after some time idling or
after suspending or whatever (couldn't reproduce it reliably, sorry)
o-p-p silently quits. No traceback, no coredump, nothing. I tried to
add a tracing but i couldn't trigger the bug yet. Is it also a known
problem fixed in SVN? ;)

> btw: please respond to the list not to me in person(i quoted your
> complete message to inform the others).

Yes, i understood i made the wrong move right after my sendmail
successfully cleared the queue. I'm new to Gnus, sorry ;)

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Stuck in a state where i'm unable to suspend anymore

2008-11-24 Thread Paul Fertser
Hi,

So, i suspended and then called my FR from the fixed phone. My FR woke
up and started to vibrate and play the famous sid. I hung up the fixed
phone, FR stopped ringing, everything seems to be normal. But i'm not
able to suspend anymore. Attached is a snippet with ogsmd DEBUG. (i'm
not sure attachment will work well, still learning Gnus with NNTP)

Should i care about it? How should i proceed? Can you suggest what
steps i should perform to investigate it further?

Good luck!2008.11.24 15:43:12 odeviced.input INFO name POWER pressed 0
2008.11.24 15:43:12 oeventsd INFO signal SetBrightness responded : ()
2008.11.24 15:43:12 odeviced.input INFO name POWER released 0
2008.11.24 15:43:12 oeventsd INFO call dbus signal 
/org/freesmartphone/Usage Suspend(())
2008.11.24 15:43:12 ousaged  INFO suspending all resources
2008.11.24 15:43:12 frameworkd.resource INFO setting resource status for 
GSM from suspending to suspending
2008.11.24 15:43:12 ogsmd.modem.abstract DEBUGprepareForSuspend ACK from 
channel  received
2008.11.24 15:43:12 ogsmd.modem.abstract DEBUGprepareForSuspend ACK from 
channel  received
2008.11.24 15:43:18 ogsmdDEBUG|...|...|...|...|...|...|...|...|...> 
NetworkGetStatus.__init__: ENTER (,  at 0x78b830>, 
 at 0x78b630>),{}
2008.11.24 15:43:18 ogsmdDEBUG|...|...|...|...|...|...|...|...|...> 
NetworkGetStatus.__init__: LEAVE
2008.11.24 15:43:18 ogsmdDEBUG(: last 
communication with modem was 15 seconds ago. Sending EOF to wakeup)
2008.11.24 15:43:18 ogsmdDEBUG queue is: 
deque([('AT+CSQ\r\n', >, >, 10)])
2008.11.24 15:43:18 ogsmdDEBUG: sending 8 
bytes: 'AT+CSQ\r\n'
2008.11.24 15:43:19 ogsmdDEBUG: got 16 
bytes from: '\r\n+CSQ: 31,99 \r\n'
2008.11.24 15:43:19 ogsmdDEBUG: got 6 bytes 
from: '\r\nOK\r\n'
2008.11.24 15:43:19 ogsmdDEBUG: COMPLETED 
'AT+CSQ' => ['+CSQ: 31,99 ', 'OK']
2008.11.24 15:43:19 ogsmdDEBUG
|...|...|...|...|...|...|...|...|...|...|...> 
NetworkGetStatus.genResponseFromChannel: ENTER ('AT+CSQ', ['+CSQ: 31,99 ', 
'OK']),{}
2008.11.24 15:43:19 ogsmdDEBUG
|...|...|...|...|...|...|...|...|...|...|...> 
NetworkGetStatus.genResponseFromChannel: LEAVE
2008.11.24 15:43:19 ogsmdDEBUG queue is: 
deque([('AT+CREG?;+COPS=3,0;+COPS?\r\n', >, >, 10)])
2008.11.24 15:43:19 ogsmdDEBUG: sending 27 
bytes: 'AT+CREG?;+COPS=3,0;+COPS?\r\n'
2008.11.24 15:43:19 ogsmdDEBUG: got 14 
bytes from: '\r\n+CREG: 0,1\r\n'
2008.11.24 15:43:19 ogsmdDEBUG: got 31 
bytes from: '\r\n+COPS: 0,0,"BEE LINE"\r\n\r\nOK\r\n'
2008.11.24 15:43:19 ogsmdDEBUG: COMPLETED 
'AT+CREG?;+COPS=3,0;+COPS?' => ['+CREG: 0,1', '+COPS: 0,0,"BEE LINE"', 'OK']
2008.11.24 15:43:19 ogsmdDEBUG
|...|...|...|...|...|...|...|...|...|...|...> 
NetworkGetStatus.genResponseFromChannel: ENTER ('AT+CREG?;+COPS=3,0;+COPS?', 
['+CREG: 0,1', '+COPS: 0,0,"BEE LINE"', 'OK']),{}
2008.11.24 15:43:19 ogsmdDEBUG
|...|...|...|...|...|...|...|...|...|...|...> 
NetworkGetStatus.genResponseFromChannel: LEAVE
2008.11.24 15:43:19 ogsmdDEBUG|...|...|...|...|...|...|...|...|...> 
NetworkGetStatus.__del__: ENTER (),{}
2008.11.24 15:43:19 ogsmdDEBUG|...|...|...|...|...|...|...|...|...> 
NetworkGetStatus.__del__: LEAVE
2008.11.24 15:43:19 ogsmdDEBUG queue is: 
deque([])
2008.11.24 15:43:19 ogsmdDEBUG: nothing in 
request queue
2008.11.24 15:43:22 odeviced.idlenotifier INFO 
framework.subsystems.odeviced.idlenotifier state change to idle
2008.11.24 15:43:22 oeventsd INFO DebugAction : dbus trigger test
2008.11.24 15:43:22 oeventsd INFO Receive IdleState, status = idle
2008.11.24 15:43:22 oeventsd INFO Receive IdleState, status = idle
2008.11.24 15:43:22 oeventsd INFO Receive IdleState, status = idle
2008.11.24 15:43:24 ogsmdDEBUG|...|...|...|...|...|...|...|...|...> 
SimRetrieveMessagebook.__init__: ENTER 
(,  at 0x78b830>,  at 
0x78b630>),{'category': dbus.String(u'unsent')}
2008.11.24 15:43:24 ogsmdDEBUG|...|...|...|...|...|...|...|...|...> 
SimRetrieveMessagebook.__init__: LEAVE
2008.11.24 15:43:24 ogsmdDEBUG queue is: 
deque([('AT+CMGL=2\r\n', >, 
>, 
10)])
2008.11.24 15:43:24 ogsmdDEBUG: sending 11 
bytes: 'AT+CMGL=2\r\n'
2008.11.24 15:43:24 ogsmdDEBUG: got 19 
bytes from: '\r\n+CMS ERROR: 321\r\n'
2008.11.24 15:43:24 ogsmdDEBUG: COMPLETED 
'AT+CMGL=2' => ['+CMS ERROR: 321']
2008.11.24 15:43:24 ogsmdDEBUG
|...|...|...|...|...|...|...|...|...|...|...> 
SimRetrieveMessagebook.responseFromChannel: ENTER ('AT+CMGL=2', ['+CMS ERROR: 
321']),{}
2008.11.24 15:43:24 ogsmdDEBUG
|...|...|...|...|...|...|...|...|...|...|...> 
SimRetrieveMessagebook.responseFromChannel: LEAVE
2008.11.24 15:43:24 ogsmdDEBUG|...|...|...|...|...|...|...|...|...> 
SimRetrieveMessagebook.__del__: ENTER (),{}
2008.11.24 15:43:24 ogsmdDEBUG|...|...|...|...|...|...|...|...|...> 
SimRetrieveMessagebook.__de

Re: Status of a fresh Debian install on Freerunner

2008-11-25 Thread Paul Fertser
Hi,

Sergey Matveev <[EMAIL PROTECTED]> writes:
> On Mon, Nov 24, 2008 at 10:35:28PM +0100, Sebastian Reichel wrote:
>> Though it's annoying, that the number is
>> shown instead of the name, when somebody from phonebook dials.
> in pyphone_call class in onCallStatus method in zhone (/usr/bin/zhone)
> by
>
>  self.part_text_set( "label", self.main.groups["contacts"].tryNumberToName( 
> properties[ "peer" ]) )
>
> helps to show name instead of number for me.

I decompiled zhone.edj and added another part with type TEXT just
below "label" and output raw number there. Now i see both phonebook
entry and number, which makes me feel more comfortable (not sure why).

Also i added a hack to the modems/ti_calypso/unsolicited.py to
simulate SimReady signal after registration state update. It at least
allows me to restart Zhone without restarting gsm0710muxd and see
phone- and messagebooks (though zhone now reads the books incomplete on first
"cold" start but then the real SimReady occurs and zhone happily
rereads them, it seems).

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Here is the log for the case when FR don't stop ringing after remote hangup

2008-11-25 Thread Paul Fertser
Hi,

Sometimes i'm able to reproduce a strange behaviour. I suspend my FR
and call from the fixed phone. Just after it unsuspends i hang up. But
it keeps ringing and vibrating. I was able to get a debug ogsmd log. I
did only one probably unrelevant change to the unsolicted.py: added a
%N0187 to percentCPI. Even if it does interfere, it could reveal a
bug.

Also please notice that there was a traceback in
unsolicited.py while trying to parse a %CPI "response". (That
particular response is obviously garbled because +CLIP somehow got
inbetween). I'm not sure how that +CLIP crippled in. Maybe muxing is
somehow buggy?

Not sure what should i do next to debug it. Any suggestions? This bug
obviously needs fixing...

2008.11.25 12:49:01 odeviced.input INFO name POWER pressed 0
2008.11.25 12:49:01 odeviced.input INFO name POWER released 0
2008.11.25 12:49:01 oeventsd INFO call dbus signal 
/org/freesmartphone/Usage Suspend(())
2008.11.25 12:49:01 ousaged  INFO suspending all resources
2008.11.25 12:49:01 frameworkd.resource INFO setting resource status for 
GSM from enabled to suspending
2008.11.25 12:49:01 ogsmd.modem.abstract DEBUGprepareForSuspend ACK from 
channel  received
2008.11.25 12:49:01 ogsmd.modem.abstract DEBUGprepareForSuspend ACK from 
channel  received
2008.11.25 12:49:01 ogsmdDEBUG queue is: deque([('AT+CTZU=0\r\n', None, None, 10), 
('AT+CTZR=0\r\n', None, None, 10), ('AT+CREG=0\r\n', None, None, 10), 
('AT+CGREG=0\r\n', None, None, 10), ('AT+CGEREP=0,0\r\n', None, None, 10), 
('AT+CNMI=2,1,0,0,0\r\n', None, None, 10), ('AT%CSQ=0\r\n', None, None, 10), 
('AT%CGEREP=0\r\n', None, None, 10), ('AT%CGREG=0\r\n', None, None, 10), 
('AT%CBHZ=0\r\n', , , 
10)])
2008.11.25 12:49:01 ogsmdDEBUG: sending 11 bytes: 'AT+CTZU=0\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: got 6 bytes from: '\r\nOK\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: COMPLETED 'AT+CTZU=0' => ['OK']
2008.11.25 12:49:01 ogsmdDEBUG queue is: deque([('AT+CTZR=0\r\n', None, None, 10), 
('AT+CREG=0\r\n', None, None, 10), ('AT+CGREG=0\r\n', None, None, 10), 
('AT+CGEREP=0,0\r\n', None, None, 10), ('AT+CNMI=2,1,0,0,0\r\n', None, None, 
10), ('AT%CSQ=0\r\n', None, None, 10), ('AT%CGEREP=0\r\n', None, None, 10), 
('AT%CGREG=0\r\n', None, None, 10), ('AT%CBHZ=0\r\n', , , 10)])
2008.11.25 12:49:01 ogsmdDEBUG: sending 11 bytes: 'AT+CTZR=0\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: got 6 bytes from: '\r\nOK\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: COMPLETED 'AT+CTZR=0' => ['OK']
2008.11.25 12:49:01 ogsmdDEBUG queue is: deque([('AT+CREG=0\r\n', None, None, 10), 
('AT+CGREG=0\r\n', None, None, 10), ('AT+CGEREP=0,0\r\n', None, None, 10), 
('AT+CNMI=2,1,0,0,0\r\n', None, None, 10), ('AT%CSQ=0\r\n', None, None, 10), 
('AT%CGEREP=0\r\n', None, None, 10), ('AT%CGREG=0\r\n', None, None, 10), 
('AT%CBHZ=0\r\n', , , 
10)])
2008.11.25 12:49:01 ogsmdDEBUG: sending 11 bytes: 'AT+CREG=0\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: got 6 bytes from: '\r\nOK\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: COMPLETED 'AT+CREG=0' => ['OK']
2008.11.25 12:49:01 ogsmdDEBUG queue is: deque([('AT+CGREG=0\r\n', None, None, 10), 
('AT+CGEREP=0,0\r\n', None, None, 10), ('AT+CNMI=2,1,0,0,0\r\n', None, None, 
10), ('AT%CSQ=0\r\n', None, None, 10), ('AT%CGEREP=0\r\n', None, None, 10), 
('AT%CGREG=0\r\n', None, None, 10), ('AT%CBHZ=0\r\n', , , 10)])
2008.11.25 12:49:01 ogsmdDEBUG: sending 12 bytes: 'AT+CGREG=0\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: got 6 bytes from: '\r\nOK\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: COMPLETED 'AT+CGREG=0' => ['OK']
2008.11.25 12:49:01 ogsmdDEBUG queue is: deque([('AT+CGEREP=0,0\r\n', None, None, 10), 
('AT+CNMI=2,1,0,0,0\r\n', None, None, 10), ('AT%CSQ=0\r\n', None, None, 10), 
('AT%CGEREP=0\r\n', None, None, 10), ('AT%CGREG=0\r\n', None, None, 10), 
('AT%CBHZ=0\r\n', , , 
10)])
2008.11.25 12:49:01 ogsmdDEBUG: sending 15 bytes: 'AT+CGEREP=0,0\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: got 6 bytes from: '\r\nOK\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: COMPLETED 'AT+CGEREP=0,0' => ['OK']
2008.11.25 12:49:01 ogsmdDEBUG queue is: deque([('AT+CNMI=2,1,0,0,0\r\n', None, None, 10), 
('AT%CSQ=0\r\n', None, None, 10), ('AT%CGEREP=0\r\n', None, None, 10), 
('AT%CGREG=0\r\n', None, None, 10), ('AT%CBHZ=0\r\n', , , 10)])
2008.11.25 12:49:01 ogsmdDEBUG: sending 19 bytes: 'AT+CNMI=2,1,0,0,0\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: got 6 bytes from: '\r\nOK\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: COMPLETED 'AT+CNMI=2,1,0,0,0' => ['OK']
2008.11.25 12:49:01 ogsmdDEBUG queue is: deque([('AT%CSQ=0\r\n', None, None, 10), 
('AT%CGEREP=0\r\n', None, None, 10), ('AT%CGREG=0\r\n', None, None, 10), 
('AT%CBHZ=0\r\n', , , 
10)])
2008.11.25 12:49:01 ogsmdDEBUG: sending 10 bytes: 'AT%CSQ=0\r\n'
2008.11.25 12:49:01 ogsmdDEBUG: got 12 bytes from: '\r\n%CSQ: 0 \r\n'
2008.11.25 12:49:01 ogsmdDEBUG: g

Re: Here is the log for the case when FR don't stop ringing after remote hangup

2008-11-25 Thread Paul Fertser
Oh, and here's another clue: after that i killed zhone and
frameworkd. Restarted it and...

2008.11.25 13:24:15 ogsmdDEBUG(modem init... try #1)
2008.11.25 13:24:15 ogsmdDEBUG(modem not responding)
2008.11.25 13:24:15 ogsmdDEBUG(modem init... try #2)
2008.11.25 13:24:15 ogsmdDEBUGread: +CMS ERROR: 512
2008.11.25 13:24:15 ogsmdDEBUG(modem not responding)
2008.11.25 13:24:15 ogsmdDEBUG(modem init... try #3)
2008.11.25 13:24:15 ogsmdDEBUGread: +CMS ERROR: 512
And so on until it gives up.

I'm able to recover from those nasty situation by using this script
(not sure how much every line is needed, esp. unsure about calling
MUX.Reset but it works):

#!/bin/sh
pkill zhone
/etc/init.d/fso-frameworkd stop
pkill -f frameworkd
pkill -f gsm0710
sleep 3
/etc/init.d/fso-frameworkd start
mdbus -s org.pyneo.muxer /org/pyneo/Muxer org.freesmartphone.GSM.MUX.Reset t
zhone &

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Here is the log for the case when FR don't stop ringing after remote hangup

2008-11-25 Thread Paul Fertser
Hi,

"arne anka" <[EMAIL PROTECTED]> writes:
>> did only one probably unrelevant change to the unsolicted.py: added a
>> %N0187 to percentCPI. Even if it does interfere, it could reveal a
>> bug.
>
> well, i didn't change anything (vanilla frameworkd) and experienced it
> with one test call, too, after upgrading to ms4 last sunday.
> since i got the issue more frequently a long time ago (right after
> installing debian back in september, no clue wich milestone), i
> created a  little emergency script, silencing the fr by echo'ing 0 to
> /sys/.../brightness of the vibration "led".

You saw my "emergency script", after executing it i'm able to make and
receive a call.

> anyway, you should file a bug at the fso trac.

You know, i'll do it but first i want to hear a word from the FSO
developers. I hope that after their suggestions my reports at trac
will be better. Moreover, i'm a bit afraid that a trac ticket will be
silently ignored without discussion. I don't know how actively the FSO
developers use it.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Here is the log for the case when FR don't stop ringing after remote hangup

2008-11-25 Thread Paul Fertser
Hi,

Paul Fertser <[EMAIL PROTECTED]> writes:
> 2008.11.25 13:24:15 ogsmdDEBUGread: +CMS ERROR: 512

Ok, so this is a suggestion that it might be the buggy gsm
firmware. I'm reflashing it now to moko10 and will report if i see it
again.

It is really really great that field-upgrades of the GSM firmware were
made possible! I hope that by now everybody at OM understands that it
is absolutely necessary to have a way to upgrade any fw by user
himself.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


After several successful reads MiscChannel is stuck (and i'm unable to see new SMSs)

2008-11-25 Thread Paul Fertser
Hi,

NB: I'm trying to produce some bugreports that can actually help to
debug the issues i'm facing. If i'm doing it wrong, please, suggest
how should i do it better.

So, from the log:

2008.11.26 01:54:02 ogsmdDEBUG:
got 1376 bytes from: \r\n+CPBR: 
220,"7916xxx",145,"0041007200610070006F0076002000530059"\r\n\r\nOK\r\n'

(that is the last part of +CPBR response, all 220 numbers are here,
but...)

2008.11.26 01:54:07 ogsmdDEBUG
|...|...|...|...|...|...|...|...|...> SimRetrieveMessagebook.__init__:
ENTER (,  at
0x7c2f70>,  at 0x7c2d30>),{'category':
dbus.String(u'unsent')}

2008.11.26 01:54:07 ogsmdDEBUG
|...|...|...|...|...|...|...|...|...> SimRetrieveMessagebook.__init__:
LEAVE

2008.11.26 01:54:10 ogsmdDEBUG:
TIMEOUT 'AT+CPBS="SM";+CPBR=1,220' => ???

2008.11.26 01:54:10 ogsmdDEBUG|...|...|...|...|...|...>
SimRetrievePhonebook.errorFromChannel: ENTER
('AT+CPBS="SM";+CPBR=1,220', ('timeout', 10)),{}

2008.11.26 01:54:10 ogsmdDEBUG|...|...|...|...|...|...>
SimRetrievePhonebook.errorFromChannel: LEAVE

So, the request of my large phonebook from sim timed out though the
full reply was received. But it's not the only problem. After this
line no requests on pts/0 are sent. This is the last line in my log
mentioning pts/0. The channel seems to be waiting for ReadyToSend
which never comes...

I'm still using frameworkd debian version 0.8.4.3-20081118-2.

Should i open a ticket?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Saving and loading GPS ephemerides still seems to be useful

2008-11-25 Thread Paul Fertser
Hi,

I was glad to see that (almost) everything needed for a warm start of
GPS is already implemented in FSO. The comment about "screwing" up the
receiver by loading saved ephemerides was a bit surprising so i
decided to uncomment the relevant code and give it a try.

I think it is working ok and that it does speed up getting the
fix. It seems that two conditions should be met though:

1. The system time must correspond to the GPS time
2. The ephemerides mustn't be too old (i.e. older than 4 hours).

To check the first condition i suggest to check the current time for
"saneness" (not earlier than 2007 year, in example). If doesn't look
right, just discard the ephemerides. Moreover i suggest adding a new
configuration parameter to allow ogpsd to set the system time to the
GPS time as soon as it gets a fix. If it is not allowed, dump the
ephemerides (as the time could have been set manually or with ntp but
weeks ago and have a significiant drift). As to the second -- i think
the time of acquiring should be stored in persistent storage along
with the ephemerides. If they are too old -- dump them.

Anyone ready to test these ideas?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: After several successful reads MiscChannel is stuck (and i'm unable to see new SMSs)

2008-11-26 Thread Paul Fertser
Hi,

Daniel Willmann <[EMAIL PROTECTED]> writes:
>> NB: I'm trying to produce some bugreports that can actually help to
>> debug the issues i'm facing. If i'm doing it wrong, please, suggest
>> how should i do it better.
>
> Looking good so far, thanks!

Thank you for working on it! BTW, you should like my ticket about
SimReady ;)

>> So, the request of my large phonebook from sim timed out though the
...
>> I'm still using frameworkd debian version 0.8.4.3-20081118-2.
>> Should i open a ticket?
>
> Please do and also include the complete log. It doesn't look as if the
> reply takes too long since your log indicates that the command
> completed at 2 seconds past, but the timeout fires at 10 seconds past.
> I hope the complete log will be more conclusive.

Did. Sorry for the confusion. I thought that timeout is irrelevant and
skipped the first part of the reply. I hope the new "cut" will be
better.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] Zhone: show the name from the phonebook during call

2008-11-26 Thread Paul Fertser
Hi,

I'm not sure whether you prefer this kind of patches here or on the
Trac. Please let me know if opening a ticket is more convenient for
you.

>From 183e270a159b3d33a019f83761ecb518ee7122a7 Mon Sep 17 00:00:00 2001
From: Paul Fertser <[EMAIL PROTECTED]>
Date: Wed, 26 Nov 2008 22:03:41 +0300
Subject: [PATCH] Show the name from the phonebook (in addition to the number) during call


diff --git a/data/themes/toby/zhone_call.edc b/data/themes/toby/zhone_call.edc
index 880bf3e..08c7dd9 100644
--- a/data/themes/toby/zhone_call.edc
+++ b/data/themes/toby/zhone_call.edc
@@ -39,7 +39,7 @@ parts {
 to: "swallow_main";
 }
 rel2 {
-relative: 1.0 0.4;
+relative: 1.0 0.6;
 offset: -1 -1;
 to: "swallow_main";
 }
@@ -60,6 +60,32 @@ parts {
 to: "label_background";
 }
 rel2 {
+relative: 1.0 0.5;
+offset: -1 -1;
+to: "label_background";
+}
+text {
+font: FONT_NAME;
+size: 1;
+fit: 1 1;
+align: 0.0 0.5;
+}
+}
+}
+part {
+name: "sublabel";
+type: TEXT;
+effect: SOFT_OUTLINE;
+mouse_events: 0;
+clip_to: "swallow_clip";
+description {
+state: "default" 0.0;
+rel1 {
+relative: 0.0 0.5;
+offset: 0 0;
+to: "label_background";
+}
+rel2 {
 relative: 1.0 1.0;
 offset: -1 -1;
 to: "label_background";
diff --git a/src/zhone b/src/zhone
index f26f0aa..0bc26e7 100755
--- a/src/zhone
+++ b/src/zhone
@@ -216,7 +216,9 @@ class pyphone_call(edje_group):
 self.call = id
 self.update_status(status)
 try:
-self.part_text_set( "label", properties[ "peer" ] )
+self.part_text_set( "label", self.main.groups["contacts"].tryNumberToName( properties[ "peer" ] ) )
+self.part_text_set( "sublabel", properties[ "peer" ] )
+
 except KeyError:
 pass
 
-- 
1.5.2.2

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]
___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: [Debian/FSO] openmoko-panel-plugin: inflexibility in events processing

2008-11-27 Thread Paul Fertser
Hi,

Arigead <[EMAIL PROTECTED]> writes:
> I think even a granny given an iPod for the first time would
> have a fairly good stab at playing some music.

Last time i had an iPod in my hands, i found the interface rather
unintuitive, limiting and confusing. I can't imagine how that can be
good for anybody.

What i'd like for an interface is just some consistency on default
installation and an ability to change anything later.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Possible muxer bug (was Re: Zhone doesn't show my contacts and messages after restart)

2008-11-27 Thread Paul Fertser
Hi,

"Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> writes:
> Am Wednesday 26 November 2008 21:56:19 schrieb Paul Fertser:
>> "Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> writes:
>> >> "Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> writes:
>> >> > Am Monday 24 November 2008 13:33:54 schrieb Paul Fertser:
>> >> >> I think i know what happens. If i restart Zhone without restarting
>> >> >> frameworkd it never receives ReadyStatus signal from
>> >> >> org.freesmartphone.GSM.SIM because sim was ready long ago it
>> >> >> started.
>> >> >
>> >> > This should no longer be a problem as nowadays, if the last GSM user
>> >> > vanishes from the bus, the GSM resource (hence the modem) gets
>> >> > shutdown completely.
...
>> Moreover, even provided zhone is the only app using the GSM
>> resource, are you sure that gsm0710muxd will power-cycle the modem?
>
> Yes. Shutting down the resource will shut down gsm0710muxd, which in effect, 
> turns off the modem.

I'll try to provide the logs where after the Zhone restart %CSTAT
never comes but it's still possible to read the information from SIM.

In fact, as a quick work-around i added activation of SimReady to the
network registration event. What i see every time i reboot
zhone+frameworkd+gsm0710muxd is that right after the registration
zhone receives the SimReady signal and tries to read the
Phonebook. Not all entries are read, however as the sim is not really
ready yet. After some time %CSTAT finally comes and zhone rereads the
book, now with all entries present. I think i saw the same behaviour
using some simple (probably Nokia) cellphone.

Actually, i've just tried to gather the logs for the case of
restarting zhone and it seems that part of the phonebook was lost
during transfer from the phone to the ogsmd. No, really.

2008.11.27 13:40:33 ogsmdDEBUG:
got 256 bytes from: '51071",145,"004500780061006D0073"\r\n+CPBR:
37,"xxx",129,"00560054"\r\n+CPBR:
38,"xxx",145,"0041006E0074006F006E00200050006F007A0064006E00650076"\r\n+CPBR:
39,"xxx",129,"0041006E0074006F006E00200050006F007A0064006E0065007600200048"\r\n+CPBR:
40,"79'
2008.11.27 13:40:35 ogsmdDEBUG:
got 122 bytes from:
'xxx",145,"005000650072006C0061006D006F006E"\r\n+C07500650074007A0020004D"\r\n+CPBR:
220,"xxx",145,"0041007200610'
2008.11.27 13:40:35 ogsmdDEBUG:
got 32 bytes from: '070006F0076002000530059"\r\n\r\nOK\r\n'
2008.11.27 13:40:42 ogsmdDEBUG:
TIMEOUT 'AT+CPBS="SM";+CPBR=1,220' => ???

Notice the garbage right before the 220th entry. We saw something
equally weird from my other log. :(

And there's an entry number 41 as well as others (41-219) present in
the debug log:
Nov 27 13:40:33 debian-gta02 /usr/sbin/gsm0710muxd[27748]:
gsm0710muxd.c:374:syslogdump(): ~~. 
Nov 27 13:40:33 debian-gta02 /usr/sbin/gsm0710muxd[27748]:
gsm0710muxd.c:374:syslogdump(): > >> As the exact documentation on %CSTAT is unavailable (thank you, TI), i
>> >> looked it up in Enfora's. It says that the %CSTAT codes will be
>> >> delivered only after power on. If it is really the case with calypso
>> >> it is no surprise that we never get SimReady signal as we don't
>> >> power-cycle the modem (ATZ seems to be not equivalent, and we can't do
>> >> $RESET). So it seems that %CSTAT should be avoided altogether...
>> >
>> > It's a question of alternatives. I don't think hammering the modem with
>> > read/write contact requests until it stops answering with 'SIM busy' is
>> > better than using %CSTAT.
>>
>> Do it once, then if 'SIM busy' received, wait for the %CSTAT. What's
>> wrong with this approach?
>
> The fact that it only works if the Calypso is in a good mood. If the timing 
> is 
> wrong, you get an empty list of contacts...

So, the modem firmware is buggy, the documentation is absent, and
though you can probably convince the guy who can modify the firmware
to fix this bug, it would be too late (he's now busy fixing #1024, i
suppose) and you don't want to mass-upgrade it anyway. So the only
possible solution i see is to let applications get the phone- and
messagebooks anyway. You tell them that sim is probably not ready but
if they try, they can get whatever the modem gives. When %CSTAT
received, you send them a signal to reread.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


FSO counts on "killall" presence which is not installed in Debian by default (was: Re: Zhone doesn't show my contacts and messages after restart)

2008-11-27 Thread Paul Fertser
Hi,

A followup to the original problem of not showing contacts. The
problem seems to be Debian-related.

> "Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> writes:
>> Am Wednesday 26 November 2008 21:56:19 schrieb Paul Fertser:
>>> "Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> writes:
>>> >> "Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> writes:
>>> >> > Am Monday 24 November 2008 13:33:54 schrieb Paul Fertser:
>>> >> >> I think i know what happens. If i restart Zhone without restarting
>>> >> >> frameworkd it never receives ReadyStatus signal from
>>> >> >> org.freesmartphone.GSM.SIM because sim was ready long ago it
>>> >> >> started.
>>> >> >
>>> >> > This should no longer be a problem as nowadays, if the last GSM user
>>> >> > vanishes from the bus, the GSM resource (hence the modem) gets
>>> >> > shutdown completely.
> ...
>>> Moreover, even provided zhone is the only app using the GSM
>>> resource, are you sure that gsm0710muxd will power-cycle the modem?
>>
>> Yes. Shutting down the resource will shut down gsm0710muxd, which in effect, 
>> turns off the modem.

def close( self ): # SYNC
"""
Close modem.

Overriden for internal purposes.
"""
# call default implementation (closing all channels)
AbstractModem.close( self )
# FIXME ok this is a bit hefty. gsm0710muxd has open/close dbus calls,
# but last time I checked they weren't working.
subprocess.call( "killall gsm0710muxd", shell=True )

It seems somebody's gotta fix gsm0710muxd ;)

BTW, i get buggy (losing information from the modem) behaviour with it
today all day long. Especially i can't read phonebook cleanly. Killed
it and executed without -vvv flags and it's "stable" as it was
earlier. "It's getting curiouser and curiouser" indeed.

--
"Don't know why i feel so bad. Is it just the weather or am I going mad?"
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: [debian/fso] openmoko-panel-plugin 0.6-2.1 sporadically quits

2008-11-27 Thread Paul Fertser
Hi,

Fox Mulder <[EMAIL PROTECTED]> writes:
> Since a short time i have one big problem with my beloved o-p-p. When i
> start o-p-p, which doesn't always work at the first try, it quits after
> a random time period. Sometimes it quits just a few seconds after i
> started it and sometimes it quites after a few hours. But i can be sure
>  that it quits while i use my fr over the day.

I can confirm i experience the same. I wasn't able to track down the
problem yet, but i have a suggestion. If you run o-p-p like this
(anyone please suggest a better example):

screen -d -m bash -c 'python -m trace --trace /usr/bin/openmoko-panel-plugin; 
sleep 1'

(you must have screen installed, of course), you might be able to see
the exact reason why it has quit (as soon as you see that o-p-p is
gone, reattach to the screen session by "screen -r" and you'll see the
last steps of the program. screen has a scrollback buffer as well. If
you don't know the GNU screen yet, you better learn ;) )

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: [PATCH] Further improved current call display

2008-11-29 Thread Paul Fertser
Hi,

Joachim Breitner <[EMAIL PROTECTED]> writes:
> Paul, one feature request: If the number is _not_ known, could to avoid
> showing it twice? You probably also need to improve the .edj file so
> that the sublabel is not visible (not even as an empty white bar) in
> that case.

Done.

BTW, Joachim, you've seen the thread about proper modem restarting? I
hope you'll either package a new version of stabilization/milestone4
(or at least cherry-pick afa83bf037dcf207eac706c3dbd092f9aa67e9bf) or
make a dependency to have killall automatically installed.

>From 036d61bb9393b81afb6c48b16f4c5050a76a3539 Mon Sep 17 00:00:00 2001
From: Paul Fertser <[EMAIL PROTECTED]>
Date: Sun, 30 Nov 2008 01:13:21 +0300
Subject: [PATCH] Further improved current call display

---
 data/themes/toby/zhone_call.edc |   47 +++---
 src/zhone   |   11 ++--
 2 files changed, 51 insertions(+), 7 deletions(-)

diff --git a/data/themes/toby/zhone_call.edc b/data/themes/toby/zhone_call.edc
index 08c7dd9..1ff7cee 100644
--- a/data/themes/toby/zhone_call.edc
+++ b/data/themes/toby/zhone_call.edc
@@ -39,10 +39,36 @@ parts {
 to: "swallow_main";
 }
 rel2 {
+relative: 1.0 0.4;
+offset: -1 -1;
+to: "swallow_main";
+}
+color: 255 255 255 64;
+}
+}
+part {
+name: "sublabel_background";
+type: RECT;
+mouse_events: 0;
+clip_to: "swallow_clip";
+description {
+state: "default" 0.0;
+visible: 0;
+rel1 {
+relative: 0.0 0.4;
+offset: 0 0;
+to: "swallow_main";
+}
+rel2 {
 relative: 1.0 0.6;
 offset: -1 -1;
 to: "swallow_main";
 }
+}
+description {
+state: "shown" 0.0;
+inherit: "default" 0.0;
+visible: 1;
 color: 255 255 255 64;
 }
 }
@@ -60,7 +86,7 @@ parts {
 to: "label_background";
 }
 rel2 {
-relative: 1.0 0.5;
+relative: 1.0 1.0;
 offset: -1 -1;
 to: "label_background";
 }
@@ -81,14 +107,14 @@ parts {
 description {
 state: "default" 0.0;
 rel1 {
-relative: 0.0 0.5;
+relative: 0.0 0.0;
 offset: 0 0;
-to: "label_background";
+to: "sublabel_background";
 }
 rel2 {
 relative: 1.0 1.0;
 offset: -1 -1;
-to: "label_background";
+to: "sublabel_background";
 }
 text {
 font: FONT_NAME;
@@ -200,6 +226,19 @@ programs {
 
 EMIT_CALL_BUTTON_PRESSED("button_left");
 EMIT_CALL_BUTTON_PRESSED("button_right");
+
+program {
+name: "show_sublabel";
+signal: "show_sublabel";
+action: STATE_SET "shown" 0.0;
+target: "sublabel_background";
+}
+program {
+name: "hide_sublabel";
+signal: "hide_sublabel";
+action: STATE_SET "default" 0.0;
+target: "sublabel_background";
+}
 
 TRANSITION();
 }
diff --git a/src/zhone b/src/zhone
index 0bc26e7..feeeb9c 100755
--- a/src/zhone
+++ b/src/zhone
@@ -216,9 +216,14 @@ class pyphone_call(edje_group):
 self.call = id
 self.update_status(status)
 try:
-self.part_text_set( "label", self.main.groups["contacts"].tryNumberToName( properties[ "peer" ] ) )
-self.part_text_set( "sublabel", properties[ "peer" ] )
-
+contact_name = self.main.groups["contacts"].tryNumberToName( properties[ "peer" ] ) 
+self.part_text_set( "label", u"".join( contact_name )+u" " )
+if contact_name == properties[ "peer" ]:
+self.signal_emit( "hide_sublabel", "" )
+self.part_text_set( "sublabel", "")
+else:
+self.signal_emit( "show_sublabel", "" )
+self.part_text_set( "sublabel", u"".join( properties[ "peer" ] )+u" " )
 except KeyError:
 pass
 
-- 
1.5.2.2

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]
___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: [debian/fso] openmoko-panel-plugin 0.6-2.1 sporadically quits

2008-11-29 Thread Paul Fertser
Hi,

> in the next days i will have a look on this issue and will try to  
> figure out,
> a) what's happening there and
> b) what could be done to solve this

I've got two traces. Don't really know whether they are of any use or
not. The first one ends with a segfault (no coredump, sorry).

openmoko-panel-plugin(208): try:
openmoko-panel-plugin(209): icon.timedUpdate()
 --- modulename: trace, funcname: timedUpdate
openmoko-panel-plugin(1294): self.brightness = 
self.dbus.device_display_iface.GetBrightness()
 --- modulename: proxies, funcname: __getattr__
proxies.py(537): if member.startswith('__') and member.endswith('__'):
proxies.py(540): return self._obj.get_dbus_method(member, 
self._dbus_interface)
 --- modulename: proxies, funcname: get_dbus_method
proxies.py(461): ret = self.ProxyMethodClass(self, self._bus,
proxies.py(462): self._named_service,
proxies.py(463): self.__dbus_object_path__, 
member,
proxies.py(464): dbus_interface)
 --- modulename: proxies, funcname: __init__
proxies.py(83): if object_path == LOCAL_PATH:
proxies.py(88): self._proxy  = proxy
proxies.py(89): self._connection = connection
proxies.py(90): self._named_service  = bus_name
proxies.py(91): self._object_path= object_path
proxies.py(93): _dbus_bindings.validate_member_name(method_name)
proxies.py(95): self._method_name= method_name
proxies.py(97): if iface is not None:
proxies.py(98): _dbus_bindings.validate_interface_name(iface)
proxies.py(99): self._dbus_interface = iface
proxies.py(470): if self._introspect_state == 
self.INTROSPECT_STATE_INTROSPECT_IN_PROGRESS:
proxies.py(474): return ret
 --- modulename: proxies, funcname: __call__
proxies.py(102): reply_handler = keywords.pop('reply_handler', None)
proxies.py(103): error_handler = keywords.pop('error_handler', None)
proxies.py(104): ignore_reply = keywords.pop('ignore_reply', False)
proxies.py(106): if reply_handler is not None or error_handler is not 
None:
proxies.py(115): dbus_interface = keywords.pop('dbus_interface', 
self._dbus_interface)
proxies.py(117): if dbus_interface is None:
proxies.py(120): key = dbus_interface + '.' + self._method_name
proxies.py(121): introspect_sig = 
self._proxy._introspect_method_map.get(key, None)
proxies.py(123): if ignore_reply or reply_handler is not None:
proxies.py(134): return 
self._connection.call_blocking(self._named_service,
proxies.py(135):   
self._object_path,
proxies.py(136):   
dbus_interface,
proxies.py(137):   
self._method_name,
proxies.py(138):   
introspect_sig,
proxies.py(139):   args,
proxies.py(140):   **keywords)
 --- modulename: connection, funcname: call_blocking
connection.py(595): if object_path == LOCAL_PATH:
connection.py(598): if dbus_interface == LOCAL_IFACE:
connection.py(603): get_args_opts = {'utf8_strings': utf8_strings,
connection.py(604):  'byte_arrays': byte_arrays}
connection.py(606): message = MethodCallMessage(destination=bus_name,
connection.py(607): path=object_path,
connection.py(608): 
interface=dbus_interface,
connection.py(609): method=method)
connection.py(611): try:
connection.py(612): message.append(signature=signature, *args)
connection.py(621): reply_message = 
self.send_message_with_reply_and_block(
connection.py(622): message, timeout)
bash: line 1: 24646 Segmentation fault  python -m trace --trace 
/usr/bin/openmoko-panel-plugin

openmoko-panel-plugin(208): try:
openmoko-panel-plugin(209): icon.timedUpdate()
 --- modulename: trace, funcname: timedUpdate
openmoko-panel-plugin(460): return
openmoko-panel-plugin(207): for icon in self.icons:
openmoko-panel-plugin(208): try:
openmoko-panel-plugin(209): icon.timedUpdate()
 --- modulename: trace, funcname: timedUpdate
openmoko-panel-plugin(460): return
openmoko-panel-plugin(207): for icon in self.icons:
openmoko-panel-plugin(208): try:
openmoko-panel-plugin(209): icon.timedUpdate()
 --- modulename: trace, funcname: timedUpdate
openmoko-panel-plugin(1294): self.brightness = 
se

gsm0710muxd bug isolated, fix proposed (was: Re: FSO counts on "killall" presence which is not installed in Debian by default)

2008-11-30 Thread Paul Fertser
Hi,

"Michael 'Mickey' Lauer" <[EMAIL PROTECTED]> writes:
> Am Thursday 27 November 2008 22:48:31 schrieb Paul Fertser:
>> BTW, i get buggy (losing information from the modem) behaviour with it
>> today all day long. Especially i can't read phonebook cleanly. Killed
>> it and executed without -vvv flags and it's "stable" as it was
>> earlier. "It's getting curiouser and curiouser" indeed.
>
> Strange. Could that be http://docs.openmoko.org/trac/ticket/1435 by any 
> chance?

No. I carefully analysed my debug log and here is my conclusion:

In gsm0710muxd a circular buffer for storing incoming data is
used. The macros (unneeded btw, as the same function most probably would
be inlined by the compiler automatically) to calculate the free space
is:

#define gsm0710_buffer_free(buf) ((buf->readp > buf->writep) ?
(buf->readp - buf->writep) : (GSM0710_BUFFER_SIZE -
(buf->writep-buf->readp)))

You see? If (buf->readp == buf->writep) we consider the buffer empty
and return the full size. But if we write GSM0710_BUFFER_SIZE bytes to
the buffer, we'll have (buf->readp == buf->writep) again.

In serial_device_read we have:

  unsigned char buf[4096];
  int len;
  //input from serial port
  LOG(LOG_DEBUG, "Serial Data");
  int length;
  if ((length = gsm0710_buffer_free(serial->in_buf)) > 0
   && (len = read(serial->fd, buf, min(length, sizeof(buf > 0)
  {
  syslogdump("in_buf, buf, len);
  //extract and handle ready frames
  if (extract_frames(serial->in_buf) > 0)
  {
  time(&serial->frame_receive_time); //get the 
current time
  serial->ping_number = 0;
  }
  }

When we see that a buffer is empty, we try to read()
GSM0710_BUFFER_SIZE bytes from the modem. Sometimes it's able to
deliver all that bytes (2048 as it is now) at once, especially when we
read the phonebook (and i think additional delays on verbose output
increase the probabality). And in my debug log i indeed see exactly
0x0800 bytes from syslogdump. All of which are then written to
the serial->in_buf, and lost in extract_frames, as it thinks that the
buffer is empty.

An excerpt from the log:
Nov 27 13:40:35 debian-gta02 /usr/sbin/gsm0710muxd[27748]:
   gsm0710muxd.c:374:syslogdump(): http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: t9 keyboard

2008-12-01 Thread Paul Fertser
Hi,

Davide <[EMAIL PROTECTED]> writes:
> Do you mean that not only a proprietary code is
> copyrighted, but even the idea?

http://en.wikipedia.org/wiki/Software_patents

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: gsm0710muxd bug isolated, fix proposed

2008-12-03 Thread Paul Fertser
Hi,

Paul Fertser <[EMAIL PROTECTED]> writes:
> In gsm0710muxd a circular buffer for storing incoming data is
> used. The macros (unneeded btw, as the same function most probably would
> be inlined by the compiler automatically) to calculate the free space
> is:
>
> #define gsm0710_buffer_free(buf) ((buf->readp > buf->writep) ?
> (buf->readp - buf->writep) : (GSM0710_BUFFER_SIZE -
> (buf->writep-buf->readp)))
...
> So, the proposed fix is to make gsm0710_buffer_free return the correct
> free size, i.e. one byte less than it does now.

Mickey, with the help of lindi i've tested the fixed version and can
confirm that it works for me.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] Fixed a bug with a 2048-sized transfer from modem (was: Re: gsm0710muxd bug isolated, fix proposed)

2008-12-04 Thread Paul Fertser
Hi,

>From ca87e942de0c2b389b8797d41a906c946c5c441d Mon Sep 17 00:00:00 2001
From: Paul Fertser <[EMAIL PROTECTED]>
Date: Thu, 4 Dec 2008 20:27:39 +0300
Subject: [PATCH] Fixed a bug with a 2048-sized transfer from modem

As the circular buffer is used to hold the incoming data from the modem,
its free size must be one byte less than is actually available or we'll get
readp == writep and the buffer will be considered empty.
---
 src/gsm0710muxd.c |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/gsm0710muxd.c b/src/gsm0710muxd.c
index bb49d73..0b9e7ad 100644
--- a/src/gsm0710muxd.c
+++ b/src/gsm0710muxd.c
@@ -194,7 +194,7 @@ typedef struct Serial
  * tells how much free space there is in the buffer
  */
 //int gsm0710_buffer_free(GSM0710_Buffer *buf);
-#define gsm0710_buffer_free(buf) ((buf->readp > buf->writep) ? (buf->readp - buf->writep) : (GSM0710_BUFFER_SIZE - (buf->writep-buf->readp)))
+#define gsm0710_buffer_free(buf) ((buf->readp > buf->writep) ? (buf->readp - buf->writep) : (GSM0710_BUFFER_SIZE - (buf->writep-buf->readp)) - 1)
 
 // constants & globals
 static unsigned char close_channel_cmd[] = { GSM0710_CONTROL_CLD | GSM0710_CR, GSM0710_EA | (0 << 1) };
-- 
1.5.2.2

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:[EMAIL PROTECTED]
___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


matchbox-keyboard (was: Re: Current Debian version)

2008-12-24 Thread Paul Fertser
Hi,

"Nikita V. Youshchenko"  writes:
> Still could not enlarge matchbox-keyboard font - looks like it is not 
> possible without altering the code.

You might also be interested in OE's patches to the
matchbox-keyboard. They implement an ability to switch layouts without
restarting the keyboard (an additional button is added to each layout
that activates the next in the list). They are not in Debian yet (i've
already filed a "wish-list" bug), but you can download a compatible (armv4)
version from Angstrom's feeds and install it manually. It works for me.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Setting up qemubuilder

2008-12-30 Thread Paul Fertser
Hi,

"Nikita V. Youshchenko"  writes:
> But --create failed: recommended kernel from 
> http://ftp.us.debian.org/debian/dists/sid/main/installer-armel/current/images/versatile/netboot/vmlinuz-2.6.26-1-versatile
> was unable to mount root.

I found and downloaded another kernel with compiled-in
driver. Unfortunately, it's on my work pc, so i can't say even the
file name.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] gsm0710muxd: Implement write buffering for the ptys

2009-01-05 Thread Paul Fertser
Hi,

Recently a new problem with gsm0710muxd was discovered. It appears
when there're lots of data from the modem and the receiving part of
the pty (frameworkd or pppd) for some reason is slow to read the
data. Reported by quickdev on IRC. Investigation showed that it's
because of silent overflow of the in-kernel pty buffer (4096 bytes).

The patch was tested and confirmed solving the issues by quickdev (who
had problems reading his large phonebook) and quatrox (who was unable
to receive large files via GPRS).

I have no experience with glib, but i performed some tests with a
simple application that showed that this kind of usage of glib buffers
is correct.

>From 66c3acd4fb92d05f1b97050165f83a197a733ec3 Mon Sep 17 00:00:00 2001
From: root 
Date: Mon, 22 Dec 2008 01:21:22 +0300
Subject: [PATCH] Implement write buffering for the ptys

If the receiving side of the pty is slow, the kernel pty buffer (of 4096
bytes) overflows and an unreported lossage occurs. This can be seen when
receiving a large SIM phonebook with busy frameworkd.
---
 src/gsm0710muxd.c |   22 ++
 1 files changed, 18 insertions(+), 4 deletions(-)

diff --git a/src/gsm0710muxd.c b/src/gsm0710muxd.c
index 083df5d..cb8df03 100644
--- a/src/gsm0710muxd.c
+++ b/src/gsm0710muxd.c
@@ -114,6 +114,7 @@ DBusConnection* dbus_g_connection_get_connection(DBusGConnection *gconnection);
 // enabled The value is in seconds
 #define GSM0710_POLLING_INTERVAL 5
 #define GSM0710_BUFFER_SIZE 2048
+#define PTY_GLIB_BUFFER_SIZE (16*1024)
 
 // types
 //
@@ -153,6 +154,7 @@ typedef struct Channel
 	int remaining;
 	unsigned char *tmp;
 	guint g_source;
+	GIOChannel* g_channel;
 } Channel;
 
 typedef enum MuxerStates 
@@ -687,8 +689,10 @@ static gboolean c_alloc_channel(const char* origin, const char** name)
 	SYSCHECK(unlockpt(channellist[i].fd));
 }
 channellist[i].v24_signals = GSM0710_SIGNAL_DV | GSM0710_SIGNAL_RTR | GSM0710_SIGNAL_RTC | GSM0710_EA;
-GIOChannel* g_channel = g_io_channel_unix_new(channellist[i].fd);
-channellist[i].g_source = g_io_add_watch(g_channel, G_IO_IN | G_IO_HUP, pseudo_device_read, channellist+i);
+channellist[i].g_channel = g_io_channel_unix_new(channellist[i].fd);
+g_io_channel_set_encoding(channellist[i].g_channel, NULL, NULL );
+g_io_channel_set_buffer_size( channellist[i].g_channel, PTY_GLIB_BUFFER_SIZE );
+channellist[i].g_source = g_io_add_watch(channellist[i].g_channel, G_IO_IN | G_IO_HUP, pseudo_device_read, channellist+i);
 write_frame(i, NULL, 0, GSM0710_TYPE_SABM | GSM0710_PF);
 LOG(LOG_INFO, "Connecting %s to virtual channel %d for %s on %s",
 	channellist[i].ptsname, channellist[i].id, channellist[i].origin, serial.devicename);
@@ -1372,9 +1376,15 @@ int extract_frames(
 			LOG(LOG_DEBUG, "Frame is UI or UIH");
 			if (frame->channel > 0)
 			{
+gsize written;
 LOG(LOG_DEBUG, "Frame channel > 0, pseudo channel");
 //data from logical channel
-write(channellist[frame->channel].fd, frame->data, frame->length);
+g_io_channel_write_chars(channellist[frame->channel].g_channel, (gchar*)frame->data, (gssize)frame->length, &written, NULL);
+if (written != frame->length)
+	LOG(LOG_WARNING, "Pty write buffer overflow, data loss: needed to write %d bytes, written %d, channel %d", frame->length, written, frame->channel);
+else
+	LOG(LOG_DEBUG, "Written %d bytes to pty channel %d", written, frame->channel);
+g_io_channel_flush(channellist[frame->channel].g_channel, NULL );
 			}
 			else
 			{
@@ -1740,6 +1750,7 @@ static int close_devices()
 
 static gboolean watchdog(gpointer data)
 {
+	int i;
 	LOG(LOG_DEBUG, "Enter");
 	Serial* serial = (Serial*)data;
 	LOG(LOG_DEBUG, "Serial state is %d", serial->state);
@@ -1748,13 +1759,16 @@ static gboolean watchdog(gpointer data)
 	case MUX_STATE_OPENING:
 		if (open_serial_device(serial) < 0)
 			LOG(LOG_WARNING, "Could not open all devices and start muxer");
-		serial->g_source_watchdog = g_timeout_add_seconds(5, watchdog, data); // let the dog watch every 5 sec
+		serial->g_source_watchdog = g_timeout_add_seconds(1, watchdog, data); // let the dog watch every 1 sec
 		LOG(LOG_INFO, "Watchdog started");
 	case MUX_STATE_INITILIZING:
 		if (start_muxer(serial) < 0)
 			LOG(LOG_WARNING, "Could not open all devices and start muxer errno=%d", errno);
 	break;
 	case MUX_STATE_MUXING:
+		for (i=1;i= 0)
+g_io_channel_flush(channellist[i].g_channel, NULL);
 		if (use_ping)
 		{
 			if (serial->ping_number > use_ping)
-- 
1.5.6.5

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com
___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: [debian] "offline" or "airplane" or "pda-only" use case

2009-02-22 Thread Paul Fertser
"e.waelde"  writes:
> Questions:
> 1. can the GSM hw be completely shutdown via software at all? If so,
> how?

On GTA02, yes. Using power_on sysfs node.

> 2. can the GSM hw be powered up again via software?

On GTA02, yes.

> 3. how about the phone application itself (I use zhone so far), can
>zhone or whatever is the future thing handle this case? Probably
>not.

FSO handles this case automatically. When no phone application is
running, GSM modem is powered off. As soon as you start Zhone (or any
other app), it powers the modem and provides the service. As soon as
all consumers are gone (i.e. you killed zhone), it powers off the
modem automatically.

> 4. anything else?

There will be a new kernel soon that doesn't waste an energy when the
GSM is powered off.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] Remain compatible with Python 2.5

2009-03-21 Thread Paul Fertser
---
 framework/subsystems/ophoned/headset.py |4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/framework/subsystems/ophoned/headset.py 
b/framework/subsystems/ophoned/headset.py
index e9f07ca..7ff5f6d 100644
--- a/framework/subsystems/ophoned/headset.py
+++ b/framework/subsystems/ophoned/headset.py
@@ -100,7 +100,7 @@ class HeadsetManager( object ):
 self._matchAnswerRequested = 
self.bluez_device_headset.connect_to_signal(
 'AnswerRequested', self._onAnswerRequested
 )
-except dbus.exceptions.DBusException as e:
+except dbus.exceptions.DBusException, e:
 if e.get_dbus_name() == "org.bluez.Error.AlreadyConnected":
 pass
 else:
@@ -109,7 +109,7 @@ class HeadsetManager( object ):
 def _startBT( self ):
 try:
 self.bluez_device_headset.Play()
-except dbus.exceptions.DBusException as e:
+except dbus.exceptions.DBusException, e:
 if e.get_dbus_name() == "org.bluez.Error.AlreadyConnected":
 pass
 else:
-- 
1.6.1.3


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Help: Sending message to dbus via mdbus

2009-04-07 Thread Paul Fertser
Emfox Zhou  writes:
> Hello, I'm trying fso-abyss to see if it works on my treo phone, and
> got to know that after start abyss daemon, I should talk to omuxerd by
> dbus, but there's something wrong with it. the error log attached. Am
> I missing something?

DBus security restictions again :( Take a look at your
/etc/dbus-1/system.d/, there should be a file describing security
policy; i guess an example is included in the sources.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


[PATCH] gta02: try to use both new and old usb_mode sysfs paths

2009-04-16 Thread Paul Fertser

Signed-off-by: Paul Fertser 
---
 framework/subsystems/odeviced/powercontrol_neo.py |3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/framework/subsystems/odeviced/powercontrol_neo.py 
b/framework/subsystems/odeviced/powercontrol_neo.py
index 6b0e585..6d5959f 100644
--- a/framework/subsystems/odeviced/powercontrol_neo.py
+++ b/framework/subsystems/odeviced/powercontrol_neo.py
@@ -89,6 +89,9 @@ def factory( prefix, controller ):
 if "neo1973-pm-bt.0" in devices:
 objects.append( NeoBluetoothPowerControl( bus, "%s/%s" % ( DEVICE_DIR, 
"neo1973-pm-bt.0" ) ) )
 
+if "s3c-ohci" in devices:
+objects.append( NeoUsbHostPowerControl( bus, "%s/%s" % ( DEVICE_DIR, 
"s3c-ohci" ) ) )
+
 if "s3c2410-ohci" in devices:
 objects.append( NeoUsbHostPowerControl( bus, "%s/%s" % ( DEVICE_DIR, 
"s3c2410-ohci" ) ) )
 
-- 
1.6.1.3


___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: zhone keyboard

2009-06-04 Thread Paul Fertser
peter boehm  writes:
> i installed debian on freerunner with lxde which is running fine. i
> tried to use zhone (version 0-git20090202-3) and experienced the
> following:
> When i try to make a new contact no keyboard for writing letters to
> the name field is shown below it. do i miss something?

You can also install e17 and use the Raster's keyboard that is
included. It will appear automatically for some apps (including
zhone).

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Recording from headset when pressing headset button

2009-06-07 Thread Paul Fertser
Enrico Zini  writes:
> [here I press it]
> 18:12:48.971987: EV_KEY KEY_PAUSE released
> 18:12:48.972274: EV_SYN code=0 value=0
>
> [here I release it]
> 18:12:51.817171: EV_KEY KEY_PAUSE pressed
> 18:12:51.817396: EV_SYN code=0 value=0

Do you think it should be fixed in kernel right now before it's too
late?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: Recording from headset when pressing headset button

2009-06-08 Thread Paul Fertser
Hi,

On Mon, Jun 08, 2009 at 07:39:43PM +0200, Luca Capello wrote:
> Note that in that case it is no more consistent with the KEY_PAUSE
> behavior: when you press the headset button, you want to PLAY, thus you
> release PAUSE, which is exactly the behavior we have now.  Thus I think
> the best would be to have the headset button reporting KEY_PLAY instead.

Agreed.
 
> I would like to update to a more recent snapshot and I have already
> successfully tested the last andy-tracking checkout:
> 
>   
> http://git.openmoko.org/?p=kernel.git;a=commitdiff;h=23b564c9d22cc5e442361e632626d5f131c40752
> 
> Should I go directly with the above one or do you think that the headset
> button behavior will be fixed soon?  I would prefer to wait for that, it
> this means a short time...

A trivial fix will invert KEY_PLUS and KEY_MINUS for GTA03. I don't know if
anyone cares though. I will send a trivial one right now and a more
sophisticated a bit later, and wait for comments.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: GTA02 default GSM call volume

2009-07-26 Thread Paul Fertser
Lionel Elie Mamane  writes:
> I (and Joachim Breitner) find the default call volume rather low in
> zhone. This patch sets it to maximum, which I still find good only for
> rather quiet situations. Is the hardware just limited that way, or
> does anybody know of another of the 100+ ALSA settings that would
> help?

Hardware fix to short the useless caps would help immediately...

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: GTA02 default GSM call volume

2009-07-26 Thread Paul Fertser
Joachim Breitner  writes:
> Am Sonntag, den 26.07.2009, 23:12 +0400 schrieb Paul Fertser:
>> Lionel Elie Mamane  writes:
>> > I (and Joachim Breitner) find the default call volume rather low in
>> > zhone. This patch sets it to maximum, which I still find good only for
>> > rather quiet situations. Is the hardware just limited that way, or
>> > does anybody know of another of the 100+ ALSA settings that would
>> > help?
>> 
>> Hardware fix to short the useless caps would help immediately...
>
> is that documented properly somewhere?

R3004 and R3005 are caps on some devices. BOMs are lost so now nobody
can say for sure which revisions from which batches have that and
which don't.

I'm not sure where and how to document it properly.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: bluez-alsa & debian sid

2009-10-31 Thread Paul Fertser
"A.A."  writes:
> I have installed in my moko with debian sid bluez-alsa package and configured 
> .asoundrc:
...
> but when I try run mplayer -ao alsa:device=bluetooth...

Are you sure you properly "paired" the headset?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: bluez-alsa & debian sid

2009-10-31 Thread Paul Fertser
"A.A."  writes:
> 2009/10/31 Paul Fertser 
>
> "A.A."  writes:
> > I have installed in my moko with debian sid bluez-alsa package and 
> configured .asoundrc:
> ...
> > but when I try run mplayer -ao alsa:device=bluetooth...
>
> Are you sure you properly "paired" the headset?
>
> --
> Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
> mailto:fercer...@gmail.com
>
> yes, sure.
> But, there are stops in the audio flow.

Aha, so the audio works but with skips.

Try to nice -19 mplayer and to play file from network or NAND and not from
SD.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: bluez-alsa & debian sid

2009-10-31 Thread Paul Fertser
Al Johnson  writes:
> On Saturday 31 October 2009, A.A. wrote:
>> > "A.A."  writes:
>> But, there are stops in the audio flow.
>
> Try this:
> hciconfig hci0 lm master; hciconfig hci0 lp hold,sniff,park

Bluez developers claim that with bluez4 all stuff like that is always
done automatically and correctly, that's why there're no more options
like that in config, probably even these hciconfig commands are nops
now.

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: bluez-alsa & debian sid

2009-10-31 Thread Paul Fertser
Al Johnson  writes:
> On Saturday 31 October 2009, Paul Fertser wrote:
>> Al Johnson  writes:
>> > On Saturday 31 October 2009, A.A. wrote:
>> >> > "A.A."  writes:
>> >>
>> >> But, there are stops in the audio flow.
>> >
>> > Try this:
>> > hciconfig hci0 lm master; hciconfig hci0 lp hold,sniff,park
>> 
>> Bluez developers claim that with bluez4 all stuff like that is always
>> done automatically and correctly, that's why there're no more options
>> like that in config, probably even these hciconfig commands are nops
>> now.
>
> That may be the claim, but the commands worked on shr-u a month or two ago. 
> mplayer went from skipping regularly every few seconds to skipping only when 
> CPU or SD activity spiked. Has there been an update to bluez4 in shr-u that 
> might have corrected this?

I don't think so. In this case probably this issue should have been
discussed with upstream (and it's not too late to do it now for a one
who can reproduce, i lack a2dp headset so i can't do that).

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: debian on Neo 1973

2009-11-17 Thread Paul Fertser
Steven Jones  writes:
> It doesn't even seem to try to boot from the SD card. When I hold the
> power button down, to try and get a verbose boot, the only thing I see
> is:
> s3c2410 debugfs dir creation failed -19

I'm afraid verbose boot doesn't work on gta01. And anyway you'll get
only kernel messages this way, but userspace console will still be
directed only to the serial port.

Are you building Qi from source? Is it recent enough to have SDHC
support? Can you provide serial console output for it?

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: debian on Neo 1973

2009-11-18 Thread Paul Fertser
Steven Jones  writes:
>> Steven Jones  writes:
>>> It doesn't even seem to try to boot from the SD card. When I hold the
>>> power button down, to try and get a verbose boot, the only thing I see
>>> is:
>>> s3c2410 debugfs dir creation failed -19
>>
>> I'm afraid verbose boot doesn't work on gta01. And anyway you'll get
>> only kernel messages this way, but userspace console will still be
>> directed only to the serial port.
>>
>> Are you building Qi from source? Is it recent enough to have SDHC
>> support? Can you provide serial console output for it?
>
> I am not building Qi from source. I downloaded
> qi-s3c2410-master-hist_3b8513d8b3d9615e.udfu
> from http://people.openmoko.org/andy/
> and used dfu-util to flash the Qi bootloader image.
>
> I tried installing on the 512 Mb SD card (before I changed to Qi),
> with the same lack of success.
>
> I am not sure how to provide serial console output. My connection is
> established after the system boots. I will search for ways to connect
> during boot up

Do you want to tell me you lack debug board and yet decided to risk
installing untested Qi version on gta01 without asking anybody? Oh
man.

Now your best option is to boot from NAND and flash really recent version
or find a compatible non-SDHC card or get a debug board...

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: [debian] Latest xserver 1.7 and touch screen problems

2010-01-25 Thread Paul Fertser
thisismypriv...@riseup.net writes:
> P.S.: Why is this mailinglist without "Answer to:
> smartphones-userland@linuxtogo.org"-Tag? It would be really really
> nice!

It would be really stupid. http://www.unicom.com/pw/reply-to-harmful.html

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: [debian] Latest xserver 1.7 and touch screen problems

2010-01-25 Thread Paul Fertser
On Tue, Jan 26, 2010 at 12:04:21AM +0100, thisismypriv...@riseup.net wrote:
> OK, thank you! I didn't use "Answer to all" because I thougt that you
> don't want to get the message twice (I know, I could delete the entry
> with your adress, because you are on the list).

Lists are usually configured to avoid duplicates automatically, they
just do not send extra messages if they see a subscriber was already
in the To: or Cc: list :)

HTH
-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland


Re: htc dream and sms

2010-07-05 Thread Paul Fertser
Denis 'GNUtoo' Carikli  writes:
>> first before asking my question, I would like to thank for all the work on 
>> the
>> htc dream. I'm now able to use it really, and I'm very happy of this. The 
>> work
>> (in progress) has been already very important.
>> 
>> So now, my question : I'm using fso2 but neither shr nor zhone2. Since I'm 
>> using
>> only sometimes sms, I would like to have them on the sim card.
>
> Try to modify opimd section in frameworkd.conf

opimd no longer supports any other backends, only SQLite. So your
options to not use opimd are to listen to the IncomingMessage signals
yourself or making sure fso asks the modem to store the messages on
sim, just as you've written.

> also: someone made an emacs plugin for fso...  It uses opimd too.

Indeed. I can't see why not to use opimd for the
messages. (emacs ui: http://wiki.github.com/paulfertser/fso-el/ )

-- 
Be free, use free (http://www.gnu.org/philosophy/free-sw.html) software!
mailto:fercer...@gmail.com

___
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland