Commit Graph

88 Commits

Author SHA1 Message Date
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:
OFONO_VENDOR_QUECTEL_EC2X
2020-08-11 10:47:36 -05:00
Martin Hundebøll b73a681972 atmodem: sms: don't request URC buffering for Quectel UC15 modems
Add a vendor quirk to avoid an error being returned when setting up sms
notification for Quectel UC15 modems.
2019-09-04 07:23:46 -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 46616a52d9 atmodem: sms: add quectel m95 quirks
CNMA isn't mentioned in the m95 documentation, but trial'n'error has
revealed some details:
 * the CSMS query returns the list (0,128) instead of a range
 * CNMA is enabled by setting 128 as CSMS service
 * once enabled, SMS deliveries are acked by sending AT+CNMA without a
   value setting

Add m95 quirks to the atmodem driver, so that CNMA is correctly
detected, configured, and used.
2019-07-12 09:41:08 -05:00
Denis Kenzior 305ae9ba84 atmodem: Use l_util_hexstring instead of encode_hex 2018-12-27 18:18:51 -06:00
Jonas Bonn 1e176755af atmodem: enlarge command buffer
The ofono phone number max length is 80 so a buffer size of 64 is
obviously insufficient.  Expanding the buffer to 128 prevents a
potential failure and suppresses the folowing compiler warning:

../drivers/atmodem/sms.c: In function ‘at_csca_set’:
../drivers/atmodem/sms.c:108:40: warning: ‘%s’ directive output may be truncated writing up to 80 bytes into a region of size 55 [-Wformat-truncation=]
  snprintf(buf, sizeof(buf), "AT+CSCA=\"%s\",%d", sca->number, sca->type);
                                        ^~
../drivers/atmodem/sms.c:108:2: note: ‘snprintf’ output between 13 and 103 bytes into a destination of size 64
  snprintf(buf, sizeof(buf), "AT+CSCA=\"%s\",%d", sca->number, sca->type);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2018-10-29 13:33:56 -05:00
Giacinto Cifelli 92bf7fb867 atmodem: added Gemalto vendor quirk for +CNMI 2018-10-23 09:54:59 -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
Jonas Bonn 67701b1c40 drivers: constify vtables
The driver vtables are read-only structures.  This patch declares them as
'const' allowing the compiler to (optionally) put them in the RELRO
section.  RELRO pages may be marked as read-only by the linker after
the relocations have been done ensuring that they aren't inadvertently
or maliciously altered at runtime.
2018-10-17 09:56:27 -05:00
Giacinto Cifelli 579e9dd3ec atmodem/sms: no mms support for Gemalto 2018-09-27 07:32:03 -05:00
Giacinto Cifelli df5bc68fcf atmodem: change vendor CINTERION in GEMALTO in sms 2018-09-25 09:44:30 -05:00
Giacinto Cifelli abd219c89f atmodem/sms: Do not print an error message incorrectly
add missing return in at_cmt_notify.  Without it an error message was
generated in all cases, even successful ones.
2018-09-20 10:50:44 -05:00
Julien Tournier 925006f49d atmodem: Handle cinterion modems compliant with 27.005 2018-08-29 16:10:29 -05:00
Vincent Cesson 0e7add9447 atmodem: Fix SMS reception for Gemalto modems
SMS reception is not working for Gemalto modems because of +CMT parsing.
PDU length is the first argument of +CMT URCs in Gemalto modems.

Add a switch case on vendor info to handle Gemalto case.
Also handle acknowledgment, +CNMA takes only one parameter.

