pengfork-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Pengfork-devel] Modem AT replies


From: Jean-Charles Salzeber
Subject: Re: [Pengfork-devel] Modem AT replies
Date: Wed, 28 Aug 2002 01:24:31 +0200
User-agent: Mutt/1.5.1i

On Tue, Aug 27, 2002 at 23:18, Nicolas Burrus wrote:
> Here is a sample AT session with my ISDN modem :
> 
> send ATZ
> > ATZ\r\r\nOK\r\n
> 
> send AT&F
> > AT&F\r\r\nOK\r\n
> 
> It repeats the command given before OK.

Yes, the modem echo is activated, I have sometimes this problem with my
RTC modem too, specially when old pengaol has made the connection.
Have you try E0 on the first init string? (Echo off)

> 
> It  think yours does not behave like mine, because you expect an "Ok" as the 
> start of your modem answer in modem_send_command.
> 
> So modem_send_command is not appropriated to get answer back, maybe we should 
> use waitfor ("OK", ..) instead I think.

We shouldn't because we may have different handling of an OK, ERROR,
timeout, CONNECT, FAX, NO DIALTONE, ... so we have to know what the
modem answered, 'waitfor' is stupid and will wait for only one string.

> 
> I wait for your feedback before doing any changes as I'm not expert at all 
> with modem and serial stuff :)

Nobody is perfect! ;o)
I'm not an expert too...

So I've identified several case when this happens:
  * Line speed is set to 0
  * Old pengaol has made a connection (in this case a simple retry
should work)
  * Line speed is too high, try lowering it
  * cfmakeraw doesn't work on some undetermined case

On OpenBSD I've this problem too.

To be a bit more understable:
modem.c:370:
  t.c_lflag &= ~(ISIG | XCASE | ECHO);

So normally echo *IS* disabled
There is something wrong with the cfmakeraw:
modem.c:392
  cfmakeraw (&t);
  tcsetattr (fd, TCSANOW, &t);
  
try comment this lines and send feedback please.
In this case you may have some unpredictable result with data you
send/receive because data could be interpreted/transformed by the modem.

A good solution would be to make modem_send_command handle the response 
idependtly of the echo state.

When you are connected no matter what the echo state is, peng will
work normally (good news! (-: ).

Hope this help.

> 
> -- 
> Nicolas

JC

PS: Sorry for the delay, I'm currently not at full time on peng so be
indulgent please.

Attachment: pgpFmzI5HdcUS.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]