Jump to content
  • 0

NanoPi Duo with LTE Modem (Huawei E3372s)


Slawek
 Share

Question

Hi,

 

I'm trying to use the popular LTE USB modem Huawei E3372s (Stick mode) with NanoPi Duo.

 

Modem is in Network card mode - USB_Modeswitch was installed and started

root@nanopiduo:~# lsusb
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 004 Device 002: ID 0525:a4a7 Netchip Technology, Inc. Linux-USB Serial Gadget (CDC ACM mode)
Bus 004 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 003: ID 12d1:1506 Huawei Technologies Co., Ltd. Modem/Networkcard
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

WVDial is installed and configured:

 

/etc/wvdial.conf

[Dialer Orange]
Modem = /dev/ttyUSB1
Init3 = AT+CGDCONT=1,"IP","internet"
Username = "internet"
Password = "internet"
Phone = "*99#"
Dial Command = ATDTW
Stupid Mode = yes
Dial Attempts = 0

the connection to my provider is going fine:

root@nanopiduo:~# wvdial orange&
[1] 2752
root@nanopiduo:~# --> WvDial: Internet dialer version 1.61
--> Initializing modem.
--> Sending: ATZ
ATZ
OK
--> Sending: ATQ0 V1 E1 S0=0
ATQ0 V1 E1 S0=0
OK
--> Sending: AT+CGDCONT=1,"IP","internet"
AT+CGDCONT=1,"IP","internet"
OK
--> Modem initialized.
--> Sending: ATDTW*99#
--> Waiting for carrier.
ATDTW*99#
CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Mon Jan 29 06:38:27 2018
--> Pid of pppd: 2753
--> Using interface ppp0
--> local  IP address 10.89.114.208
--> remote IP address 10.64.64.64
--> primary   DNS address 194.204.159.1
--> secondary DNS address 194.204.152.34

 

root@nanopiduo:~# ifconfig
eth0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether b2:9b:24:4e:11:e2  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
        device interrupt 35

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 64  bytes 5184 (5.0 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 64  bytes 5184 (5.0 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

ppp0: flags=4305<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST>  mtu 1500
        inet 10.93.28.221  netmask 255.255.255.255  destination 10.64.64.64
        ppp  txqueuelen 3  (Point-to-Point Protocol)
        RX packets 7  bytes 106 (106.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 8  bytes 157 (157.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether 12:42:33:5d:22:81  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

but I can't ping nothing on the Internet:

 

root@nanopiduo:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
^C
--- 8.8.8.8 ping statistics ---
8 packets transmitted, 0 received, 100% packet loss, time 7254ms


The modem (E3372s) with RPi 3 and latest Raspbian works perfectly. Also plugged into my Windows 10 PC works OK.

 

Nano Pi Duo is powered from good 3A 5V power source and USB socket for Huawei 3371s is separately powered from this same source (not via pins on Nano Pi Duo).

 

checked with: Armbian_5.38_Nanopiduo_Debian_stretch_next_4.14.15, Armbian_5.38_Nanopiduo_Ubuntu_xenial_next_4.14.15.img and also with nanopi-duo_friendlycore-xenial_4.14.52_20180628.img.

 

If you have any idea what should I check any suggestions will be very appreciated.

 

Slawek

 

Link to comment
Share on other sites

4 answers to this question

Recommended Posts

Check forum guidelines to use maximum potential!

  • 0

Thanks for your suggestion.  Here are results:

 

NanoPi Duo (Armbian_5.38_Nanopiduo_Debian_stretch_next_4.14.15.img)

before connection:

root@nanopiduo:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         0.0.0.0         0.0.0.0         U     1002   0        0 eth0
link-local      0.0.0.0         255.255.0.0     U     0      0        0 eth0

root@nanopiduo:~# ip route
default dev eth0 scope link metric 1002 linkdown
169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.11.58 linkdown

after connection:

CONNECT
--> Carrier detected.  Starting PPP immediately.
--> Starting pppd at Thu Aug 23 18:52:19 2018
--> Pid of pppd: 1099
--> Using interface ppp0
--> local  IP address 10.91.179.3
--> remote IP address 10.64.64.64
--> primary   DNS address 194.204.159.1
--> secondary DNS address 194.204.152.34

root@nanopiduo:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         0.0.0.0         0.0.0.0         U     1002   0        0 eth0
10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0
link-local      0.0.0.0         255.255.0.0     U     0      0        0 eth0
root@nanopiduo:~#

root@nanopiduo:~# ip route
default dev eth0 scope link metric 1002 linkdown
10.64.64.64 dev ppp0 proto kernel scope link src 10.95.40.137
169.254.0.0/16 dev eth0 proto kernel scope link src 169.254.11.58 linkdown

results of ping:

root@nanopiduo:~# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
From 169.254.10.53 icmp_seq=1 Destination Host Unreachable
From 169.254.10.53 icmp_seq=2 Destination Host Unreachable
From 169.254.10.53 icmp_seq=3 Destination Host Unreachable
^C
--- 8.8.8.8 ping statistics ---
6 packets transmitted, 0 received, +3 errors, 100% packet loss, time 5193ms pipe 4

root@nanopiduo:~# ping -I ppp0 8.8.8.8
PING 8.8.8.8 (8.8.8.8) from 10.91.179.3 ppp0: 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=2 ttl=118 time=639 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=118 time=1108 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=118 time=225 ms
^C
--- 8.8.8.8 ping statistics ---
11 packets transmitted, 3 received, 72% packet loss, time 10434ms
rtt min/avg/max/mdev = 225.175/657.813/1108.846/360.991 ms, pipe 2

RPi 3 (2018-06-27-raspbian-stretch-lite.img)

 

Before connection route table is empty. After connection:

root@nanopiduo:~# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
default         0.0.0.0         0.0.0.0         U     0      0        0 ppp0
10.64.64.64     0.0.0.0         255.255.255.255 UH    0      0        0 ppp0


root@nanopiduo:~# ip route
default dev ppp0 scope link
10.64.64.64 dev ppp0 proto kernel scope link src 10.90.159.69

and ping is working nice and smooth:

PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1 ttl=117 time=134 ms
64 bytes from 8.8.8.8: icmp_seq=2 ttl=117 time=45.7 ms
64 bytes from 8.8.8.8: icmp_seq=3 ttl=117 time=40.4 ms
64 bytes from 8.8.8.8: icmp_seq=4 ttl=117 time=43.8 ms
64 bytes from 8.8.8.8: icmp_seq=5 ttl=117 time=43.8 ms

--- 8.8.8.8 ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4008ms
rtt min/avg/max/mdev = 40.454/61.783/134.997/36.647 ms

 

Seams that on Armbian the default and link-local are bind to eth0 but on RPi to ppp0. Could be the source of my problems?

 

Both installations are super fresh - just images flashed to SD on NPi USB_Modeswitch installed (o raspbian is included in distro) plus on both on RPi wvdial installed and configured. Nothing else.

Link to comment
Share on other sites

  • 0
16 hours ago, Slawek said:

Could be the source of my problems?

Yes.

 

Try to add a gw to ppp0, something like:

route add default gw {IP-ADDRESS} {INTERFACE-NAME}

Not sure is the best way ( i am not sysadmin), it should be automagically done by  some package.

 

 route add default gw 10.64.64.64 ppp0

 

 

 

Link to comment
Share on other sites

  • 0

Hi @lex, many thanks for you effort.

 

Finally I have it working.... but it was made .... automagically :wacko: by installing new Armbian from this Tuesday 21'th

(Armbian_5.59_Nanopiduo_Ubuntu_bionic_next_4.14.65.img or Armbian_5.59_Nanopiduo_Debian_stretch_next_4.14.65.img - both are working perfectly)

The routing table is set after connection exactly this same as it was in Raspbian on my RPi3.

 

I don't know what was the source of problems but now is working OK, so we can close the topic.

 

BTW: there was no success with manual altering of route table on previous Armbian tested.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
 Share

×
×
  • Create New...