Commit Graph

8869 Commits (master)

Author SHA1 Message Date
Denis Kenzior b3682c6bab AUTHORS: Mention Alexey's contributions 2021-02-22 10:04:18 -06:00
Alexey Andreyev ce86a6c207 qmimodem: Add USSD indication support
Handle USSD QMI indication messages.
Add support for UCS2 USS Data coding scheme.
Check for User Action TLV type.
2021-02-22 10:02:16 -06:00
Sergey Matyukevich cfcb6a7d9c unit: add validate_utf8_tlv tests 2021-01-19 10:05:05 -06:00
Sergey Matyukevich 7a62b554ab sim: validate IMS private identity
Make sure that IMS private identity is a valid UTF8 string before
setting sim->impi field. Otherwise ofono may crash on dbus assert
when SIM properties are reported via org.ofono.SimManager interface.
2021-01-19 10:05:02 -06:00
Sergey Matyukevich bae8ebe907 simutil: add validate_utf8_tlv
Add helper to validate if TLV value is a valid UTF8 string.
Note that both null-terminated and non null-terminated UTF8
strings are considered valid.
2021-01-19 10:03:05 -06:00
Sergey Matyukevich 7b3840c5ce gemalto: netmon measurements scaling
Gemalto modem reports raw measurements in dBm. Reported values may
include negative numbers. Meanwhile oFono follows ETSI TS 27.007,
so negative numbers do not really exist at the API level.

Modify gemalto netmon driver to report measurements according to
27.007. For this purpose re-scale from what Gemalto firmware
reports into something that 27.007 recommends.
2021-01-15 11:43:52 -06:00
Sergey Matyukevich 8492b722eb plugin: gemalto: enable netmon
Enable netmon functionality for Gemalto ELS81x modems.
2021-01-15 11:35:53 -06:00
Sergey Matyukevich be8c907d91 gemalto: add netmon driver
Implement network monitoring driver for gemalto modems that
are able to provide serving cell information and basic
measurements using AT+CQS and AT^SMONI commands.
2021-01-15 11:26:32 -06:00
Sergei Golubtsov 39f70c29d1 quectel: adding support for the Quectel EC200 USB modem series
Support for the Quectel EC200 USB modem series has been added. The model
identification AT command has been added as the first step in the
communication with a Quectel USB modem.
2021-01-07 23:21:32 -06:00
Denis Kenzior 0be380fb9d AUTHORS: Mention Sergei's contributions 2021-01-07 23:21:09 -06:00
Sergei Golubtsov c8ed7162d5 ppp: using RX ACCM = 0 by default
Some modems such as Quectel EC200T do not honor the default value for
the Async-Control-Character-Map (ACCM) configuration option defined in
RFC 1548 6.2 as 0xffffffff. This patch suggests to use RX ACCM = 0 for
Ofono by default as pppd does for instance. This will reduce PPP data
overhead as well.
2021-01-07 23:17:45 -06:00
Sergei Golubtsov 41967b92f3 gsmdial: adding support for selection of authentication method
Selection capability for authentication method via a command line
argument has been added
2021-01-07 23:16:43 -06:00
Sergey Matyukevich 23ad67e326 gemalto: gprs: support authentication settings
Add support for gprs contexts with username, password,
and specific authentication type.
2020-12-30 10:57:02 -06:00
Sergey Matyukevich 3303268d02 gemalto: gprs: support automatic context activation
Implement read_settings function to get configuration for automatic
contexts. AT^SWWAN command activates PDP context unless it has been
already activated automatically, and then starts DHCP server in the
ME. So AT^SWWAN command should be run for automatic context as well
in order to obtain IP settings from the ME.

This commit also fixes the issue uncovered by the added support for
automatic contexts: as per modem specs, AT+CGACT context should not
be reused for AT^SWWAN. Though that worked for some reason when
automatic context was reactivated without proper deactivation.

