[PATCH 0/7] Add quectel EC21 in serial mode
by poeschel@lemonage.de
From: Lars Poeschel <poeschel(a)lemonage.de>
This patchset adds support for the quectel EC21 LTE modem connected
through its serial port.
Lars Poeschel (7):
quectel: Add Quectel EC21 to known serial modems
quectel: use lte atom on EC21
quectel: Query the model before setting up the mux
quectel: EC21 needs aux channel to be the first mux channel
quectel: EC21 does not understand AT+QIURC
voicecall: Quectel modem do not understand AT+CNAP
quectel: EC21 add ussd with atmodem driver
drivers/atmodem/voicecall.c | 4 +-
plugins/quectel.c | 153 +++++++++++++++++++++++-------------
2 files changed, 101 insertions(+), 56 deletions(-)
--
2.26.2
7 months
Re: [PATCH] udevng: Add support for Quectel BG96 modem
by Martin Hundebøll
Hi Sean,
On 11/25/19 9:26 AM, Sean Nyekjaer wrote:
> Signed-off-by: Sean Nyekjaer <sean(a)geanix.com>
No signoff when submitting to ofono.
// Martin
> ---
> plugins/udevng.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/plugins/udevng.c b/plugins/udevng.c
> index 40ed2b02..cc294c94 100644
> --- a/plugins/udevng.c
> +++ b/plugins/udevng.c
> @@ -1790,6 +1790,8 @@ static struct {
> { "quectelqmi", "qcserial", "2c7c", "0121" },
> { "quectelqmi", "qmi_wwan", "2c7c", "0125" },
> { "quectelqmi", "qcserial", "2c7c", "0125" },
> + { "quectelqmi", "qmi_wwan", "2c7c", "0296" },
> + { "quectelqmi", "qcserial", "2c7c", "0296" },
> { "ublox", "cdc_acm", "1546", "1010" },
> { "ublox", "cdc_ncm", "1546", "1010" },
> { "ublox", "cdc_acm", "1546", "1102" },
>
8 months
Re: [PATCH] Adds optional phone number parameter to ofono-phonesim
by Lars Poeschel
Hi Bettina-Jennifer,
whatever way you chose to send your patches, this is totally messed up.
It would be very hard to extract usable information from this email. It
looks like you wanted to send two patches, but it is just one email.
Your email does include text and html parts, which is also not good.
If you want someone to:
* look at your patches
* try them out
* comment on them
* or even include them in the ofono repository
you have to follow the steps documented in the HACKING file of ofono.
Especially the "Submitting patches" section.
Really please use git send-email to send your patches or at least send
them in a format that is acceptable by git am.
Regards,
Lars
On Wed, May 27, 2020 at 09:51:37AM +0000, Bettina Jennifer Riedl wrote:
> Hello,
>
> this patch adds an optional phone number parameter to ofono-phonesim, instead of using the default number.
>
> Greetings
> Bettina
>
> Michael Klemm:
> Added phone number as additional parameter (1/2)
> AUTHORS: Mention Michael's contributions (2/2)
>
> (1/2)
> diff --git a/src/main.cpp b/src/main.cpp
> index 712e767..a20bc1a 100644
> --- a/src/main.cpp
> +++ b/src/main.cpp
> @@ -28,13 +28,14 @@ static void usage()
> {
> qWarning() << "Usage:"
> << QFileInfo(QCoreApplication::instance()->applicationFilePath()).fileName().toLocal8Bit().constData()
> - << "[-v] [-p port] [-gui] filename";
> + << "[-v] [-p port] [-gui] [-n number] filename";
> exit(-1);
> }
> int main(int argc, char **argv)
> {
> QString filename = nullptr;
> + QString number = "+491701234567";
> QCoreApplication *app;
> int port = 12345;
> int index;
> @@ -61,6 +62,15 @@ int main(int argc, char **argv)
> } else if ( strcmp(argv[index],"-h") == 0
> || strcmp(argv[index],"-help") == 0 ) {
> usage();
> + } else if ( strcmp(argv[index],"-n") == 0
> + || strcmp(argv[index],"-num") == 0 ) {
> + index++;
> + if (index >= argc) {
> + qWarning() << "ERROR: Got -n but missing phone number";
> + usage();
> + } else {
> + number = argv[index];
> + }
> } else {
> // must be filename. SHOULD be last argument.
> if (index != argc-1) {
> @@ -85,7 +95,7 @@ int main(int argc, char **argv)
> } else
> app = new QCoreApplication(argc, argv);
> - PhoneSimServer *pss = new PhoneSimServer(filename, port, nullptr);
> + PhoneSimServer *pss = new PhoneSimServer(filename, port, number, nullptr);
>
> diff --git a/src/server.cpp b/src/server.cpp
> index 3ff7def..856a90f 100644
> --- a/src/server.cpp
> +++ b/src/server.cpp
> @@ -22,13 +22,12 @@
> #include "hardwaremanipulator.h"
> #include <qdebug.h>
> -static int phonenumber = 555000;
> -
> -PhoneSimServer::PhoneSimServer(const QString &f, quint16 port, QObject *parent)
> +PhoneSimServer::PhoneSimServer(const QString &f, quint16 port, const QString &n, QObject *parent)
> : QTcpServer(parent), fact(nullptr), currentRules(nullptr)
> {
> listen( QHostAddress::Any, port );
> filename = f;
> + number = n;
> }
> PhoneSimServer::~PhoneSimServer()
> @@ -47,7 +46,6 @@ void PhoneSimServer::setHardwareManipulator(HardwareManipulatorFactory *f)
> void PhoneSimServer::incomingConnection(qintptr s)
> {
> SimRules *sr = new SimRules(s, this, filename, fact);
> - sr->setPhoneNumber(QString::number(phonenumber));
> - phonenumber++;
> + sr->setPhoneNumber(number);
> currentRules = sr;
> }
>
> diff --git a/src/server.h b/src/server.h
> index 9175359..6790be4 100644
> --- a/src/server.h
> +++ b/src/server.h
> @@ -32,7 +32,7 @@ class HardwareManipulatorFactory;
> class PhoneSimServer : public QTcpServer
> {
> public:
> - PhoneSimServer(const QString &, quint16 port, QObject *parent = nullptr);
> + PhoneSimServer(const QString &, quint16 port, const QString &, QObject *parent = nullptr);
> ~PhoneSimServer() override;
> void setHardwareManipulator(HardwareManipulatorFactory *f);
> @@ -44,6 +44,7 @@ protected:
> private:
> QString filename;
> + QString number;
>
>
>
> (2/2)
> diff --git a/AUTHORS b/AUTHORS
> index 9b8a840..d8e107f 100644
> --- a/AUTHORS
> +++ b/AUTHORS
> @@ -15,3 +15,4 @@ Jussi Pakkanen <jussi.pakkanen(a)canonical.com>
> James Prestwood <james.prestwood(a)linux.intel.com>
> Simon Busch <morphis(a)gravedo.de>
> Jonah Brüchert <jbb.prv(a)gmx.de>
> +Michael Klemm <mklemm(a)assystem.com>
> _____________________________________________________________________________________
>
> Expleo Germany GmbH
> Sitz der Gesellschaft | Corporate Headquarters: München
> Handelsregister | Commercial Register: Amtsgericht München HRB 83252
> Geschäftsführung | Management: Ralph Gillessen, Josef Mitterhuber
>
> This message contains information that may be privileged or confidential. It is intended only for the person to whom it is addressed.
> If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof.
> If you receive this message in error, please notify the sender immediately and delete all copies of this message.
> _________________________________________________________
>
> EMAIL LEGAL MENTION / DISCLAIMER
>
> This message contains information that may be privileged or confidential and is the property of the Expleo Services SAS, RCS Versailles 831 178 348, located, 3 avenue des Prés, 78180 Montigny Le Bretonneux - France. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
>
> Ce message contient des informations qui peuvent être privilégiées ou confidentielles et elles sont de la propriété d'Expleo Services SAS, RCS Versailles 831 178 348, situé, 3 avenue des Prés, 78180 Montigny le Bretonneux-France. Il est destiné uniquement à la personne à qui est adressé. Si vous n'êtes pas le destinataire visé, vous n'êtes pas autorisé à lire, imprimer, conserver, copier, diffuser, distribuer ou utiliser ce message ou toute partie de celui-ci. Si vous recevez ce message par erreur, veuillez en avertir immédiatement l'expéditeur et supprimer toutes les copies de ce message.
> _______________________________________________
> ofono mailing list -- ofono(a)ofono.org
> To unsubscribe send an email to ofono-leave(a)ofono.org
9 months, 1 week
Quectel BG95 Support
by arash.javanmard@inro-et.de
Hello,
unfortunately there is no support for Quectel BG95 in ofono. But nevertheless i tried to adapt the existing Quectel implementation for BG95.
So i added:
udevng.c
------- 8< -------------
{ "quectelqmi", "qmi_wwan", "2c7c", "0700" },
{ "quectelqmi", "qcserial", "2c7c", "0700" },
{ "quectel", "option", "2c7c", "0700" },
------- >8 -------------
It helps to recognize the modem, but it seems to be BUG in "setup_quectel" fucntion in "udevng.c" file.
Since checking for "modem->serial" in the function produces a segfault. so i just commented it out.
But after that the next problems popped up in "quectel.c"-Modul.
------- 8< ----------------------------------------
ofonod[273]: Aux: > AT+CGMM\r
ofonod[273]: Aux: < \r\nBG95-M3\r\n\r\nOK\r\n
ofonod[273]: plugins/quectel.c:cgmm_cb() 0x165dd0 ok 1
ofonod[273]: Failed to query modem model
------- >8 -----------------------------------------
As you can see it failed to query the model modem, even though the modem is answering correct.
so i digged deeper and found out, that only the number of lines save in result-argument which is a "GATResult"
is actually zero! That means somewho the answer of the modem is not parsed right!
Any help is welcome!
Best Regards
Arash
9 months, 1 week
[PATCH] Adds optional phone number parameter to ofono-phonesim
by Bettina Jennifer Riedl
Hello,
this patch adds an optional phone number parameter to ofono-phonesim, instead of using the default number.
Greetings
Bettina
Michael Klemm:
Added phone number as additional parameter (1/2)
AUTHORS: Mention Michael's contributions (2/2)
(1/2)
diff --git a/src/main.cpp b/src/main.cpp
index 712e767..a20bc1a 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -28,13 +28,14 @@ static void usage()
{
qWarning() << "Usage:"
<< QFileInfo(QCoreApplication::instance()->applicationFilePath()).fileName().toLocal8Bit().constData()
- << "[-v] [-p port] [-gui] filename";
+ << "[-v] [-p port] [-gui] [-n number] filename";
exit(-1);
}
int main(int argc, char **argv)
{
QString filename = nullptr;
+ QString number = "+491701234567";
QCoreApplication *app;
int port = 12345;
int index;
@@ -61,6 +62,15 @@ int main(int argc, char **argv)
} else if ( strcmp(argv[index],"-h") == 0
|| strcmp(argv[index],"-help") == 0 ) {
usage();
+ } else if ( strcmp(argv[index],"-n") == 0
+ || strcmp(argv[index],"-num") == 0 ) {
+ index++;
+ if (index >= argc) {
+ qWarning() << "ERROR: Got -n but missing phone number";
+ usage();
+ } else {
+ number = argv[index];
+ }
} else {
// must be filename. SHOULD be last argument.
if (index != argc-1) {
@@ -85,7 +95,7 @@ int main(int argc, char **argv)
} else
app = new QCoreApplication(argc, argv);
- PhoneSimServer *pss = new PhoneSimServer(filename, port, nullptr);
+ PhoneSimServer *pss = new PhoneSimServer(filename, port, number, nullptr);
diff --git a/src/server.cpp b/src/server.cpp
index 3ff7def..856a90f 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -22,13 +22,12 @@
#include "hardwaremanipulator.h"
#include <qdebug.h>
-static int phonenumber = 555000;
-
-PhoneSimServer::PhoneSimServer(const QString &f, quint16 port, QObject *parent)
+PhoneSimServer::PhoneSimServer(const QString &f, quint16 port, const QString &n, QObject *parent)
: QTcpServer(parent), fact(nullptr), currentRules(nullptr)
{
listen( QHostAddress::Any, port );
filename = f;
+ number = n;
}
PhoneSimServer::~PhoneSimServer()
@@ -47,7 +46,6 @@ void PhoneSimServer::setHardwareManipulator(HardwareManipulatorFactory *f)
void PhoneSimServer::incomingConnection(qintptr s)
{
SimRules *sr = new SimRules(s, this, filename, fact);
- sr->setPhoneNumber(QString::number(phonenumber));
- phonenumber++;
+ sr->setPhoneNumber(number);
currentRules = sr;
}
diff --git a/src/server.h b/src/server.h
index 9175359..6790be4 100644
--- a/src/server.h
+++ b/src/server.h
@@ -32,7 +32,7 @@ class HardwareManipulatorFactory;
class PhoneSimServer : public QTcpServer
{
public:
- PhoneSimServer(const QString &, quint16 port, QObject *parent = nullptr);
+ PhoneSimServer(const QString &, quint16 port, const QString &, QObject *parent = nullptr);
~PhoneSimServer() override;
void setHardwareManipulator(HardwareManipulatorFactory *f);
@@ -44,6 +44,7 @@ protected:
private:
QString filename;
+ QString number;
(2/2)
diff --git a/AUTHORS b/AUTHORS
index 9b8a840..d8e107f 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -15,3 +15,4 @@ Jussi Pakkanen <jussi.pakkanen(a)canonical.com>
James Prestwood <james.prestwood(a)linux.intel.com>
Simon Busch <morphis(a)gravedo.de>
Jonah Brüchert <jbb.prv(a)gmx.de>
+Michael Klemm <mklemm(a)assystem.com>
_____________________________________________________________________________________
Expleo Germany GmbH
Sitz der Gesellschaft | Corporate Headquarters: München
Handelsregister | Commercial Register: Amtsgericht München HRB 83252
Geschäftsführung | Management: Ralph Gillessen, Josef Mitterhuber
This message contains information that may be privileged or confidential. It is intended only for the person to whom it is addressed.
If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof.
If you receive this message in error, please notify the sender immediately and delete all copies of this message.
_________________________________________________________
EMAIL LEGAL MENTION / DISCLAIMER
This message contains information that may be privileged or confidential and is the property of the Expleo Services SAS, RCS Versailles 831 178 348, located, 3 avenue des Prés, 78180 Montigny Le Bretonneux - France. It is intended only for the person to whom it is addressed. If you are not the intended recipient, you are not authorized to read, print, retain, copy, disseminate, distribute, or use this message or any part thereof. If you receive this message in error, please notify the sender immediately and delete all copies of this message.
Ce message contient des informations qui peuvent être privilégiées ou confidentielles et elles sont de la propriété d'Expleo Services SAS, RCS Versailles 831 178 348, situé, 3 avenue des Prés, 78180 Montigny le Bretonneux-France. Il est destiné uniquement à la personne à qui est adressé. Si vous n'êtes pas le destinataire visé, vous n'êtes pas autorisé à lire, imprimer, conserver, copier, diffuser, distribuer ou utiliser ce message ou toute partie de celui-ci. Si vous recevez ce message par erreur, veuillez en avertir immédiatement l'expéditeur et supprimer toutes les copies de ce message.
9 months, 2 weeks
crash in drivers/qmimodem/gprs.c:extract_ss_info()
by Pau Espin Pedrol
Hi all,
I reported an ofono recurring crash together with the corresponding
investigation & logs yesterday on #ofono IRC channel. The crash appears
on our osmo-gsm-tester setup several times per day.
In my opinion, the summary for the crash is following race condition:
1- We submit QMI request using qmi_attached_status() and expect callback
to be received at some point
2- While waiting for the response, modem announces becoming offline
(modem_change_state() MODEM_STATE_ONLINE -> MODEM_STATE_OFFLINE). Here
gprs_remove() is called which frees all related structures
3- We receive the QMI response of qmi_attached_status() and
get_ss_info_cb() is called, which eventually crashes because the "gprs =
cbd->user" is already gone, so use after free occurs and process
receives SIGSEGV.
The details of the issue can be found here:
https://osmocom.org/issues/4542
so far Denis proposed something like this on IRC:
* Tracking outstanding requests and cancel them. For instance GAtChat
(via g_at_chat_clone) creates a facade object instead, and assigns a
‘group id’ to it. So destroying the facade object also cancels any
outstanding requests associated with it. QMI should ideally do something
similar.
* An easy fix would be to store the request id for whatever NAS
request you’re doing in gprs.c and cancel it in gprs_remove. But you
might run into this in other places in drivers/qmimodem/gprs.c
I would welcome if someone with more knowledge of ofono code base than I
could have a look at this and provide some fix, or at least some
detailed pointers at the work required. I am happy to collaborate and
test the patches as needed.
Best Regards,
Pau
--
- Pau Espin Pedrol <pespin(a)sysmocom.de> http://www.sysmocom.de/
=======================================================================
* sysmocom - systems for mobile communications GmbH
* Alt-Moabit 93
* 10559 Berlin, Germany
* Sitz / Registered office: Berlin, HRB 134158 B
* Geschaeftsfuehrer / Managing Director: Harald Welte
9 months, 4 weeks