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-03-2012 08:35 AM

Having difficulties to connect to the internet with a USB-UMTS-Modem
 
Hello,

I've bought an UMTS-Modem Huawei 3G which works with Windows.

I've tried to connect to the internet via this device with Slackware-Linux, I'm running Slackware64-current.

The Modem is recognized by the system, dmesg shows the expected output and the devicenodes in /dev are created automatically.

I've configured ppp.
Code:

# /etc/ppp/peers/umts

hide-password
noauth
connect "/usr/sbin/chat -V -f /etc/ppp/umts.chat"
debug
/dev/gsmmodem
460800
defaultroute
noipdefault
noccp
nobsdcomp
#local
user "eplus"
password "gprs"
usepeerdns
connect-delay 10000
persist

Code:

and the chatscript:
# /etc/ppp/umts.chat
READY-AT+CPIN=xxxx
OK ATDT*99#

When I call
Code:

pppd call umts debug nodetach
a connection is created which is shown with ifconfig
Code:

samsung:~# ifconfig
ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.128.210.1  netmask 255.255.255.255  destination 10.64.64.64
        ppp  txqueuelen 3  (Point-to-Point Protocol)
        RX packets 12  bytes 579 (579.0 B)
        RX errors 1  dropped 0  overruns 0  frame 0
        TX packets 13  bytes 474 (474.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The output of the pppd command is (some lines of it)
Code:

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 ConfNak id=0x6 <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=0x7 <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=0x2]
sent [IPCP ConfNak id=0x2 <addr 0.0.0.0>]
rcvd [IPCP ConfRej id=0x7 <compress VJ 0f 01> <ms-wins 10.11.12.13> <ms-wins 10.11.12.14>]
sent [IPCP ConfReq id=0x8 <addr 0.0.0.0> <ms-dns1 10.11.12.13> <ms-dns2 10.11.12.14>]
rcvd [IPCP ConfReq id=0x3]
sent [IPCP ConfAck id=0x3]
rcvd [IPCP ConfNak id=0x8 <addr 10.128.82.202> <ms-dns1 212.23.97.3> <ms-dns2 212.23.97.2>]
sent [IPCP ConfReq id=0x9 <addr 10.128.82.202> <ms-dns1 212.23.97.3> <ms-dns2 212.23.97.2>]
rcvd [IPCP ConfAck id=0x9 <addr 10.128.82.202> <ms-dns1 212.23.97.3> <ms-dns2 212.23.97.2>]
Could not determine remote IP address: defaulting to 10.64.64.64
Cannot determine ethernet address for proxy ARP
local  IP address 10.128.82.202
remote IP address 10.64.64.64
primary  DNS address 212.23.97.3
secondary DNS address 212.23.97.2
sent [LCP EchoReq id=0x1 magic=0xd8800ed2]
rcvd [LCP EchoRep id=0x1 magic=0x11ce915 d8 80 0e d2]
sent [LCP EchoReq id=0x2 magic=0xd8800ed2]
rcvd [LCP EchoRep id=0x2 magic=0x11ce915 d8 80 0e d2]

tail /var/log/syslog gives
Code:

samsung:/etc/ppp/peers# tail /var/log/syslog
Aug  3 13:28:27 samsung kernel: [  475.931573] sr1: scsi-1 drive
Aug  3 13:36:29 samsung pppd[2121]: Connect script failed
Aug  3 13:39:12 samsung pppd[2157]: Connect script failed
Aug  3 13:41:22 samsung pppd[2159]: Connect script failed
Aug  3 13:42:17 samsung pppd[2208]: Could not determine remote IP address: defaulting to 10.64.64.64
Aug  3 13:42:17 samsung pppd[2208]: Cannot determine ethernet address for proxy ARP
Aug  3 13:55:08 samsung pppd[2655]: Could not determine remote IP address: defaulting to 10.64.64.64
Aug  3 13:55:08 samsung pppd[2655]: Cannot determine ethernet address for proxy ARP
Aug  3 14:03:11 samsung pppd[2677]: Could not determine remote IP address: defaulting to 10.64.64.64
Aug  3 14:03:11 samsung pppd[2677]: Cannot determine ethernet address for proxy ARP

The problem is that I don't have too much knowledge about point-to-point connections. I cannot ping the DNS-servers by their IP-adresses. The network seems to be unreachable. In a normal ethernet-network I would say that the standard-gateway is missing.
I suppose the message above
Code:

Aug  3 13:55:08 samsung pppd[2655]: Could not determine remote IP address: defaulting to 10.64.64.64
tells me anything relevant which I don't understand.

Can please anyone give me a hint what's wrong?

Thanks in advance.

Markus

vdemuth 08-03-2012 09:56 AM

I would be tempted to grab WVDIAL and use that. It's available via sbopkg.

markush 08-03-2012 10:50 AM

Quote:

Originally Posted by vdemuth (Post 4745075)
I would be tempted to grab WVDIAL and use that. It's available via sbopkg.

Yes, I tried that, but it has wvstreams as a dependency but wvstreams didn't compile, on both, slack64-current and slack-current. But it is not the slackbuildscript, there's an issue with the sources. I'm not enough experienced to get that working.

BTW: I used your tutorial in the tutorial-section here at LQ, but the workaround with usb_modeswitch is no longer necessary, at least with current. But thanks anyway, it helped me to find my so far.

Markus

H_TeXMeX_H 08-03-2012 11:08 AM

See:
http://axion.physics.ubc.ca/ppp-linux.html#Other

H_TeXMeX_H 08-03-2012 11:12 AM

Cannot edit my last post, also check:

http://www.linuxquestions.org/questi...huawei-762157/

So make sure you have a valid resolv.conf. Try to ping a known IP.

markush 08-03-2012 11:35 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 4745116)
Cannot edit my last post, also check:

http://www.linuxquestions.org/questi...huawei-762157/

So make sure you have a valid resolv.conf. Try to ping a known IP.

Well, thanks, but as I wrote, I cannot ping the IP-Adresses of the DNS-Servers, therefore DNS is not (yet) the problem. But I have already created a symbolic link from /etc/ppp/resolv.conf to /etc/resolv.conf

I think it is a problem with the gateway. I'll read the tutorial from your above post, thanks for the link.

Markus

vdemuth 08-03-2012 12:21 PM

I've also had success with KPPP (included with kdenetwork) and network manager. Just preferred wvdial.

cod_liver_0il 08-03-2012 01:08 PM

Does your firewall only allow one specified interface to access net, say before it was eth0, but now it's ppp0?

ponce 08-03-2012 01:24 PM

I have used wvdial in the past with an internet key with success: if you want to build wvstreams on -current, have a look at the modifications I have done to the build script (click on the "plain" links on the right to download the files).
In /etc/resolv.conf you can also use the public nameservers of your choice, like google's one
Code:

nameserver 8.8.8.8
to check the gateway use netstat (it's the line containing UG - Universal Gateway)
Code:

netstat -rn | grep UG

san 08-03-2012 02:35 PM

i'm using wvdial on 13.37, but some time ago i got it working using only pppd and chat.
Code:

Could not determine remote IP address: defaulting to 10.64.64.64
this actually is not the issue, i get this one each time.

your /etc/ppp/peers/umts looks quite bloated, i have a rather old modem (huawei e220), so maybe yours needs those features.
one thing you could try is following a step-by-step instruction like this one (in german ;) ) this was the one that i used with only the stock-slackware tools available. look at the command-line starting with "jetzt wird's ernst". please note that most umts-modems (i had experiences with huawei, option, and zte) need ATZ instead of AT&F1 in order to initialize correctly, if this does not help, add ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0

you will need a resolv.conf, nameserver 8.8.8.8 is a good choice.

markush 08-03-2012 03:55 PM

Well, it's still not running, I've only an internet-connection with Windows but Windows sucks..... I had to download wvstreams and wvdial with Windows and using ponce's patches it worked, I've no installed wvstreams and wvdial.
I'll try to find a valid configuration for wvdial.

Thanks also to san for the link.

@cod liver Oil: I have yet no firewall installed.

Also DNS is not yet the problem because I have yet no connection.

Thanks to H_TeXMeX_H for the provided link.

I'll follow up when I've got it running

BTW: I was considering if I should post this issue in the Slackware-forum or in the Network-forum of LQ. I think it was a good idea to post it here in the Slackware-forum. Very knowledgeable and helpful people here :)

Markus

markush 08-03-2012 04:43 PM

Unfortunately there's a bug in wvstreams. http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=674006

I get the errormessage which is mentioned in the link above. So I will try to configure pppd correctly to establish the internet-connection.

Markus

Darth Vader 08-03-2012 05:50 PM

Two things...

Firstly, the modern USB modems have the bad habit to work in two modes, and to need to switch the modem in the working mode with usb_modeswitch. IF your modem is still not supported by usb_modeswitch, you should create a new configuration file in /etc/usb_modeswitch.d. For populating that new configuration file with right info, you should know the exact type of your modem and to do a little google; is it almost impossible to be unique Linux user of it and with that problem.

Secondly, I strongly suggest you to use the NetworkManager interface. That thingy is much more powerfully than "to be used for WiFi networks", and it have an excellent modem support.

Then, add support for your modem (if it doesn't exists) to usb_modeswitch and go to NetworkManager and configure the new connection.

markush 08-03-2012 06:29 PM

Quote:

Originally Posted by Darth Vader (Post 4745414)
Two things...

Firstly, the modern USB modems have the bad habit to work in two modes, and to need to switch the modem in the working mode with usb_modeswitch. IF your modem is still not supported by usb_modeswitch, you should create a new configuration file in /etc/usb_modeswitch.d. For populating that new configuration file with right info, you should know the exact type of your modem and to do a little google; is it almost impossible to be unique Linux user of it and with that problem.

I don't think that usb_modeswitch is necessary. When I connect the modem, it is recognized automatically as I can see with dmesg (it is shown as GSM-Modem). There are the nodes /dev/ttyUSB0 up to /dev/ttyUSB3 created automatically and a symlink /dev/gsmmodem which points to /dev/ttyUSB0. I am also able to connect via
Code:

minicom /dev/gsmmodem
to the modem.
The modem is recognized by the system correctly (as far as I know).

Quote:

Secondly, I strongly suggest you to use the NetworkManager interface. That thingy is much more powerfully than "to be used for WiFi networks", and it have an excellent modem support.

Then, add support for your modem (if it doesn't exists) to usb_modeswitch and go to NetworkManager and configure the new connection.
Well, I'll try that.

Markus

Darth Vader 08-03-2012 06:38 PM

Still, how about to show me the complete dump of dmesg?

I'm curious if the modem is really switched from "installation" mode to "working mode"...

Idea is if your modem have an builtin software presented for installation, is very posible to have two working modes.


All times are GMT -5. The time now is 04:58 AM.