# Starke Probleme mit Aufbau einer UMTS-Verbindung

## ConiKost

Moin!

Ich habe hier ein Thinkpad X200 Tablet mit einer eingebauten F3507g UMTS Karte.

Wird vom Kernel problemlos erkannt.

Die UMTS-Karte wird von mir manuel per AT+CFUN=1 aktiviert und ist dann Einsatzbereit.

Wenn ich eine UMTS-Verbindung via WVDIAL aufbaue, funktioniert das gut. Direkt beim Start steht dann eine Verbindung.

/etc/wvdial.conf

```

X200T / # cat /etc/wvdial.conf

[Dialer simyo]

Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

Modem Type = USB Modem

Phone = *99#

ISDN = 0

Username = eplus

Init1 = AT

Password = internet

Modem = /dev/ttyACM0

Baud = 460800

```

wvdial simyo

```

X200T / # wvdial simyo

--> WvDial: Internet dialer version 1.60

--> Cannot get information for serial port.

--> Initializing modem.

--> Sending: AT

AT

OK

--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

OK

--> Modem initialized.

--> Sending: ATDT*99#

--> Waiting for carrier.

ATDT*99#

~[7f]}#@!}!}!} }9}#}%B#}%}(}"}'}"}"}&} } } } }%}&};}][08]q>E~

CONNECT

--> Carrier detected.  Waiting for prompt.

~[7f]}#@!}!}"} }9}#}%B#}%}(}"}'}"}"}&} } } } }%}&};}][08]qr(~

--> PPP negotiation detected.

--> Starting pppd at Mon Mar  9 20:51:45 2009

--> Pid of pppd: 6325

--> pppd: [7f]

--> Using interface ppp0

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> Authentication (CHAP) started

--> pppd: [7f]

--> pppd: [7f]

--> Authentication (CHAP) successful

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> pppd: [7f]

--> local  IP address 10.129.136.150

--> pppd: [7f]

--> remote IP address 10.64.64.64

--> pppd: [7f]

--> primary   DNS address 212.23.97.2

--> pppd: [7f]

--> secondary DNS address 212.23.97.3

--> pppd: [7f]

--> pppd: [7f]

--> Script /etc/ppp/ip-up run successful

--> Default route Ok.

--> Nameserver (DNS) Ok.

--> Connected... Press Ctrl-C to disconnect

--> pppd: [7f]

```

Eine Verbindung steht und funktioniert. Jedoch würde ich sehr gerne auf wvdial verzichten und das ganze direkt mit den INIT-Scripts von Gentoo lösen.

Dazu habe ich folgendes eingetragen:

/etc/conf.d/net

```

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

config_eth0="dhcp"

config_ppp0="ppp"

username_ppp0="eplus"

password_ppp0="gprs"

#phone_number_ppp0="*99#"

link_ppp0="/dev/ttyACM0"

pppd_ppp0=(

        "updetach"

        "defaultroute"

        "usepeerdns"

        "noipdefault"

        "debug"

        "noauth"

        "asyncmap 0"

        "ipcp-accept-local"

        "ipcp-accept-remote"

        "modem crtscts"

        "user eplus"

        "password gprs"

)

chat_ppp0="

        '' 'AT+CGDCONT=1,"IP","internet.eplus.de","",0,0'

        '' 'ATDT*99***1#'

"

```

Nun starte ich die Verbindung:

```

X200T / # /etc/init.d/net.ppp0 start

* Bringing up interface ppp0

*   Starting pppd in ppp0...                                                                                                                           [ ok ]

*   received address 10.129.74.253

* WARNING: net.ppp0 has started, but is inactive

```

Jedoch ist die Verbindung NICHT geglückt. Sie war für maximal 1 Sekunde da. Der nun folgende Log zeigt, dass eine Verbindung erstellt worden ist, jedoch mir nicht ersichtlichen gründen, wurde wieder aufgelegt. WARUM?

```

X200T / # cat /var/log/ppp.log

Plugin passwordfd.so loaded.

Serial connection established.

using channel 11

Using interface ppp0

Connect: ppp0 <--> /dev/ttyACM0

rcvd [LCP ConfReq id=0x1 <auth chap MD5> <accomp> <pcomp> <asyncmap 0x0> <magic 0x6a125e7f>]

sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0x9eccd7aa> <pcomp> <accomp>]

sent [LCP ConfAck id=0x1 <auth chap MD5> <accomp> <pcomp> <asyncmap 0x0> <magic 0x6a125e7f>]

rcvd [LCP ConfReq id=0x2 <auth chap MD5> <accomp> <pcomp> <asyncmap 0x0> <magic 0x6a125e7f>]

sent [LCP ConfAck id=0x2 <auth chap MD5> <accomp> <pcomp> <asyncmap 0x0> <magic 0x6a125e7f>]

rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0x9eccd7aa> <pcomp> <accomp>]

rcvd [CHAP Challenge id=0x0 <0c556a5bf8d13637a40dc2d310090e2f3cc51a4b2841e627d47d72c34079be1f6c35ca3b58b1961704ed22b370e96e0f9ca57a2b88214607345dd2a3a0591e>, name = "Kermit"]

sent [CHAP Response id=0x0 <fa914b669b8fd15cfef0f9437f106ac2>, name = "eplus"]

rcvd [CHAP Success id=0x0 "Congratulations!"]

CHAP authentication succeeded: Congratulations!

CHAP authentication succeeded

sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]

rcvd [IPCP ConfReq id=0x1]

sent [IPCP ConfNak id=0x1 <addr 0.0.0.0>]

rcvd [IPCP ConfNak id=0x1 <addr 10.161.67.55> <ms-dns1 212.23.97.2> <ms-dns3 212.23.97.3>]

sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 10.161.67.55> <ms-dns1 212.23.97.2> <ms-dns3 212.23.97.3>]

rcvd [IPCP ConfReq id=0x2]

sent [IPCP ConfAck id=0x2]

rcvd [IPCP ConfAck id=0x2 <compress VJ 0f 01> <addr 10.161.67.55> <ms-dns1 212.23.97.2> <ms-dns3 212.23.97.3>]

Could not determine remote IP address: defaulting to 10.64.64.64

local  IP address 10.161.67.55

remote IP address 10.64.64.64

primary   DNS address 212.23.97.2

secondary DNS address 212.23.97.3

Script /etc/ppp/ip-up started (pid 9530)

Hangup (SIGHUP)

Modem hangup

Connect time 0.0 minutes.

Sent 0 bytes, received 0 bytes.

Connection terminated.

Script /etc/ppp/ip-up finished (pid 9530), status = 0x1

Script /etc/ppp/ip-down started (pid 9643)

Script /etc/ppp/ip-down finished (pid 9643), status = 0x0

Terminating on signal 15

```

Nach 60 Sekunden geht es weiter und es klappt.

```

Serial connection established.

using channel 14

Using interface ppp0

Connect: ppp0 <--> /dev/ttyACM0

rcvd [LCP ConfReq id=0x1 <auth chap MD5> <accomp> <pcomp> <asyncmap 0x0> <magic 0x573df4db>]

sent [LCP ConfReq id=0x4 <asyncmap 0x0> <magic 0x1cd9086b> <pcomp> <accomp>]

sent [LCP ConfAck id=0x1 <auth chap MD5> <accomp> <pcomp> <asyncmap 0x0> <magic 0x573df4db>]

rcvd [LCP ConfReq id=0x2 <auth chap MD5> <accomp> <pcomp> <asyncmap 0x0> <magic 0x573df4db>]

sent [LCP ConfAck id=0x2 <auth chap MD5> <accomp> <pcomp> <asyncmap 0x0> <magic 0x573df4db>]

rcvd [LCP ConfAck id=0x4 <asyncmap 0x0> <magic 0x1cd9086b> <pcomp> <accomp>]

rcvd [CHAP Challenge id=0x0 <4c95aa9b38117677e44d021350494e6f7c055a8b6881266714bdb20380b9fe5fac750a7b98f1d657442d62f3b029ae4fdce5ba6bc8618647749d12e3e0995e>, name = "Kermit"]

sent [CHAP Response id=0x0 <55fae4c791d1997a53eafe42dd46cd38>, name = "eplus"]

rcvd [CHAP Success id=0x0 "Congratulations!"]

CHAP authentication succeeded: Congratulations!

CHAP authentication succeeded

sent [IPCP ConfReq id=0x4 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns3 0.0.0.0>]

rcvd [IPCP ConfReq id=0x1]

sent [IPCP ConfNak id=0x1 <addr 0.0.0.0>]

rcvd [IPCP ConfNak id=0x4 <addr 10.161.143.177> <ms-dns1 212.23.97.2> <ms-dns3 212.23.97.3>]

sent [IPCP ConfReq id=0x5 <compress VJ 0f 01> <addr 10.161.143.177> <ms-dns1 212.23.97.2> <ms-dns3 212.23.97.3>]

rcvd [IPCP ConfReq id=0x2]

sent [IPCP ConfAck id=0x2]

rcvd [IPCP ConfAck id=0x5 <compress VJ 0f 01> <addr 10.161.143.177> <ms-dns1 212.23.97.2> <ms-dns3 212.23.97.3>]

Could not determine remote IP address: defaulting to 10.64.64.64

local  IP address 10.161.143.177

remote IP address 10.64.64.64

primary   DNS address 212.23.97.2

secondary DNS address 212.23.97.3

Script /etc/ppp/ip-up started (pid 10312)

Script /etc/ppp/ip-up finished (pid 10312), status = 0x0

```

emerge --info

