04-19-2024, 07:07 AM
(This post was last modified: 04-19-2024, 07:09 AM by Kevin Kofler.)
As far as I know (though I mostly know the story from the Plasma side, which dropped ofono support in favor of ModemManager), ofono is mostly deprecated, poorly maintained upstream, and ModemManager is what everyone works on nowadays. And keep in mind that ModemManager originally comes from GNOME developers, so it is also the more natural target for Phosh, even though Phosh indeed supports both. The main reason ofono is still a thing at all (and also why some not-really-GNU mobile Linux distributions such as SailfishOS and Ubuntu Touch still use it) is that it has a port working on top of Halium, so it can be used on Android kernels, whereas ModemManager does not support that. But that feature is not relevant for the PinePhone.
ModemManager is also by design not going to try to handle Bluetooth on its own, but rely on BlueZ and on either PulseAudio or Pipewire (where PulseAudio is also deprecated, but most PinePhone distros still use it because callaudiod profile switching is still designed for it) to do their part of the job. Otherwise, it would conflict with them, whereas environments like Plasma Mobile rely on BlueZ and PulseAudio/Pipewire APIs for their Bluetooth-related UI. In particular, Bluetooth audio is something I would not expect to be handled in ModemManager or ofono at all, but in PulseAudio or Pipewire, with maybe some changes to callaudiod to pick the correct profile for the Bluetooth headset instead of the internal mic&earpiece. The remote control (number key) part also does not belong into ModemManager or ofono at all, but probably into BlueZ.
At least that is how I would expect things to work and what I would expect to be upstreamable in the long run (though I do not work in any of the affected projects). You may be able to get something done more quickly with a different architecture, but then please do not be disappointed if you are unable to get your solution upstreamed or shipped by most distributions.
ModemManager is also by design not going to try to handle Bluetooth on its own, but rely on BlueZ and on either PulseAudio or Pipewire (where PulseAudio is also deprecated, but most PinePhone distros still use it because callaudiod profile switching is still designed for it) to do their part of the job. Otherwise, it would conflict with them, whereas environments like Plasma Mobile rely on BlueZ and PulseAudio/Pipewire APIs for their Bluetooth-related UI. In particular, Bluetooth audio is something I would not expect to be handled in ModemManager or ofono at all, but in PulseAudio or Pipewire, with maybe some changes to callaudiod to pick the correct profile for the Bluetooth headset instead of the internal mic&earpiece. The remote control (number key) part also does not belong into ModemManager or ofono at all, but probably into BlueZ.
At least that is how I would expect things to work and what I would expect to be upstreamable in the long run (though I do not work in any of the affected projects). You may be able to get something done more quickly with a different architecture, but then please do not be disappointed if you are unable to get your solution upstreamed or shipped by most distributions.