Skip to content

Switch from ConnMan to NetworkManager for edge-agent compatibility #25

@mihai-chiorean

Description

@mihai-chiorean

Summary

EdgeOS currently uses ConnMan for network management, but the edge-agent WiFi implementation requires NetworkManager's DBus interface. This incompatibility prevents the edge-agent from managing WiFi connections on EdgeOS devices.

Problem

The edge-agent's WiFi management implementation (in the NetworkManager.swift module) specifically uses NetworkManager's DBus API:

  • Connects to org.freedesktop.NetworkManager DBus service
  • Uses NetworkManager-specific interfaces like:
    • org.freedesktop.NetworkManager.Device.Wireless
    • org.freedesktop.NetworkManager.AccessPoint
    • org.freedesktop.NetworkManager.Connection.Active
  • Implements WiFi operations through NetworkManager's AddAndActivateConnection method

This is incompatible with ConnMan, which uses different DBus interfaces (net.connman.*).

Current State

  • EdgeOS: Uses ConnMan (connman package in meta-edgeos/recipes-core/packagegroups/packagegroup-edgeos-base.bb:14)
  • edge-agent: Hardcoded to use NetworkManager DBus API for WiFi management

Proposed Solution

Replace ConnMan with NetworkManager in EdgeOS to ensure compatibility with edge-agent:

# In packagegroup-edgeos-base.bb
RDEPENDS:${PN} = " \
    packagegroup-core-boot \
    packagegroup-base-extended \
    coreutils \
    libstdc++ \
    util-linux \
-   connman \
+   networkmanager \
    tzdata \
    zstd \
    iproute2 \
    vim \
    edgeos-identity \
    edgeos-user \
    "

Implementation Checklist

  • Replace connman with networkmanager in packagegroup-edgeos-base.bb
  • Add NetworkManager systemd service enablement
  • Configure NetworkManager for USB gadget compatibility (192.168.7.1)
  • Update any ConnMan-specific configuration files
  • Test WiFi scanning/connection via edge-agent
  • Verify USB gadget networking still works
  • Update documentation

Benefits

  1. Full edge-agent compatibility: WiFi commands will work out of the box
  2. Richer API: NetworkManager provides more comprehensive DBus interface
  3. Better enterprise support: WPA2-Enterprise, 802.1x authentication
  4. Active development: NetworkManager has broader adoption and support
  5. Consistent with edge-agent design: No need to maintain dual network manager support

Testing Required

  • USB gadget Ethernet (192.168.7.1) must continue working
  • WiFi operations through edge-agent CLI
  • Boot time impact measurement
  • Memory usage comparison

Alternative Approaches Considered

  1. Modify edge-agent to support ConnMan: Would require significant Swift code changes and maintaining two code paths
  2. Add abstraction layer: Complex and adds maintenance burden
  3. Make configurable: Would complicate both projects

Switching to NetworkManager is the cleanest solution that aligns with the edge-agent's existing implementation.

References

  • Edge-agent NetworkManager implementation: NetworkManager.swift
  • Current ConnMan usage: /meta-edgeos/recipes-core/packagegroups/packagegroup-edgeos-base.bb:14

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions