Skip to content

wwan/ofono: create connections based on available contexts

This is the re-submit of !773 (closed), plus other patches that I made with the focus of making auto-activation works right with oFono. TODO's from !773 (closed) are dealt, along with more items as driven by Ubuntu Touch's requirement.

This MR is tested on Ubuntu Touch 20.04 with NM 1.36.6 backported from Ubuntu 22.04.

Original MR message follows.


Downstream patches for this does it through NMSettings plugin, however settings plugin are hard to maintain and complicated architecture wise as well.

So directly create a connection profiles in-memory from the nm-modem-ofono side. Those profiles are created in /run, and are not added as a persistent connection, because connection state quite depends on the state of ofono

This also allows us to drop the hack where we are keeping track of active context/APN through the connection name, i.e if connection name was in /imsi/context1 format, it was used. Instead now, Connection name is actual context name which is user friendly ("Vodafone Connect" e.g. in my case), and details like IMSI and context are stored internally.


TODO

  • Upstream patches that are part of (!771 (closed)) first and rebase
  • Check Preferred Access point name, and use it to create connection for only that one
  • Handle case of multiple valid access point name
  • Handle case of adding/removing of access points
  • Tidy up code, and fix various issues told by CI (for now doing ci.skip till I know patch is in ready state)

Additional TODO

  • Handle case of oFono disappear (and re-appear)
  • Make sure the connection attempt is not failed outright in modem state _SEARCHING.
Edited by Ratchanan Srirattanamet

Merge request reports