Commit Graph

1516 Commits

Author SHA1 Message Date
Jonas Bonn 5559874592 ublox: add voicecall support 2019-07-19 01:42:45 -05:00
Jonas Bonn 353b7bc3e9 ublox: create only 1 gprs context
Some uBlox modems support multiple, simultaneously active contexts.  These
contexts are either bridged to the network interface or handled
transparently by the modem acting like a router.

The problem with this approach is that ofono and ofono clients (e.g.
mmsd) expect a dedicated _local_ network interface for each context.

As such, it doesn't make sense for ofono to set up the multiple gprs
contexts.
2019-07-19 01:42:15 -05:00
Jonas Bonn 5b1d6f4e13 ublox: determine gprs-context driver from network interface
Some u-blox devices present a USB network class device for data and some
just switch to PPP on (one of) the communication channel(s).  Whether
the atmodem or ubloxmodem gprs-context driver should be used depends on
whether or not the network interface is present; check this condition
directly when deciding which driver to us.
2019-07-19 01:41:43 -05:00
Martin Hundebøll e98af8127f quectel: add support for the Quectel MC60 modem
The modem is AT-compatible with the Quectel M95 modem, but also features
a GNSS module.
2019-07-17 10:27:31 -05:00
Martin Hundebøll 5a255d6e62 quectel: store model id in private data
Some Quectel models supports different features such as GNSS or
different URC strings. Add a field in the quectel data structure to be
used when adding support for said features.
2019-07-17 10:26:53 -05:00
Martin Hundebøll bac8a9cf8d quectel: enable call volume settings 2019-07-17 10:26:16 -05:00
Martin Hundebøll 8be2adc908 atmodem: rename OFONO_VENDOR_QUECTEL_M95
Other serial connected modems (i.e the MC60 model) from is AT-compatible
with the M95 model, so rename the M95 vendor id to be common for both.
2019-07-17 10:25:51 -05:00
Martin Hundebøll 57b4aa3678 quectel: initialize call, phonebook and sms when ready
The Quectel M95 modem issues a "Call ready" notification when call and
phonebook are ready, so set up a listener for that.

The only way to know when sms is ready is to issue QINITSTAT queries.
Since sms is always ready after call and phonebook, the queries are
initiated after creating call/phonebook.
2019-07-12 11:00:52 -05:00
Martin Hundebøll ded2915fd5 quectel: query device model to enable vendor quirks 2019-07-12 11:00:48 -05:00
Martin Hundebøll 47f6e8c3ad quectel: configure flow control when enabled 2019-07-12 10:54:21 -05:00
Martin Hundebøll 2f58421b64 quectel: support gpio to power on/off the modem
This adds support for configuring a gpio in udev to control the modem
power.

To enable gpio control, specify OFONO_QUECTEL_GPIO_CHIP and
OFONO_QUECTEL_GPIO_OFFSET in the udev environment, for example:

KERNEL=="ttymxc0", ENV{OFONO_DRIVER}="quectel", \
        ENV{OFONO_QUECTEL_GPIO_CHIP}="gpiochip2", \
        ENV{OFONO_QUECTEL_GPIO_OFFSET}="26"
2019-07-12 10:50:51 -05:00
Martin Hundebøll 23a09f8559 quectel: add basic support for serial connected modems
Setup GSM 07.10 multiplexing using the kernel n_gsm line discpline
driver, and use the virtual tty devices as Aux and Modem channels.

The driver supports rts/cts on the underlying serial device. This is
enabled with OFONO_QUECTED_RTSCTS udev environment, e.g.:

KERNEL=="ttymxc0", ENV{OFONO_DRIVER}="quectel", \
        ENV{OFONO_QUECTEL_RTSCTS}="on"
