Converged network stack

Registered by Loïc Minier

Discuss requirements of converged network stack for Ubuntu Touch and Desktop; mobile data support etc.

Blueprint information

Loïc Minier
Stéphane Graber
Series goal:
Accepted for raring
Milestone target:
milestone icon ubuntu-13.05
Started by
Martin Pitt
Completed by
Martin Pitt

Related branches



== Issues with current network stacks ==
Main missing piece is data support (over 3G/4G) for Ubuntu Touch
Certification will be required for the whole phone stack
Leveraging RILd and binary libraries for it
Memory consumption is really high with NM + nm-applet + dhclient

== ConnMan v.s. NM ==
Considering ConnMan as a replacement; but need to estimate the amount of work in both cases amongst many angles
ModemManager currently used in NM; could support both ModemManager and oFono at the same time in NM
Support for specific WiFi drivers: relatively on equal footing here; most patches go in wpasupplicant anyway
Transition to ConnMan: would require converting the settings on upgrade

== Estimate amount of work required ==
 * (Stephane) Looked at how much effort it would be to add oFono support to Network Manager
   * Not a huge effort, and could support both MM and oFono at the same time; probably a month worth of work
   * Upstream NM ready to take oFono support
   * Could whitelist modems for oFono vs. MM
 * Possibility of using MM
  * ChromeBooks happily using MM, but lacks voice support
  * MM could get voice support, but was never certified on a phone
  * Voice has lots of ancillary features that may need to be developed as well (call forwarding, blocking, etc.)
  * Current MM iface (in git) supports more capability detection than pervious versions (example: SIM support lacking on CDMA modems)
 * (Stephane) Looked at how much effort it would be to add fast DHCP support to dhclient
  * dhclient needed for advanced support of features (example: infiniband)
  * Conmann DHCP support is much faster
  * Would require pulling the changes into dhclient (might be a large patch)
  * Security concerns should probably not block DHCP client choice (we can mitigate with apparmor)
  * NM does caching on a per-network basis to try and help the situation
   * concerned about creating DCHP network storms on large networks
 * (Alberto) Looked at how much work it would be to port Chewie to ConnMan
 * Security review
  * No issues with code quality (on either)
  * Connman is more engineered as a single user solution rather than multi-user
   * Might cause issues with settings being shared
   * Perhaps would need to be added after further review
   * Might be more of an issue for enterprise issue with network logins that might be based on domain login
  * NM has a fine grained PK access control
   * Used in guest session and on login screen
   * Removes some features for security reasons
 * (Tony) Looked at how much work it would be to add dhclient support to ConnMan
 * (Tony) Looked at how much work it would be to implement a RILd backend for oFono
  * Built initial framework for CES/MWC demo
   * Pulled pieces out of RILd for various features
  * Doesn't preclue usage of oFono directly for modems that have full support
  * Missing most advanced features like PINs on SIMs -- needs more work (not impossible)
 * (Mathieu) To check whether we can improve memory consumption
  * Dropping nm-applet (which seems to be the worst)
  * There hasn't been much profiling done currently, could be improved.
  * Is there a target? No specific target, just a observation more than a specific problem.
  * NM is looking for, in the future, to have the features being dynamically loadable to reduce memory consumption
 * (Mathieu) To look for ConnMan UIs to allow testing (just for evaluation)
  * [mpt] (doesn't support modern connman)
 * oFono supports SIM Toolkit already (took 6 people 12 months), so not easy to replicate; that's high-level and hw independent, modem plugin just needs a transport plugin

== !! Decision on NM vs. ConnMan !! ==
 * Default: use oFono (no disagreement)
 * Stephane: NM
 * Tony: NM
 * Mathieu: NM
 * Marc: Unable to commit :-)
 * Loic: NM


== Security model ==
Security review of ConnMan
AppArmor profiles
Secure storage of WiFi passwords

== QA ==
Need strong QA for WiFi and telephony stack. Test plan, automated testing of middleware, of drivers etc. There's only 15 manual tests and 5 automated tests targeting WiFi.

   *13 test cases, covering basic connection to: ethernet, WPA/WPA2 encrypted network, WEP network, open network, 3G network, Cisco VPN network, OpenVPN, PPTP VPN, OpenConnect VPN.
   * 2 and a half test cases: connect to a wireless network from unity, from gnome classic, the half test case is one where you verify you have connection, but it doesn't specify how to establish it.

 * Connect to allowed bands covered by 5 cert tests, they need to be run regularly on new images.
 * Rfkill, scanning, association tests missing
 * state transitioning testing needs to be created (suspend/resume/flight mode/switch off/on)

Saucy network test development is covered by

== Indicators ==
Want to drop nm-applet anyway, even if we keep Network Manager.
Chewie implementation started against Network Manager, but only covering WiFi at this point; misses e.g. wired ethernet and VPN connections. Estimate to rewrite the Chewie bits for ConnMan are around 8-10 weeks of work.
Need to sync with design on complete design that suits the implementation requirements.

== wpasupplicant ==
Which version to use? Issues with iw, there’s an Android version

WiFi direct support is in Android, not clear how important it is for touch tough

= Notes =

mathieu-tl, 2013-05-03:
Carried over 13.05 work items to client-1305-connectivity-not-networking.


Work Items

Work items for ubuntu-13.04-month-5:
[stgraber] prototype oFono support for NM: DONE

Work items for ubuntu-13.04-month-6:
[cyphermox] debug oFono modem detection code from stgraber: DONE
[stgraber] Ensure ModemManager continues handling bluetooth connections: DONE
[pitti] investigate how mac80211_hwsim kernel module works, and its utility for test automation: DONE
[pitti] investigate how to use hostapd for simulating an access point with mac80211_hwsim: DONE
[pitti] write wpa_supplicant autopkgtest for open/WPA/WPA2: DONE
[pitti] write dhclient autopkgtest for IPv4 and IPv6: DONE
[pitti] fix mac80211_hwsim kernel module to get accepted by NetworkManager: DONE
[pitti] get mac80211_hwsim fix into raring kernel: DONE
[pitti] write network-manager autopkgtest for WPA/WPA2: DONE
[pitti] write network-manager autopkgtest for IPv4, IPv6+DHCP, IPV6+RA-only: DONE
[pitti] write network-manager autopkgtest for killswitch handling (tear down on kill, reconnect on unkill): DONE
[pitti] write network-manager autopkgtest for reconnect after suspend: DONE
[pitti] make network-manager tests work against upstream trunk: DONE
[lool] Loic to followup on testing with Gema and cert guys: DONE