[pkg-fso-commits] [SCM] FSO frameworkd Debian packaging branch, master, updated. milestone4-368-g700ab82

Michael 'Mickey' Lauer mickey at vanille-media.de
Mon Feb 2 18:51:43 UTC 2009


The following commit has been merged in the master branch:
commit c0d3cebcd7889cb0cb09d078f3b60f5f93dee99f
Author: Michael 'Mickey' Lauer <mickey at vanille-media.de>
Date:   Sat Dec 20 16:17:23 2008 +0100

    ogsmd: [FREESCALE NEPTUNE] send the magic SIM initialization commands,
    so that the GSM 07.07 commands for reading the SMS message book work ootb.
    Override one channel's modemStateSimUnlocked() as well to send the mandatory
    org.freesmartphone.GSM.SIM.ReadyStatus( True ) on time.

diff --git a/docs/TODO b/docs/TODO
index 8ab279a..945f300 100644
--- a/docs/TODO
+++ b/docs/TODO
@@ -21,7 +21,8 @@ b) they can be treated as plugins (just toss a new one into a directory and it w
 * add more regexps
 * revamp parser to take a number of expected prefixes. This should lead to much more
   reliable detection of unsolicited responses
-* add gprs status into org.freesmartphone.GSM.Network.Status
+* move gprs status into org.freesmartphone.GSM.Network.Status?
+* how to find out when the SIM is truly ready? [Calypso has a signal, others not]
 * port to vala
 * ...
 
diff --git a/framework/subsystems/ogsmd/modems/freescale_neptune/channel.py b/framework/subsystems/ogsmd/modems/freescale_neptune/channel.py
index 4385af8..1de3ede 100644
--- a/framework/subsystems/ogsmd/modems/freescale_neptune/channel.py
+++ b/framework/subsystems/ogsmd/modems/freescale_neptune/channel.py
@@ -12,10 +12,14 @@ Module: channel
 Freescale Neptune specific modem channels
 """
 
+__version__ = "0.8.0"
+MODULE_NAME = "ogsmd.neptune_freescale"
 
 from ogsmd.modems.abstract.channel import AbstractModemChannel
 from ogsmd.gsm.parser import ThrowStuffAwayParser
 
+import gobject
+
 #=========================================================================#
 class EzxMuxChannel( AbstractModemChannel ):
 #=========================================================================#
@@ -40,6 +44,19 @@ class EzxMuxChannel( AbstractModemChannel ):
         c.append( "+CGREG=2" )
 
 #=========================================================================#
+class CallChannel( EzxMuxChannel ):
+#=========================================================================#
+    def __init__( self, *args, **kwargs ):
+        EzxMuxChannel.__init__( self, *args, **kwargs )
+
+        # FIXME we can't do this, since it is modem-wide (not VC-wide)
+        #self.enqueue( "+CMER=0,0,0,0,0" ) # unsolicited event reporting: none
+
+    def installParser( self ):
+        trash = [ "+CIEV:" ]
+        self.parser = ThrowStuffAwayParser( trash, self._handleResponseToRequest, self._handleUnsolicitedResponse )
+
+#=========================================================================#
 class MiscChannel( EzxMuxChannel ):
 #=========================================================================#
     def __init__( self, *args, **kwargs ):
@@ -52,6 +69,21 @@ class MiscChannel( EzxMuxChannel ):
         trash = [ "+CIEV:" ]
         self.parser = ThrowStuffAwayParser( trash, self._handleResponseToRequest, self._handleUnsolicitedResponse )
 
+    def modemStateSimUnlocked( self ):
+        """
+        Called, when the modem signalizes the SIM being unlocked.
+        """
+
+        # This modem needs a special SIM init sequence otherwise GSM 07.07 SMS commands won't succeed
+        self.enqueue( "+CRRM" )
+        self.enqueue( "+EPMS?" )
+        self.enqueue( "+EMGL=4", self._ezxEgmlAnswer )
+
+    def _ezxEgmlAnswer( self, request, response ):
+        if True: #if response[0] == "OK":
+            # send SIM is ready command
+            self._modem._object.ReadyStatus( True )
+
 #=========================================================================#
 class UnsolicitedResponseChannel( EzxMuxChannel ):
 #=========================================================================#
diff --git a/framework/subsystems/ogsmd/modems/freescale_neptune/mediator.py b/framework/subsystems/ogsmd/modems/freescale_neptune/mediator.py
index e833040..1728475 100644
--- a/framework/subsystems/ogsmd/modems/freescale_neptune/mediator.py
+++ b/framework/subsystems/ogsmd/modems/freescale_neptune/mediator.py
@@ -74,8 +74,7 @@ class SimSendAuthCode( SimMediator ):
         if response[-1] == "OK":
             self._ok()
             # send auth status signal
-            if response[0].startswith( "+CPIN" ):
-                self._object.AuthStatus( self._rightHandSide( response[0] ) )
+            self._object.AuthStatus( "READY" )
         else:
             SimMediator.responseFromChannel( self, request, response )
 
diff --git a/framework/subsystems/ogsmd/modems/freescale_neptune/modem.py b/framework/subsystems/ogsmd/modems/freescale_neptune/modem.py
index 9a1501a..cc74484 100644
--- a/framework/subsystems/ogsmd/modems/freescale_neptune/modem.py
+++ b/framework/subsystems/ogsmd/modems/freescale_neptune/modem.py
@@ -11,14 +11,14 @@ Module: modem
 Freescale Neptune modem class
 """
 
-__version__ = "0.2.0"
+__version__ = "0.2.1"
 MODULE_NAME = "ogsmd.modems.freescale_neptune"
 
 import mediator
 
 from ogsmd.modems.abstract.modem import AbstractModem
 
-from .channel import MiscChannel, UnsolicitedResponseChannel
+from .channel import CallChannel, MiscChannel, UnsolicitedResponseChannel
 from .unsolicited import UnsolicitedResponseDelegate
 
 from ogsmd.gsm.decor import logged
@@ -61,7 +61,7 @@ class FreescaleNeptune( AbstractModem ):
         AbstractModem.__init__( self, *args, **kwargs )
 
         self._channels[ "UNSOL" ] = UnsolicitedResponseChannel( self.pathfactory, "/dev/mux0", modem=self ) # might also be callchannel, if /dev/mux2 does not want to
-        self._channels[ "CALL" ] = MiscChannel( self.pathfactory, "/dev/mux2", modem=self )
+        self._channels[ "CALL" ] = CallChannel( self.pathfactory, "/dev/mux2", modem=self )
         #self._channels[ "MISC" ] = MiscChannel( self.pathfactory, "/dev/mux4", modem=self ) # needs to parse unsolicited
         self._channels[ "MISC" ] = MiscChannel( self.pathfactory, "/dev/mux6", modem=self )
 

-- 
FSO frameworkd Debian packaging



More information about the pkg-fso-commits mailing list