Hello,

Selon Michael 'Mickey' Lauer <mic...@vanille-media.de>:

> Dear folks,
>
> as you might remember, we always had some problems with unsolicited
> messages appearing in the middle of solicited answers. Since unsolicited
> messages are an inherent feature of the AT protocol, there is no way to
> work without these. Still, there's an unpleasent likeliness of race
> conditions involved -- due to the numerous different buffers involved on
> the way from the modem to the parser, and the Calypso not always
> honoring %CUNS (which litererally means: Always wait with sending
> unsolicited responses until you sent a solicited response to a request
> that might be going on).
>
> To finally fix this for good, after some additional nightshifts, the new
> ogsmd "ruggedized parser" has landed in frameworkd's
> ogsmd-new-timeout-branch. The old low level AT parser has been altered
> to accept a list of possible soliticed answer prefixes for every request
> involved. If a line does not match, it is recognized as unsolicited
> response -- even in the middle of a solicited -- and sent upwards.
>

Thanks for all your work.

I have tried this on my EZX E680, with the "usual" patch for mediator.py
(I put it in attachement)

With this zhone and framework are working (with a adapted frameworkd.conf).
But I still get some unhandled messages :
1) The phonebook : the OK answer is not send by the modem so frameworkd say that
there is a TIMEOUT and after that say that
WARNING  UNHANDLED INTERMEDIATE: +CPBR:
1,"888",129,"005F006D006500730073006100670065007200690065"
I understand that it is a false unsollicited message
2) sms : I get
<CallChannel via /dev/mux2>: got 253 bytes from: '\r\n+CMT:
111\r\n079133860940... (truncated for this mail)
the sms is not decoded and after that I get
WARNING  UNHANDLED INTERMEDIATE:

I have some other UNHANDLED but it does not matter.

What is the good way to solve this ?

Sincerely,

Alain
--- mediator.py 2009-02-06 10:29:11.000000000 +0100
+++ mediator.py 2009-02-06 19:33:25.000000000 +0100
@@ -59,6 +59,38 @@
             self._ok( result )
 
 #=========================================================================#
+class DeviceSetAntennaPower( DeviceMediator ):
+#=========================================================================#
+    def trigger( self ):
+        self._commchannel.enqueue( "+CFUN=%d" % self.power, 
self.responseFromChannel, self.errorFromChannel, 
timeout=currentModem().timeout("CFUN") )
+
+        pin_state = self._object.modem._simPinState
+        if pin_state == "READY":
+            self._ok()
+        else:
+            self._error(error.SimAuthFailed("not READY"))
+
+    @logged
+    def responseFromChannel( self, request, response ):
+        if not response[-1] == "OK":
+            DeviceMediator.responseFromChannel( self, request, response )
+
+#=========================================================================#
+class SimGetAuthStatus( SimMediator ):
+#=========================================================================#
+    """
+    Modem violating GSM 07.07 here.
+
+    +CPIN? does not work
+    """
+    def trigger( self ):
+        pin_state = self._object.modem._simPinState
+        if pin_state == "READY":
+            self._ok( pin_state )
+        else:
+            self._ok( "SIM PIN" )
+
+#=========================================================================#
 class SimSendAuthCode( SimMediator ):
 #=========================================================================#
     """
_______________________________________________
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland

Reply via email to