CMT parsing is moved from at_parse_cmt() to at_cmt_notify(). This
function is modified to match the style of at_cmgr_notify() and it
includes a switch case for CINTERION modems.
2017-04-21 11:02:05 -05:00
Marko Šulejić a9a477e469 atmodem: fix typo 2016-12-14 11:19:56 -06:00
Anthony Viallard 8c6eea3385 SIMCOM: add a quirk for AT+CNMI command building
Use mode=1 otherwise it fails (ref. "SIM5215_SIM5216_ATC_V1.18.pdf - §6.9")
2013-07-22 15:48:59 -05:00
Denis Kenzior b947ee702b sms: Constify atmodem driver submit method 2012-06-16 09:50:05 -05:00
Pablo Neira Ayuso 535ff69ded sms: Handle quirky Wavecom Q2XXX CPMS syntax 2012-05-30 00:03:10 -05:00
Marcel Holtmann 19e7437c46 atmodem: Icera devices don't support SMS ACK PDUs either 2012-05-24 03:54:29 +02:00
Philippe Nunes 09449f1e66 sms: Add ZTE quirk for CDS notifications 2012-04-06 11:05:48 -05:00
Renat Zaripov c217638197 sms: Disable sending AT+CNMA with SIMCOM quirk
SIMCOM SIM900 modem module not support AT+CNMA command
2012-02-27 20:29:22 -06:00
Marcel Holtmann 4e77afffb3 drivers: Update copyright information 2011-10-10 13:39:48 -07:00
Marcel Holtmann 98afba784d atmodem: Use ZTE specific vendor quirk for SMS support 2011-10-06 15:30:14 -07:00
Marcel Holtmann 1973805069 atmodem: The Gobi devices don't support SMS ACK PDUs either 2011-01-29 18:39:37 +01:00
Jeevaka Badrappan 4258fb5915 atmodem: remove NULL check 2011-01-29 18:39:37 +01:00
Marcel Holtmann 66032172ef atmodem: Use Qualcomm Gobi quirks for SMS, CBS and USSD 2011-01-22 11:36:43 +01:00
Marcel Holtmann 503e5e0321 atmodem: Use switch statements for SMS vendor quirks 2011-01-22 11:20:10 +01:00
Jeevaka Badrappan b97676acc3 atmodem: M15 coding style fix 2011-01-12 08:06:58 -08:00
Lucas De Marchi b82a7f8511 drivers: explicitly compare pointers to NULL
This patch was generated by the following semantic patch
(http://coccinelle.lip6.fr/)

// <smpl>
@fix disable is_null,isnt_null1@
expression *E;
@@

- !E
+ E == NULL
// </smpl>
2010-11-29 11:37:09 -06:00
Denis Kenzior 8f949a6d8c atmodem: Forgot to reset sms data on remove 2010-11-29 07:52:35 -06:00
Marcel Holtmann ae2a9207a4 atmodem: Add support for Infineon CNMA without PDU
Seems like the Infineon modem can't handle a provided PDU to the CNMA
command. So just leave it out.
2010-09-24 18:28:32 +09:00
Marcel Holtmann 773b3a8088 atmodem: Add a few more debug statements for SMS support 2010-08-20 21:53:21 +02:00
Marcel Holtmann a8d3e7433a atmodem: Remove useless NULL checks before g_free 2010-08-16 22:02:01 +02:00
Denis Kenzior ac524be99f atmodem: Use g_at_chat_clone 2010-08-12 16:40:40 -05:00
Denis Kenzior 52da988816 atmodem: Add CGSMS support to sms driver 2010-06-25 14:25:46 -05:00
Denis Kenzior 054ed2653a atmodem: Support CDS indicators for MBM
MBM does not advertise support for CNMA, yet only supports CDS style
notifications which do not need to be acknowledged.
2010-06-21 15:21:40 -05:00
Marcel Holtmann 45c1bcb1d9 Disable CNMA support for Novatel based devices 2010-06-10 21:06:48 -07:00
Denis Kenzior 6c8d2f0e5b atmodem: Allow ME & SM for status report store 2010-06-10 22:23:05 -05:00
Denis Kenzior a128cbff8b atmodem: Force CDSI delivery for Novatel devices 2010-06-10 20:21:33 -05:00
Denis Kenzior d8e7a7b5e3 atmodem: Add support for status report via CDSI 2010-06-10 20:13:50 -05:00
Denis Kenzior 39391cf32b atmodem: Use atutil based functions 2010-06-10 20:08:10 -05:00
Denis Kenzior 5a883d1c76 atmodem: Register for notifications after CMGL 2010-06-10 18:43:30 -05:00
Denis Kenzior 150c1e753f atmodem: Split out the +CPMS sender
Just before sending a CMGR for +CMTI notification, use need to
optionally send a CPMS to select the proper storage.  This should be
done in a separate function for potential re-use by CDSI
2010-06-10 18:41:29 -05:00
Marcel Holtmann 2aeb7df627 And some more minor coding style cleanup in SMS driver 2010-06-09 19:13:57 -07:00
Marcel Holtmann 1125ffa7f6 Fix coding style for one comment in SMS driver 2010-06-09 19:12:24 -07:00
Marcel Holtmann 45ba3b9a7c Add special SMS handling for Huawei based devices 2010-06-06 18:21:30 -07:00
Denis Kenzior 56d14e1fe1 atmodem: Put some common code into a utility 2010-06-04 14:21:57 -05:00
Pasi Miettinen 6220c01f4a Change in at_cds_notify for status report 2010-06-04 14:21:57 -05:00
Marcel Holtmann 48d210bac6 The ack pdu support is not working on Novatel or Option devices 2010-06-03 18:15:27 -07:00
Marcel Holtmann 23d97f2c0a Quirk SMS handling for Novatel based devices
The Novatel based devices with Qualcomm chips seems to have various
problems. First they advertise CNMI mode 2, but don't support it. And
second they don't support CNMA acknowledgement with a PDU. So fall back
to acks without PDU.
2010-06-03 08:54:08 -07:00