Link Search Menu Expand Document

Network manager and general notes

  1. Network manager and general notes
  2. Use of raspbian built in wiringPi RPi4 – update the wiringPi app
  3. NetworkManager
    1. NetworkManager - configuration
    2. NetworkManager - autoconnect
    3. NetworkManager - configure autoconnect using nmcli
    4. Network manager - configure via GUI
    5. Configure manually via the file system
    6. Stop network manager**
    7. Restart network manager
  4. Further network manager notes
  5. Debug stuff

Use of raspbian built in wiringPi RPi4 – update the wiringPi app

At the time of writing (August 2019) the builtin wiringPi app doesn’t work on the RPi4
This is a workaround from wiringpi.com

To upgrade:

cd /tmp
wget https://project-downloads.drogon.net/wiringpi-latest.deb
sudo dpkg -i wiringpi-latest.deb

Check with:

gpio -v

NetworkManager

NetworkManager is a linux daemon - from the manual

The NetworkManager daemon attempts to make networking configuration and operation as painless and automatic as possible by managing the primary network connection and other network interfaces, like Ethernet, Wi-Fi, and Mobile Broadband devices. NetworkManager will connect any network device when a connection for that device becomes available, unless that behavior is disabled. Information about networking is exported via a D-Bus interface to any interested application, providing a rich API with which to inspect and control network settings and operation.

Use Linux network manager to provide automatation of the Pilot cellular modules IP interface bringup in Linux

For more info

Documentation on network Manager

Documentation on network manager cellular command line configuration

NetworkManager - configuration

NetworkManager can be configured in a few different ways

  • GUI
  • nmcli
  • nmtui
  • direct data file edit
  • API

Note that the graphical interface has a database of general cellular networks.
To configure network manager manually use nmcli or manually edit the files on the RPi system - for example to change the APN / add PAP / CHAP / USER / PASSWORD …

NetworkManager - autoconnect

The network interface can be set to autoconnect when the cellular module is on - if the connection configuration has setting

autoconnect=true

NetworkManager - configure autoconnect using nmcli

Make the change - example

pi@raspberrypi:~ $ sudo nmcli c modify '3 Internet' connection.autoconnect yes

Check the result

pi@raspberrypi:~ $ nmcli c show '3 Internet' | grep connection.auto
connection.autoconnect:                 yes
connection.autoconnect-priority:        0
connection.autoconnect-retries:         -1 (default)
connection.autoconnect-slaves:          -1 (default)

To list nmcli settings “show” see

Network manager - configure via GUI

Right click on the tray icon - “edit - connections”

Configure manually via the file system

Configuration settings are actually stored in the file system e.g.

root@raspberrypi:/etc/NetworkManager# ls system-connections
'3 Internet.nmconnection'

For an example see

sudo service network-manager restart

Stop network manager**

sudo /etc/init.d/network-manager stop

Restart network manager

After editing settings - the network manager daemon needs to be restarted for the changes to take effect

sudo service network-manager restart

Further network manager notes

  • With dhcpcd disabled - network manager manages all of the RPi networking interfaces e.g. Ethernet, WiFi, Cellular …
  • With dhcpcd uninstalled but the GUI is not - it’s GUI is still visible in the Raspbian Task bar it reports “Connection to dhcpcd lost”
    the functionality of this GUI is replaced by the NetworkManager Applet icon
  • The command line tool nmtui doesn’t appear to be able to edit cellular device configuration

Debug stuff

Debug modemManager see

Have a look at the syslog

sudo tail -f /var/log/syslog

Have a look at running processes

ps -U0 -o 'tty,pid,comm' | grep ^?

J Thompson 2022