2019-07-12 10:47:10 -05:00
Martin Hundebøll e41252d00b quectel: replace glib uses with ell 2019-07-12 10:17:12 -05:00
Martin Hundebøll 4fe04add08 quectel: unwrap call to at_util_open_device() 2019-07-12 10:16:45 -05:00
Martin Hundebøll a0a93da0f9 quectel: always print modem pointer in debug messages 2019-07-12 09:42:43 -05:00
Martin Hundebøll 47021f9950 quectel: fix initial channel/device configuration
The three-commands-in-one-go results in error on some quectel devices
(e.g. m95). Add semicolons between the commands to fix it.
2019-07-05 17:28:04 -05:00
Martin Hundebøll db74f0998a quectel: improve coding style 2019-07-05 17:17:47 -05:00
Denis Kenzior c1ccae7efc alcatel: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 98ec74cf10 hso: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior e0ac26458e huawei: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior eab7d90572 icera: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 2e544e6745 linktop: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 1ff6e83db0 mbm: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior aa228df5f6 nokia: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior a538238ee5 novatel: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior d493c7cc10 quectel: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 974e04c671 samsung: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 33af81eae5 sierra: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 3ab93f4a21 speedupcdma: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior ee92c647c5 speedup: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior bd858ba8b4 telit: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 44e6bccf10 ublox: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior f02a967e68 zte: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior fc4440a27c xmm7xxx: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior ad007eb9ab wavecom: Use at_util_open_device 2019-05-31 11:58:39 -05:00
Denis Kenzior 06de60a8fd hfp_ag_bluez5: Remove unneeded forward declarations 2019-05-31 10:57:38 -05:00
Stefan Herbrechtsmeier c3b7756907 udevng: add SIMCom SIM7600 modem support
The SIMCom SIM7100 and SIM7600 modem use the same vendor and product id
but require different drivers (sim7100 vs gobi).
2019-05-08 09:46:39 -05:00
Denis Kenzior e633b95aae sierra: Abort initialization on CFUN failure 2019-04-30 11:41:39 -05:00
Denis Kenzior 4bb6e09661 phoneseim: Remove unneeded if 2019-04-29 14:09:56 -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
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
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 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 e2d2712708 ublox: pass model id to LTE plugin 2019-03-13 16:44:43 -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 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 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 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 4f5ce95d41 ublox: drop vendor type for Toby L2 model 2019-03-13 13:20:43 -05: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
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
Khaled Romdhani 4462bde1f2 gemalto: Move atoms to post_online
when the voice call driver is probing, I noticed sometimes
a CME Error with the code = 4 (operation not supported)
related to AT commands "AT+CSSN=1,1" and "AT^SLCC=1".

In the current voice call implementation for Gemalto modems
the ofono_voicecall_create() is called on the gemalto_pre_sim().
The sim is not totaly readed by the module, it is not yet
online which is causing a sporadic problem at driver
intialization also when launching some outgoing/incoming calls.

