How to write a PPP script to dial ISP with the telephone number and username.

Hi All,

  Once agian Its me. I have a LAPTOP with red hat LINUX installed, a GLOBETROTTER card to use as a MODEM for connecting internet via GSM connection and a SIM CARD from E-Plus.

Now I have a number to dial an ISP and also username (password is not needed for this ISP). can u suggest me how to write a ppp script (if u have code, please give me) for dialing an ISP with the number and username in redhat linux.

thanks in advance.
dineshb_2001Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
drelectroConnect With a Mentor Commented:
Looks like the other end is hanging up on you.

name eplus  
should be placed in the options file rather than the password file

eplus * word
Should be placed in /etc/ppp/pap-secrets
0
 
dineshb_2001Author Commented:
Well I tried to write a PPP script for dialing an ISP and here it looks like this.

 pppd -d connect 'chat -v -f /etc/ppp/chat-isp' /dev/ttyS1 115200 crtscts novj modem noipdefault defaultroute

and the contents of chat-isp file looks like this

 'ABORT' 'NO CARRIER'
 'ABORT' 'NO DIALTONE'
 'ABORT' 'ERROR'
 'ABORT' 'NO ANSWER'
 'ABORT' 'BUSY'
 'ABORT' 'USERNAME/PASSWORD Incorrect'

' '  'ATZ'
' '  'ATE1'
'OK'  'ATD+++++++'          (where ++++++ stands for phone number of ISP)
'CONNECT'  ' '
'name:'  'xxxx'                   (where xxxx stands for username and I don`t require password for this connection as ISP told me)



When I run this I can able to see in var/log/messages the errors

  alarm
  Failed
  Connect Script failed
  Exit.
 
Please help me out where I went wrong and please sugggest me what changes I have to do for running this correct.

reply as earliast as possible.
waiting for ur reply,
Dinesh.
 
0
 
drelectroCommented:
Remove the 'name:'  'xxxx' from the chat script

Instead modify /etc/ppp/options and /etc/ppp/pap-secrets or /etc/ppp/chap-secrets to include your username and password (blank).
See http://www.faqs.org/docs/Linux-HOWTO/PPP-HOWTO.html#PAP for details

0
Evaluating UTMs? Here's what you need to know!

Evaluating a UTM appliance and vendor can prove to be an overwhelming exercise.  How can you make sure that you're getting the security that your organization needs without breaking the bank? Check out our UTM Buyer's Guide for more information on what you should be looking for!

 
dineshb_2001Author Commented:
Thanks drelectro, I will try this tommorrow in the lab. If it works I will be happy to accept this as answer.

 bye.
0
 
dineshb_2001Author Commented:
Hi ,
 
 Instead of giving username in the chat script file I modified in /etc/ppp/options and /etc/ppp/pap-secrets.
And my etc/ppp/option file look like

   lock

and my /etc/ppp/ppp-secrets  look like

  name  eplus
  word


and I started the script like this

pppd -d connect 'chat -v -f /etc/ppp/chat-isp' /dev/ttyS1 115200 crtscts novj modem noipdefault defaultroute user eplus

but when I see in the var/log/messages I find the following and it is telling modem Hang,


localhost chat (3449):   ATD+49177123100   where + is number
localhost chat (3449):   CONNECT
localhost chat (3449):   -- got it
localhost chat (3449):   send (^M)
localhost pppd(3448):   Serial Connection established.
localhost pppd(3448):   Using interface ppp0
localhost pppd(3448):   connect: ppp0 <---> /dev/ttyS1
localhost /etc/hotplug/net.agent:   assuming ppp0 is already up´
localhost pppd(3448):   Hangup (SIGHUP)
localhost pppd(3448):   Modem hangup
localhost pppd(3448):   Connection terminated.
localhost /etc/hotplug/net.agent:   NET unregister event not supported
localhost : Exit


and sometimes it says

localhost chat (3501):   ATD+49177123100   where + is number
localhost chat (3501):   NO CARRIER
localhost chat (3501):   -- failed
localhost chat (3501):   Failed (NO CARRIER)
localhost pppd(3500):   Connect script failed
localhost pppd(3500):   Exit

Please help me how to rectify this problem. It`s urgent.

Dinesh.
0
 
dineshb_2001Author Commented:
Hi drelectro,
so nice of u ur replying to my quesitons.

your answer :

name eplus  
should be placed in the options file rather than the password file

+++++++++++

yeah tried this even but didn´t get the connection and let me know what is password file , is this the same  pap-secrets file.

your answer :

eplus * word
Should be placed in /etc/ppp/pap-secrets

++++++++++++++++

I understand what is eplus * , but why word , As I told you before that I don`t need to give password as I don`t have any to dial Eplus.

please rectify this problem, I wasted almost entier two days for this and didn`t succeded.

what if I do if the other end hangs me it means I don`t have  any possibility to make a connection.

And one more thing do u know the phonenumber, username and password to make GSM connection to vodafone(D2). please let me know if u know.

give me ur mail ID for further help.

Dinesh.
0
 
drelectroCommented:
Ah sorry, you're quite right you did mention that.

Try
eplus *


Yes by password file I mean pap-secrets or chap-secrets
0
 
dineshb_2001Author Commented:
Hi drelectro,

 I have done every possibility u told me , but didn`t succeeded and getting the same messages in var/log/messages. I don`t know where is the problem. Can u advice me what went wrong.

please help me out in this worst situation.

bye,
Dinesh.
0
 
dineshb_2001Author Commented:
Hi agian drelectro,

  I tried using the same scripts for dialing vodafone with D2 simcard and to my surprise it worked fine. May I know why it is not working with Eplus with Eplus simcard. i fail to understand what changes I have to do in order to work via Eplus.

script file contains for dialing :

pppd -d connect 'chat -v -f /etc/ppp/chat-isp' /dev/ttyS1 115200 crtscts novj modem noipdefault defaultroute user eplus

and the contents of chat-isp file looks like this

 'ABORT' 'NO CARRIER'
 'ABORT' 'NO DIALTONE'
 'ABORT' 'ERROR'
 'ABORT' 'NO ANSWER'
 'ABORT' 'BUSY'
 'ABORT' 'USERNAME/PASSWORD Incorrect'

' '  'ATZ'
' '  'ATE1'
'OK'  'ATD+++++++'          (where ++++++ stands for phone number of ISP)
'CONNECT'  ' '

And my etc/ppp/option file look like

   lock
   name eplus

and my /etc/ppp/ppp-secrets  look like

 eplus *

so please tell me why it is not working with Eplus but working fine with Vodafone.
0
 
drelectroCommented:
That's great news !!
Looks like vodafone don't care what username and passowrd you use.

Maybe we've got a little out of step.

is "eplus" the username you were given to use with the ISP that does not require a password?

Or is eplus the name of the service itself?

0
 
dineshb_2001Author Commented:
Hi drelectro,

eplus is the username I was given to use with the ISP that does not require a password. if u want to check , look at this link,

http://www.eplus.de/dienste/5/5_1_1/5_1_1_pop_print.asp

so please try to rectify my problem,

with regards,
Dinesh.

0
All Courses

From novice to tech pro — start learning today.