[PATCH 1/1] ublox: detect and support LARA R2 series
by Jonas Bonn
---
Hi Krishna,
This patch isn't tested, but this is roughly what you'd need to get the
LARA R2 detected and running. After that, it's just a matter of going
through the details of where ofono has issues.
>From what I can see at a quick glance at the documentation, there's
nothing that particularly stands out here so I suspect things will
mostly just work. Give the patch a try and let me know how it goes.
Regards,
Jonas
drivers/ubloxmodem/ubloxmodem.c | 9 +++++++++
drivers/ubloxmodem/ubloxmodem.h | 1 +
plugins/udevng.c | 2 ++
3 files changed, 12 insertions(+)
diff --git a/drivers/ubloxmodem/ubloxmodem.c b/drivers/ubloxmodem/ubloxmodem.c
index a52a67ea..85d72684 100644
--- a/drivers/ubloxmodem/ubloxmodem.c
+++ b/drivers/ubloxmodem/ubloxmodem.c
@@ -77,6 +77,15 @@ const struct ublox_model ublox_models[] = {
.name = "TOBY-L4906",
.flags = UBLOX_F_TOBY_L4,
},
+ /* LARA L2 series */
+ {
+ .name = "LARA-R202",
+ .flags = UBLOX_F_LARA_R2,
+ },
+ {
+ .name = "LARA-R211",
+ .flags = UBLOX_F_LARA_R2,
+ },
{ /* sentinel */ },
};
diff --git a/drivers/ubloxmodem/ubloxmodem.h b/drivers/ubloxmodem/ubloxmodem.h
index 2c5b7433..7fe58df3 100644
--- a/drivers/ubloxmodem/ubloxmodem.h
+++ b/drivers/ubloxmodem/ubloxmodem.h
@@ -27,6 +27,7 @@ enum ublox_flags {
UBLOX_F_TOBY_L2 = (1 << 0),
UBLOX_F_TOBY_L4 = (1 << 1),
UBLOX_F_HAVE_USBCONF = (1 << 2),
+ UBLOX_F_LARA_R2 = (1 << 3),
};
struct ublox_model {
diff --git a/plugins/udevng.c b/plugins/udevng.c
index f689b756..397ac931 100644
--- a/plugins/udevng.c
+++ b/plugins/udevng.c
@@ -1700,6 +1700,8 @@ static struct {
{ "ublox", "cdc_acm", "1546", "1010" },
{ "ublox", "cdc_ncm", "1546", "1010" },
{ "ublox", "cdc_acm", "1546", "1102" },
+ { "ublox", "cdc_acm", "1546", "110a" },
+ { "ublox", "cdc_ncm", "1546", "110a" },
{ "ublox", "rndis_host", "1546", "1146" },
{ "ublox", "cdc_acm", "1546", "1146" },
{ "gemalto", "option", "1e2d", "0053" },
--
2.20.1
1 year, 8 months
[PATCH 2/2] xmm7modem: enabling simtoolkit for xmm7modem
by Antara Borwankar
added code to create stk atom in xmm7modem plugin
---
plugins/xmm7xxx.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/plugins/xmm7xxx.c b/plugins/xmm7xxx.c
index 23a7d4e..da6622b 100644
--- a/plugins/xmm7xxx.c
+++ b/plugins/xmm7xxx.c
@@ -1225,6 +1225,7 @@ static void xmm7xxx_pre_sim(struct ofono_modem *modem)
ofono_devinfo_create(modem, OFONO_VENDOR_IFX, "atmodem", data->chat);
data->sim = ofono_sim_create(modem, OFONO_VENDOR_XMM, "atmodem",
data->chat);
+ ofono_stk_create(modem, OFONO_VENDOR_XMM, "atmodem", data->chat);
}
static void set_online_cb(gboolean ok, GAtResult *result, gpointer user_data)
--
1.9.1
1 year, 8 months
[PATCH 0/4] RFC2: ublox serial modem support
by Philippe De Swert
After the comments on the last patchset, as requested I tried to take
the approach where the serial support is merged into the existing ublox driver.
Some notes/caveats:
1. Not sure if filtering on device path is the right approach to identify a serial modem
2. This will not really work unless we fix the CEREG/CREG mess
3. There is still the CHAP NO_AUTH ppp issue also
4. There is an issue with missing support for AT+CGDATA for SARA ublox modems. Did not
find a better way than mandate atd99 for all ublox modems based on vendor. Maybe there
is a cleaner/better way?
Philippe De Swert (4):
ubloxmodem: pre-eliminary support for ublox SARA serial modems
plugins/ublox: Enable serial connection for an ublox modem
udev: Recognize ublox serial modems
atmodem: Use atd99 as ppp command for ublox
drivers/atmodem/gprs-context.c | 11 ++++---
drivers/ubloxmodem/lte.c | 9 ++++++
drivers/ubloxmodem/netmon.c | 2 ++
drivers/ubloxmodem/ubloxmodem.c | 14 +++++++++
drivers/ubloxmodem/ubloxmodem.h | 2 ++
plugins/ublox.c | 55 ++++++++++++++++++++++++++++++++-
plugins/udevng.c | 7 +++++
7 files changed, 95 insertions(+), 5 deletions(-)
--
2.20.1
1 year, 9 months
[PATCH] ppp: Allow to set-up ppp connection without authentification
by Philippe De Swert
When using RCR_REJECT no ppp connection will be established. It used to work before, and
this was a side-effect of commit 6fc119d9eaee5f9cc37a5a7198d1c55ef98fd645
See also this thread: https://lists.ofono.org/pipermail/ofono/2019-January/019067.html
---
gatchat/ppp_lcp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gatchat/ppp_lcp.c b/gatchat/ppp_lcp.c
index 3fe38217..252b3cdc 100644
--- a/gatchat/ppp_lcp.c
+++ b/gatchat/ppp_lcp.c
@@ -281,7 +281,7 @@ static enum rcr_result lcp_rcr(struct pppcp_data *pppcp,
return RCR_NAK;
case G_AT_PPP_AUTH_METHOD_NONE:
- return RCR_REJECT;
+ break;
}
break;
}
--
2.20.1
1 year, 9 months
[PATCH 2/4] netmon: adding get function for neighbouring cell information
by Antara Borwankar
Added declaration of functions and structures required for getting
neighbouring cell information.
---
include/netmon.h | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/include/netmon.h b/include/netmon.h
index c8fcafa..8847b82 100644
--- a/include/netmon.h
+++ b/include/netmon.h
@@ -43,6 +43,8 @@ struct ofono_netmon_driver {
unsigned int enable,
unsigned int period,
ofono_netmon_cb_t cb, void *data);
+ void (*neighbouring_cell_update)(struct ofono_netmon *netmon,
+ ofono_netmon_cb_t cb, void *data);
};
enum ofono_netmon_cell_type {
@@ -73,6 +75,28 @@ enum ofono_netmon_info {
OFONO_NETMON_INFO_INVALID,
};
+struct ofono_netmon_neighbouring_cell
+{
+ enum ofono_netmon_cell_type cell_type;
+ int mcc;
+ int mnc;
+ int cell_id;
+ union {
+ struct lte_cell {
+ int rsrq;
+ int rsrp;
+ } lte;
+ struct umts_cell {
+ int rscp;
+ int ecno;
+ } umts;
+ struct gsm_cell {
+ int rssi;
+ int ber;
+ } gsm;
+ } cell_meas;
+};
+
/*
* Examples:
* ofono_netmon_serving_cell_notify(netmon, OFONO_NETMON_CELL_TYPE_GSM,
@@ -104,6 +128,9 @@ void ofono_netmon_set_data(struct ofono_netmon *netmon, void *data);
void *ofono_netmon_get_data(struct ofono_netmon *netmon);
+void ofono_netmon_neighbouring_cell_notify(struct ofono_netmon *netmon,
+ void *cell_list);
+
#ifdef __cplusplus
}
#endif
--
1.9.1
1 year, 9 months
[PATCH 1/4] netmon: adding method to fetch neighbouring cell mesurement
by Antara Borwankar
Added new method to fetch neighbouring cell information.
---
doc/networkmonitor-api.txt | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/doc/networkmonitor-api.txt b/doc/networkmonitor-api.txt
index f8cc1c2..1cc73d2 100644
--- a/doc/networkmonitor-api.txt
+++ b/doc/networkmonitor-api.txt
@@ -22,6 +22,23 @@ Methods a{sv} GetServingCellInformation()
are available, their valid value ranges and
applicability to different cell types.
+ a{a{sv}} GetNeighbouringCellsInformation()
+
+ Requests the neighbouring cells information and basic
+ measurements from oFono. The returned value is a
+ dictionary with the possible key / values documented
+ below. The type of cell is given by the 'Technology'
+ property.
+
+ Based on the type of cell, the dictionary will contain
+ additional key/value pairs. If a given key/value pair
+ is not present, then it is not known or unsupported
+ by the underlying driver.
+
+ Refer to the sections below for which property types
+ are available, their valid value ranges and
+ applicability to different cell types.
+
void RegisterAgent(object path)
Registers an agent which will be called whenever the
--
1.9.1
1 year, 9 months
[PATCH 4/4] xmm7modem: adding netmon changes for reporting neighbouring cell
by Antara Borwankar
Added netmon changes for xmm7modem driver to fetch neighbouring
cell information.
---
drivers/xmm7modem/netmon.c | 160 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 160 insertions(+)
diff --git a/drivers/xmm7modem/netmon.c b/drivers/xmm7modem/netmon.c
index ba70e2b..b9aac3e 100644
--- a/drivers/xmm7modem/netmon.c
+++ b/drivers/xmm7modem/netmon.c
@@ -205,6 +205,165 @@ static void xmm7modem_netmon_request_update(struct ofono_netmon *netmon,
CALLBACK_WITH_FAILURE(cb, data);
}
+static void xmci_neighbouring_cell_cb
+ (gboolean ok, GAtResult *result, gpointer user_data)
+{
+ struct cb_data *cbd = user_data;
+ struct ofono_netmon *netmon = cbd->data;
+ ofono_netmon_cb_t cb = cbd->cb;
+ struct ofono_error error;
+ GAtResultIter iter;
+ int number;
+ int rxlev = -1;
+ int ber = -1;
+ int rscp = -1;
+ int rsrp = -1;
+ int ecn0 = -1;
+ int rsrq = -1;
+ int tech = -1;
+ int mcc = -1;
+ int mnc = -1;
+ int ci = -1;
+ GList *list = NULL;
+ struct ofono_netmon_neighbouring_cell *cell;
+ int list_size = 0;
+
+ DBG("ok %d", ok);
+
+ decode_at_error(&error, g_at_result_final_response(result));
+
+ if (!ok) {
+ cb(&error, cbd->data);
+ return;
+ }
+
+ g_at_result_iter_init(&iter, result);
+
+ while (g_at_result_iter_next(&iter, "+XMCI:")) {
+ if (!g_at_result_iter_next_number(&iter, &number))
+ break;
+
+ tech = xmm7modem_map_radio_access_technology(number);
+
+ switch (number) {
+ case XMCI_GSM_NEIGH_CELL:
+ /* skip <MCC>,<MNC>,<LAC>,<CI>,<BSIC> */
+ g_at_result_iter_next_number(&iter, &mcc);
+ g_at_result_iter_next_number(&iter, &mnc);
+ g_at_result_iter_skip_next(&iter);
+ g_at_result_iter_next_number(&iter, &ci);
+ g_at_result_iter_skip_next(&iter);
+
+ g_at_result_iter_next_number(&iter, &number);
+ rxlev = number != 99 ? number : rxlev;
+
+ g_at_result_iter_next_number(&iter, &number);
+ ber = number != 99 ? number : ber;
+
+ cell = g_new0(struct ofono_netmon_neighbouring_cell,
+ 1);
+ cell->cell_type = tech;
+ cell->mcc = mcc;
+ cell->mnc = mnc;
+ cell->cell_id = ci;
+ cell->cell_meas.gsm.rssi = rxlev;
+ cell->cell_meas.gsm.ber = ber;
+
+ list = g_list_append(list, cell);
+ break;
+ case XMCI_UMTS_NEIGH_CELL:
+ /*
+ * skip <MCC>,<MNC>,<LAC>,<CI><PSC>,<DLUARFNC>,
+ * <ULUARFCN>,<PATHLOSS>,<RSSI>
+ */
+ g_at_result_iter_next_number(&iter, &mcc);
+ g_at_result_iter_next_number(&iter, &mnc);
+ g_at_result_iter_skip_next(&iter);
+ g_at_result_iter_next_number(&iter, &ci);
+ g_at_result_iter_skip_next(&iter);
+ g_at_result_iter_skip_next(&iter);
+ g_at_result_iter_skip_next(&iter);
+ g_at_result_iter_skip_next(&iter);
+ g_at_result_iter_skip_next(&iter);
+
+ g_at_result_iter_next_number(&iter, &number);
+ rscp = number != 255 ? number : rscp;
+
+ g_at_result_iter_next_number(&iter, &number);
+ ecn0 = number != 255 ? number : ecn0;
+
+ cell = g_new0(struct ofono_netmon_neighbouring_cell,
+ 1);
+ cell->cell_type = tech;
+ cell->mcc = mcc;
+ cell->mnc = mnc;
+ cell->cell_id = ci;
+ cell->cell_meas.umts.rscp = rscp;
+ cell->cell_meas.umts.ecno = ecn0;
+
+ list = g_list_append(list, cell);
+ break;
+ case XMCI_LTE_NEIGH_CELL:
+ /*
+ * skip <MCC>,<MNC>,<TAC>,<CI>,<PCI>,<DLUARFNC>,
+ * <ULUARFCN>,<PATHLOSS_LTE>
+ */
+ g_at_result_iter_next_number(&iter, &mcc);
+ g_at_result_iter_next_number(&iter, &mnc);
+ g_at_result_iter_skip_next(&iter);
+ g_at_result_iter_next_number(&iter, &ci);
+ g_at_result_iter_skip_next(&iter);
+ g_at_result_iter_skip_next(&iter);
+ g_at_result_iter_skip_next(&iter);
+ g_at_result_iter_skip_next(&iter);
+
+ g_at_result_iter_next_number(&iter, &number);
+ rsrq = number != 255 ? number : rsrq;
+
+ g_at_result_iter_next_number(&iter, &number);
+ rsrp = number != 255 ? number : rsrp;
+
+ cell = g_new0(struct ofono_netmon_neighbouring_cell,
+ 1);
+ cell->cell_type = tech;
+ cell->mcc = mcc;
+ cell->mnc = mnc;
+ cell->cell_id = ci;
+ cell->cell_meas.lte.rsrq = rsrq;
+ cell->cell_meas.lte.rsrp = rsrp;
+
+ list = g_list_append(list, cell);
+ break;
+ default:
+ break;
+ }
+ }
+
+ list_size = g_list_length(list);
+
+ if(list_size)
+ ofono_netmon_neighbouring_cell_notify(netmon, list);
+
+ CALLBACK_WITH_SUCCESS(cb, cbd->data);
+ g_list_free(list);
+}
+
+static void xmm7modem_neighbouring_cell_update(struct ofono_netmon *netmon,
+ ofono_netmon_cb_t cb, void *data)
+{
+ struct netmon_driver_data *nmd = ofono_netmon_get_data(netmon);
+ struct cb_data *cbd = cb_data_new(cb, data);
+
+ DBG("xmm7modem netmon request neighbouring cell update");
+
+ if (g_at_chat_send(nmd->chat, "AT+XMCI=0", xmci_prefix,
+ xmci_neighbouring_cell_cb, cbd, g_free) > 0)
+ return;
+
+ g_free(cbd);
+ CALLBACK_WITH_FAILURE(cb, data);
+}
+
static gboolean ril_delayed_register(gpointer user_data)
{
struct ofono_netmon *netmon = user_data;
@@ -250,6 +409,7 @@ static const struct ofono_netmon_driver driver = {
.probe = xmm7modem_netmon_probe,
.remove = xmm7modem_netmon_remove,
.request_update = xmm7modem_netmon_request_update,
+ .neighbouring_cell_update = xmm7modem_neighbouring_cell_update,
};
void xmm_netmon_init(void)
--
1.9.1
1 year, 9 months
[PATCH 3/4] netmon: adding get functionality for neighbouring cell information
by Antara Borwankar
Handled the get neighbouring cell information function which returns
an array of signal strength of all neighbouring cells.
---
src/netmon.c | 136 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 136 insertions(+)
diff --git a/src/netmon.c b/src/netmon.c
index 6c19df5..5896089 100644
--- a/src/netmon.c
+++ b/src/netmon.c
@@ -403,6 +403,139 @@ static DBusMessage *netmon_unregister_agent(DBusConnection *conn,
return dbus_message_new_method_return(msg);
}
+
+void ofono_netmon_neighbouring_cell_notify(struct ofono_netmon *netmon,
+ void *cell_list)
+{
+ DBusMessageIter iter;
+ DBusMessageIter arr;
+ GSList *l;
+
+ if (netmon->pending == NULL)
+ return;
+
+ netmon->reply = dbus_message_new_method_return(netmon->pending);
+ dbus_message_iter_init_append(netmon->reply, &iter);
+
+ dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
+ DBUS_STRUCT_BEGIN_CHAR_AS_STRING
+ DBUS_TYPE_ARRAY_AS_STRING
+ DBUS_DICT_ENTRY_BEGIN_CHAR_AS_STRING
+ DBUS_TYPE_STRING_AS_STRING
+ DBUS_TYPE_VARIANT_AS_STRING
+ DBUS_DICT_ENTRY_END_CHAR_AS_STRING
+ DBUS_STRUCT_END_CHAR_AS_STRING,
+ &arr);
+
+ for (l = cell_list; l; l = l->next) {
+ DBusMessageIter dict;
+ DBusMessageIter strct;
+ struct ofono_netmon_neighbouring_cell *cell = l->data;
+ const char *tech = cell_type_to_tech_name(cell->cell_type);
+
+ dbus_message_iter_open_container(&arr, DBUS_TYPE_STRUCT,
+ NULL, &strct);
+ dbus_message_iter_open_container(&strct, DBUS_TYPE_ARRAY,
+ OFONO_PROPERTIES_ARRAY_SIGNATURE,
+ &dict);
+
+ ofono_dbus_dict_append(&dict, "Technology",
+ DBUS_TYPE_STRING, &tech);
+ ofono_dbus_dict_append(&dict, "MobileCountryCode",
+ DBUS_TYPE_UINT16, &cell->mcc);
+ ofono_dbus_dict_append(&dict, "MobileNetworkCode",
+ DBUS_TYPE_UINT16, &cell->mnc);
+ ofono_dbus_dict_append(&dict, "CellId",
+ DBUS_TYPE_UINT16, &cell->cell_id);
+
+ switch (cell->cell_type) {
+ case OFONO_NETMON_CELL_TYPE_GSM:
+ ofono_dbus_dict_append(&dict,
+ "Strength",
+ DBUS_TYPE_UINT16,
+ &cell->cell_meas.gsm.rssi);
+ ofono_dbus_dict_append(&dict,
+ "BitErrorRate",
+ DBUS_TYPE_UINT16,
+ &cell->cell_meas.gsm.ber);
+ break;
+
+ case OFONO_NETMON_CELL_TYPE_UMTS:
+ ofono_dbus_dict_append(&dict,
+ "ReceivedSignalCodePower",
+ DBUS_TYPE_UINT16,
+ &cell->cell_meas.umts.rscp);
+ ofono_dbus_dict_append(&dict,
+ "ReceivedEnergyRatio",
+ DBUS_TYPE_UINT16,
+ &cell->cell_meas.umts.ecno);
+ break;
+
+ case OFONO_NETMON_CELL_TYPE_LTE:
+ ofono_dbus_dict_append(&dict,
+ "ReferenceSignalReceivedQuality",
+ DBUS_TYPE_UINT16,
+ &cell->cell_meas.lte.rsrq);
+ ofono_dbus_dict_append(&dict,
+ "ReferenceSignalReceivedPower",
+ DBUS_TYPE_UINT16,
+ &cell->cell_meas.lte.rsrp);
+ break;
+ }
+
+ dbus_message_iter_close_container(&strct, &dict);
+ dbus_message_iter_close_container(&arr, &strct);
+ }
+
+ dbus_message_iter_close_container(&iter, &arr);
+}
+
+static void neighbouring_cell_info_callback(const struct ofono_error *error,
+ void *data)
+{
+ struct ofono_netmon *netmon = data;
+ DBusMessage *reply = netmon->reply;
+
+ if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
+ if (reply)
+ dbus_message_unref(reply);
+
+ reply = __ofono_error_failed(netmon->pending);
+ } else if (!reply) {
+ DBusMessageIter iter;
+ DBusMessageIter dict;
+
+ reply = dbus_message_new_method_return(netmon->pending);
+ dbus_message_iter_init_append(reply, &iter);
+ dbus_message_iter_open_container(&iter, DBUS_TYPE_ARRAY,
+ OFONO_PROPERTIES_ARRAY_SIGNATURE,
+ &dict);
+ dbus_message_iter_close_container(&iter, &dict);
+ }
+
+ netmon->reply = NULL;
+ __ofono_dbus_pending_reply(&netmon->pending, reply);
+}
+
+static DBusMessage *netmon_get_neighbouring_cell_info(DBusConnection *conn,
+ DBusMessage *msg, void *data)
+{
+ struct ofono_netmon *netmon = data;
+
+ if (!netmon->driver->neighbouring_cell_update)
+ return __ofono_error_not_implemented(msg);
+
+ if (netmon->pending)
+ return __ofono_error_busy(msg);
+
+ netmon->pending = dbus_message_ref(msg);
+
+ netmon->driver->neighbouring_cell_update(netmon,
+ neighbouring_cell_info_callback, netmon);
+
+ return NULL;
+}
+
static const GDBusMethodTable netmon_methods[] = {
{ GDBUS_ASYNC_METHOD("GetServingCellInformation",
NULL, GDBUS_ARGS({ "cellinfo", "a{sv}" }),
@@ -413,6 +546,9 @@ static const GDBusMethodTable netmon_methods[] = {
{ GDBUS_METHOD("UnregisterAgent",
GDBUS_ARGS({ "agent", "o" }), NULL,
netmon_unregister_agent) },
+ { GDBUS_ASYNC_METHOD("GetNeighbouringCellInformation",
+ NULL, GDBUS_ARGS({ "cellinfo", "a(a{sv})" }),
+ netmon_get_neighbouring_cell_info) },
{ }
};
--
1.9.1
1 year, 9 months
Fw: Regarding ofonod sending signal 11 after calling setup_sim7x00 for sim7600
by Pranoti Bobade
-----Original Message-----
From: Pranoti Bobade
Sent: Friday, May 17, 2019 5:28 PM
To: mailman(a)ofono.org
Subject: Regarding ofonod sending signal 11 after calling setup_sim7x00 for
sim7600
Hello,
Hope you are doing well. We are currently working with ofono to make
sim7600e work with our ARM based embedded board. Our modem is connected
through serial interface. We have cloned the latest git repository for ofono
and compiled it for our board, But when we run ofonod it gives segmentation
fault in setup_sim7x00() from plugins/udevng.c. Screenshot is attached with
the mail for reference. Our query is to know if there is support for Serial
interface of sim7600e.
Thanks in advance.
1 year, 9 months