Mini-Tutorials¶
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.
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 or via QMI. Support 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