Re: ogmsd: Ruggedized Parser
Hello, Selon Michael 'Mickey' Lauer : > 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 : 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.0 +0100 +++ mediator.py 2009-02-06 19:33:25.0 +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
Re: ogmsd: Ruggedized Parser
Due to the minimal amount of responses (thanks Alain!), I now have merged the ogsmd-new-timeout branch to master. Alain2210: > I have tried this on my EZX E680, with the "usual" patch for mediator.py > (I put it in attachement) Ah right, that needs mergin. > 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" That's interesting. Could you paste the whole debug logs? I did not have the chance to test much on OpenEZX, since i'm kind of disappointed by our lack of UI [Zhone used to work on QVGA, it no longer does, so we're back to square 2 with regards to a release...). Anyways, I'll take it with me on vacation next week and will spend some quality time getting the middleware finished (as far as kernel permits). > : got 253 bytes from: '\r\n+CMT: > 111\r\n079133860940... (truncated for this mail) > the sms is not decoded and after that I get Daniel would be interested in that. Do you have the full PDU? (or even better the whole log...). Thanks! Mickey. ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Selon Michael 'Mickey' Lauer : > Due to the minimal amount of responses (thanks Alain!), I now have > merged the ogsmd-new-timeout branch to master. Thanks. > > Alain2210: > > I have tried this on my EZX E680, with the "usual" patch for mediator.py > > (I put it in attachement) > > Ah right, that needs mergin. When you will have some time. > > > 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" > > That's interesting. Could you paste the whole debug logs? Sure : 2009.03.03 19:59:04 ogsmd.channel DEBUG: sending 22 bytes: 'AT+CPBS="SM";+CPBR=?\r\n' 2009.03.03 19:59:05 ogsmd.channel DEBUG: got 30 bytes from: '\r\n+CPBR: (1-250),20,14\r\n\r\nOK\r\n' 2009.03.03 19:59:05 ogsmd.channel DEBUG: COMPLETED 'AT+CPBS="SM";+CPBR=?' => ['+CPBR: (1-250),20,14', 'OK'] 2009.03.03 19:59:05 ogsmd.channel DEBUG: sending 11 bytes: 'AT+CMGL=4\r\n' 2009.03.03 19:59:05 ogsmd.channel DEBUG: got 19 bytes from: '\r\n+CMS ERROR: 302\r\n' 2009.03.03 19:59:05 ogsmd.channel DEBUG: COMPLETED 'AT+CMGL=4' => ['+CMS ERROR: 302'] 2009.03.03 19:59:05 ogsmd.channel DEBUG: sending 26 bytes: 'AT+CPBS="SM";+CPBR=1,250\r\n' 2009.03.03 19:59:05 ogsmd.channel DEBUG: got 69 bytes from: '\r\n+CPBR: 1,"888",129,"005F006D006500730073006100670065007200690065"\r\n' 2009.03.03 19:59:05 ogsmd.channel DEBUG: got 73 bytes from: '\r\n+CPBR: 2,"221",129,"005F0073007500690076006900200063006F006E0073006F"\r\n' 2009.03.03 19:59:05 ogsmd.channel DEBUG: got 77 bytes from: '\r\n+CPBR: 3,"224",129,"005F00720065006300680061007200670065006D0065006E0074"\r\n' 2009.03.03 19:59:05 ogsmd.channel DEBUG: got 77 bytes from: '\r\n+CPBR: 4,"833",129,"005F0073006500720076002E0063006C00690065006E00740073"\r\n' 2009.03.03 19:59:05 ogsmd.channel DEBUG: got 77 bytes from: '\r\n+CPBR: 5,"225",129,"005F0076006F0074007200650020006E0075006D00E90072006F"\r\n' 2009.03.03 19:59:10 otimed INFO offsets: n=1 mean=-24.513034 sd=0.00 2009.03.03 19:59:10 otimed INFO adjusting clock by -24.513034 seconds 2009.03.03 19:58:56 ogsmd.channel DEBUG: TIMEOUT 'AT+CPBS="SM";+CPBR=1,250' => ??? 2009.03.03 19:58:56 ogsmd.channel DEBUG: got 9 bytes from: '\r\nERROR\r\n' 2009.03.03 19:58:56 ogsmd.modems.abstract.channel WARNING UNHANDLED INTERMEDIATE: +CPBR: 1,"888",129,"005F006D006500730073006100670065007200690065" 2009.03.03 19:59:17 ogsmd.channel WARNING : Got unicode input. Trying to convert to plain string... (I did only some clean up) By the way, I have 4 phonebooks : SM, FD, ON et SD. But frameworkd does not know two of it. > I did not have > the chance to test much on OpenEZX, since i'm kind of disappointed by > our lack of UI [Zhone used to work on QVGA, it no longer does, so we're > back to square 2 with regards to a release...). With MS5.5 branch of oe, I have a working zhone. > > Anyways, I'll take it with me on vacation next week and will spend some > quality time getting the middleware finished (as far as kernel permits). Thanks. > > > : got 253 bytes from: '\r\n+CMT: > > 111\r\n079133860940... (truncated for this mail) > > the sms is not decoded and after that I get > > Daniel would be interested in that. Do you have the full PDU? (or even > better the whole log...). > Sure again : 2009.03.03 19:59:33 ogsmd.channel DEBUG: got 253 bytes from: '\r\n+CMT: 111\r\n07913386094000F00405851210F83900903030120061406CC13A08367BC166A0304816D3C160A0E99B4D2E83C6EF369C5E06C9CB6374587E2E87C5EC3208A40395E1F5F4BC0CB2BEEB7310FC5DB797F52079798C0ECBCF6539C8FEA6CBCBA0F1BB0DA79741F3BA1C249697D37A74FB2D4EB3CBAEF1BB0D\r\n' 2009.03.03 19:59:33 ogsmd.modems.abstract.channel WARNING UNHANDLED INTERMEDIATE: The previous lines in log are the fact I'm calling a number that generate this SMS : 2009.03.03 19:59:17 ogsmd.channel DEBUG: sending 9 bytes: 'ATD221;\r\n' 2009.03.03 19:59:17 ogsmd.channel DEBUG: got 6 bytes from: '\r\nOK\r\n' 2009.03.03 19:59:17 ogsmd.channel DEBUG: COMPLETED 'ATD221;' => ['OK'] 2009.03.03 19:59:18 ogsmd.channel DEBUG: got 19 bytes from: '\r\n+CCTP: 1, "221"\r\n' 2009.03.03 19:59:18 ogsmd.modems.abstract.channel WARNING UNHANDLED INTERMEDIATE: +CCTP: 1, "221" 2009.03.03 19:59:18 ogsmd.channel DEBUG: got 14 bytes from: '\r\n+CIEV: 6,2\r\n' 2009.03.03 19:59:18 ogsmd.channel DEBUG: got 14 bytes from: '\r\n+CIEV: 6,2\r\n' 2009.03.03 19:59:18 ogsmd.channel DEBUG: got 14 bytes from: '\r\n+CIEV: 6,2\r\n' 2009.03.03 19:59:21 ogsmd.channel DEBUG: got 11 bytes from: '\r\n+ALERT \r\n' 2009.03.03 19:59:21 ogsmd.channel DEBUG: got 28 bytes from: '\r\n+CIEV: 5,1\r\n\r\nCONNECT: 1\r\n' 2009.03.03 19:59:21 ogsmd.modems.abstract.channel WARNING UNHANDLED INTERMEDIATE: 2009.03
Re: ogmsd: Ruggedized Parser
Am Mittwoch, den 04.03.2009, 22:49 +0100 schrieb Alain2210: > > Ah right, that needs mergin. > > When you will have some time. I'll have some time next week -- taking my A780 with me (while my wife goes skiing with the guys, I'll work to finance her luxury lifestyle ;), ah well, at least I'll enjoy the evenings in .at and get some fresh air. > 2009.03.03 19:58:56 ogsmd.modems.abstract.channel WARNING UNHANDLED > INTERMEDIATE: +CPBR: > 1,"888",129,"005F006D006500730073006100670065007200690065" > 2009.03.03 19:59:17 ogsmd.channel WARNING : Got > unicode input. Trying to convert to plain string... > > (I did only some clean up) > > By the way, I have 4 phonebooks : SM, FD, ON et SD. But frameworkd does not > know > two of it. Oh really? Ok, then we need to fix that in the Neptune mediator.py. I had to override SimListPhonebooks, hardcoding it, since the modem does not support +CPBS=? > > I did not have > > the chance to test much on OpenEZX, since i'm kind of disappointed by > > our lack of UI [Zhone used to work on QVGA, it no longer does, so we're > > back to square 2 with regards to a release...). > > With MS5.5 branch of oe, I have a working zhone. Oh really? With my last test, all the fonts were too large and the image didn't scale correctly. > Sure again : > > 2009.03.03 19:59:33 ogsmd.channel DEBUG: got > 253 > bytes from: '\r\n+CMT: > 111\r\n07913386094000F00405851210F83900903030120061406CC13A08367BC166A0304816D3C160A0E99B4D2E83C6EF369C5E06C9CB6374587E2E87C5EC3208A40395E1F5F4BC0CB2BEEB7310FC5DB797F52079798C0ECBCF6539C8FEA6CBCBA0F1BB0DA79741F3BA1C249697D37A74FB2D4EB3CBAEF1BB0D\r\n' > 2009.03.03 19:59:33 ogsmd.modems.abstract.channel WARNING UNHANDLED > INTERMEDIATE: Oh, now I see it. +CMT comes in via /dev/mux2, not via /dev/mux0 *sigh*. We have to change channel mapping (again) or teach the NeptuneCallChannel to deal with +CMT. > > The previous lines in log are the fact I'm calling a number that generate this > SMS : Ah, interesting. Could you do me a favour and test what happens, if you issue this command on /dev/mux0? I'm curious whether it still comes in via /dev/mux2 then. Thanks! Mickey. ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Commited as http://git.freesmartphone.org/?p=framework.git;a=commit;h=b445a328b91c4910e802d13cda00da124f772b98 Thanks! -- :M: ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Hello, > > By the way, I have 4 phonebooks : SM, FD, ON et SD. But frameworkd does not > know > > two of it. > > Oh really? Ok, then we need to fix that in the Neptune mediator.py. I > had to override SimListPhonebooks, hardcoding it, since the modem does > not support +CPBS=? Yes I have seen it. > > > > I did not have > > > the chance to test much on OpenEZX, since i'm kind of disappointed by > > > our lack of UI [Zhone used to work on QVGA, it no longer does, so we're > > > back to square 2 with regards to a release...). > > > > With MS5.5 branch of oe, I have a working zhone. > > Oh really? With my last test, all the fonts were too large and the image > didn't scale correctly. So, for me, it is probably not the newest one. But I not sufficiently good in git to say what revision I use. > > > Sure again : > > > > 2009.03.03 19:59:33 ogsmd.channel DEBUG: got > 253 > > bytes from: '\r\n+CMT: > > > 111\r\n07913386094000F00405851210F83900903030120061406CC13A08367BC166A0304816D3C160A0E99B4D2E83C6EF369C5E06C9CB6374587E2E87C5EC3208A40395E1F5F4BC0CB2BEEB7310FC5DB797F52079798C0ECBCF6539C8FEA6CBCBA0F1BB0DA79741F3BA1C249697D37A74FB2D4EB3CBAEF1BB0D\r\n' > > 2009.03.03 19:59:33 ogsmd.modems.abstract.channel WARNING UNHANDLED > > INTERMEDIATE: > > Oh, now I see it. +CMT comes in via /dev/mux2, not via /dev/mux0 *sigh*. > We have to change channel mapping (again) or teach the > NeptuneCallChannel to deal with +CMT. Yes they comes in /dev/mux2 > > > > > The previous lines in log are the fact I'm calling a number that generate > this > > SMS : > > Ah, interesting. Could you do me a favour and test what happens, if you > issue this command on /dev/mux0? I'm curious whether it still comes in > via /dev/mux2 then. > Yes, I have reread my old tests without frameworkd and all commands written directly on /dev/mux0. I always got sms on /dev/mux2. Thanks, Alain ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Hello, Selon Michael 'Mickey' Lauer : > Am Mittwoch, den 04.03.2009, 22:49 +0100 schrieb Alain2210: > > > Ah right, that needs mergin. > > > > When you will have some time. > > I'll have some time next week -- taking my A780 with me (while my wife > goes skiing with the guys, I'll work to finance her luxury lifestyle ;), > ah well, at least I'll enjoy the evenings in .at and get some fresh air. Thanks for the time you have spend on it. I have seen the commit on fso. And I have tried them. I have some observations : first, it works better thanks again. I have use the e6c36e917cc75809f60fa587b68bbf6be0c5bf58 1) I still need a modified version of mediator.py for freescale_neptune. It is quite the previous one : only timeout suppressed. I put it in attachment. It is the diff1. 2) With this modem, I can do without problem (it seems) CFUN=0 or CFUN=1, and I like it, because It do need the antenna often (for exemple when testing sms like yesterday) 3) > > > 2009.03.03 19:58:56 ogsmd.modems.abstract.channel WARNING UNHANDLED > > INTERMEDIATE: +CPBR: > 1,"888",129,"005F006D006500730073006100670065007200690065" > > 2009.03.03 19:59:17 ogsmd.channel WARNING : Got > > unicode input. Trying to convert to plain string... Now it works. I can confirm it. 4) > > > > (I did only some clean up) > > > > By the way, I have 4 phonebooks : SM, FD, ON et SD. But frameworkd does not > know > > two of it. > > Oh really? Ok, then we need to fix that in the Neptune mediator.py. I > had to override SimListPhonebooks, hardcoding it, since the modem does > not support +CPBS=? I have test it again and found finally only SM,ON and FD, the last one is emergency number. So I have patch mediator.py of freescale_neptune (diff2 in attachment) and const.py of gsm folder. I put the two patch in attachment. By the way zhone only retrieve the SM one (that is contact), why ? 5) > > 2009.03.03 19:59:33 ogsmd.channel DEBUG: got > 253 > > bytes from: '\r\n+CMT: > > > 111\r\n07913386094000F00405851210F83900903030120061406CC13A08367BC166A0304816D3C160A0E99B4D2E83C6EF369C5E06C9CB6374587E2E87C5EC3208A40395E1F5F4BC0CB2BEEB7310FC5DB797F52079798C0ECBCF6539C8FEA6CBCBA0F1BB0DA79741F3BA1C249697D37A74FB2D4EB3CBAEF1BB0D\r\n' > > 2009.03.03 19:59:33 ogsmd.modems.abstract.channel WARNING UNHANDLED > > INTERMEDIATE: > > Oh, now I see it. +CMT comes in via /dev/mux2, not via /dev/mux0 *sigh*. > We have to change channel mapping (again) or teach the > NeptuneCallChannel to deal with +CMT. > I works now, in the sense that I only get in frameworkd.log : 2009.03.15 19:58:03.235 ogsmd.device INFO incoming message (unbuffered) from 21018 but I see nothing else (either in zhone) is it normal ? And I do not get the text of the sms. 6) I did not succeed in getting sms from sim card, il the following sense : I get this in frameworkd.log : after AT+CMGL=2 '+CMGL: 1,2,25\r\n07913386094000F011010081FF11E3F2380D2ACFE9A0BA1B549ECFC369\r\nOK\r\n' It seems that in const.py another header is expected : # +CMGL: 1,1,"",125 PAT_SMS_PDU_HEADER = re.compile( '(?P\d+),(?P\d+),(?:"(?P[^"]*)")?,(?P\d+)' ) that is the freescale_neptune does not give the "name". Moreover after that I get another problem : 2009.03.16 00:01:59.678 ogsmd.channelERROR(ignoring) unhandled exception in response callback: string index out of range Traceback (most recent call last): File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/gsm/channel.py", line 414, in handleResponseToRequest ok_cb( reqstring.strip(), response ) File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/modems/abstract/mediator.py", line 936, in responseFromChannel sms = ogsmd.gsm.sms.SMS.decode( line, direction ) File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/gsm/sms.py", line 123, in decode sms.parse( bytes ) File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/gsm/sms.py", line 798, in parse (self.addr, skip) = self._parse_address( bytes, offset ) File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/gsm/sms.py", line 160, in _parse_address address = PDUAddress.decode( bytes[offset:offset+address_len] ) File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/gsm/sms.py", line 68, in decode number = bcd_decode( number ) File "/usr/lib/python2.6/site-packages/framework/subsystems/ogsmd/gsm/convert.py", line 49, in bcd_decode if s[-1] == "f": IndexError: string index out of range I do not know the the problem come from. Sincerely, Alain mediator.py.diff1 Description: Binary data mediator.py.diff2 Description: Binary data --- const.py.orig 2009-03-15 21:12:36.0 +0100 +++ const.py2009-03-16 00:16:15.0 +0100 @@ -689,6 +689,7 @@ "own": "ON", "missed": "MC", "emergency": "EN", +"emergency2": "FD", # FIXME: Do we need more? } ) ___ Smartphones-userland mailing list Smartp
Re: ogmsd: Ruggedized Parser
Hello, I anwser to myself to give a precision : to get this > 6) I did not succeed in getting sms from sim card, il the following sense : > I get this in frameworkd.log : after AT+CMGL=2 > > '+CMGL: > 1,2,25\r\n07913386094000F011010081FF11E3F2380D2ACFE9A0BA1B549ECFC369\r\nOK\r\n' > I need to send the magic commands (AT+CRRM, AT+EPSM?, AT+EMGL=4) AFTER the CPIN but they are send before now and I so does not work directly. Sincerely, Alain ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Hello, I answer again to myself. > > '+CMGL: > > > 1,2,25\r\n07913386094000F011010081FF11E3F2380D2ACFE9A0BA1B549ECFC369\r\nOK\r\n' > > I think there is two problems : header and sms. 1) header, I have modified const.py to have : # +CMGL: 1,1,"",125 PAT_SMS_PDU_HEADER = re.compile( '(?P\d+),(?P\d+)(?:,"(?P[^ "]*)")?,(?P\d+)' ) that is the "," is now in the name block 2) this sms is without destination adress so sms.py makes an error. To avoid this, I have patched sms.py with this : --- sms.py.orig Sat Mar 14 15:43:25 2009 +++ sms.py Mon Mar 16 13:17:16 2009 @@ -157,7 +157,9 @@ # XXX: Is this correct? Can we detect the @-padding issue in # address_len? address_len = 1 + (bytes[offset] + 1) / 2 offset += 1 -address = PDUAddress.decode( bytes[offset:offset+address_len] ) +address = ""; +if (address_len > 1): +address = PDUAddress.decode( bytes[offset:offset+address_len] ) return ( address, address_len + 1 ) def _parse_userdata( self, ud_len, bytes ): Sincerely, Alain ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Am Montag, den 16.03.2009, 11:44 +0100 schrieb Alain2210: > Hello, > > I anwser to myself to give a precision : to get this > > > 6) I did not succeed in getting sms from sim card, il the following sense : > > I get this in frameworkd.log : after AT+CMGL=2 > > > > '+CMGL: > > > 1,2,25\r\n07913386094000F011010081FF11E3F2380D2ACFE9A0BA1B549ECFC369\r\nOK\r\n' > > > > I need to send the magic commands (AT+CRRM, AT+EPSM?, AT+EMGL=4) AFTER the > CPIN > but they are send before now and I so does not work directly. I wonder why they are sent before. According to the code they should be sent afterwards (in channel.py:modemStateSimUnlocked). -- :M: ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Am Montag, den 16.03.2009, 14:25 +0100 schrieb Alain2210: > Hello, > > I answer again to myself. > > > > '+CMGL: > > > > > > 1,2,25\r\n07913386094000F011010081FF11E3F2380D2ACFE9A0BA1B549ECFC369\r\nOK\r\n' > > > > > I think there is two problems : header and sms. > 1) header, I have modified const.py to have : > > # +CMGL: 1,1,"",125 > PAT_SMS_PDU_HEADER = re.compile( > '(?P\d+),(?P\d+)(?:,"(?P[^ > "]*)")?,(?P\d+)' ) > > that is the "," is now in the name block Didn't I do the same in mediator.py? > 2) this sms is without destination adress so sms.py makes an error. To avoid > this, I have patched sms.py with this : > --- sms.py.orig Sat Mar 14 15:43:25 2009 > +++ sms.py Mon Mar 16 13:17:16 2009 > @@ -157,7 +157,9 @@ > # XXX: Is this correct? Can we detect the @-padding issue in > # address_len? > address_len = 1 + (bytes[offset] + 1) / 2 > offset += 1 > -address = PDUAddress.decode( bytes[offset:offset+address_len] ) > +address = ""; > +if (address_len > 1): > +address = PDUAddress.decode( bytes[offset:offset+address_len] ) > return ( address, address_len + 1 ) > > def _parse_userdata( self, ud_len, bytes ): Excellent, thanks! -- :M: ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Hi, seems you have solved most problems already, I'm too slow again ;) > 1) I still need a modified version of mediator.py for freescale_neptune. It is > quite the previous one : only timeout suppressed. I put it in attachment. > It is the diff1. I'm not sure this patch is right. +CPIN? works pretty well here on my A780 -- is that different on yours? > 2) With this modem, I can do without problem (it seems) CFUN=0 or CFUN=1, and > I > like it, because It do need the antenna often (for exemple when testing sms > like > yesterday) Yes, I documented that wrongly. +CFUN=0/1 works fine on the Neptune, what it does not like though is unregistering, it completely locks for me in that case. Cheers, -- :M: ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Selon Michael 'Mickey' Lauer : > Hi, > > seems you have solved most problems already, I'm too slow again ;) too busy > > > 1) I still need a modified version of mediator.py for freescale_neptune. It > is > > quite the previous one : only timeout suppressed. I put it in attachment. > > It is the diff1. > > I'm not sure this patch is right. +CPIN? works pretty well here on my > A780 -- is that different on yours? On my E680, I get : AT+CPIN? +CME ERROR: 4 And without this patch, frameworkd cannot make the phone work (I first try the original frameworkd). > > > 2) With this modem, I can do without problem (it seems) CFUN=0 or CFUN=1, > and I > > like it, because It do need the antenna often (for exemple when testing sms > like > > yesterday) > > Yes, I documented that wrongly. +CFUN=0/1 works fine on the Neptune, > what it does not like though is unregistering, it completely locks for > me in that case. > I have never unregister. how do you do that ? With the motorola soft, I often put the antenna off. Last thing, I now that the other phonebook of E680 are not essential, but I would like to be able to access them with fso. Thanks, Alain ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Selon Michael 'Mickey' Lauer : . > > > > I need to send the magic commands (AT+CRRM, AT+EPSM?, AT+EMGL=4) AFTER the > CPIN > > but they are send before now and I so does not work directly. > > I wonder why they are sent before. According to the code they should be > sent afterwards (in channel.py:modemStateSimUnlocked). > Yes, you are wright. I need to retry properly. Sincerely, Alain ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Selon Michael 'Mickey' Lauer : > > I think there is two problems : header and sms. > > 1) header, I have modified const.py to have : > > > > # +CMGL: 1,1,"",125 > > PAT_SMS_PDU_HEADER = re.compile( > '(?P\d+),(?P\d+)(?:,"(?P[^ > > "]*)")?,(?P\d+)' ) > > > > that is the "," is now in the name block > > Didn't I do the same in mediator.py? I think no : in git.fso I read now const.py : # +CMGL: 1,1,"",125 PAT_SMS_PDU_HEADER = re.compile( '(?P\d+),(?P\d+),(?:"(?P[^"]*)")?,(?P\d+)' ) > > > 2) this sms is without destination adress so sms.py makes an error. To > avoid > > this, I have patched sms.py with this : > > --- sms.py.orig Sat Mar 14 15:43:25 2009 > > +++ sms.py Mon Mar 16 13:17:16 2009 > > @@ -157,7 +157,9 @@ > > # XXX: Is this correct? Can we detect the @-padding issue in > > # address_len? > > address_len = 1 + (bytes[offset] + 1) / 2 > > offset += 1 > > -address = PDUAddress.decode( bytes[offset:offset+address_len] ) > > +address = ""; > > +if (address_len > 1): > > +address = PDUAddress.decode( bytes[offset:offset+address_len] > ) > > return ( address, address_len + 1 ) > > > > def _parse_userdata( self, ud_len, bytes ): > > Excellent, thanks! > When (if) you have time, could it be commit. Such that I can use the original frameworkd ? Thanks, Alain ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Am Dienstag, den 17.03.2009, 10:02 +0100 schrieb Alain2210: > Selon Michael 'Mickey' Lauer : > > > > > I think there is two problems : header and sms. > > > 1) header, I have modified const.py to have : > > > > > > # +CMGL: 1,1,"",125 > > > PAT_SMS_PDU_HEADER = re.compile( > > '(?P\d+),(?P\d+)(?:,"(?P[^ > > > "]*)")?,(?P\d+)' ) > > > > > > that is the "," is now in the name block > > > > Didn't I do the same in mediator.py? > > I think no : in git.fso I read now const.py : > # +CMGL: 1,1,"",125 > PAT_SMS_PDU_HEADER = re.compile( > '(?P\d+),(?P\d+),(?:"(?P[^"]*)")?,(?P\d+)' ) Which gets overridden by the Neptune's mediator.py like that: # modem violating 05.05 here # the ',' before the name was not supposed to be optional # +CMGL: 6,1,125 PAT_SMS_PDU_HEADER = re.compile( '(?P\d+),(?P\d +)(?:,"(?P[^"]*)")?,(?P\d+)' ) # modem violating 05.05 here: # the ',' before the name was not supposed to be optional # +CMGR: 1,155 PAT_SMS_PDU_HEADER_SINGLE = re.compile( '(?P\d +)(?:,"(?P[^"]*)")?,(?P\d+)' ) const.PAT_SMS_PDU_HEADER = PAT_SMS_PDU_HEADER const.PAT_SMS_PDU_HEADER_SINGLE = PAT_SMS_PDU_HEADER_SINGLE That should have the same effect as changing it in const.py, shouldn't it? If it doesn't work, then I will pull these constants up into the modem abstraction. > > > 2) this sms is without destination adress so sms.py makes an error. To > > avoid > > > this, I have patched sms.py with this : > > > --- sms.py.orig Sat Mar 14 15:43:25 2009 > > > +++ sms.py Mon Mar 16 13:17:16 2009 > > > @@ -157,7 +157,9 @@ > > > # XXX: Is this correct? Can we detect the @-padding issue in > > > # address_len? > > > address_len = 1 + (bytes[offset] + 1) / 2 > > > offset += 1 > > > -address = PDUAddress.decode( bytes[offset:offset+address_len] ) > > > +address = ""; > > > +if (address_len > 1): > > > +address = PDUAddress.decode( bytes[offset:offset+address_len] > > ) > > > return ( address, address_len + 1 ) > > > > > > def _parse_userdata( self, ud_len, bytes ): > > > > Excellent, thanks! > > > > When (if) you have time, could it be commit. Such that I can use the original > frameworkd ? If Daniel ACKs this change. then we can commit asap. -- :M: ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Am Dienstag, den 17.03.2009, 10:11 +0100 schrieb Alain2210: > Selon Michael 'Mickey' Lauer : > > > Hi, > > > > seems you have solved most problems already, I'm too slow again ;) > > too busy > > > > > > 1) I still need a modified version of mediator.py for freescale_neptune. > > > It > > is > > > quite the previous one : only timeout suppressed. I put it in attachment. > > > It is the diff1. > > > > I'm not sure this patch is right. +CPIN? works pretty well here on my > > A780 -- is that different on yours? > > On my E680, I get : > AT+CPIN? > +CME ERROR: 4 Uh oh, that sucks :/ This seems to be the first incarnation where there are differences among the Neptune Freescale baseband versions. Obviously there are, so we need to support both versions in one mediator by first trying if +CPIN is supported, and if not, falling back to the other way. > > Yes, I documented that wrongly. +CFUN=0/1 works fine on the Neptune, > > what it does not like though is unregistering, it completely locks for > > me in that case. > > > > I have never unregister. how do you do that ? gsmnetwork.Unregister() (which sends +COPS=2) > With the motorola soft, I often put the antenna off. Yeah, antenna on/off is no problem, unregistering is. > Last thing, I now that the other phonebook of E680 are not essential, > but I > would like to be able to access them with fso. Let me check whether they're present here as well (now that we found differences among the Neptune Freescale's baseband versions) and then I will add them. -- :M: ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Hello, Selon Michael 'Mickey' Lauer : . > > PAT_SMS_PDU_HEADER = re.compile( > > '(?P\d+),(?P\d+),(?:"(?P[^"]*)")?,(?P\d+)' ) > > Which gets overridden by the Neptune's mediator.py like that: > .. > PAT_SMS_PDU_HEADER_SINGLE = re.compile( '(?P\d > +)(?:,"(?P[^"]*)")?,(?P\d+)' ) > > const.PAT_SMS_PDU_HEADER = PAT_SMS_PDU_HEADER > const.PAT_SMS_PDU_HEADER_SINGLE = PAT_SMS_PDU_HEADER_SINGLE > > That should have the same effect as changing it in const.py, shouldn't > it? > > > If it doesn't work, then I will pull these constants up into the modem > abstraction. > Sorry, you are right. It works. Thanks, Alai ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Hello again, > > > I'm not sure this patch is right. +CPIN? works pretty well here on my > > > A780 -- is that different on yours? > > > > On my E680, I get : > > AT+CPIN? > > +CME ERROR: 4 > > Uh oh, that sucks :/ Yes I can confirm that I get the same bad answer, PIN given or not. > > This seems to be the first incarnation where there are differences among > the Neptune Freescale baseband versions. Obviously there are, so we need > to support both versions in one mediator by first trying if +CPIN is > supported, and if not, falling back to the other way. Yes. Sincerely, Alain ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
On Tue, 17 Mar 2009 12:51:09 +0100 Michael 'Mickey' Lauer wrote: > > > > 2) this sms is without destination adress so sms.py makes an > > > > error. To > > > avoid > > > > this, I have patched sms.py with this : > > > > --- sms.py.orig Sat Mar 14 15:43:25 2009 > > > > +++ sms.py Mon Mar 16 13:17:16 2009 > > > > @@ -157,7 +157,9 @@ > > > > # XXX: Is this correct? Can we detect the @-padding > > > > issue in # address_len? > > > > address_len = 1 + (bytes[offset] + 1) / 2 > > > > offset += 1 > > > > -address = > > > > PDUAddress.decode( bytes[offset:offset+address_len] ) > > > > +address = ""; > > > > +if (address_len > 1): > > > > +address = > > > > PDUAddress.decode( bytes[offset:offset+address_len] > > > ) > > > > return ( address, address_len + 1 ) > > > > > > > > def _parse_userdata( self, ud_len, bytes ): > > > > > > Excellent, thanks! > > > > > > > When (if) you have time, could it be commit. Such that I can use > > the original frameworkd ? > > If Daniel ACKs this change. then we can commit asap. Give me today to think about this and come up with a general solution. This will need to be changed in more places than this one or in the PDUAddress class. Regards, Daniel Willmann signature.asc Description: PGP signature ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
On Monday 16 March 2009 11:16:32 Alain2210 wrote: > I have test it again and found finally only SM,ON and FD, the last one is > emergency number. So I have patch mediator.py of freescale_neptune (diff2 > in attachment) and const.py of gsm folder. I put the two patch in > attachment. Thanks, applied this -- however as per the spec, FD is not emergency numbers, but "fixed dialling", which may just be pre-set to emergency number on your SIM. Cheers, -- :M: ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Selon Michael 'Mickey' Lauer : > On Monday 16 March 2009 11:16:32 Alain2210 wrote: > > I have test it again and found finally only SM,ON and FD, the last one is > > emergency number. So I have patch mediator.py of freescale_neptune (diff2 > > in attachment) and const.py of gsm folder. I put the two patch in > > attachment. > > Thanks, applied this -- however as per the spec, FD is not emergency numbers, > but "fixed dialling", which may just be pre-set to emergency number on your > SIM. Thanks a lot. I have also seen your work on CMSM. I have not tested it but it is a very good idea (I have found this information in my old logs, but was not undestanding it). Thanks. By the way, yesterday I tested the phone with fso and the recent ezx kernel (I usually use the old one, since it does not need to disconnect/reconnect usb and since it can shut the phone down without removing the battery). I have tested a voice call. I can hear the voice with the gsm but not with the fixed phone. Do you have already seen that ? (I have not made all the tests with arecord for exemple). Thanks, Alain ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
On Thursday 19 March 2009 12:18:05 Alain2210 wrote: > By the way, yesterday I tested the phone with fso and the recent ezx kernel > (I usually use the old one, since it does not need to disconnect/reconnect > usb and since it can shut the phone down without removing the battery). I > have tested a voice call. I can hear the voice with the gsm but not with > the fixed phone. Do you have already seen that ? (I have not made all the > tests with arecord for exemple). I think this is still a bug in the kernel. We need to open the sound device before switching to the BP alsa scenario. If the phone gets called, this happens automatically, since we play the ringtone. If the phone calls before someone calls the phone, then this initial opening has never happened. We can fix this easily in frameworkd as a band-aid, but I prefer it to be fixed in the kernel. -- :M: ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
On Thu, Mar 19, 2009 at 12:47 PM, Alain2210 wrote: > > I may have be unclear. I have made the test using alsamixer for accessing > at all > the configuration (I hope). And before calling the gsm with the fixed > phone, I > have test that aplay was abled to play music. But I have not tested the > recording. Then I have made the call and the gsm was echoing my voice > locally > but was not sending it to the fixed phone. The BP' dai should be selected *after* the call is started...did you? Try manually, maybe like described at http://wiki.openezx.org/Call but maybe i miss something? > > > My technic is not reliable. Moreover, I use the fso-light-image and the gsm > is > not ringing. > > (Of course there is still the suspend/resume problem : I have read the > mailing-lists and seen that there are divergent points of view) > > Thanks, > > alain > > ___ > Smartphones-userland mailing list > Smartphones-userland@linuxtogo.org > http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland > ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Hello, Selon Michael 'Mickey' Lauer : > On Thursday 19 March 2009 12:18:05 Alain2210 wrote: > > By the way, yesterday I tested the phone with fso and the recent ezx kernel > > (I usually use the old one, since it does not need to disconnect/reconnect > > usb and since it can shut the phone down without removing the battery). I > > have tested a voice call. I can hear the voice with the gsm but not with > > the fixed phone. Do you have already seen that ? (I have not made all the > > tests with arecord for exemple). > > I think this is still a bug in the kernel. We need to open the sound device > before switching to the BP alsa scenario. If the phone gets called, this > happens automatically, since we play the ringtone. If the phone calls before > someone calls the phone, then this initial opening has never happened. > > We can fix this easily in frameworkd as a band-aid, but I prefer it to be > fixed > in the kernel. > Thanks for the answer. I may have be unclear. I have made the test using alsamixer for accessing at all the configuration (I hope). And before calling the gsm with the fixed phone, I have test that aplay was abled to play music. But I have not tested the recording. Then I have made the call and the gsm was echoing my voice locally but was not sending it to the fixed phone. My technic is not reliable. Moreover, I use the fso-light-image and the gsm is not ringing. (Of course there is still the suspend/resume problem : I have read the mailing-lists and seen that there are divergent points of view) Thanks, alain ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Re: ogmsd: Ruggedized Parser
Hello, Selon "Fred ." : > On Thu, Mar 19, 2009 at 12:47 PM, Alain2210 wrote: > > > > > I may have be unclear. I have made the test using alsamixer for accessing > > at all > > the configuration (I hope). And before calling the gsm with the fixed > > phone, I > > have test that aplay was abled to play music. But I have not tested the > > recording. Then I have made the call and the gsm was echoing my voice > > locally > > but was not sending it to the fixed phone. > > > The BP' dai should be selected *after* the call is started...did you? > Try manually, maybe like described at http://wiki.openezx.org/Call but maybe > i miss something? This works now in both sense. I do not know why (I'm using FSO and Zhone) It there is two call one after one, the BP dai can stay selected. But arecord still does not work. It may be normal. Thanks, Alain ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland
Recording on ezx (Was: Re: ogmsd: Ruggedized Parser)
Hello, Selon Daniel Ribeiro : > Em Qui, 2009-03-19 Ã s 23:28 +0100, Alain2210 escreveu: > > But arecord still does not work. It may be normal. > > It works if you respect the hardware limitations and select the mono > DAI. (the stereo DAI cant capture). > > ie. 8000 or 16000 rate, 16bit mono. > Any other configuration will return EINVAL. > > For a quick test, you can simply: > cat /dev/dsp > /tmp/test > ^C > cat /tmp/test > /dev/dsp > > Dont forget to set the input gain level on alsamixer (IIRC F5 shows all > mixer controls). > > The recording is still very noisy, im not sure what is causing this. > I will look at it after i finish some other higher priority tasks. > Thanks a lot for the explanation. Yes it works with "cat /dev/dsp > /tmp/test" after having put the mixer on mono. By the way, I have succeded in using arecord with this command : arecord -D hw:0 -f S16_LE -t wav /tmp/test2.wav without the -D hw:0 I get ALSA lib pcm_dmix.c:947:(snd_pcm_dmix_open) The dmix plugin supports only playback stream it seems to be due to /etc/asound.conf : pcm.!default { type plug slave.pcm "dmix" } Thanks again, Alain ___ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland