Autodetct also is now broken for me. I don't know if it's because of the
last changes - I'm not working with auto-detection usually, but last
time I checked it (a few weeks back) it did work.
apparently detect_modem_type() opens the modem device but doesn't close
it, and when device_thread() attempts to open the device again (after
returning from detect_modem_type()) it fails and breaks.
the solution to call close_device() before leaving detect_modem_type()
works for me, and is trivial.

Cheers

Oded Arbel
m-Wise Inc.
[EMAIL PROTECTED]

--
We make a living by what we get,
But we make a life by what we give.
        -- Winston Churchill


> -----Original Message-----
> From: Oded Arbel 
> Sent: Tuesday, February 26, 2002 1:48 PM
> To: Kannel-devel (E-mail)
> Cc: Bruno David Rodrigues
> Subject: [PATCH] +CPIN: READY response parsed as time out
> 
> 
> > -----Original Message-----
> > From: kannel [mailto:[EMAIL PROTECTED]]
> > Subject: Daily patch: gateway
> > 
> > +2002-02-25  Bruno Rodrigues  <[EMAIL PROTECTED]>
> > +    * gw/smsc_at2.c: Changed a possible bug. On timeout, 
> > at2_wait_modem_command
> > +      returned -10, and every other line shows that it 
> should be -1;
> 
> after that patch, kannel stopped working for me (with wavecom modem).
> apparently after it recieved the +CPIN:READY response it 
> concluded that
> the device cannot be opened and shut the module down. 
> 
> tracking it down :
> this code in init_device()
>         ret = at2_send_modem_command(privdata, "AT+CPIN?", 0, 0);
>         if(ret == -1)
>           return -1;
> breaks out if timeout occured after the CPIN command.
> this code in wait_modem_command :
>            if (-1 != octstr_search(line, octstr_imm("+CPIN: 
> READY"), 0))
>            {
>               privdata->pin_ready = 1;
>               continue;
>          }
> will cause Kannel to return with a time out for a +CPIN: 
> READY response
> (no OK sent after that), and return -10 before the patch, which is ok
> with init_device. after the patch it will return -1 and so it 
> will break
> init_device.
> 
> attacehd it a patch that fixed the problem for me (I am going 
> to attach
> it, this time :-)
> 
> Cheers
> 
> Oded Arbel
> m-Wise Inc.
> [EMAIL PROTECTED]
> 
> --
> A committee takes root and grows, it flowers, wilts and dies, 
> scattering
> the seed from which other committees will bloom. 
>       -- Parkinson
> 
> 
> 

Reply via email to