Applications don't really understand our current values very well and
would need to look up the spec. Instead we change to much more commonly
accepted terms.
This adds the methods on the D-bus interface to allow the
client to handle USSD requests from the network, according to 22.090.
Unfortunately this document is not clear on every point and some
details can't be implemented. This includes reporting unsupported
request to the network, unsupported language, ME busy etc, because
there isn't an AT command for that.
According to 22.030, UDUB or CHLD=0 can only be invoked on waiting
calls. Most AT command based modems do not support using CHLD=0 on an
incoming call. So we remove the Busy method and invoke set_udub on
a call that is in the waiting state.
This commit implements the GPRS context setup and teardown according to
doc/dataconnectionmanager-api.txt
One issue with the AT implementation of the api is that "Powered" (a
read-write property) can be set independently of "Attached" (read-only
property) and remain set when "Attached" is clear. The semantics would
be that the network doesn't have resources to let the modem attach,
but the modem waits for the resources to become available and then
attaches. On AT the modem is in this state only when executing +CGATT,
so currently the code will rerun +CGATT as soon as the previous one
returns with error, probably starving other commands. A possible
workaround would be for "Powered" to flip back to False after the modem
fails to attach once, or give up on having separate properties.
Alternatively we could re-try to attach periodically but on one modem
I've tried +CGATT fails after about 1 minute (that's the Calypso) and
on another only about 0.5s (Nokia phones with AT emulation).
When "Powered" is set and "RoamingAllowed" is clear and we manage to
attach and find that we're roaming, ofono resets "Powered".
We may want to catch the user trying to dial *99***1# which is the
backwards compatibility quirk for old modems (same way ofono parses
USSD strings).