LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Having difficulties to connect to the internet with a USB-UMTS-Modem (https://www.linuxquestions.org/questions/slackware-14/having-difficulties-to-connect-to-the-internet-with-a-usb-umts-modem-4175420175/)

markush 08-05-2012 05:39 AM

1 Attachment(s)
A connection is established. This seems not to be the problem. It is shown with ifconfig as ppp0.

I cannot ping 8.8.8.8, at first I supposed that is due to filtering icmp packages by the provider. But this is not the case. When I have a connection here with Windows I can ping 8.8.8.8

So I think either the connection does not work or I have a firewall working (but didn't configure one).

Here the ouput of "pppd call umts debug nodetach"
Code:

thinkpad:~# pppd call umts debug nodetach
AT
OKScript /usr/sbin/chat -V -f /etc/ppp/umts.chat finished (pid 2580), status = 0x0
Serial connection established.
using channel 5
Using interface ppp0
Connect: ppp0 <--> /dev/ttyUSB0
sent [LCP ConfReq id=0x1 <asyncmap 0x0> <magic 0xa07f3b8e> <pcomp> <accomp>]
rcvd [LCP ConfReq id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x10d283f> <pcomp> <accomp>]
sent [LCP ConfAck id=0x0 <asyncmap 0x0> <auth chap MD5> <magic 0x10d283f> <pcomp> <accomp>]
rcvd [LCP ConfAck id=0x1 <asyncmap 0x0> <magic 0xa07f3b8e> <pcomp> <accomp>]
rcvd [LCP DiscReq id=0x1 magic=0x10d283f]
rcvd [CHAP Challenge id=0x1 <b48fc727d286ab9e6096200f62807024>, name = "UMTS_CHAP_SRVR"]
sent [CHAP Response id=0x1 <c55e659e9fbaa207eed69c3d34da28d8>, name = "eplus"]
rcvd [CHAP Success id=0x1 ""]
CHAP authentication succeeded
CHAP authentication succeeded
sent [CCP ConfReq id=0x1 <deflate 15> <deflate(old#) 15> <bsd v1 15>]
sent [IPCP ConfReq id=0x1 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 0.0.0.0> <ms-dns2 0.0.0.0>]
rcvd [LCP ProtRej id=0x2 80 fd 01 01 00 0f 1a 04 78 00 18 04 78 00 15 03 2f]
Protocol-Reject for 'Compression Control Protocol' (0x80fd) received
rcvd [IPCP ConfNak id=0x1 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x2 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
rcvd [IPCP ConfNak id=0x2 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x3 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
rcvd [IPCP ConfNak id=0x3 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x4 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
rcvd [IPCP ConfNak id=0x4 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x5 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
rcvd [IPCP ConfNak id=0x5 <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x6 <compress VJ 0f 01> <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
rcvd [IPCP ConfReq id=0x0]
sent [IPCP ConfNak id=0x0 <addr 0.0.0.0>]
rcvd [IPCP ConfRej id=0x6 <compress VJ 0f 01> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x7 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14>]
rcvd [IPCP ConfReq id=0x1]
sent [IPCP ConfAck id=0x1]
rcvd [IPCP ConfNak id=0x7 <addr 10.168.199.189> <ms-dns1 212.23.97.2> <ms-dns2 212.23.97.3>]
sent [IPCP ConfReq id=0x8 <addr 10.168.199.189> <ms-dns1 212.23.97.2> <ms-dns2 212.23.97.3>]
rcvd [IPCP ConfAck id=0x8 <addr 10.168.199.189> <ms-dns1 212.23.97.2> <ms-dns2 212.23.97.3>]
Could not determine remote IP address: defaulting to 10.64.64.64
local  IP address 10.168.199.189
remote IP address 10.64.64.64
primary  DNS address 212.23.97.2
secondary DNS address 212.23.97.3

I'll append the output of tcpdump to this posting, hopefully someone has an idea.

When I try to access a website, it seems that nameresolution works, but the browser times out after a while.

Markus

allend 08-05-2012 09:56 AM

Your last post shows that you have made a successful connection. The problems you describe suggest a problem with DNS. What is the content of /etc/resolv.conf after the connection is made? Can you ping the DNS servers at 212.23.97.2 and 212.23.97.3?

markush 08-05-2012 11:13 AM

Hello allend,

no I cannot ping any IP-adress, I don't think that it is a DNS-Problem, because when I ping a name, the IP-adress of the host is shown, maybe they are in the DNS-cache, but I did ping adresses which I did not visit since several month and had an IP-adress although. So my idea is that DNS works, but routing does not work.

I found an example routingtable for a ppp-connection in a network-book, I'll try that out.

Anyway, thanks for your help, any suggestions are appreciated.

Markus

Gerard Lally 08-05-2012 01:03 PM

Quote:

Originally Posted by markush (Post 4746490)
... any suggestions are appreciated.

Have you tried sakis3g ?

markush 08-05-2012 02:41 PM

sakis3g does not work. It tries to use wvdial and crashes then, as I wrote earlier wvdial has a bug and exits.

The problem seems to be that I have the correct settings, but sometimes I don't have enough signalstrength in order to receive a correct configuration.
And when I have a connection, I suppose I have a routing-problem.

Markus

ponce 08-09-2012 02:40 PM

I've added some compiler flags to wvstreams that should avoid the crash, I suggest you to try the new build script

http://cgit.ponce.cc/slackbuilds/commit/?h=wvstreams

markush 08-09-2012 04:02 PM

Thanks ponce, I'll try that tomorrow.

I've read much about GSM and PPP recently, I don't have a solution yet, but it seems that the newsgroup comp.protocols.ppp is very valuable regarding to this.

Markus

Bourbon 08-09-2012 09:33 PM

Ciao Markus,

I don't know if can be useful for you, but if you like read this one:
http://www.linuxquestions.org/questi...3-37-a-943335/

markush 08-10-2012 12:15 AM

Hi Bourbon,

I didn't read this thread but I'll read it carefully. My problem with sakis3g was that it uses wvdial which yet does not work correctly with Slackware-current (32bit and 64bit as well). I will at first have to rebuild wvstreams with the patches ponce posted above and then rebuild wvdial.

But thanks for your help anyway.

Markus

san 08-10-2012 02:25 AM

i believe that this really is a routing issue, although the output of "/sbin/route" that you posted looks quite similar to mine (except that i have a lo interface set up). wvdial as well as sakis3g will just run pppd sooner or later.

looking at the sakis3g script, there are at least two snippets which might interest you:
firstly the pppd-options:

Code:

    pppdoptions="${PPPD_OPTIONS}"
    [ "a${pppdoptions}" = "a" ] && pppdoptions="modem crtscts -detach defaultroute dump noipdefault usepeerdns usehostname ktune logfd 2 noauth name  sakis3g lock maxfail 3"
    if [ "a${PPPD_PEERS}" != "a" ]; then
        if [ -d "${PPPD_PEERS}" ]; then
            if [ -f "${PPPD_PEERS}/sakis3g" ]; then
                debug "Found peers file %s.\n" "${PPPD_PEERS}/sakis3g"
                pppdoptions="-detach dump logfd 2 name sakis3gpeer maxfail 3 call sakis3g"
            fi
        fi
    fi

you might try to pass these to pppd

and secondly the post-connection stuff, especially this one:
Code:

routing_fix() {
    ! find_binary "netstat" && return 1
    ! find_binary "route" && return 1
    need_arg "pppint"
    hostpeer=`${netstatbin} -rn | ${grepbin} " ${pppint}$" | ${grepbin} -v "^0.0.0.0 " | ${cutbin} -d\  -f1`
    if [ "a${hostpeer}" != "a" ]; then
        routing_delete_gateways
        debug run_command "${routebin} add default gw ${hostpeer}"
        debug "Added correct default gateway: %s.\n" "${hostpeer}"
        debug run_command "${netstatbin} -rn"
    fi
    unset hostpeer
    return 0
}

evidently, sakis3g will just run
Code:

route add default gw 10.64.64.64
to fix routing issues.

vdemuth 08-10-2012 02:28 AM

Been following this since my earlier suggestions, and apologies if they have not worked. Anyhow, I have been trying to figure out what might be happening (or not) and I have no idea if this is related or not, but running 64-current, I too am unable to connect with my Huwaei 3g Modem, but, using the same modem on the 32 bit edition, I have no problem at all.
Can't for the life of me figure out why. Is it possible that the hardware itself will only work under a 32bit environment?

markush 08-10-2012 02:50 AM

Quote:

Originally Posted by vdemuth (Post 4750631)
...
... I have no idea if this is related or not, but running 64-current, I too am unable to connect with my Huwaei 3g Modem, but, using the same modem on the 32 bit edition, I have no problem at all.
Can't for the life of me figure out why. Is it possible that the hardware itself will only work under a 32bit environment?

I have a Subnotebook Lenovo Thinkpad x100e with Slackware-current (32bit) and a Notebook (Samsung) with Slackware64-current. As far as I can tell, the issues are the same, I tried all chat-scripts and pppd-configurations I wrote on both computers and the errormessages and debug-output respectively were almost the same.

Also I have Installed Win 7 on both machines, 64bit on the Laptop 32bit on the subnotebook, the stick works with both.

The errormessages regarding wvdial are also the same for both, 32 and 64bit.

Markus

jostber 08-10-2012 04:04 AM

Try to put this in your /etc/ppp/options file:

:10.168.199.189
ipcp-accept-remote
novj

markush 08-10-2012 01:49 PM

It works!!!

I'll post my scripts later, but at first want to say thank you very much for all the help!

Markus

markush 08-10-2012 02:31 PM

Well, now I've veryfied that it works with Slackware-current and with Slackware64-current as well.

my umts.chat file
Code:

#/etc/ppp/umts.chat
ABORT "BUSY"                                                                                                                                                         
ABORT "NO CARRIER"                                                                                                                                                   
ABORT "NO ANSWER"                                                                                                                                                     
'' AT                                                                                                                                                                 
TIMEOUT 5                                                                                                                                                             
OK 'AT+cgdcont,"IP","internet.eplus.de","0.0.0.0"'                                                                                                                   
TIMEOUT 5                                                                                                                                                             
'' AT                                                                                                                                                                 
TIMEOUT 5                                                                                                                                                             
OK ATDT*99#                                                                                                                                                           
TIMEOUT 5

my configuration for pppd
Code:

#/etc/ppp/peers/umts
debug dump                                                                                                                                                           
/dev/ttyUSB0                                                                                                                                                         
460800                                                                                                                                                               
hide-password                                                                                                                                                         
noauth                                                                                                                                                               
connect "/usr/sbin/chat -V -f /etc/ppp/umts.chat"                                                                                                                     
crtscts                                                                                                                                                               
user "eplus"                                                                                                                                                         
password "gprs"                                                                                                                                                       
modem                                                                                                                                                                 
connect-delay 10000                                                                                                                                                   
persist

my /etc/ppp/options file
Code:

#/etc/ppp/options
is empty ;)
on the commandline as root I did
Code:

pppd call umts debug nodetach
I copied the resolv.conf file (which is created in /etc/ppp/ when the connection is established to /etc and added nameserver 8.8.8.8
Also I did what san wrote
Code:

route add default gw 10.64.64.64
That was all. The problem was obviously that I did not really know how this line in the chat-file
Code:

OK 'AT+cgdcont,"IP","internet.eplus.de","0.0.0.0"'
had to look like. It was not clear if it was needed, but if one omits the line and additionally uses "local" instead of "modem" in the umts-file, there is a local echo working and it looks like a connection is established and the authentication worked, but this is not the case.

One question remains. Regarding to the chat-file I pushed the PIN to the stick via the commandline
Code:

echo "AT+CPIN=XXXX" > /dev/ttyUSB0
which works (XXXX is the PIN), but one has to push the pin to the stick only once when the stick is connected to the computer. If I put the line for the PIN into the chat-file, the file fails when the PIN is already given to the stick. Question: does anyone know, if it is possible in the chat-file to ask if the PIN is already commited to the stick? regarding to some documentation I read a line
Code:

AT+CPIN?
should work, but I had no success because I don't know the syntax for an optional argument.

Markus


All times are GMT -5. The time now is 10:57 PM.