Commit Graph

8869 Commits

Author SHA1 Message Date
Denis Kenzior b126407632 mbmmodem: Remove unneeded if 2019-04-29 14:11:22 -05:00
Denis Kenzior 4bb6e09661 phoneseim: Remove unneeded if 2019-04-29 14:09:56 -05:00
Denis Kenzior 9da5779a90 stemodem: Remove unneeded if 2019-04-29 14:09:11 -05:00
Denis Kenzior 0b2de27727 telit: Remove unneeded if 2019-04-29 14:07:59 -05:00
Denis Kenzior ea6cd4e7fd huawei: Remove unneeded if statement 2019-04-29 14:06:58 -05:00
Denis Kenzior c13411da6f icera: Remove unneeded if statement 2019-04-29 14:06:27 -05:00
Denis Kenzior cdcb576692 hsomodem: Remove unneeded if statement 2019-04-29 14:06:19 -05:00
Denis Kenzior eef1f73cb3 swmodem: Remove unneeded if statement 2019-04-29 14:01:41 -05:00
Denis Kenzior c05cbf147d ifxmodem: Remove unneeded if statement
if (ctx->apn) always evalues to true since it is an array member
2019-04-29 14:00:42 -05:00
Denis Kenzior 88f2ae3869 atmodem: Remove unneeded if statement
if (ctx->apn) is always true since apn is an array variable
2019-04-29 13:59:36 -05:00
Antara Borwankar 413e6ecab0 xmm7modem: handling of IPv6 address for activated context
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"
2019-04-29 11:33:58 -05:00
Alexander Couzens 64df5344c5 qmi: netmon: fix crashs on get_rssi_cb when BER or RSSI are empty
The message can be emitted without the fields being present. In this case ber or rssi are 0
resulting in a null pointer deref.
2019-04-28 10:13:51 -05:00
Alexander Couzens d604052cef gprs: netreg_status_changed: output the status as human readable string 2019-04-28 10:13:51 -05:00
Alexander Couzens 13181d1a01 network: debug log the network time on update 2019-04-28 10:13:07 -05:00
Alexander Couzens c508574f68 network/ofono_netreg_status_notify: debug log the lac and ci 2019-04-28 10:13:07 -05:00
Denis Kenzior 79565d33d8 AUTHORS: Mention Pau's contributions 2019-04-26 12:21:53 -05:00
Denis Kenzior 47beb6b378 AUTHORS: Mention Alexander's contributions 2019-04-26 12:20:45 -05:00
Denis Kenzior dd4c444393 AUTHORS: Mention Tom's contributions 2019-04-16 11:52:56 -05:00
Tom Nguyen 0ddb7c6e2f qmimodem: return all serial numbers
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.
2019-04-16 11:51:37 -05:00
Richard Röjfors 05aaab72ae gprs: Always store RoamingAllowed as a boolean.
In one instance it was stored as boolean and another as int.
Since its always parsed as a boolean and it is a boolean,
always store it as boolean.
2019-04-16 11:46:00 -05:00
Marcel Holtmann fe9d22374e Release 1.29 2019-04-12 22:13:00 +02:00
Richard Röjfors 64df539a27 ublox: gprs-context: Fix router mode IP settings.
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.
2019-04-04 09:55:04 -05:00
Richard Röjfors b9fdba531f gprs: Fix allocation of context id read from settings
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
2019-04-02 10:41:16 -05:00
Antara Borwankar 05484bdb73 xmm7modem: Changes in plugin for DSSA functionality
Changed the sim driver vendor for xmm7modem from
OFONO_VENDOR_IFX to OFONO_VENDOR_XMM to handle DSSA functionality.
2019-04-02 10:36:23 -05:00
Antara Borwankar c76b68d4bf xmm7modem: handling of dual sim single active feature
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.
2019-04-02 10:34:11 -05:00
Antara Borwankar d10a2490b1 sim: added error handling in set slot callback
Adding the handling of error when the driver returns
CME ERROR:4.

This error will be returned for non xmm vendor modems
using ifxmodem driver for sim.
2019-04-02 10:27:07 -05:00
Richard Röjfors 2004d26cdc ublox: Correct the USBCONF reply prefix
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.
2019-04-01 09:56:40 -05:00
Richard Röjfors 4d64235f27 ublox: Do not leave vendor_family unset
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.
2019-04-01 09:52:59 -05:00
Denis Kenzior c5cb6f7a3c sim: Initialize card_slot_count and active_card_slot
Initialize both to 1 so that SimManager does not erroneously show
ActiveCardSlot as 0 for drivers that do not (yet) setup these values.
2019-03-28 21:08:02 -05:00
Denis Kenzior ab4e5d0852 sim: Emit PropertyChanged for ActiveCardSlot changes 2019-03-28 21:08:02 -05:00
Antara Borwankar 693396da22 sim: handling of dual sim single active feature
Added implementation for handling CardSlotCount and ActiveCardSlot
properties for DSSA use case.
2019-03-28 21:08:02 -05:00
Antara Borwankar a7a2d09d10 sim: Added set function for CardSlotCount and ActiveCardSlot
Adding set function definition for CardSlotCount and ActiveCardSlot
properties.
2019-03-28 21:08:02 -05:00
Antara Borwankar f143f1f838 doc: Added new properties to SimManager for DSSA
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.
2019-03-28 21:07:41 -05:00
Jonas Bonn 9cba079221 ublox: do not set bridge mode for TOBY L2
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.
2019-03-14 20:34:32 -05:00
Jonas Bonn a55e797ba2 ublox: gprs-context: query networking mode for TOBY L2
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.
2019-03-14 20:34:32 -05:00
Jonas Bonn efe1306ec2 ublox: TOBY L4 supports only router mode
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.
2019-03-14 20:34:32 -05:00
Jonas Bonn 5a6de99737 ublox: pass model_id to gprs-context driver
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.
2019-03-14 20:34:32 -05:00
Jonas Bonn d393863486 ublox: gprs-context: take model parameter 2019-03-14 20:34:32 -05:00
Jonas Bonn e2d2712708 ublox: pass model id to LTE plugin 2019-03-13 16:44:43 -05:00
Jonas Bonn 0c2afdd3f0 ublox: extend LTE driver
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
2019-03-13 16:39:42 -05:00
Jonas Bonn e6b7a2fd2d Separate ATE and AT+CMEE commands
The TOBY L4 doesn't seem to like seeing these two commands on the same
line...
2019-03-13 16:39:25 -05:00
Jonas Bonn 85c64b1784 udevng: detect ublox TOBY L4
ttyACM0 (USB interface 02) is reportedly unreliable (breaking DHCP setup)
so the recommended approach is to use ttyACM2 (USB interface 06)
exclusively.
2019-03-13 16:39:16 -05:00
Jonas Bonn 83834419e5 ublox: add TOBY L4 models 2019-03-13 16:38:55 -05:00
Jonas Bonn 8a62ee79a9 ublox: add device flags
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.
2019-03-13 16:38:12 -05:00
Jonas Bonn c2f9faef1a udevng: ublox: Model string no longer used 2019-03-13 16:29:09 -05:00
Jonas Bonn 2dc053b28e ublox: query USBCONF for applicable devices
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.
2019-03-13 16:28:48 -05:00
Jonas Bonn cfab42825d ublox: add model flag HAVE_USBCONF
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.
2019-03-13 16:26:42 -05:00
Jonas Bonn f4b8d4d30b ublox: query device model
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.
2019-03-13 16:22:51 -05:00
Jonas Bonn d7844183c0 ublox: create model data structures
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.
2019-03-13 13:48:54 -05:00
Jonas Bonn 55bec598b6 ublox: make device selection more flexible
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.
2019-03-13 13:22:53 -05:00