Solved

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

Posted on 2004-10-13
11
834 Views
Last Modified: 2013-12-09
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.
0
Comment
Question by:dineshb_2001
  • 7
  • 4
11 Comments
 

Author Comment

by:dineshb_2001
ID: 12297360
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
 
LVL 5

Expert Comment

by:drelectro
ID: 12303089
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
 

Author Comment

by:dineshb_2001
ID: 12303118
Thanks drelectro, I will try this tommorrow in the lab. If it works I will be happy to accept this as answer.

 bye.
0
 

Author Comment

by:dineshb_2001
ID: 12306942
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
 
LVL 5

Accepted Solution

by:
drelectro earned 500 total points
ID: 12312728
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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:dineshb_2001
ID: 12312886
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
 
LVL 5

Expert Comment

by:drelectro
ID: 12313022
Ah sorry, you're quite right you did mention that.

Try
eplus *


Yes by password file I mean pap-secrets or chap-secrets
0
 

Author Comment

by:dineshb_2001
ID: 12317375
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
 

Author Comment

by:dineshb_2001
ID: 12318143
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
 
LVL 5

Expert Comment

by:drelectro
ID: 12324480
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
 

Author Comment

by:dineshb_2001
ID: 12324618
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

Featured Post

Network it in WD Red

There's an industry-leading WD Red drive for every compatible NAS system to help fulfill your data storage needs. With drives up to 8TB, WD Red offers a wide array of solutions for customers looking to build the biggest, best-performing NAS storage solution.  

Join & Write a Comment

Today sees the launch of a new case study, focusing on BYOD technologies we have been working with for some time now.  But with the advent of 802.11ac wireless technologies and the story behind our landmark developments, we would like to share this …
For Sennheiser, comfort, quality and security are high priority areas. This paper addresses the security of Bluetooth technology and the supplementary security that Sennheiser’s Contact Center and Office (CC&O) headsets provide.  
This Micro Tutorial will show you how to maximize your wireless card to its maximum capability. This will be demonstrated using Intel(R) Centrino(R) Wireless-N 2230 wireless card on Windows 8 operating system.
Viewers will learn how to connect to a wireless network using the network security key. They will also learn how to access the IP address and DNS server for connections that must be done manually. After setting up a router, find the network security…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now