ppp scripts help
has anyone got /etc/ppp scipts for options , peers etc so that i can connect to the net using pppd with my huawei usb-modem e620
tried the way netbsd hanbook says but i get message "uhmodem0:usba_requested:STALLED" and then i get "connect script failed"
yeah done it all , i can connect my modem now but i cant get on the internet
it tells me "ping:cannot reslove "www.google.com"(host name lookup failure)"
sorry thats after i try to ping google.
its been racking my brain all day
How do you know the connection with modem is established?
Try to find out your ISP's IP addressess of DNS servers, or try to use some publicly available and try to ping again. You put those addresses in /etc/resolv.conf file, if it is not there create one. See resolv.conf(5) for more.
The best way to learn UNIX is to play with it, and the harder you play, the more you learn.
If you play hard enough, you'll break something for sure, and having to fix a badly broken system is arguably the fastest way of all to learn. -Michael Lucas, AbsoluteBSD
i've got a huawei usb-modem and when i run "pppd call vodafone" the blue light stays on intercating that i am connected to the net .i wouldnt have a clue about the ip's numbers, i,ve just used the same nameserver's in the resolv.conf as i do with my linux on my laptop
i'm with "vfinternet.au" which is vodafone australia
I'm guessing the blue light being on only means your modem is connected to the ISP modem, but the modem can't know if a proper PPP connection has been established (unless of course the remote side hangs up).
One place to look is in /var/log/messages for pppd(9)'s blow-by-blow account of things. Here's what mine looks like for a successful connection (I've munged the IP's):
May 16 11:11:44 throne pppd: pppd 2.4.4 started by root, uid 0 May 16 11:12:13 throne pppd: Serial connection established. May 16 11:12:13 throne pppd: Using interface ppp0 May 16 11:12:13 throne pppd: Connect: ppp0 <--> /dev/modem May 16 11:12:15 throne pppd: CHAP authentication succeeded: May 16 11:12:15 throne pppd: CHAP authentication succeeded May 16 11:12:15 throne pppd: local IP address xx.xx.xxx.xx May 16 11:12:15 throne pppd: remote IP address yyy.yy.yyy.yy May 16 11:12:15 throne pppd: primary DNS address nnn.n.n.nnn May 16 11:12:15 throne pppd: secondary DNS address mmm.m.mmm.mmm
Another thing to check is your ppp0 interface when you think you might be up and running; as root, do:
# ifconfig ppp0 ppp0: flags=8051<UP,POINTOPOINT,RUNNING,MULTICAST> mtu 1524 inet xx.xx.xxx.xx -> yyy.yy.yyy.yy netmask 0xff000000 inet6 fe80::250:baff:fe26:b0a3%ppp0 -> prefixlen 64 scopeid 0x3
# route show -inet Routing table Internet: Destination Gateway Flags default yyy.yy.yyy.yy UG loopback 127.0.0.1 UGR localhost 127.0.0.1 UH my.ip.name xx.xx.xxx.xx UH
As s0xxx said, check your /etc/resolv.conf carefully. Another thing to check, though it's probably OK by default, is your /etc/nsswitch.conf file. There should be a line that looks something like
hosts: files dns
i,ve been stuffing around with config files and now i cant get my modem to go LOL
when i run 'pppd call vodafone' i get now
"Serial connection established
Using interface ppp0
Connect: ppp0 <--> /dev/ttyU0
connection terminated "
so im assuming it is dialing out
So my first suggestion is to read everything relevant to authentication in the pppd(8) man page. Specifically how to authenticate yourself to the server. (The other way 'round is not needed which can be specified with the "noauth" option.)
Beyond that a few ideas:
* since you don't know if ISP supports only PAP or CHAP, so don't use either of "refuse-pap" or "refuse-chap".
* likewise make your pap-secrets and chap-secrets files the same ... symbolic link from one to the other will do.
* use the "user" parameter to pppd to tell it what to look up in the *-secrets file, e.g., "user firstname.lastname@example.org" or whatever it is.
* the *-secrets file needs to be owned by root, mode 600 and might contain something like this:
# Client Server Secret email@example.com * your_password
Good luck, and let us know how it goes.
SOLVED ppp script helps
thank IdOp for all your help
i came across this quick guide to seting it all up and yep heeeeeee it is all working
here is that guide :
Connecting to the Internet with UMTS on NetBSD
All you need is a laptop with cardbus slot (PCMCIA) and a datacard which is supported by NetBSD. The card will appear as an USB modem to the kernel. In my example I am using an Option N.V. MC3G (Vodafone Mobile Connect Card).
First of all you have to make sure the datacard is recognized by the kernel:
ohci0 at cardbus0 function 0: vendor 0x1045 product 0xc861 (rev. 0x10)
ohci0: OHCI version 1.0, legacy support
usb5 at ohci0: USB revision 1.0
uhub5 at usb5: vendor 0x1045 OHCI root hub, class 9/0, rev 1.00/1.00, addr 1
uhub5: 2 ports with 2 removable, self powered
ubsa0 at uhub5 port 1
ubsa0: Vodafone Vodafone Mobile Connect Card - 3G, rev 2.00/0.00, addr 2
ucom0 at ubsa0 portno 0
ucom0 means we have successfully attached a serial adapter. ugen0 would mean the card is not yet supported. The device can be accessed through /dev/ttyU0. For a test, we add the following line to /etc/remote to communicate with the modem:
Then connect to the modem as root and try some AT commands:
# tip ucom0
Manufacturer: Option Wireless Technology
Revision: 3.1.2 (Date: Mar 08 2004, Time: 11:54:30)
&C: 1; &D: 2; &F: 0; E: 1; I: 0; L: 0; M: 0; Q: 0; V: 1; X: 4; Z: 0;
S0: 0; S3: 13; S4: 10; S5: 8; S6: 2; S7: 50; S8: 2; S9: 6; S10: 14;
S11: 95; +ICF: 3,3; +IFC: 2,2; +IPR: 115200; +DR: 0; +DS: 0,0,2048,6;
+CBST: 7,0,1; +CHSN: 0,0,0,0; +CSCS: "IRA"; +CSTA: 129; +CR: 0; +CRC: 0;
+CMEE: 0; +CGDCONT: (1,"IP","web.vodafone.de",,0,0)
+CGEQREQ: (1,4,0,0,0,0,1,1500,"0E0","0E0",3,0,0); +CGEQMIN: ; +CGQREQ: ;
+CGQMIN: ; +CGEREP: 0,0; +CGCLASS: "A"; +CGSMS: 3; +CSMS: 0; +CMGF: 0;
+CSCA: "",; +CSMP: ,,0,0; +CSDH: 0; +FCLASS: 0; +FDD: 0; +FAR: 0;
+FCL: 0; +FIT: 0,0; +ES: ,,; +ESA: 0,,,,0,0,255,; +CRLP: 61,61,48,6;
+CPIN: ,; +CGATT: 1; +CGACT: (1,0),(2,0),(3,0); +CPBS: "SM";
+CPMS: "SM","SM","SM"; +CNMI: 0,0,0,0,0; +FTS: 0; +FRS: 0; +FTH: 3;
+FRH: 3; +FTM: 96; +FRM: 96; +CCUG: 0,0,0; +CUSD: 0; +CFUN: 1; +CREG: 0;
+CGREG: 0; +COPS: 0,0,"",3; +COLP: 0; +CLIP: 0; +CLIR: 0; +CLVL: 2;
+CHLD: ; +CTFR: "",; +CCWA: 0,3,7; +CPOL: 0,2,"",0,0,0; +STPD: 0,;
+STGC: 0; +STCR: 0,"","",""; +STMS: 0,0; +STTONE: 0,1,500; +STRT: 0;
_OPOS: 0,0; _OPSYS: 0,0; _OSBM: 4; _OSQI: 0; _OGCVI: 0; _OSSYS: 0;
_OSEC: 0; _OLT: 0; _OLOOP: 0,0
When you can talk to the modem as shown above you are nearly done. The card is fully supported and only some configuration is standing between you and a wireless internet connection. While at it you may want to disable the PIN on your SIM card. Otherwise you have to enter it every time the card is inserted or the system is rebooted. This can be a problem, because you can set the PIN only once. Afterwards this will produce an error. Type the following line while connected with the modem and replace "1234" with your valid PIN:
If you do not want to disable the PIN, you have to enter it with the command at+cpin="1234" now. In both cases it should take only a few seconds before the blinking of both LEDs changes into a blinking of either the green (GPRS) or the blue one (UMTS) alone. The signal quality can be checked with at+csq:
15 is a quite good value for UMTS. Possible levels are between 0 and 31. Now you should choose if you prefer UMTS or GPRS connections:
AT_OPSYS=0,2 GPRS only
AT_OPSYS=1,2 UMTS only
AT_OPSYS=2,2 Prefer GPRS
AT_OPSYS=3,2 Prefer UMTS
The provider is set with AT+CGDCONT, but it should already be preconfigured when receiving your SIM card. When missing, the configuration for Vodafone would be:
All the settings done above will be stored onto the SIM card, so we never have to bother about it again. Next step is the configuration of the internet access via PPP (point to point protocol)!
For the pppd daemon to work we have to provide a configuration and a chat script for our provider (Vodafone in this case). After activating pppd in /etc/rc.conf
the daemon will read its options from /etc/ppp/peers/vodafone. The directories /etc/ppp and /etc/ppp/peers probably have to be created first. Then I am using a config file like this:
connect "/usr/sbin/chat -v -f /etc/ppp/peers/vodafone.chat"
The provider doesn't have to authenticate itself.
Specifies the chat-script to use when connecting (see below).
The modem device to use.
Usual bps rate for UMTS.
Don't use modem control lines. Not required for UMTS.
Set the default route to this PPP connection, after it has been successfully established.
The provider supplies us with a local IP address during IPCP negotiation.
Query the provider for DNS addresses and create /etc/ppp/resolv.conf with it.
Diable Van Jacobsen header compression (Vodafone doesn't support it?).
User name for authentication.
Password for authentication.
Always try to reconnect, when the connection fails or is lost.
Never give up after failed connection attempts.
The chat-script (/etc/ppp/peers/vodafone.chat) is not much more than a simple dialing of *99***1#:
ABORT BUSY ABORT 'NO CARRIER' ABORT VOICE ABORT 'NO DIALTONE'
ABORT 'NO DIAL TONE' ABORT 'NO ANSWER' ABORT DELAYED
As soon as a connection to the provider was established successfully, we have a valid default route and a recent resolv.conf in /etc/ppp/. Now you could either use /etc/ppp/ip-up to copy resolv.conf or just create a link:
# cd /etc
# ln -s /etc/ppp/resolv.conf resolv.conf
That's all. Every time the system is booted you will be connected to the internet via UMTS, provided it is available. Now some fine tuning could be done. For example to delay pppd until /dev/ttyU0 is ready, or to allow LAN connections via DHCP, when you returned to your office.
Frank Wille, September 2008
|Thread||Thread Starter||Forum||Replies||Last Post|
|Can't load any scripts in ircII||guitarscn||General software and network||4||22nd November 2010 12:06 AM|
|DJB daemontools: compile and install scripts (OpenBSD)||J65nko||Guides||2||13th November 2009 10:57 AM|
|Executing web scripts : can't!||erehwon||OpenBSD General||3||3rd November 2009 10:02 PM|
|Windows scripts can't print||drhowarddrfine||Other OS||15||31st March 2009 09:53 AM|
|Periodic scripts for mail scripts||stukov||FreeBSD General||2||8th March 2009 07:51 PM|