>  > -----Original Message-----
>>  From: kannel [mailto:[EMAIL PROTECTED]]
>>  Sent: Saturday, March 09, 2002 8:30 AM
>>  To: [EMAIL PROTECTED]
>>  Subject: Daily patch: gateway
>
>>  Index: gateway/ChangeLog
>>  diff -u gateway/ChangeLog:1.1704 gateway/ChangeLog:1.1708
>>  --- gateway/ChangeLog:1.1704        Thu Mar  7 21:01:03 2002
>>  +++ gateway/ChangeLog       Fri Mar  8 22:28:36 2002
>>  @@ -1,3 +1,48 @@
>>  +2002-03-08 Andreas Fink <[EMAIL PROTECTED]>
>>  +    * gw/smsc_at2.c: fixed a bug for +CPIN which wasnt
>>  waiting for OK after
>>  +    +CPIN answer. This was screwing up AT command answers
>>  and Siemens TC35
>>  +    couldnt get initialized anymore.
>
>I don't think that this solution it correct - as some modems do not send
>an OK after +CPIN:READY, and AFAIR, the standard does not require it.

Its not a question if the standard requries it or not (I think it 
does). Its a question how the driver deals with it. the broken 
version did implement it as the result for the next command which is 
pretty bad.

>as
>the modem does not send an OK, wait_modem_command() will return a
>timeout, which  init_device() will parse as an error and therby fail the
>initialization.

Why did it always work before then?

>  this has been discussed before and that's the reason
>that the ret = 4 line was introduced. you can go around making patches
>that are known to break some implemenations just because it will make
>your implemenation work.

*grin* I wont comment that...

>I assert that both solutions are wrong and we need to come up with a
>third one. how about calling wait_modem_command() once after recieving
>+CPIN:READY if the modem is of a type that sends an OK after that
>message ? (or just call it anyway and discard the return value ? at most
>it will slow some modems' initialization by the call timeout).

no, the best way is to wait for +CPIN: READY and then wait for OK or 
timeout in 1-2 seconds and dont deal this missing ok as a error.


-- 

Andreas Fink
Fink-Consulting

------------------------------------------------------------------
Tel: +41-61-6932730 Fax: +41-61-6932729  Mobile: +41-79-2457333
Address: A. Fink, Schwarzwaldallee 16, 4058 Basel, Switzerland
E-Mail:  [EMAIL PROTECTED]  Homepage: http://www.finkconsulting.com
------------------------------------------------------------------
Something urgent? Try http://www.smsrelay.com/  Nickname afink

Reply via email to