This change moves the ofono_voicecall_create() to the
gemalto_post_online() to be sure that sim is well registred
and online.  Several other call related atoms are also moved to
post_online state.
2019-01-03 17:13:58 -06:00
Denis Kenzior a10f444a3e xmm7xxx: Various style cleanups 2018-12-13 10:11:00 -06:00
Antara Borwankar 06d16faeda xmm7modem: implemnetation of coexistence functionality
Added coex implementation in xmm7modem plugin
2018-12-13 10:03:05 -06:00
Nandini Rebello 68ea576628 xmm7xxx: Adding case for SIM PIN locked state
Handling the case when SIM PIN is enabled for xmm7xxx modem.
2018-11-27 08:44:07 -06:00
Clement Viel 3f6f108a16 sim800: add sim800 support 2018-11-14 14:33:37 -06:00
Nandini Rebello 157258eb2d udevng: enhance udev detection for intel 7xxx modems
Handle newer 7xxx modem enumeration based on ProductId.
Preserving the previous gen support too.
2018-10-31 14:20:00 -05:00
Denis Kenzior 814f7fc744 gemalto: Use GEMALTO vendor for netreg 2018-10-29 15:03:03 -05:00
Giacinto Cifelli edac159aa5 cinterion: use Gemalto vendor in netreg 2018-10-29 15:01:22 -05:00
Giacinto Cifelli 261a30f799 gemalto: Use Gemalto vendor for LTE atom 2018-10-29 14:59:23 -05:00
Jonas Bonn ab4460690d mbim: remove unused modem data
Neither the Vendor nor Model strings are used by the mbim plugin.
2018-10-29 13:34:07 -05:00
Giacinto Cifelli c8c718a46e gemalto: added voice support
The plugin for Gemalto modems is enriched with all voice-related atoms,
as well as USSD.
All except the voicecall itself are from the atmodem, while the
voicecall is from gemaltomodem.
2018-10-17 17:03:18 -05:00
Jonas Bonn 3beeff758d treewide: Remove superfluous use of _GNU_SOURCE
There are a large number of files in the tree that define _GNU_SOURCE
despite not actually using features hidden behind this flag.  This patch
removes all these definitions in one fell swoop...
2018-10-17 10:01:57 -05:00
Denis Kenzior 37d856c071 phonesim: Fix memory leak 2018-10-12 13:45:01 -05:00
Antara d9e3329f55 netmon: Enabled netmon atom for xmm7modem plugin
enabling netmon atom to report current serving cell measurements
for xmm7modem
2018-10-09 12:54:27 -05:00
Giacinto Cifelli a5bdf48ca7 mbpi: support for auth NONE
support of 'none' in mbpi:
the default method remains CHAP, but it is overridden by NONE after
parsing the entire key for the apn and detecting no username/password
2018-10-09 10:44:17 -05:00
Giacinto Cifelli a5aa268747 file-provision: support for auth type of NONE 2018-10-09 10:43:31 -05:00
Anirudh Gargi 3317cc6f45 xmm7xxx: enable sms and phonebook support 2018-10-03 11:42:51 -05:00
Pavel Machek 33be5732f1 udevng: Move debug print to more useful place
in setup_gobi()
2018-09-27 17:26:49 -05:00
Giacinto Cifelli 8077e61ee5 gemalto: Use GEMALTO vendor for sms 2018-09-25 09:44:50 -05:00
Giacinto Cifelli 635085b30e gemalto: Use GEMALTO vendor instead of CINTERION
The sim atom is now created with the GEMALTO vendor instead of
CINTERION.  This is because GEMALTO has superceeded CINTERION and the
gemalto plugin will be updated to handle (legacy) modems from cinterion
as well as current gemalto devices.
2018-09-25 09:40:18 -05:00
Anirudh Gargi f2ebcf35d7 udev:fix seg fault in case of vid and pid is NULL
In some case linux report 'driver' as valid yet vid and pid as NULL.
Adding NULL check to prevent seg fault.

Log:
ofonod[23829]: plugins/udevng.c:udev_start()
ofonod[23829]: plugins/udevng.c:enumerate_devices()
ofonod[23829]: plugins/udevng.c:check_usb_device() hub [1d6b:0002]
ofonod[23829]: plugins/udevng.c:check_usb_device() usb [1d6b:0002]
ofonod[23829]: plugins/udevng.c:check_usb_device() usbhid [03f0:034a]
ofonod[23829]: plugins/udevng.c:check_usb_device() usbhid [03f0:034a]
ofonod[23829]: plugins/udevng.c:check_usb_device() usb [1d6b:0002]
ofonod[23829]: plugins/udevng.c:check_usb_device() cdc_acm [(null):(null)]
ofonod[23829]: Aborting (signal 11) [./src/ofonod]
2018-09-10 11:04:11 -05:00
Martin Hundebøll 92a80db13f udevng: fix removal of serial devices
Since the merge of udev.c into udevng.c all cleanup function must handle
both usb devices and serial devices. Add this distinction to
check_remove(), so that is doesn't try to iterate the .serial member as
if it were a .devices list.
2018-08-24 11:26:42 -05:00
Giacinto Cifelli f9cde76095 ublox: Add voicecall support 2018-08-09 11:48:40 -05:00
Christophe Ronco ef3ebe5840 huawei: use VENDOR_HUAWEI quirk on gprs context creation 2018-07-25 14:11:58 -05:00
Denis Kenzior 08796aa391 udevng: Fix SIM900 detection 2018-06-19 12:37:15 -05:00
Denis Kenzior d0ab273615 mbim: Remove useless debug 2018-06-19 12:37:15 -05:00
Denis Kenzior b42bc11d85 gemalto: Whitespace fixes 2018-05-23 09:02:08 -05:00
Varun Gargi 0ee376ccab udevng: remove vendor ID to make it generic for intel modem 2018-05-23 08:55:39 -05:00
James Prestwood 34ff57e083 plugins: fixed crash in udevng
The return value from ofono_modem_register was not being checked. If this fails
the modem object is not setup and causes a crash. This was specifically seen
when using the mbim driver without having configured with mbim support.

