Selon Alain2210 <alain2...@free.fr>:
> Hello,
>
> I'm trying a very recent frameworkd.
>
> 1) I can confirm that now frameworkd see +EKEV and produce the good signal.
> I have not yet tried to make a rule to put the phone off.
>
> 2) my e680 does not work as the a780 for +CPIN? and makes an error. So I have
> to
> modify the SimGetAuthStatus. Here is a patch that first send the +CPIN? for
> compatibility with a780 and after an error use modem._simPinState instead.
>
> 3) when doing CFUN=0 and CFUN=1 to get the sim status, I often get an error.
> To
> avoid this, I need to change sleep from 1.0 to 2.0. This is also in the
> patch.
>
Here the file. Sorry.
Alain
--- mediator.py.orig 2009-05-21 21:53:09.000000000 +0200
+++ mediator.py 2009-05-21 22:01:51.000000000 +0200
@@ -61,6 +61,28 @@
self._ok( result )
#=========================================================================#
+class SimGetAuthStatus( SimMediator ):
+#=========================================================================#
+ # FIXME: Add SIM PIN known/unknown logic here in order to prepare for
changing SetAntennaPower() semantics
+ def trigger( self ):
+ self._commchannel.enqueue( "+CPIN?", self.responseFromChannel,
self.errorFromChannel )
+
+ @logged
+ def responseFromChannel( self, request, response ):
+ if response[-1] == "OK":
+ pin_state = self._rightHandSide( response[0] ).strip( '"' ) # some
modems include "
+ self._ok( pin_state )
+ else:
+ """
+ Modem violating GSM 07.07 here.
+
+ +CPIN? does not work
+ """
+ #SimMediator.responseFromChannel( self, request, response )
+ pin_state = self._object.modem._simPinState
+ self._ok( pin_state )
+
+#=========================================================================#
class DeviceSetAntennaPower( AbstractMediator.DeviceSetAntennaPower ):
#=========================================================================#
"""
@@ -76,7 +98,7 @@
def responseFromChannel1( self, request, response ):
# FIXME: make async
- time.sleep( 1.0 )
+ time.sleep( 2.0 )
cmd = "+CFUN=%d" % ( 1 if self.power else 0 )
self._commchannel.enqueue( cmd, self.responseFromChannel,
self.errorFromChannel )
_______________________________________________
Smartphones-userland mailing list
Smartphones-userland@linuxtogo.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland