LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 01-21-2009, 05:23 AM   #1
Peter333
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Rep: Reputation: 0
Runnig chat separately from pppd


Hi,
I'd like to run chat separately from pppd. Normally it is called internally from pppd when "connect" parameter is used in pppd config file.
Chat is started with help of fork() in pppd source code and it seems that there is new process created with redirected input/output to /dev/ttyS0.
How can I start chat and how can I dedicate which port to use for modem connection in shell command line ?

Peter
 
Old 01-22-2009, 09:19 AM   #2
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,493

Rep: Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123
Quote:
Originally Posted by Peter333 View Post
Hi,
I'd like to run chat separately from pppd. Normally it is called internally from pppd when "connect" parameter is used in pppd config file.
Chat is started with help of fork() in pppd source code and it seems that there is new process created with redirected input/output to /dev/ttyS0.
How can I start chat and how can I dedicate which port to use for modem connection in shell command line ?

Peter
How about using minicom instead? Let's you talk directly to a serial/modem port, no PPP involved.
 
Old 01-23-2009, 02:20 AM   #3
Peter333
LQ Newbie
 
Registered: Jan 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Hi,

to use minicom is problem, because it must be functional in several different Linux distributions, chat is present in all of them, minicom not.
But I found temporary solution, I am using simple shell script which uses:
echo -e "AT+COMMAND>\r" > /dev/ttyS0
But it should be perfect to have something more inteligent for example chat, because it also investigates modem responses and returns success/fails on finishing.
If somebody is master of shell scripts, it should be great to know ho to do it
:-)


Peter
 
Old 01-23-2009, 09:13 AM   #4
TB0ne
LQ Guru
 
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,493

Rep: Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123Reputation: 8123
Quote:
Originally Posted by Peter333 View Post
Hi,

to use minicom is problem, because it must be functional in several different Linux distributions, chat is present in all of them, minicom not.
But I found temporary solution, I am using simple shell script which uses:
echo -e "AT+COMMAND>\r" > /dev/ttyS0
But it should be perfect to have something more inteligent for example chat, because it also investigates modem responses and returns success/fails on finishing.
If somebody is master of shell scripts, it should be great to know ho to do it
:-)


Peter
Well, minicom does run on any distro, although it may not be installed by default on all of them.

There may be scripts already written to do what you'd like, but it will be problematic for different systems, which sounds like what you're going for. If people have modems on different ports, or USB modems, all those will be different. Add to that folks who may have devices (printers? Console terminal?), plugged into serial ports, and burping out modem-check strings could cause bad things to happen.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
PPP library & pppd, chat return codes ruchika Linux - Networking 1 03-08-2011 03:50 AM
pppd/chat error after new slackware install Kanaflloric Slackware 3 09-28-2004 01:05 AM
Samba, GUI settings wrong, RedHat - W2K, smbclient runnig good, Nautils runnig bad samuel_burg Linux - Networking 1 06-23-2004 08:54 AM
pppd and chat problem Ricky Linux - Networking 1 10-02-2003 10:05 AM
Pppd does not wait for chat script to finish ruchika Programming 1 08-29-2003 12:30 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:41 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration