E1750 Reloaded - QMI - STATIC - DHCP - IPv4
poma
pomidorabelisima at gmail.com
Thu Aug 7 22:15:13 PDT 2014
Tutti frutti
# lsusb
Bus 002 Device 004: ID 12d1:140c Huawei Technologies Co., Ltd. E180v
# lsusb -t
/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=ehci-pci/6p, 480M
...
|__ Port 3: Dev 4, If 1, Class=Vendor Specific Class, Driver=qmi_wwan, 480M
...
/etc/udev/rules.d/70-persistent-fw-mode.rules
# Huawei Technologies Co., Ltd. E1552/E1800/E173 (HSPA modem) 12d1:1446 USB Mass Storage mode,
# Huawei Technologies Co., Ltd. E180v 12d1:140c WWAN/QMI device mode,
# actually Huawei E1750 FW Rev. 11.126.13.00.00 Qualcomm based mobile broadband modem
#
# Firmware USB Modeswitch from USB Mass Storage mode to WWAN/QMI device mode
#
ATTR{idVendor}=="12d1", ATTR{idProduct}=="1446", RUN+="/sbin/usb_modeswitch -v 12d1 -p 1446 -M 55534243123456780600000080010a11060000000000000000000000000000"
#
# udevadm info -a -p /sys/class/net/wwan0
/etc/usb_modeswitch.conf
# Disable automatic mode switching globally (e.g. to access the original
# install storage)
DisableSwitching=1
/etc/modprobe.d/blacklist-option.conf
blacklist option
~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/etc/NetworkManager/system-connections/MBB
[connection]
id=MBB
uuid=12345678-1234-1234-1234-123456789abc
type=gsm
autoconnect=false
timestamp=1407455669
zone=block
[gsm]
username=username
password=password
apn=access.point.name
home-only=true
[ipv4]
method=auto
[ipv6]
method=ignore
[ppp]
refuse-eap=true
refuse-chap=true
refuse-mschap=true
refuse-mschapv2=true
nobsdcomp=true
nodeflate=true
no-vj-comp=true
# mmcli -m 0
/org/freedesktop/ModemManager1/Modem/0 (device id 'eb8...')
-------------------------
Hardware | manufacturer: 'QUALCOMM INCORPORATED'
| model: '29'
| revision: 'M6290A-KPRBL-...'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '353...'
-------------------------
System | device: '/sys/devices/pci0000:00/0000:00:04.1/usb2/2-3'
| drivers: 'qmi_wwan'
| plugin: 'Huawei'
| primary port: 'cdc-wdm0'
| ports: 'cdc-wdm0 (qmi), wwan0 (net)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'sim-pin2'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'registered'
| power state: 'on'
| access tech: 'umts'
| signal quality: '55' (recent)
-------------------------
Modes | supported: 'allowed: 2g; preferred: none
| allowed: 3g; preferred: none
| allowed: 2g, 3g; preferred: none
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 3g; preferred: 3g'
| current: 'allowed: any; preferred: none'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '353...'
| enabled locks: 'none'
| operator id: '00000'
| operator name: 'Operator'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/0'
-------------------------
Bearers | paths: 'none'
# nmcli connection up MBB
Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/1)
or
# nmcli device connect cdc-wdm0
Device 'cdc-wdm0' successfully activated with '12345678-1234-1234-1234-123456789abc'.
# mmcli -m 0
/org/freedesktop/ModemManager1/Modem/0 (device id 'eb8...')
-------------------------
Hardware | manufacturer: 'QUALCOMM INCORPORATED'
| model: '29'
| revision: 'M6290A-KPRBL-...'
| supported: 'gsm-umts'
| current: 'gsm-umts'
| equipment id: '353...'
-------------------------
System | device: '/sys/devices/pci0000:00/0000:00:04.1/usb2/2-3'
| drivers: 'qmi_wwan'
| plugin: 'Huawei'
| primary port: 'cdc-wdm0'
| ports: 'cdc-wdm0 (qmi), wwan0 (net)'
-------------------------
Numbers | own : 'unknown'
-------------------------
Status | lock: 'sim-pin2'
| unlock retries: 'sim-pin (3), sim-pin2 (3), sim-puk (10), sim-puk2 (10)'
| state: 'connected'
| power state: 'on'
| access tech: 'umts'
| signal quality: '47' (recent)
-------------------------
Modes | supported: 'allowed: 2g; preferred: none
| allowed: 3g; preferred: none
| allowed: 2g, 3g; preferred: none
| allowed: 2g, 3g; preferred: 2g
| allowed: 2g, 3g; preferred: 3g'
| current: 'allowed: any; preferred: none'
-------------------------
Bands | supported: 'unknown'
| current: 'unknown'
-------------------------
IP | supported: 'ipv4, ipv6, ipv4v6'
-------------------------
3GPP | imei: '353...'
| enabled locks: 'none'
| operator id: '00000'
| operator name: 'Operator'
| subscription: 'unknown'
| registration: 'home'
-------------------------
SIM | path: '/org/freedesktop/ModemManager1/SIM/0'
-------------------------
Bearers | paths: '/org/freedesktop/ModemManager1/Bearer/1'
# mmcli -b 1
Bearer '/org/freedesktop/ModemManager1/Bearer/1'
-------------------------
Status | connected: 'yes'
| suspended: 'no'
| interface: 'wwan0'
| IP timeout: '20'
-------------------------
Properties | apn: 'access.point.name'
| roaming: 'forbidden'
| IP type: 'ipv4v6'
| user: 'username'
| password: 'password'
| number: 'none'
| Rm protocol: 'unknown'
-------------------------
IPv4 configuration | method: 'static'
| address: '01.234.56.23'
| prefix: '28'
| gateway: '01.234.56.17'
| DNS: '8.8.8.8', '8.8.4.4'
-------------------------
IPv6 configuration | method: 'unknown'
# ifconfig wwan0
wwan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 01.234.56.23 netmask 255.255.255.240 broadcast 01.234.56.31
ether 00:01:02:03:04:05 txqueuelen 1000 (Ethernet)
RX packets 6 bytes 168 (168.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 238 bytes 12746 (12.4 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 01.234.56.17 0.0.0.0 UG 1024 0 0 wwan0
01.234.56.16 0.0.0.0 255.255.255.240 U 0 0 0 wwan0
# ip link show wwan0
2: wwan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 00:01:02:03:04:05 brd ff:ff:ff:ff:ff:ff
# ip addr show wwan0
2: wwan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
link/ether 00:01:02:03:04:05 brd ff:ff:ff:ff:ff:ff
inet 01.234.56.23/28 brd 01.234.56.31 scope global wwan0
valid_lft forever preferred_lft forever
# ip route list
default via 01.234.56.17 dev wwan0 proto static metric 1024
01.234.56.16/28 dev wwan0 proto kernel scope link src 01.234.56.23
# ping -c 10 01.234.56.17
PING 01.234.56.17 (01.234.56.17) 56(84) bytes of data.
--- 01.234.56.17 ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 8999ms
# ping -c 10 8.8.8.8
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
--- 8.8.8.8 ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 8999ms
# ping -c 10 google-public-dns-a.google.com
ping: unknown host google-public-dns-a.google.com
~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~
# dhclient -v wwan0
~~~~~~~~~~
Internet Systems Consortium DHCP Client 4.3.1b1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wwan0/00:01:02:03:04:05
Sending on LPF/wwan0/00:01:02:03:04:05
Sending on Socket/fallback
DHCPDISCOVER on wwan0 to 255.255.255.255 port 67 interval 6 (xid=0x5e92da1e)
DHCPREQUEST on wwan0 to 255.255.255.255 port 67 (xid=0x5e92da1e)
DHCPOFFER from 01.234.56.17
DHCPACK from 01.234.56.17 (xid=0x5e92da1e)
bound to 01.234.56.23 -- renewal in 2799 seconds.
# mmcli -b 1
Bearer '/org/freedesktop/ModemManager1/Bearer/1'
-------------------------
Status | connected: 'yes'
| suspended: 'no'
| interface: 'wwan0'
| IP timeout: '20'
-------------------------
Properties | apn: 'access.point.name'
| roaming: 'forbidden'
| IP type: 'ipv4v6'
| user: 'username'
| password: 'password'
| number: 'none'
| Rm protocol: 'unknown'
-------------------------
IPv4 configuration | method: 'static'
| address: '01.234.56.23'
| prefix: '28'
| gateway: '01.234.56.17'
| DNS: '8.8.8.8', '8.8.4.4'
-------------------------
IPv6 configuration | method: 'unknown'
# ifconfig wwan0
wwan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 01.234.56.23 netmask 255.255.255.240 broadcast 01.234.56.31
ether 00:01:02:03:04:05 txqueuelen 1000 (Ethernet)
RX packets 1442 bytes 908039 (886.7 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 1644 bytes 143559 (140.1 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 01.234.56.17 0.0.0.0 UG 0 0 0 wwan0
01.234.56.16 0.0.0.0 255.255.255.240 U 0 0 0 wwan0
# ip link show wwan0
2: wwan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN mode DEFAULT group default qlen 1000
link/ether 00:01:02:03:04:05 brd ff:ff:ff:ff:ff:ff
# ip addr show wwan0
2: wwan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 1000
link/ether 00:01:02:03:04:05 brd ff:ff:ff:ff:ff:ff
inet 01.234.56.23/28 brd 01.234.56.31 scope global dynamic wwan0
valid_lft 5922sec preferred_lft 5922sec
# ip route list
default via 01.234.56.17 dev wwan0
01.234.56.16/28 dev wwan0 proto kernel scope link src 01.234.56.23
# ping -c 10 01.234.56.17
PING 01.234.56.17 (01.234.56.17) 56(84) bytes of data.
--- 01.234.56.17 ping statistics ---
10 packets transmitted, 0 received, 100% packet loss, time 8999ms
# ping -c 10 google-public-dns-a.google.com
PING google-public-dns-a.google.com (8.8.8.8) 56(84) bytes of data.
64 bytes from google-public-dns-a.google.com (8.8.8.8): icmp_seq=1 ttl=45 time=589 ms
64 bytes from google-public-dns-a.google.com (8.8.8.8): icmp_seq=2 ttl=45 time=1798 ms
64 bytes from google-public-dns-a.google.com (8.8.8.8): icmp_seq=3 ttl=45 time=869 ms
64 bytes from google-public-dns-a.google.com (8.8.8.8): icmp_seq=4 ttl=45 time=169 ms
64 bytes from google-public-dns-a.google.com (8.8.8.8): icmp_seq=5 ttl=45 time=187 ms
64 bytes from google-public-dns-a.google.com (8.8.8.8): icmp_seq=6 ttl=45 time=195 ms
64 bytes from google-public-dns-a.google.com (8.8.8.8): icmp_seq=7 ttl=45 time=214 ms
64 bytes from google-public-dns-a.google.com (8.8.8.8): icmp_seq=8 ttl=45 time=232 ms
64 bytes from google-public-dns-a.google.com (8.8.8.8): icmp_seq=9 ttl=45 time=192 ms
64 bytes from google-public-dns-a.google.com (8.8.8.8): icmp_seq=10 ttl=45 time=231 ms
--- google-public-dns-a.google.com ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9005ms
rtt min/avg/max/mdev = 169.189/468.260/1798.464/493.846 ms, pipe 2
# ping -c 10 google-public-dns-b.google.com
PING google-public-dns-b.google.com (8.8.4.4) 56(84) bytes of data.
64 bytes from google-public-dns-b.google.com (8.8.4.4): icmp_seq=1 ttl=45 time=179 ms
64 bytes from google-public-dns-b.google.com (8.8.4.4): icmp_seq=2 ttl=45 time=179 ms
64 bytes from google-public-dns-b.google.com (8.8.4.4): icmp_seq=3 ttl=45 time=179 ms
64 bytes from google-public-dns-b.google.com (8.8.4.4): icmp_seq=4 ttl=45 time=180 ms
64 bytes from google-public-dns-b.google.com (8.8.4.4): icmp_seq=5 ttl=45 time=219 ms
64 bytes from google-public-dns-b.google.com (8.8.4.4): icmp_seq=6 ttl=45 time=178 ms
64 bytes from google-public-dns-b.google.com (8.8.4.4): icmp_seq=7 ttl=45 time=187 ms
64 bytes from google-public-dns-b.google.com (8.8.4.4): icmp_seq=8 ttl=45 time=187 ms
64 bytes from google-public-dns-b.google.com (8.8.4.4): icmp_seq=9 ttl=45 time=176 ms
64 bytes from google-public-dns-b.google.com (8.8.4.4): icmp_seq=10 ttl=45 time=235 ms
--- google-public-dns-b.google.com ping statistics ---
10 packets transmitted, 10 received, 0% packet loss, time 9002ms
rtt min/avg/max/mdev = 176.718/190.592/235.777/19.226 ms
# curl http://fedoraproject.org/static/hotspot.txt
OK
# dhclient -v -r wwan0
Killed old client process
Internet Systems Consortium DHCP Client 4.3.1b1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wwan0/00:01:02:03:04:05
Sending on LPF/wwan0/00:01:02:03:04:05
Sending on Socket/fallback
DHCPRELEASE on wwan0 to 01.234.56.17 port 67 (xid=0x3ed886dc)
# nmcli connection down MBB
or
# nmcli device disconnect cdc-wdm0
Tutti frutti, oh Rudy
A whop bop-a-lu a whop bam boo
poma
More information about the ModemManager-devel
mailing list