# GPRS/UMTS connection with new baselayout

## Peach

Hello all, I'm getting some troubles trying to configure the net script for my gprs/umts connection.

First of all I'm using a Nokia 6680 as a bluetooth modem and I had no problems to rfcomm connect to it manually and such, so there's nothing wrong on that side.

the real problem here is that I found this guide on gentoo-wiki and after finding that in the scripts there were some errors, I came to this configuration, which should be more or less ok (even net.example reports it):

```
config_ppp0=( "ppp" )

link_ppp0="/dev/rfcomm0"

phone_number_ppp0=( "*99#" )

username_ppp0=''

password_ppp0=

pppd_ppp0=(

       "maxfail 10"

       "debug"

       "noauth"

       "defaultroute"

       "usepeerdns"

#       "demand"

       "ipcp-accept-remote"

       "ipcp-accept-local"

       "holdoff 3"

       "lcp-echo-interval 5"

       "lcp-echo-failure 12"

       "noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp"

       "lock"

       "912600"

       "nocrtscts"

       "noipdefault"

)

chat_ppp0=(

      'ABORT' 'BUSY'

      'ABORT' 'ERROR'

      'ABORT' 'NO ANSWER'

      'ABORT' 'NO CARRIER'

      'ABORT' 'NO DIALTONE'

      'ABORT' 'Invalid Login'

      'ABORT' 'Login incorrect'

      'TIMEOUT' '5'

      '' 'ATZ'

      'OK' 'AT+CGDCONT=1,"IP","ibox.tim.it",,0,0'

      'OK' 'ATDT\T'

      'TIMEOUT' '60'

      'CONNECT' ''

      'TIMEOUT' '5'

      '~--' ''

)
```

but with this configuration the pppd daemon seems not to contact the modem ending with this few lines in the logs:

```
pppd[3951]: speed 912600 not supported

chat[4041]: abort on (BUSY)

chat[4041]: abort on (ERROR)

chat[4041]: abort on (NO)

chat[4041]: expect (ANSWER)

chat[4041]: alarm

chat[4041]: Failed

pppd[3951]: Connect script failed
```

I even found that net.example reports also this:

```
# Here you should specify what pppd plugins you want to use

# Available plugins are: pppoe, pppoa, capi, dhcpc, minconn, radius,

#          radattr, radrealms and winbind 

plugins_ppp0=(

   "pppoe"

   "pppoa vc-encaps"

   "capi"

)
```

but I have no idea if and which plugins I should enable to make the connection work.

If anyone can help me would be great.

Thanks for your time

----------

## Peach

There's something nasty going on with this baselayout.

I've successfully started the ppp connection using this one-line command (found somewhere in these forums):

```
# pppd connect '/usr/sbin/chat -v ABORT "NO CARRIER" "" "AT" OK "AT+CGDCONT=1,\"IP\",\"ibox.tim.it\"" OK "ATDT*99#" CONNECT' /dev/rfcomm0 115200 defaultroute crtscts noauth deflate 0 asyncmap 0 mtu 1500 mru 1500 noipdefault idle 600
```

and the log reports this:

```
pppd[12056]: pppd 2.4.4 started by root, uid 0

hcid[27548]: link_key_request (sba=00:0A:3A:63:21:B7, dba=00:12:62:A8:12:FE)

chat[12064]: abort on (NO CARRIER)

chat[12064]: send (AT^M)

chat[12064]: expect (OK)

chat[12064]: AT^M^M

chat[12064]: OK

chat[12064]:  -- got it

chat[12064]: send (AT+CGDCONT=1,"IP","ibox.tim.it"^M)

chat[12064]: expect (OK)

chat[12064]: ^M

chat[12064]: AT+CGDCONT=1,"IP","ibox.tim.it"^M^M

chat[12064]: OK

chat[12064]:  -- got it

chat[12064]: send (ATDT*99#^M)

chat[12064]: expect (CONNECT)

chat[12064]: ^M

pppd[12056]: Serial connection established.

chat[12064]: ATDT*99#^M^M

chat[12064]: CONNECT

chat[12064]:  -- got it

pppd[12056]: Using interface ppp0

pppd[12056]: Connect: ppp0 <--> /dev/rfcomm0
```

so I tried to modify my net script to mimic the same chat commands:

```
chat_ppp0=(

       "ABORT" "NO CARRIER"

        "" "AT"

        OK "AT+CGDCONT=1,\"IP\",\"ibox.tim.it\""

        OK "ATD*99#"

        CONNECT

)
```

and the result is this:

```
pppd[6278]: pppd 2.4.4 started by root, uid 0

/etc/init.d/net.ppp0[4898]: WARNING: net.ppp0 has started, but is inactive

hcid[27548]: link_key_request (sba=00:0A:3A:63:21:B7, dba=00:12:62:A8:12:FE)

chat[6287]: abort on (NO)

chat[6287]: expect (CARRIER)

chat[6287]: alarm

chat[6287]: Failed

pppd[6278]: Connect script failed
```

 :Shocked: 

seems like it doesen't interpret quoted strings with spaces

am I unaware of something?

I think I'll report a bug in this case...

----------

## lucapost

 *Peach wrote:*   

> 
> 
> I've successfully started the ppp connection using this one-line command (found somewhere in these forums):
> 
> ```
> ...

 

A temporary solution is include in your /etc/conf.d/net the lines like:

```
preup_ppp0(){ 

     pppd connect '/usr/sbin/chat -v ABORT "NO CARRIER" "" "AT" OK "AT+CGDCONT=1,\"IP\",\"ibox.tim.it\"" OK "ATDT*99#" CONNECT' /dev/rfcomm0 115200 defaultroute crtscts noauth deflate 0 asyncmap 0 mtu 1500 mru 1500 noipdefault idle 600

}"

postdown_ppp0(){

     killall pppd

}
```

----------

## mrness

bash arrays are not supported by the new baselayout. For instance, your chat_ppp0 should look like this:

```
chat_ppp0="

 ABORT 'NO CARRIER'

'' AT

OK 'AT+CGDCONT=1,\\\"IP\\\",\\\"ibox.tim.it\\\"'

OK 'ATD*99#'

CONNECT ''

"
```

----------

## Peach

 *mrness wrote:*   

> bash arrays are not supported by the new baselayout. For instance, your chat_ppp0 should look like this:
> 
> ```
> chat_ppp0="
> 
> ...

 

that's good to know, I'll test it soon, thanks.

----------

## gerdesj

 *Peach wrote:*   

>  *mrness wrote:*   bash arrays are not supported by the new baselayout. For instance, your chat_ppp0 should look like this:
> 
> ```
> chat_ppp0="
> 
> ...

 

If it works, please feel free to update my page on the wiki.  Alternativly post back here and I'll give it a going over.  It is a little old now.

To be honest I thought it (the page) had gone to bit heaven when the wiki had a few slight problems a while back. 

Cheers

Jon

----------

## Dagger

NetworkManager 0.7 handles most gprs/umts stuff pretty well. Definitely less painful than manual config.

----------

## Peach

 *Dagger wrote:*   

> NetworkManager 0.7 handles most gprs/umts stuff pretty well. Definitely less painful than manual config.

 

sorry, networkmanager is not a solution to the problem. 

this is a gentoo-related problem (openrc to be more precise).

thanks anyway.  :Smile: 

----------

