Changes between Version 14 and Version 15 of expansion/gw16126
- Timestamp:
- 01/09/2019 11:56:02 PM (6 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
expansion/gw16126
v14 v15 58 58 ''' Note, because this modem uses raw-ip, the IP from the provider will not automatically be applied to the interface. The provider will give an IP and then it must manually be applied to the wwan0 interface.''' 59 59 60 Examples: (set APN env var appropriately)60 3 different examples of how to connect, testing done on a Newport family board : (set APN env var appropriately) 61 61 * Ubuntu using !NetworkManager: 62 62 {{{#!bash 63 63 root@xenial-newport:~# nmcli --version 64 64 nmcli tool, version 1.2.6 65 root@xenial-newport:~# nmcli connection down id 'Wired connection 1' 65 root@xenial-newport:~# nmcli connection down id 'Wired connection 1' #bring down ethernet to avoid confusion 66 66 Connection 'Wired connection 1' successfully deactivated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/0) 67 root@xenial-newport:~# nmcli connection add type gsm ifname cdc-wdm0 con-name mymodem apn $APN 67 root@xenial-newport:~# nmcli connection add type gsm ifname cdc-wdm0 con-name mymodem apn $APN #add the connection 68 68 Connection 'mymodem' (1c6d1b7f-2c89-4e21-93ee-231073605578) successfully added. 69 root@xenial-newport:~# nmcli connection up id mymodem 69 root@xenial-newport:~# nmcli connection up id mymodem #bring up the modem 70 70 Connection successfully activated (D-Bus active path: /org/freedesktop/NetworkManager/ActiveConnection/3) 71 root@xenial-newport:~# ifconfig wwan0 71 root@xenial-newport:~# ifconfig wwan0 #verify what the ip is 72 72 wwan0 Link encap:UNSPEC HWaddr 00-00-00-00-00-00-00-00-00-00-00-00-00-00-00-00 73 73 inet addr:100.75.76.187 P-t-P:100.75.76.187 Mask:255.255.255.248 … … 78 78 RX bytes:354005 (354.0 KB) TX bytes:54090 (54.0 KB) 79 79 80 root@xenial-newport:~# ping -c2 www.google.com 80 root@xenial-newport:~# ping -c2 www.google.com #ping for testing 81 81 PING www.google.com (216.58.192.196) 56(84) bytes of data. 82 82 64 bytes from ord30s25-in-f196.1e100.net (216.58.192.196): icmp_seq=1 ttl=52 time=568 ms … … 89 89 * Ubuntu using !ModemManager: 90 90 {{{#!bash 91 root@xenial-newport:~# mmcli --modem 0 91 root@xenial-newport:~# mmcli --modem 0 #verify modem is detected 92 92 93 93 /org/freedesktop/ModemManager1/Modem/0 (device id '5cbc1489609fb1b95308ccf41b45f14e0f57771d') … … 137 137 Bearers | paths: 'none' 138 138 139 root@xenial-newport:~# mmcli --modem 0 | grep imei 139 root@xenial-newport:~# mmcli --modem 0 | grep imei #check imei 140 140 3GPP | imei: '357812090840163' 141 root@xenial-newport:~# mmcli --modem 0 --enable 141 root@xenial-newport:~# mmcli --modem 0 --enable #enable the modem 142 142 successfully enabled the modem 143 root@xenial-newport:~# mmcli --modem 0 --simple-connect="apn=$APN" # Note 'CallFailed' is likely an invalid APN143 root@xenial-newport:~# mmcli --modem 0 --simple-connect="apn=$APN" # Actually connect the modem. Note 'CallFailed' is likely an invalid APN 144 144 successfully connected the modem 145 root@xenial-newport:~# mmcli --modem 0 --bearer 0 145 root@xenial-newport:~# mmcli --modem 0 --bearer 0 #get IP address 146 146 Bearer '/org/freedesktop/ModemManager1/Bearer/0' 147 147 ------------------------- … … 171 171 | Bytes received: 'N/A' 172 172 | Bytes transmitted: 'N/A' 173 root@xenial-newport:~# ifdown eth0 173 root@xenial-newport:~# ifdown eth0 #take down ethernet to avoid confusion 174 174 Killed old client process 175 175 Internet Systems Consortium DHCP Client 4.3.3 … … 183 183 DHCPRELEASE on eth0 to 172.24.0.2 port 67 (xid=0x3cab7268) 184 184 Restarting ntp (via systemctl): ntp.service. 185 root@xenial-newport:~# ifconfig wwan0 100.75.76.187/29 186 root@xenial-newport:~# route add default gw 100.75.76.188 187 root@xenial-newport:~# echo "nameserver 198.224.182.135" > /etc/resolv.conf 188 root@xenial-newport:~# ping www.google.com 189 root@xenial-newport:~# ping -c2 www.google.com 185 root@xenial-newport:~# ifconfig wwan0 100.75.76.187/29 #set IP address 186 root@xenial-newport:~# route add default gw 100.75.76.188 #set route 187 root@xenial-newport:~# echo "nameserver 198.224.182.135" > /etc/resolv.conf #set nameserver 188 root@xenial-newport:~# ping -c2 www.google.com #ping google to verify connection 190 189 PING www.google.com (216.58.192.196) 56(84) bytes of data. 191 190 64 bytes from ord30s25-in-f196.1e100.net (216.58.192.196): icmp_seq=1 ttl=52 time=568 ms … … 213 212 > PROXY=yes 214 213 > EOF 215 root@xenial-newport:~# qmicli -p -d /dev/cdc-wdm0 --wda-set-data-format=raw-ip 214 root@xenial-newport:~# qmicli -p -d /dev/cdc-wdm0 --wda-set-data-format=raw-ip #set modem for raw-ip 216 215 [/dev/cdc-wdm0] Successfully set data format 217 216 QoS flow header: no … … 222 221 Downlink data aggregation max datagrams: '0' 223 222 Downlink data aggregation max size: '0' 224 root@xenial-newport:~# qmicli -p -d /dev/cdc-wdm0 --set-expected-data-format=raw-ip 223 root@xenial-newport:~# qmicli -p -d /dev/cdc-wdm0 --set-expected-data-format=raw-ip #set modem for raw-ip 225 224 [/dev/cdc-wdm0] expected data format set to: raw-ip 226 root@xenial-newport:~# qmi-network /dev/cdc-wdm0 start 225 root@xenial-newport:~# qmi-network /dev/cdc-wdm0 start #start modem connection 227 226 Loading profile at /etc/qmi-network.conf... 228 227 APN: NIMBLINK.GW12.VZWENTP … … 239 238 Saving state at /tmp/qmi-network-state-cdc-wdm0... (PDH: 2194536080) 240 239 Network started successfully 241 root@xenial-newport:~# qmicli --device /dev/cdc-wdm0 --wds-get-current-settings 240 root@xenial-newport:~# qmicli --device /dev/cdc-wdm0 --wds-get-current-settings #get IP from provider 242 241 [/dev/cdc-wdm0] Current settings retrieved: 243 242 IP Family: IPv4