| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
If the user name or user name together with the password for an AP
are not provided the NONE auth method should be used
|
|
|
|
|
| |
Droid 4 modem is "special" (aka broken) so and getting incoming SMSes
to work is quite tricky. This should get it right.
|
|
|
|
|
| |
Droid 4 modem is "special" (aka broken) so it seems to need a bit of
error handling.
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
| |
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
work.
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
function.
|
|
|
|
|
|
|
|
|
| |
There are at the moment two quectel modems in ofono vendored as
OFONO_VENDOR_QUECTEL_SERIAL: The M95 and the MC60.
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.
|
|
|
|
|
|
|
| |
The Quectel EC21 modem does not understand the AT+CPSB command, and we
did not find a suitable replacement in the
Quectel_EC25&EC21_AT_Commands_Manual_V1.3.pdf
AT+CPSB gives an error on this modem, so we just skip it.
|
|
|
|
|
|
|
|
|
|
| |
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
unsupported.
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.
|
|
|
|
|
|
|
| |
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
|
| |
|
| |
|
|
|
|
| |
Added handling for cid 0 in +CGDCONT callback.
|
|
|
|
|
|
| |
The sim inserted/initialized state is handled properly in the quectel
plugin now, so remove the "auto-initialized" quirk from the atmodem
sim driver.
|
|
|
|
|
| |
Add a vendor quirk to avoid an error being returned when setting up sms
notification for Quectel UC15 modems.
|
|
|
|
| |
Reduce code duplication by introducing send_clcc function.
|
|
|
|
|
| |
The callback calls cgact and cgdcont to get information
regarding any activate context.
|
| |
|
|
|
|
|
|
| |
To detect if a context gets activated before we register
for unsolicited events we need to check if any is
already activated, and flag it auto activated.
|
|
|
|
|
|
|
|
|
| |
The Quectel M95 and MC60 modems respond to AT+CGDATA=? with a single
+CGDATA="PPP", but the callback in gprs-context expects a list of
protocols.
Avoid falling back to the old-style ATD*99 by not expecting a list of
protocols for serial quectel modems.
|
|
|
|
| |
In order to do inheritance by composition.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
An upcoming netreg driver for uBlox modems will need to override the
probe method in order to set itself up, but for further functionality
the "generic" AT implementations are sufficient. The easiest way to do
this is to just set up a vtable with a custom probe implementation and
defer all other methods to the common/generic methods.
The problem is that the AT methods are not actually exported. This
generic AT functionality was not intended to be hooked directly into
other drivers.
This patch exports all the methods of the atmodem network-registration
driver implementation so that they can be used as generic/common
implementations for other drivers.
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
| |
Glib emits a warning when g_hash_table_destroy() is called on a NULL
pointer:
GLib-CRITICAL **: 13:27:40.269: g_hash_table_destroy: assertion 'hash_table != NULL' failed
Add a check to avoid this warning.
|
|
|
|
|
|
|
| |
xmm7xxx based devices (among others) return 0 as cid for default
pdp context. Fix the atmodem gprs driver logic to work with such
devices by initializing last_auto_context_id to -1 instead of 0
to indicate a deactivated context.
|
| |
|
|
|
|
|
| |
handled enabling of stk for xmm7modem vendor in atmodem
driver.
|
|
|
|
|
|
|
| |
When a context gets activated we read its settings, but
if the context gets deactivated during this time we should
not indicate that the context is activated when the settings
are received.
|
| |
|
|
|
|
| |
if (ctx->apn) is always true since apn is an array variable
|
|
|
|
|
|
|
| |
Handled IPv6 address after activating PDP context.
Received IPv6 address is of format addr + netmask in the same string
in the form of "a1.a2.a3.a4.a5.a6.a7.a8.a9.a10.a11.a12.a13.a14.a15.a16.
m1.m2.m3.m4.m5.m6.m7.m8.m9.m10.m11.m12.m13.m14.m15.m16"
|
|
|
|
|
|
|
|
|
|
|
|
| |
Handled DSSA use case for xmm7modem. Added driver function
to switch between available card slots for SIM.
Only one SIM will be active at a given time. On calling this
function the active SIM will be removed and the card slot made
inactive and SIM in the other card slot will be made active.
Use case is similar to a SIM swap/change where one SIM is replaced
another SIM in the same slot.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
Use l_free instead of g_free since the above API was changed to use ell
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
|
| |
Otherwise all unsolicited notifications would also be consumed when
invoking +CGAUTH/+CGDCONT
|
|
|
|
|
|
|
| |
The ofono_lte_default_attach_info now handles also the protocol and the
authentication method, username and password.
Co-authored-by: Martin Baschin <martin.baschin@googlemail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
the cb_data can be used by creating the structure with cb_data_new,
and then there are two possibilities:
- use it in a single callback function, and destroy it with a call to
g_free.
Example:
- calling function:
struct cb_data *cbd = cb_data_new(cb, data);
if (g_at_chat_send(chat, buf, NULL, at_cgatt_cb, cbd, g_free) > 0)
return;
g_free(cbd);
- called function (here at_cgatt_cb):
static void at_cgatt_cb(gboolean ok, GAtResult *result,
gpointer user_data)
{
struct cb_data *cbd = user_data;
ofono_gprs_cb_t cb = cbd->cb;
struct ofono_error error;
decode_at_error(&error,
g_at_result_final_response(result));
cb(&error, cbd->data);
}
note the absence of explicit g_free(cbd);
- pass it through a train of callback functions, adding a reference at
each pass cb_data_ref, and removing it with cb_data_unref.
the use of cb_data_ref would replace a new object creation, while the
use of cb_data_unref the use of g_free.
Example:
- calling function:
struct cb_data *cbd = cb_data_new(cb, data);
// no cb_ref at the creation
if (g_at_chat_send(chat, buf, NULL,
at_lte_set_default_attach_info_cb,
cbd, cb_data_unref) > 0)
goto end;
cb_data_unref(cbd);
- called function 1 (at_lte_set_default_attach_info_cb):
static void at_lte_set_default_attach_info_cb(gboolean ok,
GAtResult *result, gpointer user_data)
{
struct cb_data *cbd = user_data;
cbd = cb_data_ref(cbd);
if (g_at_chat_send(chat, buf, NULL,
at_cgatt_cb, cbd, cb_data_unref) > 0)
return;
cb_data_unref(cbd);
}
- called function 2 (at_cgatt_cb):
like above. no call to g_free or cb_data_unref. The terminal function
doesn't need to know about the reference scheme.
|
| |
|
|
|
|
|
|
|
| |
The function at_util_get_cgdcont_command computes the AT+CGDCONT
string, as per 3GPP 27.007.
It uses a second function, at_util_gprs_proto_to_pdp_type,
that returns the pdp_type string for the command
|
|
|
|
|
|
| |
This function converts the ofono enum ofono_gprs_auth_method
into the value of the 3GPP 27.007 'auth_proto' variable of +CGAUTH so
that it can be passed directly to the AT command.
|
|
|
|
|
|
| |
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...
|