Merge ~alfonsosanchezbeato/snappy-hwe-snaps/+git/engineering-tests:adapt-modem-tests into ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master

Proposed by Alfonso Sanchez-Beato
Status: Merged
Approved by: Simon Fels
Approved revision: 04cbaa05575a274492d3dca164fb601343e0e996
Merged at revision: 3fa2d24978552e2f34fd093c4d328b99c3f0203b
Proposed branch: ~alfonsosanchezbeato/snappy-hwe-snaps/+git/engineering-tests:adapt-modem-tests
Merge into: ~snappy-hwe-team/snappy-hwe-snaps/+git/engineering-tests:master
Diff against target: 111 lines (+49/-25)
1 file modified
modem-manager/units/modem-manager.pxu (+49/-25)
Reviewer Review Type Date Requested Status
System Enablement Bot continuous-integration Approve
Matteo Croce (community) Approve
Simon Fels Approve
Konrad Zapałowicz (community) code Approve
Review via email: mp+318745@code.launchpad.net

Commit message

Adapt modem tests to latest mm snap

Adapt tests to what is provided by latest modem-manager snap.

Description of the change

Adapt modem tests to latest mm snap

Adapt tests to what is provided by latest modem-manager snap.

To post a comment you must log in.
Revision history for this message
Konrad Zapałowicz (kzapalowicz) wrote :

ack

review: Approve (code)
Revision history for this message
Simon Fels (morphis) wrote :

LGTM

review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Matteo Croce (teknoraver) :
review: Approve
Revision history for this message
System Enablement Bot (system-enablement-ci-bot) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/modem-manager/units/modem-manager.pxu b/modem-manager/units/modem-manager.pxu
2index 02da607..3912ac2 100644
3--- a/modem-manager/units/modem-manager.pxu
4+++ b/modem-manager/units/modem-manager.pxu
5@@ -3,6 +3,7 @@
6 #
7 # Written by:
8 # Jim Hodapp <jim.hodapp@canonical.com>
9+# Alfonso Sanchez-Beato <alfonso.sanchez-beato@canonical.com>
10
11 unit: category
12 id: modem_manager
13@@ -13,13 +14,17 @@ category_id: modem_manager
14 _description: Ensure that the modem-manager interface is connected
15 plugin: manual
16 _steps:
17- 1. Connect required modem-manager slot/plug
18- .
19- $ sudo snap connect modem-manager:mmcli modem-manager:service
20- $ sudo snap connect network-manager:nmcli network-manager:service
21- $ sudo snap connect network-manager:modem-manager modem-manager:service
22- $ sudo snap connect network-manager:ppp ubuntu-core:ppp
23- .
24+ 1. Install network-manager if not already installed
25+ .
26+ $ sudo snap install network-manager
27+ .
28+ 2. Connect required modem-manager/network-manager slots/plugs
29+ .
30+ $ sudo snap connect modem-manager:mmcli modem-manager:service
31+ $ sudo snap connect network-manager:nmcli network-manager:service
32+ $ sudo snap connect network-manager:modem-manager modem-manager:service
33+ $ sudo snap connect network-manager:ppp ubuntu-core:ppp
34+ .
35 _verification:
36 Verify that you see the following when running snap interfaces:
37 modem-manager:service modem-manager:mmcli,network-manager:modem-manager
38@@ -35,8 +40,8 @@ _purpose:
39 Check if the modem shows up as being recognized by modem-manager.
40 _steps:
41 1. Execute the following command to retrieve the list of all detected modems:
42- .
43- $ /snap/bin/modem-manager.mmcli -L
44+ .
45+ $ sudo mmcli -L
46 _verification:
47 Your expected modem is shown in the output list.
48
49@@ -49,9 +54,9 @@ _purpose:
50 Check if the modem details can be listed.
51 _steps:
52 1. Execute the following command to retrieve the list of all detected modems.
53- Note, the modem number is listed from the previous test:
54- .
55- $ /snap/bin/modem-manager.mmcli -m <modem_number>
56+ Note, the modem number is listed from the previous test:
57+ .
58+ $ sudo mmcli -m <modem_number>
59 _verification:
60 Your desired modem detail is listed.
61
62@@ -63,17 +68,36 @@ _summary: Connect to a listed modem
63 _purpose:
64 Connect to a listed modem and verify connection status
65 _steps:
66- 1. Execute the following commands to connect to a particular modem.
67- Note, replace <interface> with something like "ttyACM3" (look in /dev).
68- You may also find it as the primary port when issuing the command:
69- /snap/bin/network-manager.nmcli -m <modem_number>
70- Also, replace <op_apn> by looking up the APN string for your cell provider
71- at http://www.apn-settings.com (e.g. "fast.t-mobile.com" for T-Mobile 4G).
72- Finally, not that "gsmconn" is an arbitrary connection name and can be set
73- to anything that makes sense for the connection type.
74- .
75- $ /snap/bin/network-manager.nmcli c add type gsm ifname <interface> con-name
76- gsmconn apn <op_apn>
77- $ /snap/bin/network-manager.nmcli r wwan on
78+ 1. Execute the following commands to connect to a particular modem. First run
79+ "sudo nmcli d" to find out what you need to put in <interface> (look for
80+ TYPE=gsm, the interface will be the name in the DEVICE column). It will
81+ probably be something that starts with "tty" or "cdc". Also, replace
82+ <op_apn> by looking up the APN string for your cell provider at
83+ http://www.apn-settings.com (e.g. "fast.t-mobile.com" for T-Mobile 4G).
84+ Finally, "gsmconn" is an arbitrary connection name and can be set to
85+ anything that makes sense for the connection type.
86+ .
87+ $ sudo nmcli c add type gsm ifname <interface> con-name gsmconn apn <op_apn>
88+ $ sudo nmcli r wwan on
89+ .
90+ 2. Check that the connection is up with "sudo nmcli d". It should show that
91+ state is "connected". This can take some time depending on network
92+ conditions and on the modem type.
93+ .
94+ 3. Check which is the network interface for the cellular connection. For this,
95+ fist run
96+ .
97+ $ sudo nmcli d show <interface>
98+ .
99+ (here <interface> is the one from point 1), check the IP4.ADDRESS field,
100+ then run
101+ .
102+ $ ip address
103+ .
104+ and there you can find the network interface that owns that address.
105+ .
106+ 4. Add a route to 8.8.8.8 with
107+ .
108+ $ sudo ip route add 8.8.8.8 dev <network-interface>
109 _verification:
110- Verify that you have a modem connection by pinging www.ubuntu.com.
111+ Verify that you have a modem connection by pinging 8.8.8.8.

Subscribers

People subscribed via source and target branches