Commit Graph

1473 Commits

Author SHA1 Message Date
Marcel Holtmann a4e7e8788a quectel: Add missing include for sys/socket.h 2019-08-12 20:02:34 +02:00
Martin Hundebøll 1107d3cbc3 quectel: implement dbus signals for modem power notifications
The Quectel modems issues unsolicited strings in case of power related
events. The UC15 uses +QIND: for the events, while M95 and MC60 uses
descriptive strings. (UC15 also uses a string for normal power down).

Register listeners for these strings/codes. The handler emits an
appropriate dbus signal, and closes down the modem if needed.
2019-07-22 02:40:00 -05:00
Martin Hundebøll 133233845e quectel: add dbus hardware interface
For now the interface only exposes the modem supply voltage, but is
added as a preparation for signaling power events.
2019-07-22 02:37:56 -05:00
Martin Hundebøll 9b681d7a27 quectel: pass vendor id to gprs and gprs-context
The gprs-context does special casing on the quectel serial modem when
probing the supported layer 2 protocols, so pass the vendor id when
setting up the atoms.
2019-07-19 10:34:32 -05:00
Jonas Bonn 2bb87d88ff udevng: detect LARA R2 series 2019-07-19 02:47:29 -05:00
Jonas Bonn a39944a5c0 ublox: use custom netreg atom 2019-07-19 02:45:10 -05:00
Jonas Bonn 3a53f140cc ublox: add SMS support 2019-07-19 01:43:23 -05:00
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