This works for me with kernel ppp: http://archive.psg.com/gprs-vickers.txt
/Pete On 23. mai 2010, at 02.52, J.C. Roberts wrote: > On Sat, 22 May 2010 22:08:57 +0200 patrick kristensen > <kristensenpatri...@gmail.com> wrote: >> Thanks for taking the time to answer and your fast replies. >> > > Actually, ppp and TDMA/CDMA are nice break from the other headaches I've > been trying to solve. ;) > > First of all, you either haven't mentioned the name of your service > provider, or I forgot what it was. Either way, it matters. > > From what I can tell, you're in Spain, and I'm not familiar with the > providers there. > > Ted Roby recently posted his config for Virgin Mobile: > http://marc.info/?l=openbsd-tech&m=127285929411780&w=2 > > The above may not help, but it's nice to see working examples. > >> In absence of cdce (using ue0 as ethernet interface (and minicom) to >> connect to isp) i have tried several ppp and pppd configurations to >> get a working internet connection on -release with no success. >> >> The following is my ppp (# ppp -auto movistar) and pppd (# pppd call >> movistar) attempts. > > Since pppd(8) is in the kernel, it can be faster, but since ppp(8) is > in userland, it can be much easier to work with when figuring things > out. Once you figure out how to make things work with ppp(8), you can > easily write a new config for pppd(8). > > >> >> /etc/ppp/ppp.conf (appended to ppp.conf.sample) >> >> movistar: >> set device /dev/cuaU0 >> set speed 460800 >> set timeout 0 >> set dial "ABORT BUSY TIMEOUT 5 \ >> \"\" \ >> AT OK-AT-OK \ >> AT+CFUN=1 OK-AT-OK \ >> AT+CPIN? +CPIN:\\sREADY-AT+CPIN\\\"****"\\\"-OK \ > > The above looks wrong. Not all wireless service providers and not > all cellular wireless devices require using the Personal Identification > Number (PIN) when making a connection. And worse, the responses you > can get varies from device to device. (see below) > > Also, it is unwise to post your PIN to a public mailing list. It's not > too dangerous without the IMEI and MEID device, but it's still not a > good idea. > >> AT+CGDCONT=1,\\\"IP\\\",\\\"movistar.es\\\" OK \ > > The above is most likely wrong. The AT+CGDCONT= command sets the primary > CONText of the device and the network it is attaching to. The first > value argument states whether or not the device can be reconfigured (1), > or cannot be reconfigured (3). The second argument is a string which > defines the protocol used on the network. The third argument is also > a string and it defines the Packet Data Network (PDN) name or Access > Point Name (APN). > > As far as I know "movistar.es" is not the proper name of any Packet Data > Network (PDN) or Access Point Name (APN). For example Virgin Mobile uses > "VDATA" as the APN/PDN name, while AirTel uses "airtelgprs.com" as the name > and of course, what your provider uses is unknown. > > You need to be careful with this setting since many providers have multiple > data networks. With Verizon here in the silicon valley, I can choose from > three different data networks (actually four if you count EVDO Rel. 0 as a > different network than EVDO Rev. A). > >> "ATDT*99***1#" >> > > The above is wrong because it has no timeout or 'CONNECT'. Also, you should > have noticed the leading double quote (") which is prematurely ending > your chat script *BEFORE* the required number is dialed. The above should be: > > \\dATDT*99***1# TIMEOUT 30 CONNECT" > > The leading "\\d" gives a two second delay before calling. It may or may not > be necessary with your hardware/provider. > >> >> set mtu maximum 750 > > The above is most likely wrong. > >> resolv rewrite > > The above is often unnecessary to get things working, but rewriting > /etc/resolv.conf is mostly a matter of personal choice/needs. The > command you have below, namely `enable dns` should suffice. > >> set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0. >> add default HISADDR >> enable dns >> >> # ./. >> >> >> >> /var/log/ppp.log >> >> May 22 17:57:51 x200s ppp[8742]: Phase: Using interface: tun0 >> May 22 17:57:51 x200s ppp[8742]: Phase: deflink: Created in closed >> state May 22 17:57:51 x200s ppp[8742]: tun0: Command: default: set >> device /dev/cuaU0 May 22 17:57:51 x200s ppp[8742]: tun0: Command: >> default: set speed 460800 May 22 17:57:51 x200s ppp[8742]: tun0: >> Command: default: set dial ABORT BUSY ABORT NO\\sCARRIER TIMEOUT 5 "" >> AT OK-AT-OK ATE1Q0 OK \\dATDT\\T TIMEOUT 40 CONNECT >> May 22 17:57:51 x200s ppp[8742]: tun0: Command: movistar: set >> device /dev/cuaU0 May 22 17:57:51 x200s ppp[8742]: tun0: Command: >> movistar: set speed 460800 May 22 17:57:51 x200s ppp[8742]: tun0: >> Command: movistar: set timeout 0 May 22 17:57:51 x200s ppp[8742]: >> tun0: Command: movistar: set dial ABORT BUSY TIMEOUT 5 >> "" AT OK-AT-OK AT >> +CFUN=1 OK-AT-OK AT+CPIN? +CPIN:\\sREADY-AT+CPIN\\"7291\\"-OK AT >> +CGDCONT=1,\\"IP\\",\\"movistar.es\\" OK ATDT*99***1# May 22 17:57:51 >> x200s ppp[8742]: tun0: Command: movistar: set mtu maximum 750 May 22 >> 17:57:51 x200s ppp[8742]: tun0: Command: movistar: resolv rewrite May >> 22 17:57:51 x200s ppp[8742]: tun0: IPCP: Primary nameserver set to >> 255.255.255.255 May 22 17:57:51 x200s ppp[8742]: tun0: Command: >> movistar: set ifaddr 10.0.0.1/0 10.0.0.2/0 255.255.255.0 0.0.0.0. >> May 22 17:57:51 x200s ppp[8742]: tun0: Command: movistar: add default >> HISADDR May 22 17:57:51 x200s ppp[8742]: tun0: Command: movistar: >> enable dns May 22 17:57:51 x200s ppp[3315]: tun0: Phase: PPP Started >> (auto mode). May 22 17:57:51 x200s ppp[3315]: tun0: Phase: bundle: >> Establish May 22 17:57:51 x200s ppp[3315]: tun0: Phase: deflink: >> closed -> opening May 22 17:57:51 x200s ppp[3315]: tun0: Phase: >> deflink: Connected! May 22 17:57:51 x200s ppp[3315]: tun0: Phase: >> deflink: opening -> dial May 22 17:57:51 x200s ppp[3315]: tun0: Chat: >> deflink: Dial attempt 1 of 1 May 22 17:57:51 x200s ppp[3315]: tun0: >> Chat: Send: AT\^M May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Expect >> (5): OK May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Received: >> May 22 17:57:51 x200s last message repeated 2 times >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Received: \^M >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Received: \^M >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Received: AT\^M\^M >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Received: OK\^M >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Send: AT+CFUN=1\^M >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Expect(5): OK >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Received: AT+CFUN=1\^M\^M >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Received: OK\^M >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Send: AT+CPIN?\^M >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Expect(5): +CPIN: READY >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Received: AT+CPIN?\^M\^M >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Received: +CPIN: SIM PIN\^M >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Received: \^M >> May 22 17:57:51 x200s ppp[3315]: tun0: Chat: Received: OK\^M >> May 22 17:57:56 x200s ppp[3315]: tun0: Chat: Expect timeout >> May 22 17:57:56 x200s ppp[3315]: tun0: Chat: Send: AT+CPIN"****"\^M > > Yep. Here's (one of) your problem(s). Your chat script is telling ppp > to expect "+CPIN: READY" but the device is actually sending > you "+CPIN: SIM PIN" so you get the dreaded "Expect timeout" > > Your original chat line from above reads: >> AT+CPIN? +CPIN:\\sREADY-AT+CPIN\\\"****"\\\"-OK \ > > It should read something like this: >> AT+CPIN? +CPIN:\\sSIM\\sPIN-AT+CPIN\\\"****"\\\"-OK \ > > As mentioned above, I do not know whether or not sending your PIN to the > device/carrier is necessary to unlock the device/account. Sometimes it > is necessary, and sometimes it is not necessary. > >> May 22 17:57:56 x200s ppp[3315]: tun0: Phase: deflink: dial -> carrier >> May 22 17:57:57 x200s ppp[3315]: tun0: Phase: deflink: carrier -> login >> May 22 17:57:57 x200s ppp[3315]: tun0: Phase: deflink: login -> lcp >> May 22 17:57:57 x200s ppp[3315]: tun0: LCP: FSM: Using "deflink" as a transport >> May 22 17:57:57 x200s ppp[3315]: tun0: LCP: deflink: State change Initial --> Closed >> May 22 17:57:57 x200s ppp[3315]: tun0: LCP: deflink: State change Closed --> Stopped >> May 22 17:57:58 x200s ppp[3315]: tun0: LCP: deflink: LayerStart >> May 22 17:57:58 x200s ppp[3315]: tun0: LCP: deflink: SendConfigReq(1) state = Stopped >> May 22 17:57:58 x200s ppp[3315]: tun0: LCP: ACFCOMP[2] >> May 22 17:57:58 x200s ppp[3315]: tun0: LCP: PROTOCOMP[2] >> May 22 17:57:58 x200s ppp[3315]: tun0: LCP: ACCMAP[6] 0x00000000 >> May 22 17:57:58 x200s ppp[3315]: tun0: LCP: MRU[4] 1500 >> May 22 17:57:58 x200s ppp[3315]: tun0: LCP: MAGICNUM[6] 0x1081a7d5 >> May 22 17:57:58 x200s ppp[3315]: tun0: LCP: deflink: State change Stopped --> Req-Sent >> May 22 17:58:01 x200s ppp[3315]: tun0: LCP: deflink: SendConfigReq(1) state = Req-Sent > ... >> May 22 17:58:37 x200s ppp[3315]: tun0: Phase: Signal 15, terminate. >> May 22 17:58:37 x200s ppp[3315]: tun0: Phase: PPP Terminated (normal). > > The above made absolutely no sense to me until I realized you had an > extra double quote in your chat script which prevented it from dialing. > > jcr > > -- > The OpenBSD Journal - http://www.undeadly.org