You are not logged in.

#1 2017-07-02 17:10:56

Chlorek
Member
From: Poland
Registered: 2016-06-13
Posts: 3

[Solved] Connection through 4g modem does not provide internet

Hello,
I am trying to setup modem connection through ModemManager and NetworkManager. My modem is Huawei E3372, I am in Poland and ISP is T-Mobile. Modem is fine - I've made successful check on windows machine. On the other hand on Arch I can connect to the mobile network (receive sms, execute ussd codes) with about 50% LTE signal strength, but internet is not available. Moreover network interface receives local ip address, the only thing I found questionable is interface status that is 'UNKNOWN', other than that I have not seen any error or warning during all my works. I've tried wvdial but it seems to yield  the same result (anyway I still prefer this neat modemmanager). Also I tried bringing other interfaces down, just in case.
Of course I am sure all informations are correct: APN, phone number, protocol (tmobile says to use CHAP, also verified bundled modem software has exactly same settings).

Any clues folks?

#Solution
1. Use wvdial
2. Modem communicates on as two devices, both respond to commands, but it was ttyUSB1 that worked successfully (this device works with all commands, not just PIN code and some others).
3. BEFORE starting wvdial you have to bring down other interfaces, when I brought them down after starting ppp, then no internet, for some reason linux just keeps trying to use ethernet otherwise.
4. Also I set ppp0 up, it was down by default.

Last edited by Chlorek (2017-07-03 10:23:48)

Offline

#2 2017-07-02 21:04:55

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: [Solved] Connection through 4g modem does not provide internet

This Linux Mint topic might be helpful.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#3 2017-07-02 23:22:02

Chlorek
Member
From: Poland
Registered: 2016-06-13
Posts: 3

Re: [Solved] Connection through 4g modem does not provide internet

I revert to wvdial as I've read it should rather work in my case. However it's not so clear, I thought it "worked' before, but now I think I misread something and connection was never made. My modem mode is rather fine and it shouldn't be issue. Just in case here's lsusb output:

Bus 004 Device 021: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard

So I try to configure wvdial

[Dialer Defaults]
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0
Modem Type = Analog Modem
ISDN = 0
Baud = 9600
Modem = /dev/ttyUSB0

[Dialer tmobile]
Init1 = AT+CGDCONT=1,"IP","internet"
Stupid mode = yes
Dial Attempts = 0
Modem = /dev/ttyUSB0
Username = blank
Password = blank
Phone = *99#

[Dialer pin]
Init1 = AT+CPIN=xxxx

I made this config mostly by reading other configs and common sense, not sure I am doing it the right way. When I plug modem I issue first:

wvdial pin

It successfully unlocks sim.
Then I run

wvdial tmobile

It results in:

--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: AT+CGDCONT=1,"IP","internet"
AT+CGDCONT=1,"IP","internet"
OK
--> Sending: ATQ0 V1 E1 S0=0
ATQ0 V1 E1 S0=0
OK
--> Modem initialized.
--> Sending: ATDT*99#
--> Waiting for carrier.
ATDT*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Mon Jul  3 01:17:40 2017
--> Pid of pppd: 5001
--> Using interface ppp0
[ IT HANGS HERE FOR A WHILE ] 
--> Disconnecting at Mon Jul  3 01:18:10 2017
--> The PPP daemon has died: A modem hung up the phone (exit code = 16)
--> Sending: AT+CGDCONT=1,"IP","internet"
--> Sending: ATQ0
--> Re-Sending: AT+CGDCONT=1,"IP","internet"
...

It makes another attempt but as I can see modem no longer answers commends until unplugged and plugged again.

Last edited by Chlorek (2017-07-02 23:34:09)

Offline

#4 2017-07-03 10:06:48

Chlorek
Member
From: Poland
Registered: 2016-06-13
Posts: 3

Re: [Solved] Connection through 4g modem does not provide internet

#Partial Fix
Changing device from ttyUSB0 to ttyUSB1 fixed the "Modem hung up the phone", now it looks like this:

....
--> Using interface ppp0
--> local  IP address 10.78.97.119
--> remote IP address 10.64.64.64
--> primary   DNS address 213.158.199.1
--> secondary DNS address 213.158.199.5
ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 3
    link/ppp 
    inet 10.78.97.119 peer 10.64.64.64/32 scope global ppp0
       valid_lft forever preferred_lft forever

I have ppp0 running, yet no internet connection through this interface. I just get network unreachable when trying to ping IPs. So I'm a bit further with wvdial than before but it results in the same thing as modemmanager...

Offline

#5 2017-07-03 10:30:41

adesh
Member
Registered: 2016-10-05
Posts: 167

Re: [Solved] Connection through 4g modem does not provide internet

You should change value of 'Modem Type' to 'USB Modem'. You may also want to input your phone number in the username and password fields.

Offline

#6 2017-07-03 11:52:58

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,920

Re: [Solved] Connection through 4g modem does not provide internet

Modem communicates on as two devices, both respond to commands, but it was ttyUSB1 that worked successfully (this device works with all commands, not just PIN code and some others).

Many external modems function that way.
I investigated it long ago for a UMTS/GPRS modem on a pcmcia type II card (384k was max speed)  .
The first was some kind of control channel not used on linux afaik, the 2nd was the channel needed.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

Board footer

Powered by FluxBB