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: Nicolas Burrus
Subject: Re: [Pengfork-devel] Modem AT replies
Date: Wed, 28 Aug 2002 23:39:18 +0200
User-agent: KMail/1.4.3

On Wednesday 28 August 2002 01:24, Jean-Charles Salzeber wrote:
> 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)

Yes, and my results are quite strange, if I send ATE0 as first command, the 
echo reply for next command is disabled, and then it comes back.

> > 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.

'k

> > 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.

I've tried all this stuff and many more, I've looked at ppp sources, and 
impossible to get rid of this fu**** echo ! :) When pengaol runs, it has 
echo, but as it does a waitfor("OK"), there is no problem.

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

I've commited a fix for that, but we shouldn't forget the real solution is to 
avoid ECHO for all modems I think.

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

I got some AOL packets, and the loop seems to go quite fine, I'll watch this 
in more details tomorrow.

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

No pb, and please excuse me too, next week I won't do anything or very few 
things.

-- 
Nicolas




reply via email to

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