Instead of using a predefined set of string values for 'ip-type' in
Modem.CreateBearer() and Simple.Connect(), we'll use an enumeration. The
implementation will then need to convert the requested IP family type to e.g.
the correct PDP type in 3GPP modems.
This change also consolidates the use of enums in dictionary properties when
possible to do so, as with the Rm Protocol.
Settings are given with the 'AT$NWRAT' arguments as follows:
1,1: 2G allowed
2,1: 3G allowed
0,2: 2G and 3G allowed, none preferred
1,2: 2G and 3G allowed, 2G preferred
2,2: 2G and 3G allowed, 3G preferred
Plugins may specify that specific vendor & product IDs or strings are not
supported. This is useful when plugins need to specify that they support
all devices of a given vendor except for some specific ones.
This patch modifies MMBroadbandModemIcera as follows:
- Change modem_load_current_bands to report only bands that are
currently enabled
- Change modem_set_bands to handle setting ANY band in a way that no
forbidden bands are activated.
In practice, it may take longer time for a SIM to become ready when the
modem interface tries to use AT+CPIN? to determine if the SIM is
PIN-locked. This patch increases the number of trials for PIN check to
address the issue.
Once upon a time it was a good idea to have separate steps for CS and PS related
actions, so that plugins could override specific steps with a great detail. That
idea turned out to be not very useful, as the only case which requires custom
CS/PS registration actions is the QMI-enabled modem, and that one has commands
to act on both registration actions at the same time. So, we now consolidate
all steps, so that the implementation of the interface needs to provide all the
logic to setup/enable/disable/cleanup/check registrations in each mode.
Also, we consolidate how the unsolicited registration messages are handled, so
that it's equivalent to other unsolicited messages:
* 'Setup' will configure ports to process the unsolicited messages.
* 'Enable' will tell the modem to send unsolicited messages.
* 'Disable' will tell the modem not to send unsolicited messages.
* 'Cleanup will configure ports to ignore the unsolicited messages.
The previous logic would first request to check if indicators were supported,
and only then allow to setup/enable/cleanup/disable unsolicited events. This
behaviour is very specific to the generic 3GPP case, and therefore it shouldn't
be handled in the even more generic 3GPP interface. The logic is still kept,
but handled within the MMBroadbandModem object.
If a port support task was deferred until suggested, do not assume that the
suggested plugin actually supports the port, instead re-launch support check.
This covers the cases where a net port appears in a modem which only supports
AT ports (e.g. Nokia case).