We pass in the maximum size of the buffer to the read system call. On
the astronomically unlikely chance that we indeed read the full buffer
full of data, the subsequent assignment will overflow it. Fix this by
passing sizeof(buf) - 1 to the read system call instead.
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.