Commit Graph

8604 Commits

Author SHA1 Message Date
Pau Espin a580407e11 WIP: deetect net iface rename 2019-04-01 20:15:47 +02:00
Pau Espin 25705288e4 udevng: Track udev devices through devpath and not syspath
syspath is not really needed in there, and catching devpath instead
allows us to easily match against DEVPATH_OLD in follow-up patches.
Furthermore, previous code was misleading retrieving syspath in
remove_device() and then passing it as devpath param of check_remove().
2019-04-01 20:15:47 +02:00
Alexander Couzens e77b82a1bd NOT-FOR-MERGE: ignore disconnecting network interface
when moving a wwanX interface to a lxc container ofono gets "remove" event.
Ignoring the "remove" events allow this to work without ofono is removing
the whole modem
2019-03-25 14:38:04 +01:00
Alexander Couzens db0e15dea8 NOT_FOR_MERGE: decode qmi messages with libqmi 2019-03-25 14:38:04 +01:00
Alexander Couzens d351ec5027 NOT-FOR-UPSTREAM: ofono.service.in: enable debug output 2019-03-25 14:38:04 +01:00
Alexander Couzens 8e11828ff5 NOT-FOR-UPSTREAM: ofono.serivce.in: add quad_modem_power_cycle + Restart=always 2019-03-25 14:38:04 +01:00
Alexander Couzens b81b25d27c qmimodem: report the qmimodem bug 2019-03-25 14:38:04 +01:00
Alexander Couzens e11eca4d19 qmimodem: ensure the modem is registered by check cs and ps state
The modem tells to early it's registered even it hasn't yet received a location
update complete.
2019-03-25 14:38:04 +01:00
Alexander Couzens 5326d5d19d call gprs_detached_notify 2019-03-25 14:38:04 +01:00
Alexander Couzens a826ee1134 atutil.h: remove doublicated ofono_call_compare_by_status() 2019-03-25 14:38:04 +01:00
Alexander Couzens f133a463bb [RFC] qmimodem: implement voice calls
The voice_generated.* files is an RFC how files should look like.
They aren't yet generated.
2019-03-25 14:38:04 +01:00
Alexander Couzens ff5dd1f6a1 common,atmodem: rename & move at_util_call_compare_by_id to common.c
at_util_call_compare_by_id is used by several modem drivers.
2019-03-25 14:38:04 +01:00
Alexander Couzens dc8ee604db common,atmodem: rename & move at_util_call_compare_by_status to common.c
at_util_call_compare_by_status is used by several modem drivers.
2019-03-25 14:38:04 +01:00
Alexander Couzens 9bcebfde29 network: debug output the network time if updated 2019-03-25 14:38:04 +01:00
Alexander Couzens ad483b2b6b network/ofono_netreg_status_notify: debug output lac and ci
The location are code and cell id is updated at the same time.
2019-03-25 14:38:04 +01:00
Alexander Couzens 28ed01a745 add call-list helper to manage voice call lists
Many drivers asks the modem for a complete call list of current calls.
These list of calls can be feeded into call-list which parse the
list and notify ofono for new calls.
2019-03-25 14:38:04 +01:00
Alexander Couzens 4cd5716ba5 common: create GList helper ofono_call_compare
replaces at_util_call_compare (atmodem) and
call_compare (rild).
2019-03-25 13:11:33 +01:00
Alexander Couzens e86936d04e gprs/pri_set_apn: only call dbus function when msg is given
Otherwise dbus is trying to operate on a null-pointer resulting in an abort()
2019-03-25 12:31:14 +01: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
Jonas Bonn e70789534e atmodem: Remove TOBY_L2 vendor 2019-03-13 13:20:43 -05:00
Jonas Bonn 4f5ce95d41 ublox: drop vendor type for Toby L2 model 2019-03-13 13:20:43 -05:00
Jonas Bonn a5adf39aa1 atmodem: drop vendor type for Toby L2 model
The 'Toby L2'-specific vendor type is used only to prevent the CMER
command from attempting to set mode '3'.  For all u-blox models, mode
'3' is just an alias for mode '1'.  As such, mode '1' can be used in
place of mode '3', removing the model-specific quirk in favour of a
vendor-specific quirk.

With this change, the L2-specific vendor type is no longer needed.
2019-03-13 13:19:15 -05:00
Jonas Bonn a88ebf4913 Fix whitespace weirdness 2019-03-13 13:13:27 -05:00
Anirudh Gargi e54ac6bcd4 sim: fix segfault in sim atom
While adding the sim pin cache feature, pin_name could cause issue in
cases when sim pin is not there.

log:
ofonod[27810]: drivers/atmodem/sim.c:at_cpin_cb() crsm_pin_cb: READY
ofonod[27810]: src/sim.c:sim_pin_query_cb() sim->pin_type: 0, pin_type: 0
ofonod[27810]: Aborting (signal 11) [./src/ofonod]
ofonod[27810]: ++++++++ backtrace ++++++++
ofonod[27810]: #0  0x7fb7a7586cb0 in /lib/x86_64-linux-gnu/libc.so.6
ofonod[27810]: #1  0x7fb7a7693cd8 in /lib/x86_64-linux-gnu/libc.so.6
ofonod[27810]: #2  0x4d899b in sim_pin_query_cb() at src/sim.c:3174
ofonod[27810]: #3  0x4649e7 in at_cpin_cb() at drivers/atmodem/sim.c:1304
ofonod[27810]: #4  0x4a5d70 in at_chat_finish_command() at gatchat/gatchat.c:462
2019-03-07 10:24:54 -06:00
Denis Kenzior 54b8639c0e ifxmodem: Clean up the previous commit slightly
The if statements were over 80 characters and breaking them up made the
code look a bit uglier.  So refactor the if statements to just figure
out the data path 'n' parameter or return an error.  On success, form
the datapath string and return it.

Also bump the buffer size and use snprintf to be safe(r).
2019-03-04 13:34:13 -06:00
Antara Borwankar b51c1a23c0 xmm7modem: data channel setup for xmm7modem
Added the implementation required to setup data channel
in ifxmodem gprs-context driver for xmm7modem vendor
2019-03-04 13:21:34 -06:00
Antara Borwankar 608c683250 gprs-context: Adding get function for inteface
Added definition of get function to get interface value in
gprs-context
2019-02-21 11:00:04 -06:00
Antara Borwankar d32dc69898 gprs-context: adding get function for network interface
Added declaration of get function to get network interface
for gprs-context
2019-02-21 10:59:52 -06:00
Philippe De Swert 45efc2354e common: Add new NB-IoT technologies
Add lte-cat-m1 and lte-cat-nb1 technology identifiers.
2019-02-17 21:18:54 -06:00
Christophe Ronco 34225d2681 qmi: support sim hotplug
Use card status indication to detect SIM removal and insertions
2019-02-17 20:48:54 -06:00
Antara Borwankar cefba0c26f xmm7modem: Change in xmm7mode plugin for multiple PDP
Made changes in xmm7modem plugin to allow mutiple PDP context
activation and to assign correct network interface to the
activated PDP context.
2019-02-13 08:38:18 -06:00
Antara Borwankar fae77b52c6 udevng: Detect multiple network interfaces for xmm7xxx 2019-02-13 08:33:58 -06:00
Denis Kenzior 13c0e25eb2 gprs: Let gprs_context interface be settable once
This patch allows a driver to set the interface only once, instead of at
every context activation.  The previous way was originally designed for
PPP and RAW_IP based contexts which would have a (potentially)
differently named interface after each context activation due to use of
TUN/TAP.  This also worked for static high-speed interface setups as
well, since these usually had a single interface only.

For devices that support multiple high-speed interfaces it would be
advantageous to have each gprs_context get an interface assignment right
in the modem driver and skip having to setup the interface on every
activation.
2019-02-11 17:51:16 -06:00
Pičugins Arsenijs 1b0adea8dd sim800: fix typo in model check code
Fixing a copy-paste error in SIM800 code
that results in a SIM900 modem being
detected as a SIM800 modem.
2019-02-08 14:10:11 -06:00