Note that in both cases success code is reported to the core before
AT^SWWAN response. This is because the ME waits until DHCP negotiation
has finished before sending the "OK" or "ERROR" result code.
2020-12-30 10:54:50 -06:00
Denis Kenzior 3c8f24769a gemalto: Fix compiler error
Fix compiler error introduced due to a bad merge

Fixes: de0d5a19 ("gemalto: gprs: support different gprs protocols")
2020-12-26 11:36:00 -06:00
Sergey Matyukevich de0d5a19c1 gemalto: gprs: support different gprs protocols
Add support for IPv6 and dual mode gprs contexts.
2020-12-22 10:36:46 -06:00
Sergey Matyukevich 3551cc89ec gemalto: gprs: cgev gprs context deactivation
Gemalto ELS81x modems use 'ME PDN DEACT' message to notify about gprs
context deactivation. Process this 'deactivate' event in CGEV handler.
2020-12-22 10:34:48 -06:00
Sergey Matyukevich 97aea7414c plugin: gemalto: fix source of gprs notifications
Modem USB interface does not receive certain gprs context notifications.
Fix gprs chat: use Application USB interface to receive all the modem
2020-12-22 10:34:48 -06:00
Denis Kenzior cf9e6d048d build: Add check for rawmemchr
Otherwise the build will complain about multiple definitions
2020-12-22 10:32:12 -06:00
Richard Röjfors 429a5a57da util: Fix implicit enum conversion
GCC10 complains about the following:

src/smsutil.c: In function ‘sms_text_prepare_with_alphabet’:
src/smsutil.c:3594:8: error: implicit conversion from ‘enum sms_alphabet’ to ‘enum gsm_dialect’ [-Werror=enum-conversion]
 3594 |        alphabet, &used_locking,

smsutil and util has an enum each for representing
the same thing; The SMS alphabet. They share the same
values, so an explicit type cast makes GCC happy.
2020-12-22 09:45:05 -06:00
Richard Röjfors 66cd5df5d7 huawei: Fix implicit enum conversion
GCC 10 warns about this implicit conversion:

drivers/huaweimodem/radio-settings.c: In function ‘band_gsm_from_huawei’:
drivers/huaweimodem/radio-settings.c:107:10: error: implicit conversion from ‘enum ofono_radio_band_umts’ to ‘enum ofono_radio_band_gsm’ [-Werror=enum-conversion]
  107 |   return OFONO_RADIO_BAND_UMTS_ANY;

Member from the incorrect enum was returned, both had the value 0, so
the code would still work.
2020-12-22 09:43:36 -06:00
Lars Poeschel 285fad8f39 quectel: Power on/off with a gpio pulse
Current implementation uses a gpio level of 1 for powering on quectel
modems using a gpio and a level of 0 for powering off.
Normally quectel modems are powered on or off by a gpio pulse on their
PWR_KEY pin. They turn on by the first pulse and turn then off by the
next pulse. The pulse length varies between different modems.
For power on the longest I could in the quectel hardware is "more than
2 seconds" from Quectel M95 Hardware Design Manual.
For Quectel EC21 this is ">= 100 ms".
For Quectel MC60 this is "recommended to be 100 ms".
For Quectel UC15 this is "at least 0.1 s".
For power off the four modems in question vary between a minimum pulse
length of 600-700ms.
This implements a 2100ms pulse for power on and 750ms for power off.

