Handled IPv6 address after activating PDP context.
Received IPv6 address is of format addr + netmask in the same string
in the form of "a1.a2.a3.a4.a5.a6.a7.a8.a9.a10.a11.a12.a13.a14.a15.a16.
m1.m2.m3.m4.m5.m6.m7.m8.m9.m10.m11.m12.m13.m14.m15.m16"
Some modems, eg. Quectel EC25E, return the ESN, IMEI, and MEID even
though they support only one network type in a region. Current serial
number query gives precedence to the ESN if it exists, and does not
consider the IMEI and MEID.
Add a check of the supported radio interfaces in deciding which
serial number to return. If radio interfaces are 3GPP based, then
return the IMEI, else return the ESN. If neither exist, return MEID
if available, else fail.
The ublox modems always run DHCP when in router mode.
Unfortunately the code overwrote the IP settings with
static IP settings while activating.
Now we respect the networking_mode regardless if
we read settings during activation or read settings
phase.
This fix is similar to the one in the following commit,
but fixes allocation for context ids after ap's are
read from settings.
commit c3fdf6a7c5
Author: Denis Kenzior <denkenz@gmail.com>
Date: Thu Jan 3 17:17:21 2019 -0600
gprs: Fix allocation of context id
Handled DSSA use case for xmm7modem. Added driver function
to switch between available card slots for SIM.
Only one SIM will be active at a given time. On calling this
function the active SIM will be removed and the card slot made
inactive and SIM in the other card slot will be made active.
Use case is similar to a SIM swap/change where one SIM is replaced
another SIM in the same slot.
According to the u-blox AT Commands Manual and my tests
the response prefix of AT+UUSBCONF is "+UUSBCONF:", including
a colon. The colon was missing in the code, causing next step
to parse a number to fail, since a colon is not a number.
In a recent patch vendor family was only set if the device
did not support USBCONF, but that resulted in drivers
being registered the "generic" vendor. That caused
for instance netreg to use incorrect cmer mode and fail
on TOBY-L210.
Adding two new properties to sim manager interface to handle
dual SIM single active use case.
CardSlotCount [readonly]
Contains the count of number of SIM card slots available.
ActiveCardSlot [readwrite]
Contains the index of the currently active SIM card slot
for dual SIM single active mode.
Trying to set the networking mode to "bridge" mode in the plugin is bogus
because the setting does not apply until after the device has been
reset. Instead, the current setting should be queried.
If a user wants to set the modem networking mode, the setting should be
made outside of ofono.
The gprs-context driver has already been adjusted to query the
networking mode and to set things up accordingly.
The TOBY L2 may run in either "bridge" mode or "router" mode. For this
model, query the configured mode so that the appropriate settings are
communicated when the context is activated.
The TOBY L4 supports only "router mode" where the modem presents a
network interface that one can run a DHCP client against. Behind this
interface, the modem takes care of routing packets via NAT by:
i) selecting the relevant context based on destination IP
ii) using the first activated context as the default route
In order to have the connection manager, thus, do the right thing, the
context only needs to report itself as being active and with the IP
settings set to method "dhcp". There's no need for the connection manager
to know details like what IP address the context was assigned.
Tested with connman that does the right thing when it finds an active
"dhcp" context.
Depending on the transport used on the data connection we want either
the "atmodem" (PPP) driver or the "ubloxmodem". For the "ubloxmodem",
we want to pass the model data so this patch wrangles some parameters to
make sure that right driver and right variant data are passed.
There are a couple of semi-independent changes here:
* use the 'vendor' parameter to pass the modem 'model'
* support TOBY L4 modem which uses a fixed CID for configuring the EPS
default bearer
* add the setup of authentication parameters that was recently added to
the atmodem LTE driver
ttyACM0 (USB interface 02) is reportedly unreliable (breaking DHCP setup)
so the recommended approach is to use ttyACM2 (USB interface 06)
exclusively.
Some aspects of a device are detectable at runtime, like the USB profile
detection that was added in a patch preceding this one. This patch
switches the driver over from creating a new "vendor id" for each
profile to just setting a flag. This is more easily extensible as we
detect other features of the modem.
The TOBY L2 series of modems presents a number of different
configurations with different throughtput characteristics. These
configurations are packaged up as USB profiles; moreover, changing the
profile actually changes the USB model ID so this is even more like
selecting a different "device" altogether. Nonetheless, all we need to
know is which profile is selected in order to set things up correctly
and this can be queried directly.
This patch adds a call to UUSBCONF for applicable modems in order to
query the USB configuration to find out which profile is active.
This flag should be set on devices that support multiple USB profiles
and will be used to determine whether or not querying USB profiles is
appropriate/necessary.
This patch adds a call to CGMM into the modem_enable path in order to
establish the specific device model. From this device model string, a
model-specific capabilities structure can be selected.
This sets up some device model data structures and adds some helpers for
manipulating them. These data structures are a first step to trying to
support the large number of devices that ublox produces with a common
driver structure.
Many ublox modems can sit on either the USB bus or talk directly to a
UART. The udev plugin mostly takes care of figuring out what ports to
talk to and the protocol is common for all devices after that.
This patch simplifies the setup a bit:
i) There must always be an aux channel for communication with the modem
ii) The aux channel may be found behind the string Aux for USB modems
or Device for serial modems
iii) If the Modem string is set, use it; if not set, assume it's not
available.