This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PPP Chat Script Enhancement???


Hi all,

File: ecos/packages/net/ppp/current/src/chat.c

When using the PPP Chat Scipt mechanism, there are at least two
situations where I need to know the the result code returned by the
modem. First I need the result of the ATI3 command so I can determine
my modem model, and secondly, I need to know the CONNECT prompt in
order to determine my connection speed.

Has anyone else had this problem or know how to get around it?

Is there already a solution available?

I have three proposals in mind:

1) Change the return value on the cyg_ppp_chat routine to be a char
pointer which would be a NULL on a failure such as timeout; otherwise 
it would contain the LAST result code recieved by the script. This
might break alot of existing code that currently looks for the boolean
return code.

2) Add the char pointer as an additional parameter which would return
the last result code or be NULL on a timeout failure.

3) If we want it to be smarter, possibly add an escape sequence in the
cyg_ppp_chat_send to handle knowing when to store the result code in
either of the places mention in proposals 1 and 2.

I'm concerned about the code following the comment:
    // Finally, wait for the serial device to drain
Would this mean my result code may not be received completely at
conclusion of the script?

Does anyone have additional suggestions?

Thanks for the help,
Robert Chenault
Hypercom Corp.


=====
...STAND FOR SOMETHING, OR YOU'LL FALL FOR EVERYTHING...

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]