```

X200T / # emerge --info

Portage 2.1.6.7 (default/linux/amd64/2008.0/server, gcc-4.3.3, glibc-2.9_p20081201-r2, 2.6.28-gentoo-r3 x86_64)

=================================================================

System uname: Linux-2.6.28-gentoo-r3-x86_64-Intel-R-_Core-TM-2_Duo_CPU_L9400_@_1.86GHz-with-gentoo-2.0.0

Timestamp of tree: Sun, 08 Mar 2009 22:15:02 +0000

ccache version 2.4 [disabled]

app-shells/bash:     3.2_p48-r1

dev-lang/python:     2.6.1

dev-util/ccache:     2.4-r8

sys-apps/baselayout: 2.0.0

sys-apps/openrc:     0.4.3-r1

sys-apps/sandbox:    1.4

sys-devel/autoconf:  2.63

sys-devel/automake:  1.4_p6, 1.10.2

sys-devel/binutils:  2.19.1

sys-devel/gcc-config: 1.4.1

sys-devel/libtool:   2.2.6a

virtual/os-headers:  2.6.28-r1

ACCEPT_KEYWORDS="amd64 ~amd64"

CBUILD="x86_64-pc-linux-gnu"

CFLAGS="-march=core2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -pipe -fomit-frame-pointer -mfpmath=sse"

CHOST="x86_64-pc-linux-gnu"

CONFIG_PROTECT="/etc"

CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo /etc/udev/rules.d"

CXXFLAGS="-march=core2 -mmmx -msse -msse2 -msse3 -mssse3 -msse4.1 -O3 -pipe -fomit-frame-pointer -mfpmath=sse"

DISTDIR="/usr/portage/distfiles"

FEATURES="distlocks fixpackages parallel-fetch protect-owned sandbox sfperms strict unmerge-orphans userfetch"

GENTOO_MIRRORS="ftp://de-mirror.org/distro/gentoo"

LANG="de_DE.UTF-8"

LC_ALL="de_DE.UTF-8"

LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,-z,now"

LINGUAS="de"

PKGDIR="/usr/portage/packages"

PORTAGE_COMPRESS="gzip"

PORTAGE_COMPRESS_FLAGS="-f9"

PORTAGE_CONFIGROOT="/"

PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"

PORTAGE_TMPDIR="/var/tmp"

PORTDIR="/usr/portage"

PORTDIR_OVERLAY="/usr/local/portage"

SYNC="rsync://rsync.de.gentoo.org/gentoo-portage"

USE="amd64 bzip2 ftp gpm iconv ipv6 javascript multilib ncurses nls pam readline slang ssl symlink tcpd threads unicode zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" ELIBC="glibc" INPUT_DEVICES="evdev keyboard mouse wacom" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="de" USERLAND="GNU" VIDEO_CARDS="intel vesa"

Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, MAKEOPTS, PORTAGE_RSYNC_EXTRA_OPTS

```

Wenn ich nun die Verbindung weiterhin laufen lasse, etwa 60 Sekunden, dann versucht PPP erneut eine Verbindung aufzubauen. Diese glückt! nun und bleibt bestehen. Funktioniert also. Warum jedoch erst beim Zweiten Mal? Was kann ich dagegen tun? Bitte um Hilfe  :Smile: 

----------

## R.Aven

Ich nutze meinen UMTS-Stick seit nunmehr einem halben Jahr ohne weitere Probleme mit folgender Konfiguration:

```
# cat /etc/conf.d/net

# UMTS mobile device 

config_ppp0=( "ppp" )

link_ppp0="/dev/ttyUSB0"

pppd_ppp0=(

        "maxfail 25"

        "noauth"

        "defaultroute"

        "usepeerdns"

        "noipdefault"

        "novj"

        "nobsdcomp"

        "noccp"

        "debug"

        "lock"

        "460800"

        "modem"

   "crtscts"

   "user irrelevant"

   "password irrelevant"

   "connect '/usr/sbin/chat -f /etc/ppp/chat-E220-nopin'"

)
```

```
# cat /etc/ppp/chat-E220-nopin

  ABORT BUSY

  ABORT ERROR

  ABORT 'NO CARRIER'

  REPORT CONNECT

  TIMEOUT 10

  "" "ATZ"

  OK AT+CGDCONT=1,"ip","internet.t-mobile"

  OK "ATE1V1&D2&C1S0=0+IFC=2,2"

  OK "AT+IPR=115200"

  OK "ATE1"

  TIMEOUT 60

  "" "ATD*99***1#"

  CONNECT \c

```

Evtl sind dir diese Informationen von Nutze. "internet.t-mobile" muss in der zweiten Konfiguration in deinem Fall noch durch "internet.eplus.de" abgeändert werden.

EDIT: Da die entsprechende Gentoo-Wiki Seite noch immer nicht übernommen wurde, hier eine kurze Übersicht der Konfiguration ohne Init-Script: http://lostinterabytes.blogspot.com/2007/09/gentoo-huawei-e220-hsdpa-usb-modem.html

----------

## ConiKost

Hi!

Ich danke für deine Antwort. Leider hilft es ebenso wenig :/

Wenn ich die Gentoo Scripte nutzt, trennt der einfach nach dem Verbindungsaufbau sofort die Leitung wieder.

Wenn ich jedoch manuell von der Konsole aus pppd starte, bleibt die Verbindung und rennt.

Kann es sein, dass hier OpenRC irgendwelchen Mist baut?

----------

