Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GPRS/UMTS connection with new baselayout
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Tue Apr 14, 2009 12:16 pm    Post subject: GPRS/UMTS connection with new baselayout Reply with quote

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):
/etc/conf.d/net:
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:
/var/log/messages:
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:
/etc/conf.d/net.example:
# 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
_________________
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Tue Apr 14, 2009 6:09 pm    Post subject: Reply with quote

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):
Code:
# 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:
/var/log/messages:
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:
/etc/conf.d/net:
chat_ppp0=(
       "ABORT" "NO CARRIER"
        "" "AT"
        OK "AT+CGDCONT=1,\"IP\",\"ibox.tim.it\""
        OK "ATD*99#"
        CONNECT
)

and the result is this:
/var/log/messages:
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

8O
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...
_________________
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Back to top
View user's profile Send private message
lucapost
Veteran
Veteran


Joined: 24 Nov 2005
Posts: 1419
Location: <ud|me|ts> - Italy

PostPosted: Tue Apr 14, 2009 6:58 pm    Post subject: Reply with quote

Peach wrote:

I've successfully started the ppp connection using this one-line command (found somewhere in these forums):
Code:
# 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



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

Code:
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
}

_________________
LP
Back to top
View user's profile Send private message
mrness
Retired Dev
Retired Dev


Joined: 17 Feb 2004
Posts: 375
Location: bucharest.ro

PostPosted: Sat May 16, 2009 7:50 am    Post subject: Reply with quote

bash arrays are not supported by the new baselayout. For instance, your chat_ppp0 should look like this:
Code:
chat_ppp0="
 ABORT 'NO CARRIER'
'' AT
OK 'AT+CGDCONT=1,\\\"IP\\\",\\\"ibox.tim.it\\\"'
OK 'ATD*99#'
CONNECT ''
"
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Sat May 16, 2009 12:03 pm    Post subject: Reply with quote

mrness wrote:
bash arrays are not supported by the new baselayout. For instance, your chat_ppp0 should look like this:
Code:
chat_ppp0="
 ABORT 'NO CARRIER'
'' AT
OK 'AT+CGDCONT=1,\\\"IP\\\",\\\"ibox.tim.it\\\"'
OK 'ATD*99#'
CONNECT ''
"


that's good to know, I'll test it soon, thanks.
_________________
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Back to top
View user's profile Send private message
gerdesj
l33t
l33t


Joined: 29 Sep 2005
Posts: 622
Location: Yeovil, Somerset, UK

PostPosted: Sun May 17, 2009 11:13 pm    Post subject: Reply with quote

Peach wrote:
mrness wrote:
bash arrays are not supported by the new baselayout. For instance, your chat_ppp0 should look like this:
Code:
chat_ppp0="
 ABORT 'NO CARRIER'
'' AT
OK 'AT+CGDCONT=1,\\\"IP\\\",\\\"ibox.tim.it\\\"'
OK 'ATD*99#'
CONNECT ''
"


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


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
Back to top
View user's profile Send private message
Dagger
Retired Dev
Retired Dev


Joined: 11 Jun 2003
Posts: 765
Location: UK

PostPosted: Mon May 18, 2009 10:16 pm    Post subject: Reply with quote

NetworkManager 0.7 handles most gprs/umts stuff pretty well. Definitely less painful than manual config.
_________________
95% of all computer errors occur between chair and keyboard (TM)
Join the FSF as an Associate Member!
Post under CC license.
Back to top
View user's profile Send private message
Peach
Advocate
Advocate


Joined: 08 Mar 2003
Posts: 3686
Location: London, UK

PostPosted: Mon May 18, 2009 11:53 pm    Post subject: Reply with quote

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. :)
_________________
Gentoo user since 2004.
"It's all fun and games, until someone loses an eye" - mom
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum