You are not logged in.
Trying to get a 4G modem (Gemalto ELS61) with USB connection to connect to the internet, but I'm completely lost. Been googling like crazy, mostly finding guides for 3G and so many different network managers. As I understand it I need to set up a PDP context for the modem using AT commands. Tested doing this manually and seem to get an IP:
at+cgdcont=1,"IP","internet.telenor.se"
OK
at+cgact=1,1
OK
at+cgpaddr
+CGPADDR: 1,"79.102.212.32"
+CGPADDR: 2,"0.0.0.0"
+CGPADDR: 3,"0.0.0.0"
+CGPADDR: 4,"0.0.0.0","0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0"
OK
Then I'm a little bit lost. The modem creates a number of serial ports as well as two ethernet devices:
[352718.373599] usb 1-7.4.3: new full-speed USB device number 88 using xhci_hcd
[352718.473342] ftdi_sio 1-7.4.3:1.0: FTDI USB Serial Device converter detected
[352718.473399] usb 1-7.4.3: Detected FT232RL
[352718.473829] usb 1-7.4.3: FTDI USB Serial Device converter now attached to ttyUSB6
[352730.663597] usb 1-7.4.4: new high-speed USB device number 89 using xhci_hcd
[352730.793590] cdc_acm 1-7.4.4:1.0: ttyACM0: USB ACM device
[352730.795498] cdc_acm 1-7.4.4:1.2: ttyACM1: USB ACM device
[352730.797431] cdc_acm 1-7.4.4:1.4: ttyACM2: USB ACM device
[352730.799404] cdc_acm 1-7.4.4:1.6: ttyACM3: USB ACM device
[352730.800878] cdc_acm 1-7.4.4:1.8: ttyACM4: USB ACM device
[352730.807567] cdc_ether 1-7.4.4:1.10 eth0: register 'cdc_ether' at usb-0000:00:14.0-7.4.4, CDC Ethernet Device, 00:00:11:12:13:14
[352730.814212] cdc_ether 1-7.4.4:1.12 eth1: register 'cdc_ether' at usb-0000:00:14.0-7.4.4, CDC Ethernet Device, 00:00:11:12:13:16
But I'm not sure how to use them and I am also not sure if I need like pppd (I've heard it is optional to run PPP on the host machine or inside the modem, but not sure) or something. I have tried that, but not managed to get any data through at all, not even a ping.
My network devices:
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 48:4d:7e:f3:65:3f brd ff:ff:ff:ff:ff:ff
inet 172.30.116.23/23 brd 172.30.117.255 scope global dynamic enp0s31f6
valid_lft 4300sec preferred_lft 4300sec
inet 172.30.117.12/23 brd 172.30.117.255 scope global secondary enp0s31f6
valid_lft forever preferred_lft forever
inet6 fe80::9a55:4824:85c9:9016/64 scope link
valid_lft forever preferred_lft forever
31: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 00:00:11:12:13:14 brd ff:ff:ff:ff:ff:ff
inet6 fe80::200:11ff:fe12:1314/64 scope link
valid_lft forever preferred_lft forever
32: eth1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 00:00:11:12:13:16 brd ff:ff:ff:ff:ff:ff
As you can see, both eth0 and eth1 are DOWN. I have tried using systemd-networkd to make it do a dhcp request, doesnt help either:
$ cat /usr/lib/systemd/network/25-lte.network
[Match]
Name=eth0
[Network]
DHCP=yes
I also disabled the network manager in gnome so that didn't conflict somehow. This is going to run on an embedded linux platform when I figure out how to do it, so I don't really want to solve it using any GUI applications...
Last edited by UglyBob (2017-08-14 11:46:48)
Offline
3G/4G doesn't make any difference. So, almost all of https://wiki.archlinux.org/index.php/USB_3G_Modem applies.
I personally don't like NetworkManager and use wvdial (No GUI) instead, you might try that as well.
Offline
Will try it! Thanks for now!
Offline
Seem to be working to connect PPP layer at least, but after that I am lost again. Read the guide you gave me, but it sasy nothing on how to make Arch use the interface for surfing. If I bring down my ethernet, it just complains it has no DNS.
My wvdial config:
[Dialer Defaults]
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Modem Type = USB Modem
; Phone = <Target Phone Number>
ISDN = 0
; Username = <Your Login Name>
Init1 = ATZ
; Password = <Your Password>
Modem = /dev/ttyACM0
Baud = 460800
[Dialer thenet]
Phone = *99***1#
Username = 9180******
Password = 9180******
Stupid Mode = 1
Init3 = AT+CGDCONT=1,"IP","internet.telenor.se"
Wvdial output:
$ sudo wvdial thenet
--> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
--> Sending: AT+CGDCONT=1,"IP","internet.telenor.se"
AT+CGDCONT=1,"IP","internet.telenor.se"
OK
--> Modem initialized.
--> Sending: ATDT*99***1#
--> Waiting for carrier.
ATDT*99***1#
CONNECT
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Mon Aug 14 09:11:50 2017
--> Pid of pppd: 3724
--> Using interface ppp0
--> local IP address 46.195.102.183
--> remote IP address 46.195.102.183
--> primary DNS address 195.54.122.221
--> secondary DNS address 195.54.122.211
Network interfaces:
$ ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: enp0s31f6: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UP group default qlen 1000
link/ether 48:4d:7e:f3:65:3f brd ff:ff:ff:ff:ff:ff
inet 172.30.117.12/23 brd 172.30.117.255 scope global enp0s31f6
valid_lft forever preferred_lft forever
inet6 fe80::9a55:4824:85c9:9016/64 scope link
valid_lft forever preferred_lft forever
34: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 00:00:11:12:13:14 brd ff:ff:ff:ff:ff:ff
inet6 fe80::200:11ff:fe12:1314/64 scope link
valid_lft forever preferred_lft forever
35: eth1: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel state DOWN group default qlen 1000
link/ether 00:00:11:12:13:16 brd ff:ff:ff:ff:ff:ff
inet6 fe80::200:11ff:fe12:1316/64 scope link
valid_lft forever preferred_lft forever
36: ppp0: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 3
link/ppp
inet 46.195.102.183/32 scope global ppp0
valid_lft forever preferred_lft forever
I'm sure this is an easy question if you know Linux networking, but as I said, I am a little bit lost...
Offline
Am I suppose to set up routes or what? If so, some pointers would be most welcome! Never done that before...
$ ip route show
default via 172.30.116.1 dev enp0s31f6 src 172.30.117.12 metric 202
172.30.116.0/23 dev enp0s31f6 proto kernel scope link src 172.30.117.12 metric 202
Note: this is after bringing up ethernet again, as I need it to post this, but the ppp interface is still in the same state as I posted...
Last edited by UglyBob (2017-08-14 07:29:53)
Offline
Found the reason, pppd tries to set a default route when connected, but as there already is a default route (for ethernet) it doesn't want to replace it. If I removed the current default route it works fine.
Offline