mini-tutorials.rst 8.27 KB
Newer Older
1
2
3
4
5
6

.. _mini-tutorials:

Mini-Tutorials
==============

Tim M's avatar
Tim M committed
7
This page is a collection of some helpful commands to setup various applications and test their functionality within the dev boards. These tidbits are not specific to any one board but are rather generally useful guides.
8
9
10
11

MC7455 Baseband Modem mPCIe Card
################################

Tim M's avatar
Tim M committed
12
If you are testing the Sierra Wireless MC7455 with the Nit6QP_MAX, make sure you cover pin 22 with some adhesive film to prevent the modem from resetting over and over. It is okay to cover pin 20 as it is floating anyway. Pin 18 is GND and covering it is not prefered but _may_ be safe to do so.
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
Pin 22 is the one that is blacked out in this image:
`cover this pin <https://talk.puri.sm/_matrix/media/v1/download/talk.puri.sm/jzwIpANihuiyChonjlLvdLaM>`_

We may need to (unsure yet) cover the USB 3.0 pins as they are PCIe RX TX diff-pairs on the nit6 board:
`might want to cover these <https://cdn.techship.com/uploads/images/834/mc7455.1493903755.jpg>`_ (source: https://techship.com/faq/38/)

Modem Firmware Upgrade
----------------------

To upgrade the firmware stop modem manager, unzip `the firmware <https://cloud.puri.sm/apps/files/?dir=/dev/librem5/hardware/baseband_modem/sierra&fileid=20789>`_ and use QMI mode for the update::

   $ unzip SWI9X30C_02.24.05.06_Generic_002.026_000.zip 
   $ systemctl stop ModemManager
   $ qmi-firmware-update   --update -d 1199:9071 --device-open-qmi SWI9X30C_02.24.05.06.cwe SWI9X30C_02.24.05.06_GENERIC_002.026_000.nvu
   loading device information before the update...
   setting firmware preference:
   firmware version: '02.24.05.06'
   config version:   '002.026_000'
   carrier:          'GENERIC'
   rebooting in download mode...
   download mode detected
   downloading cwe image: SWI9X30C_02.24.05.06.cwe (64.4 MB)...
   finalizing download... (may take more than one minute, be patient)
   successfully downloaded in 73.72s (874.0 kB/s)
   downloading cwe image: SWI9X30C_02.24.05.06_GENERIC_002.026_000.nvu (3.9 kB)...
   finalizing download... (may take more than one minute, be patient)
   successfully downloaded in 0.06s (66.1 kB/s)
   rebooting in normal mode...
   normal mode detected

   NOTE: in order to validate which is the firmware running in the
   module, the program will wait for a complete boot; this process
   may take some time and several retries.
   
   waiting some time for the device to boot...
   loading device information after the update (1/12)...
   
   
      original firmware revision was:
         SWI9X30C_02.08.02.00 r5428 CARMD-EV-FRMWR2 2016/01/06 20:38:53
      original running firmware details:
         Model: MC7455
         Boot version: SWI9X30C_02.08.02.00
         AMSS version: SWI9X30C_02.08.02.00
         SKU ID: 1102476
         Carrier ID: 1
         Config version: 002.007_001
      original firmware preference details:
         image 'modem': unique id '002.007_001', build id '02.08.02.00_GENERIC'
         image 'pri': unique id '002.007_001', build id '02.08.02.00_GENERIC'
   
      new firmware revision is:
         SWI9X30C_02.24.05.06 r7040 CARMD-EV-FRMWR2 2017/05/19 06:23:09
      new running firmware details:
         Model: MC7455
         Boot version: SWI9X30C_02.24.05.06
         AMSS version: SWI9X30C_02.24.05.06
         SKU ID: 1102476
         Carrier ID: 1
         Config version: 002.026_000
      new firmware preference details:
         image 'modem': unique id '002.026_000', build id '02.24.05.06_GENERIC'
         image 'pri': unique id '002.026_000', build id '02.24.05.06_GENERIC'
   
      NOTE: this device supports stored image management
      with qmicli operations:

         --dms-list-stored-images
         --dms-select-stored-image
         --dms-delete-stored-image
   
      NOTE: this device supports firmware preference management
      with qmicli operations:

         --dms-get-firmware-preference
         --dms-set-firmware-preference
   

For more details see https://sigquit.wordpress.com/2016/12/09/qmi-firmware-update-with-libqmi/. These devices can either be in MBIM or QMI mode, in QMI mode MBIM commands hand: https://lists.freedesktop.org/archives/libmbim-devel/2017-March/000787.html



Data connections
----------------

Test basic connectivity::

   # most basic check, works without sim card
   mmcli -m0
   # Needs a sim card inserted
   mmcli -i 0 --pin=<yourpin>
   mmcli -m 0 --enable
   mmcli -m 0 --simple-connect=apn=internet
   mmcli -m 0 --simple-disconnect

If this works use *nm-connection-editor*  on Wayland (will be part of the next image) to create a NetworkManager connection named *test*. You can then bring the connection up and down using::

   nmcli con up test
   nmcli con down test

Location services
-----------------

Location services are either exposed via AT commands (http://whirlpool.net.au/wiki/sierra_advanced_gps) or via QMI. Suppot for QMI LOC service is not yet supported in libqmi (while the older POS is):  https://lists.freedesktop.org/archives/modemmanager-devel/2017-April/004471.html

Wireless Networking
###################

If you have your ethernet cable plugged in, you should automatically get a DHCP address on eth0. Alternatively, you can bring up the wireless interface with a DHCP address using Network Manager::

   $ nmtui

   1. Select "Edit a Connection". Hit enter.
   2. Arrow over to "Add". Hit enter.
   3. Arrow down to "Wi-Fi". Hit enter.
   4. Wifi settings:
      - Change the name if you'd like
      - Arrow down to SSID and enter your wifi network name.
      - Change the "Security" from "<none>" to the correct wifi security type ("WPA & WPA2 Personal" is most common) and enter your wifi network password on the field below.
      - Arrow down to "OK" and hit enter.
   5. Now you are on the screen with the list of your network connections where you should now see your wifi connection listed. Arrow to "Back" and hit enter.
   6. Arrow down to "Activate a Connection". Hit enter.
   7. Select your wifi connection and then arrow over to "Activate" and hit enter. You should see a pop-up that says "Connecting" and when that pop-up goes away, your connection should be active. Arrow down to "Back" and hit enter.
   8. Arrow down to "Quit" and hit enter.
   9. Now, back at the command prompt `ip addr` should show that your wlan0 interface has a DHCP address and your packets should be able to reach the outside world.

   purism@pureos:~$ ip addr
   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: can0: <NOARP,ECHO> mtu 16 qdisc noop state DOWN group default qlen 10
       link/can
   3: eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
       link/ether 00:19:b8:03:1c:ce brd ff:ff:ff:ff:ff:ff
   4: sit0@NONE: <NOARP> mtu 1480 qdisc noop state DOWN group default qlen 1000
       link/sit 0.0.0.0 brd 0.0.0.0
   5: wwan0: <POINTOPOINT,MULTICAST,NOARP> mtu 1500 qdisc noop state DOWN group default qlen 1000
       link/none
   6: wwan1: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
       link/ether 0a:76:88:94:6b:e5 brd ff:ff:ff:ff:ff:ff
   7: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
       link/ether 50:65:83:1b:16:70 brd ff:ff:ff:ff:ff:ff
       inet 192.168.1.191/24 brd 192.168.1.255 scope global dynamic noprefixroute wlan0
          valid_lft 3068649028sec preferred_lft 3068649028sec
       inet6 2601:281:c601:6dff:1e66:701c:25cc:7221/64 scope global dynamic noprefixroute
          valid_lft 3068649028sec preferred_lft 3068649028sec
       inet6 fe80::7231:a831:5341:6968/64 scope link noprefixroute
          valid_lft forever preferred_lft forever

   purism@pureos:~$ ping puri.sm
   PING puri.sm (138.201.183.172) 56(84) bytes of data.
   64 bytes from web.puri.sm (138.201.183.172): icmp_seq=1 ttl=46 time=154 ms
   64 bytes from web.puri.sm (138.201.183.172): icmp_seq=2 ttl=46 time=165 ms
   64 bytes from web.puri.sm (138.201.183.172): icmp_seq=3 ttl=46 time=161 ms
   ^C
   --- puri.sm ping statistics ---
   3 packets transmitted, 3 received, 0% packet loss, time 2000ms
   rtt min/avg/max/mdev = 154.192/160.226/165.224/4.586 ms