Now the modem object gets destroyed properly if the modem registration fails.
2018-05-22 15:39:42 -05:00
Bob Ham 1a8960564e sim7100: Specify vendor ID while creating voicecall driver
This enables the atmodem voicecall driver to handle SIMCom quirks like
not setting AT+COLP=1.
2018-05-14 11:11:18 -05:00
Bob Ham 1d63b1d35f plugins: Add support for SIM7100E by SIMCom
Add support for the SIM7100E modem.  We add a new "sim7100" plugin
because there's no other AT-based modem that has support for both GPRS
and voice calls.
2018-04-30 11:17:47 -05:00
Mark van der Putten ac96c726f2 gemalto: signal sim initialized
Modem type PLS8-E, firmware 03.017
2018-04-23 13:46:44 -05:00
Jonas Bonn c0527a211c gobi: Update to the new version_list changes 2018-04-04 09:59:53 -05:00
Bassem Boubaker db9b292f92 gemalto: Clarify supported modem family name
Some gemalto modem family share almost the same base except some very
specific AT command and some hardware changes like ALSx and PXSx family
2018-03-19 12:11:12 -05:00
Mariem Cherif 1c83dc18c4 gemalto: handle sim is inserted or removed URCs 2018-03-19 12:08:52 -05:00
Gabriel Lucas 50ad43dbe5 gemalto: support ALS3 in gemalto's plugin
Force serial port opening options
Wait for modem to be ready to start
initializing it
Handle LTE
2018-03-19 10:24:02 -05:00
Bassem Boubaker 76b5a4044f gemalto: Add more details in setup_gemalto comment
ALS3, PLS8-E and PLS8-X have same vid/pid with same enumeration process
2018-03-16 12:39:56 -05:00
Gabriel Lucas 245d6a8a77 gemalto: add detection of ALS3 modem
The product ID is added to the list of
modems to be detected by Ofono.
The gemalto plugin is used to handle the
ALS3 modem.
2018-03-15 11:54:33 -05:00
Denis Kenzior 5d346349fb plugins: Update to the new LTE API 2018-03-12 09:37:58 -05:00
Jonas Bonn 12a943866a gobi: add LTE atom
This atom needs to be created in post_sim so that the APN can be
written to the default profile before the modem attempts to use the
setting to connect to the network.
2018-03-05 11:32:47 -06:00
Christophe Ronco 1df92289d4 udevng: Add modem string SystemPath 2018-02-20 11:09:25 -06:00
Slava Monich 0797b23c5d dbus: Use dbus_validate_path
Instead of __ofono_dbus_valid_object_path
2018-01-18 10:53:28 -06:00
Alexander Couzens 439524211d plugins/gobi: reset the qmi interface when enabling the modem 2017-12-05 22:04:15 -06:00
Denis Kenzior 44acd97dd9 mbim: Keep track of max_sessions
Also set the CID range 0..max sessions.  This forces the default context
into cid 0
2017-11-13 21:24:37 -06:00