LTE atom support for gemalto modem
by Gabriel Lucas
Hi everyone,
First of all, sorry for having spammed the mailing list with last patch
serie. I thought some hadn't been accepted. Some patches are from
Mariem, a colleague, who wasn't in the subscribers before and she was in
the cc: field.
I've been having a look at the recent LTE atom. I've noticed there was
no vendor-specific parameter when registering it. I think we might have
some problem with the atmodem driver as in the
AT+CGDCONT=<context-id>,... command, the context-id starts from 0 on
some modems and from 1 on other ones (I won't denounce gemalto).
I think adding the vendor ID as a parameter might cause heavy
modifications so I wanted to have your opinion on how to handle this
case the simpliest way.
Best Regards,
Gabriel Lucas
2 years, 10 months
Wierd behaviour of ofono on MC7455 and Verizon sim card
by Eswaran Vinothkumar (BEG/PJ-IOT-EL)
Hi,
For my internal project I am using ofono and connman. I am seeing a weird behaviour when using Verizon SIM with MC7455 module.
Ofono version:1.22
The ofono is not able to detect the Verizon SIM.
* /usr/lib/ofono/test/list-modems
[ /sierra_0 ]
Type = hardware
Model = MC7455
Manufacturer = Sierra Wireless, Incorporated
Lockdown = 0
Interfaces = org.ofono.SimManager org.ofono.VoiceCallManager
Serial = 359072061147894
Revision = SWI9X30C_02.24.05.06 r7040 CARMD-EV-FRMWR2 2017/05/19 06:23:09
Online = 0
Emergency = 0
Features = sim
Powered = 1
[ org.ofono.SimManager ]
Present = 0
[ org.ofono.VoiceCallManager ]
EmergencyNumbers = 08 000 999 110 112 911 118 119
As a next step, I tried to check the responses of AT commands:
AT+CPIN?
+CPIN: READY
AT+COPS=?
+COPS: (2,"Verizon Wireless","VZW","311480",7),(1,"AT&T","AT&T","310410",7),(1,)
OK
aT+CREG?
+CREG: 0,3
We can see that SIM is being detected by the AT commands but not by ofono. >From the response of 'at+creg?' we can see that the registration to the network is denied. I thought that's the problem initially.
But when i tried to use qmilci tools, I can successfully register to the network and can access the internet. The steps followed are as foloows:
#qmicli -d /dev/cdc-wdm1 --dms-set-operating-mode=online
[/dev/cdc-wdm1] Operating mode set successfully
#qmi-network /dev/cdc-wdm1 start
Loading profile at /etc/qmi-network.conf...
APN: vzwinternet
APN user: unset
APN password: unset
qmi-proxy: no
Checking data format with 'qmicli -d /dev/cdc-wdm1 --wda-get-data-format '...
Device link layer protocol retrieved: raw-ip
Getting expected data format with 'qmicli -d /dev/cdc-wdm1 --get-expected-data-format'...
Expected link layer protocol retrieved: 802-3
Updating kernel link layer protocol with 'qmicli -d /dev/cdc-wdm1 --set-expected -data-format=raw-ip'...
Kernel link layer protocol updated
Starting network with 'qmicli -d /dev/cdc-wdm1 --wds-start-network=apn='vzwinternet' --client-no-release-cid '...
Saving state at /tmp/qmi-network-state-cdc-wdm1... (CID: 35)
Saving state at /tmp/qmi-network-state-cdc-wdm1... (PDH: 63831232)
Network started successfully
#qmicli -d /dev/cdc-wdm1 --wds-get-current-settings
[/dev/cdc-wdm1] Current settings retrieved:
IP Family: IPv4
IPv4 address: 100.100.90.111
IPv4 subnet mask: 255.255.255.224
IPv4 gateway address: 100.100.90.112
IPv4 primary DNS: 198.224.145.135
IPv4 secondary DNS: 198.224.144.135
MTU: 1428
Domains: none
root@alen-eval-kit:~# ifconfig wwan1 100.100.90.111 netmask 255.255.255.224
root@alen-eval-kit:~# route add default gw 100.100.90.112 wwan1
root@alen-eval-kit:~# echo "nameserver 198.224.145.135" > /etc/resolv.conf
root@alen-eval-kit:~# echo "nameserver 198.224.144.135" >> /etc/resolv.conf
root@alen-eval-kit:~# wget http://www.google.com
Connecting to www.google.com (74.125.124.99:80)
index.html 100% |*******************************| 13346 0:00:00 ETA
I am puzzled why the network registration fails with AT commands and when using qmicli I could successfully connect to the internet. Any information on this topic would be helpful.
I have attached the ofono debug messages for your reference.
Thanks & Regards
vinothkumar
2 years, 10 months
[PATCH 3/6] gemalto: acquire the network technology
by Gabriel Lucas
From: Mariem Cherif <mariem.cherif(a)ardia.com.tn>
---
drivers/atmodem/network-registration.c | 45 ++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index a5e2af3..aec9c2d 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -48,6 +48,7 @@ static const char *cops_prefix[] = { "+COPS:", NULL };
static const char *csq_prefix[] = { "+CSQ:", NULL };
static const char *cind_prefix[] = { "+CIND:", NULL };
static const char *cmer_prefix[] = { "+CMER:", NULL };
+static const char *smoni_prefix[] = { "^SMONI:", "", NULL };
static const char *zpas_prefix[] = { "+ZPAS:", NULL };
static const char *option_tech_prefix[] = { "_OCTI:", "_OUWCTI:", NULL };
@@ -178,6 +179,32 @@ static int option_parse_tech(GAtResult *result)
return tech;
}
+static int cinterion_parse_tech(GAtResult *result)
+{
+ int tech = -1;
+ GAtResultIter iter;
+ GSList *l;
+ g_at_result_iter_init(&iter, result);
+ l = result->lines;
+ if (strstr(l->data, "^SMONI: ") != NULL) {
+ gchar **body = g_strsplit(l->data, "^SMONI: ", 2);
+ if (*body != NULL) {
+ gchar **data = g_strsplit(body[1], ",", 20);
+ if (*data != NULL) {
+ if (g_strcmp0(data[0], "2G") == 0) {
+ tech = ACCESS_TECHNOLOGY_GSM;
+ } else if (g_strcmp0 (data[0], "3G") == 0) {
+ tech = ACCESS_TECHNOLOGY_UTRAN;
+ } else if (g_strcmp0 (data[0], "4G") == 0) {
+ tech = ACCESS_TECHNOLOGY_EUTRAN;
+ }
+ }
+ g_strfreev(body);
+ }
+ }
+ return tech;
+}
+
static void at_creg_cb(gboolean ok, GAtResult *result, gpointer user_data)
{
struct cb_data *cbd = user_data;
@@ -205,6 +232,18 @@ static void at_creg_cb(gboolean ok, GAtResult *result, gpointer user_data)
cb(&error, status, lac, ci, tech, cbd->data);
}
+static void cinterion_query_tech_cb(gboolean ok, GAtResult *result,
+ gpointer user_data)
+{
+ struct tech_query *tq = user_data;
+ int tech;
+
+ tech = cinterion_parse_tech(result);
+
+ ofono_netreg_status_notify(tq->netreg,
+ tq->status, tq->lac, tq->ci, tech);
+}
+
static void zte_tech_cb(gboolean ok, GAtResult *result, gpointer user_data)
{
struct cb_data *cbd = user_data;
@@ -1518,6 +1557,12 @@ static void creg_notify(GAtResult *result, gpointer user_data)
option_query_tech_cb, tq, g_free) > 0)
return;
break;
+ case OFONO_VENDOR_CINTERION:
+ if (g_at_chat_send(nd->chat, "AT^SMONI",
+ smoni_prefix,
+ cinterion_query_tech_cb, tq, g_free) > 0)
+ return;
+ break;
}
g_free(tq);
--
1.9.1
2 years, 10 months
[PATCH 3/6] gemalto: acquire the network technology
by Gabriel Lucas
From: Mariem Cherif <mariem.cherif(a)ardia.com.tn>
---
drivers/atmodem/network-registration.c | 45 ++++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)
diff --git a/drivers/atmodem/network-registration.c b/drivers/atmodem/network-registration.c
index a5e2af3..aec9c2d 100644
--- a/drivers/atmodem/network-registration.c
+++ b/drivers/atmodem/network-registration.c
@@ -48,6 +48,7 @@ static const char *cops_prefix[] = { "+COPS:", NULL };
static const char *csq_prefix[] = { "+CSQ:", NULL };
static const char *cind_prefix[] = { "+CIND:", NULL };
static const char *cmer_prefix[] = { "+CMER:", NULL };
+static const char *smoni_prefix[] = { "^SMONI:", "", NULL };
static const char *zpas_prefix[] = { "+ZPAS:", NULL };
static const char *option_tech_prefix[] = { "_OCTI:", "_OUWCTI:", NULL };
@@ -178,6 +179,32 @@ static int option_parse_tech(GAtResult *result)
return tech;
}
+static int cinterion_parse_tech(GAtResult *result)
+{
+ int tech = -1;
+ GAtResultIter iter;
+ GSList *l;
+ g_at_result_iter_init(&iter, result);
+ l = result->lines;
+ if (strstr(l->data, "^SMONI: ") != NULL) {
+ gchar **body = g_strsplit(l->data, "^SMONI: ", 2);
+ if (*body != NULL) {
+ gchar **data = g_strsplit(body[1], ",", 20);
+ if (*data != NULL) {
+ if (g_strcmp0(data[0], "2G") == 0) {
+ tech = ACCESS_TECHNOLOGY_GSM;
+ } else if (g_strcmp0 (data[0], "3G") == 0) {
+ tech = ACCESS_TECHNOLOGY_UTRAN;
+ } else if (g_strcmp0 (data[0], "4G") == 0) {
+ tech = ACCESS_TECHNOLOGY_EUTRAN;
+ }
+ }
+ g_strfreev(body);
+ }
+ }
+ return tech;
+}
+
static void at_creg_cb(gboolean ok, GAtResult *result, gpointer user_data)
{
struct cb_data *cbd = user_data;
@@ -205,6 +232,18 @@ static void at_creg_cb(gboolean ok, GAtResult *result, gpointer user_data)
cb(&error, status, lac, ci, tech, cbd->data);
}
+static void cinterion_query_tech_cb(gboolean ok, GAtResult *result,
+ gpointer user_data)
+{
+ struct tech_query *tq = user_data;
+ int tech;
+
+ tech = cinterion_parse_tech(result);
+
+ ofono_netreg_status_notify(tq->netreg,
+ tq->status, tq->lac, tq->ci, tech);
+}
+
static void zte_tech_cb(gboolean ok, GAtResult *result, gpointer user_data)
{
struct cb_data *cbd = user_data;
@@ -1518,6 +1557,12 @@ static void creg_notify(GAtResult *result, gpointer user_data)
option_query_tech_cb, tq, g_free) > 0)
return;
break;
+ case OFONO_VENDOR_CINTERION:
+ if (g_at_chat_send(nd->chat, "AT^SMONI",
+ smoni_prefix,
+ cinterion_query_tech_cb, tq, g_free) > 0)
+ return;
+ break;
}
g_free(tq);
--
1.9.1
2 years, 10 months
[PATCH 0/6] gemalto's ALS3 and PHS8P support
by Gabriel Lucas
This patch serie bring further support to PHS8P modem
and the same level of support for ALS3 modem. Here are
the lists on enhancements:
- ALS3 is detected by Ofono and uses the gemalto plugin
- SIM removing and insertion is supported
- The optional Technology property on NetworkRegistration
is supported
- We ensure that the modem is ready to work before
initializing it
Some of the enhancements are brought by workarounds because
of AT command interface limitations
Gabriel Lucas (4):
gemalto: add detection of ALS3 modem
gemalto: support ALS3 in gemalto's plugin
sim: give access to the driver
gemalto: fix sim reinsertion issue
Mariem Cherif (2):
gemalto: acquire the network technology
gemalto: handle sim is inserted or removed URCs
drivers/atmodem/network-registration.c | 45 +++++++++
include/sim.h | 2 +
plugins/gemalto.c | 169 +++++++++++++++++++++++++++++++--
plugins/udevng.c | 18 ++++
src/sim.c | 5 +
5 files changed, 233 insertions(+), 6 deletions(-)
--
1.9.1
2 years, 10 months
Ofono LTE modems and connman services
by Jonas Bonn
The following issue is causing us some grief and I really need some
guidance on how to approach this. This is being sent to both the ofono
and connman mailing lists because it's not really clear to me who's
doing the right/wrong thing here...
The connman ofono plugin does the following:
i) It powers up (enables) the modem
ii) If cellular tech is enabled, it brings the modem online
For an LTE-modem, this second step results in a default bearer being
attached and thereby the modem is 'connected'. The third connman step,
setting the ofono context to Active, is not required for LTE; the
context becomes 'Active=true' right away.
The above effectively means that it's not possible to have an LTE modem
that does not auto-connect (in connman terms).
Now the APN that ofono sets on the LTE context is 'automatic'; that was
selected because connman _requires_ some APN or else it ignores the
context altogther.
If the modem roams away from LTE connectivity and wants to fallback to
UMTS/GSM, it needs another context with a valid APN. So now the modem
has two 'internet' contexts ('automatic' and APN) which connman presents
as two distinct services.
These two services, as far as I can tell, end up competing with each
other when connecting and a mess ensues... if the lower numbered context
is the 3G context, connman goes into an endless loop attempting to set
it Active and continuously failing when the tech switches to LTE.
The question is, what are the expectations here:
i) What does it mean for connman to see two 'internet' contexts since
it sets up two services for them?
ii) How is a modem supposed to roam between LTE and UMTS/GSM networks
when one requires an APN and the other does not.
iii) Not auto-connecting an LTE modem means not bringing it online; what
implications does this have for connman?
The above is currently a bit of a confusing mess and both ofono and
connman get themselves tied in a knot when the modem switches between
LTE and non-LTE techs. Any guidance on how to approach this would be
appreciated.
Thanks,
Jonas
2 years, 10 months
[PATCH 0/1] Fix up HFP memory dialling documentation
by Philippe De Swert
Hi,
I noticed that unfortunately a small error crept into the documentation as I
forgot to update it to the lastest changes. Thus here is a patch to fix the
issue.
Regards,
Philippe
Philippe De Swert (1):
doc: Fix documentation for HFP memory dialling
doc/voicecallmanager-api.txt | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--
2.11.0
2 years, 10 months
[PATCH 0/3] QMI modem fixups
by Jonas Bonn
Here's a couple of fixups to the qmimodem atoms in order handle service
lifetime.
The QMI services are 'shared' between various atoms and this has some
subtle problems. Patch 3, for the LTE atom, handles an issue where
atoms from different ofono states share an atom. For things to work
properly, only atoms from the same state should be sharing a service.
For things to work better, requests should probably be queued on the
actual service instance that the atom is using and not on the underlying
shared device queue. That way, the responses for a destroyed service
instance could just be dropped instead of being propagated to a
potentially free'd atom. This is a rather intrusive rework of the QMI
core though, so the patches here will need to do for now.
The patches here resolve a concrete segfault that arises when the modem
is set offline.
Jonas Bonn (3):
qmimodem: release WDS service on GPRS atom removal
qmimodem: release DMS service on radio-settings atom removal
qmimodem: release WDS service handle in LTE atom
drivers/qmimodem/gprs.c | 3 +
drivers/qmimodem/lte.c | 143 +++++++++++++++++++++++++-------------
drivers/qmimodem/radio-settings.c | 3 +
3 files changed, 99 insertions(+), 50 deletions(-)
--
2.14.1
2 years, 10 months
[PATCH v2 0/3] LTE default bearer APN
by Jonas Bonn
Here's a reworked version of my series for getting the APN for LTE
default bearer.
In this version, we use 'Get LTE Attach Parameters' to query the modem
as to which APN it actually negotiated with the gateway.
Furthermore, the LTE atom now queries the default context and resets
it before allowing the LTE default APN to be set. This ensures that
the network attach is reproducible and doesn't depend on context
settings that the modem may have persisted.
This patch series provides the ability for QMI modems to set up the
default APN for LTE. With that, it removes the string 'automatic' that
was used as an APN when we previously couldn't determine what the modem
was using. With this, connman functions much better across network
technology transitions.
Jonas Bonn (3):
qmi: add LTE atom driver
gobi: add LTE atom
qmimodem: get LTE default bearer APN from modem
Makefile.am | 1 +
drivers/qmimodem/gprs.c | 162 +++++++++++++++++++++++++--
drivers/qmimodem/lte.c | 266 ++++++++++++++++++++++++++++++++++++++++++++
drivers/qmimodem/qmimodem.c | 2 +
drivers/qmimodem/qmimodem.h | 3 +
plugins/gobi.c | 3 +
6 files changed, 428 insertions(+), 9 deletions(-)
create mode 100644 drivers/qmimodem/lte.c
--
2.14.1
2 years, 10 months
[PATCH v3 0/3] LTE APN series
by Jonas Bonn
Here's v3 of the LTE APN series. This just fixes up some of the issues that
Denis identified in the previous series. All cosmetic with the exception
of a leaked QMI response parameter.
Reinhard had some interesting insight into whence QMI modems take their
LTE settings. It seems that there are a fair number of variants in this
area; I suspect we need to provide some driver hooks somewhere in order
to get this right. What this patch series does is to query the default
context and set the LTE APN there. It seems this should work for some
subset of QMI modems, at least; it works for Quectel. As for the others,
that will need to be left until another time when they become relevant as
I don't have anything other than my QMI EC21 to test with...
/Jonas
Jonas Bonn (3):
qmi: add LTE atom driver
gobi: add LTE atom
qmimodem: get LTE default bearer APN from modem
Makefile.am | 1 +
drivers/qmimodem/gprs.c | 162 +++++++++++++++++++++++++--
drivers/qmimodem/lte.c | 264 ++++++++++++++++++++++++++++++++++++++++++++
drivers/qmimodem/qmimodem.c | 2 +
drivers/qmimodem/qmimodem.h | 3 +
plugins/gobi.c | 3 +
6 files changed, 426 insertions(+), 9 deletions(-)
create mode 100644 drivers/qmimodem/lte.c
--
2.14.1
2 years, 10 months