If you have some special circuitry that powers your modem by gpio level
and you need the old behaviour, you can switch to gpio level powering
by setting environment variable OFONO_QUECTEL_GPIO_LEVEL. The gpio goes
to high level for the modem to power on and to low level if it should
power off.
2020-10-06 15:42:46 -05:00
Lars Poeschel 4a098c724a quectel: Extend power-on timeout
More complicated modems emerge and they need longer start-up times. An
EC21 takes about 13 seconds to boot up. This is slightly longer than the
20 * 500 ms we have at the moment. This extends the retries to 30, so we
have 30 * 500 ms and this does successfully power up an EC21 modem.
2020-09-29 09:22:45 -05:00
Nikhil Jha 0153cefeeb build: remove obsolete m4 macro
As per
LT_INIT should be used instead.
2020-09-29 09:14:22 -05:00
Christophe Ronco 7594a000dd common: APN with a dot in second position are not invalid
APN with a dot in second position (example: "t.est") are wrongly
considered invalid.
2020-09-29 09:11:08 -05:00
Pavel Machek 07e00b7215 droid 4: Add probing.
Probe Droid 4 modem. This should result in basic support working.
2020-09-15 10:24:37 -05:00
Pavel Machek cb79f71ffe droid 4: special handling for SMSes
Droid 4	 modem is "special" (aka broken) so and getting incoming SMSes
to work is quite tricky. This should get it right.
2020-09-15 10:21:44 -05:00
Pavel Machek 25fd00588a droid 4: add special handling required for voice calls and SIM
Droid 4 modem is "special" (aka broken) so it seems to need a bit of
error handling.
2020-09-15 10:17:55 -05:00
Denis Kenzior 52091a1af0 qmimodem: Fix format warning
../../drivers/qmimodem/network-registration.c: In function
../../drivers/qmimodem/network-registration.c:131:54: warning: ‘%03d’
directive output may be truncated writing between 3 and 5 bytes into a
region of size 4 [-Wformat-truncation=]
  131 |   snprintf(operator->mcc, OFONO_MAX_MCC_LENGTH + 1, "%03d",
        |                                                      ^~~~
	../../drivers/qmimodem/network-registration.c:131:53: note:
	directive argument in the range [0, 65535]
  131 |   snprintf(operator->mcc, OFONO_MAX_MCC_LENGTH + 1,

The MCC/MNC fields are limited to three digits.  Clamp the input to 999
to avoid the warning.
2020-09-08 11:19:54 -05:00
Lars Poeschel 23e1a56a47 xmm7xxx: Fix non compiling file
CC       plugins/xmm7xxx.o
../plugins/xmm7xxx.c:63:10: fatal error: dbus.h: No such file or directory
   63 | #include "dbus.h"
      |          ^~~~~~~~
compilation terminated.
2020-09-08 11:02:25 -05:00
Lars Poeschel 21f148afe9 atmodem: Detect usage of AT+CGEREP
Currently AT+CGEREP=2,1 is sent in case we don't know what the modem
needs. (default case) Not all modems understand this. So, we first query
what the modem supports with AT+CGEREP=? and then use this information
to be nice to the modem. This way modems, like the Quectel M95 that do
only understand AT+CGEREP=1 do also work nicely.
2020-09-01 11:10:14 -05:00
Lars Poeschel a811aca98a atmodem: Signal quality on quectel serial modems
As the default way of getting the signal quality with +CIND is also
unstable on quectel serial modems (the same as on quectel EC21). In fact
the signal quality is only updated on cell changes. Those trigger a
manual AT+CSQ in ofono and get an update this way, but the URCs do not
So we implement a quectelish way here as well. The quectelish way is
very similar to the way ifx modems work. We can reuse their csq_notify
2020-08-25 11:39:58 -05:00
Lars Poeschel dbc1fb62ac atmodem: Deactivate AT+CPSB for quectel serial modems
There are at the moment two quectel modems in ofono vendored as
Both modems are GSM only modems, and their official documentation does
not mention the AT+CPSB command.
I have a M95 here that gives an error on issuing the AT+CPSB=1 command.
So skip this command for these two modems.
2020-08-19 09:57:09 -05:00
Sergey Matyukevich 23c78bd316 plugins: gemalto: alternative gprs-context driver
Use alternative gprs context driver for gemalto modems
that provide USB ethernet interfaces for data path.
2020-08-19 09:50:44 -05:00
Sergey Matyukevich 71ceaf93fd plugins: udevng: detect gemalto network interfaces
Some gemalto modems, including ELS81x, may provide more than one
USB ethernet interface. Detect and save both network interfaces
rather than only the last one.
2020-08-19 09:50:41 -05:00
Sergey Matyukevich da1ef6588b drivers: gemalto: add gprs-context driver
Some gemalto modems provide USB ethernet interfaces for data path.
Implement gprs-context driver for such modems to send data via
USB ethernet rather than fallback to PPP.
2020-08-19 09:50:39 -05:00
Lars Poeschel 288f263ab6 gprs: Quectel EC21 does not understand AT+CPSB
The Quectel EC21 modem does not understand the AT+CPSB command, and we
did not find a suitable replacement in the
AT+CPSB gives an error on this modem, so we just skip it.
2020-08-17 10:14:38 -05:00
Shweta Jain d2fd1721f3 xmm7xxx-enable-esim-feature-in-xmm_ofono 2020-08-13 10:08:43 -05:00
Lars Poeschel a01613ad13 atmodem: Get strength and tech the quectel way on EC21
I had some trouble getting network strengh and access technology the
standard way on Quectel EC21. It does work - but only kind of. I did not
get URCs when I am sure I should. This way through CIEV, CIND and CMER
is also not documented in Quectel documentation, so I suspect this to be
This is now changed to the "quectelish" way of gettings those values and
this does work more fine-grained and reliable on the Quectel EC21.
2020-08-11 10:47:58 -05:00
Lars Poeschel 3401d9e29c Add a vendor OFONO_VENDOR_QUECTEL_EC2X
The distinction between OFONO_VENDOR_QUECTEL and
OFONO_VENDOR_QUECTEL_SERIAL does not suffice for EC21/EC25 in some
places, so introduce and use a new vendor:
2020-08-11 10:47:36 -05:00
Lars Poeschel 446a5ae394 quectel: Try to update voltage only, when received "vbatt"
As there are some more sources of +QIND: activated, do now only update
voltage when we get the
+QIND: "vbatt",-1
but not on things like
+QIND: "act","LTE"
+QIND: "csq",20,99
2020-08-07 11:11:39 -05:00
Lars Poeschel ab8d482af1 quectel: Set URC port to uart1 on EC21
Set the URC port of the Quectel EC21 to uart1 when it is used through
it's serial port. This setting is saved to non-volatile storage by the
modem automatically.
2020-08-07 11:09:53 -05:00
Lars Poeschel a56976e2bb Revert "quectel: EC21 needs aux channel to be the first mux channel"
This reverts commit 1868dbf2b3.
Development for this was done on EC21 firmware version
EC21EFAR06A01M4G_BETA0318. It now turns out, that actual release
firmware versions for this modem again need the original mux order with
aux channel as the second mux channel. (We know for sure for firmware
version EC21EFAR06A03M4G.)
We do not know for sure when and for what firmware versions quectel did
the switch back on the mux order, but we suspect that the "BETA"
firmware is the only one with the reversed mux order. This "BETA"
firmware was only given out for development purposes and will not appear
"in the wild", so we revert the patch here and hope for the best.
2020-08-07 11:04:35 -05:00
JongSeok Won 325a4b2998 rilmodem: support cell type LTE for netmon 2020-07-31 10:21:00 -05:00
JongSeok Won 4f4fcc4944 netmon: added PCI, TAC, SNR value
To support cell type LTE, the value of PCI, TAC, SNR is added
2020-07-31 10:18:53 -05:00
JongSeok Won 8ba6158011 doc: added PCI, TAC, SNR property in networkmonitor-api 2020-07-31 10:17:05 -05:00
JongSeok Won 7a6872b3ee rilmodem: set proto type during setting initial attach apn
Added the protocol type of initial attach apn depends on protocol
type in LTE Atom.
2020-07-21 08:55:56 -05:00
Denis Kenzior 3940514013 AUTHORS: Mention JongSeok's contributions 2020-07-21 08:42:21 -05:00
JongSeok Won 1708c2b0c8 rilmodem: fix typo error in netmon.c 2020-07-21 08:38:03 -05:00
Sean Nyekjaer e4d77210ea udevng: Add support for Quectel BG96 modem 2020-07-13 14:05:00 -05:00