All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/5 v3] Neighbor Cell Info Atom
@ 2011-01-12 12:05 Antti Paila
  2011-01-12 12:05 ` [PATCH 1/5 v3] Cell-info: CellInfo DBUS interface definition Antti Paila
                   ` (5 more replies)
  0 siblings, 6 replies; 12+ messages in thread
From: Antti Paila @ 2011-01-12 12:05 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1104 bytes --]

 This series of patches implements an interface for client
 applications to fetch the ECID information of neighboring
 cells using DBUS. Since the 1st version the DBUS api has
 been refactored to use new naming for method and to use
 flat data format for the cell information. Also, the
 internal datatypes have been optimized. Since the 2nd
 version MNC and MCC are converted to strings and CPICH-RSCP
 re-typed.

Antti Paila (5):
  Cell-info: CellInfo DBUS interface definition
  Cell-info: Header file for Neighbor cell info
  Cell-info: Atom for obtaining ECID info of cells
  Cell-info: New files included in compilation
  Cell-info: Documentation

 Makefile.am         |    8 +-
 doc/cell-info.txt   |  121 +++++++++++++
 include/cell-info.h |  128 ++++++++++++++
 include/dbus.h      |    1 +
 src/cell-info.c     |  485 +++++++++++++++++++++++++++++++++++++++++++++++++++
 src/ofono.h         |    1 +
 6 files changed, 741 insertions(+), 3 deletions(-)
 create mode 100644 doc/cell-info.txt
 create mode 100644 include/cell-info.h
 create mode 100644 src/cell-info.c


^ permalink raw reply	[flat|nested] 12+ messages in thread

* [PATCH 1/5 v3] Cell-info: CellInfo DBUS interface definition
  2011-01-12 12:05 [PATCH 0/5 v3] Neighbor Cell Info Atom Antti Paila
@ 2011-01-12 12:05 ` Antti Paila
  2011-02-07 19:27   ` Marcel Holtmann
  2011-01-12 12:05 ` [PATCH 2/5 v3] Cell-info: Header file for Neighbor cell info Antti Paila
                   ` (4 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Antti Paila @ 2011-01-12 12:05 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1087 bytes --]

---
 include/dbus.h |    1 +
 src/ofono.h    |    1 +
 2 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/include/dbus.h b/include/dbus.h
index 12768f6..f2e18bf 100644
--- a/include/dbus.h
+++ b/include/dbus.h
@@ -45,6 +45,7 @@ extern "C" {
 #define OFONO_MESSAGE_WAITING_INTERFACE "org.ofono.MessageWaiting"
 #define OFONO_NETWORK_REGISTRATION_INTERFACE "org.ofono.NetworkRegistration"
 #define OFONO_NETWORK_OPERATOR_INTERFACE "org.ofono.NetworkOperator"
+#define OFONO_CELL_INFO_INTERFACE "org.ofono.CellInfo"
 #define OFONO_PHONEBOOK_INTERFACE "org.ofono.Phonebook"
 #define OFONO_RADIO_SETTINGS_INTERFACE "org.ofono.RadioSettings"
 #define OFONO_AUDIO_SETTINGS_INTERFACE "org.ofono.AudioSettings"
diff --git a/src/ofono.h b/src/ofono.h
index cab70cd..820e3a3 100644
--- a/src/ofono.h
+++ b/src/ofono.h
@@ -127,6 +127,7 @@ enum ofono_atom_type {
 	OFONO_ATOM_TYPE_NETTIME = 21,
 	OFONO_ATOM_TYPE_CTM = 22,
 	OFONO_ATOM_TYPE_CDMA_VOICECALL_MANAGER = 23,
+	OFONO_ATOM_TYPE_CELL_INFO = 24,
 };
 
 enum ofono_atom_watch_condition {
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 2/5 v3] Cell-info: Header file for Neighbor cell info
  2011-01-12 12:05 [PATCH 0/5 v3] Neighbor Cell Info Atom Antti Paila
  2011-01-12 12:05 ` [PATCH 1/5 v3] Cell-info: CellInfo DBUS interface definition Antti Paila
@ 2011-01-12 12:05 ` Antti Paila
  2011-02-07 19:30   ` Marcel Holtmann
  2011-01-12 12:05 ` [PATCH 3/5 v3] Cell-info: Atom for obtaining ECID info of cells Antti Paila
                   ` (3 subsequent siblings)
  5 siblings, 1 reply; 12+ messages in thread
From: Antti Paila @ 2011-01-12 12:05 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 3888 bytes --]

---
 include/cell-info.h |  128 +++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 128 insertions(+), 0 deletions(-)
 create mode 100644 include/cell-info.h

diff --git a/include/cell-info.h b/include/cell-info.h
new file mode 100644
index 0000000..36d7fca
--- /dev/null
+++ b/include/cell-info.h
@@ -0,0 +1,128 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+#ifndef __OFONO_CELL_INFO_H
+#define __OFONO_CELL_INFO_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+#include <ofono/types.h>
+#include <stdint.h>
+
+struct ofono_cell_info;
+
+
+#define OFONO_CI_FIELD_TA_UNDEFINED 0xFF
+#define OFONO_CI_FIELD_UCID_UNDEFINED 0xFFFFFFFF
+#define OFONO_CI_FIELD_ECN0_UNDEFINED 0xFF
+#define OFONO_CI_FIELD_RSCP_UNDEFINED -127
+#define OFONO_CI_FIELD_PATHLOSS_UNDEFINED 0xFF
+#define OFONO_CI_FIELD_FREQ_UNDEFINED 0xFFFF
+
+#define OFONO_MAX_NMR_COUNT 15
+#define OFONO_MAX_MEASURED_CELL_COUNT 32
+#define OFONO_MAX_MEAS_RES_LIST_COUNT 8
+
+enum ofono_cell_type {
+	OFONO_CELL_TYPE_GERAN,
+	OFONO_CELL_TYPE_UTRAN_FDD
+};
+
+struct geran {
+	uint16_t lac;
+	uint16_t ci;
+	uint8_t ta;
+	uint8_t no_cells;
+	struct geran_neigh_cell {
+		uint16_t arfcn;
+		uint8_t bsic;
+		uint8_t rxlev;
+	} nmr[OFONO_MAX_NMR_COUNT];
+};
+
+struct cell_measured_results {
+	uint32_t ucid;
+	uint16_t sc;
+	uint8_t ecn0;
+	int16_t rscp;
+	uint8_t pathloss;
+};
+
+struct measured_results_list {
+	uint16_t dl_freq;
+	uint16_t ul_freq;
+	uint8_t rssi;
+	uint8_t no_cells;
+	struct cell_measured_results cmr[OFONO_MAX_MEASURED_CELL_COUNT];
+};
+
+struct utran {
+	uint32_t ucid;
+	uint16_t dl_freq;
+	uint16_t ul_freq;
+	uint16_t sc;
+	uint8_t no_freq;
+	struct measured_results_list mrl[OFONO_MAX_MEAS_RES_LIST_COUNT];
+};
+
+struct ofono_cell_info_results {
+	enum ofono_cell_type rat;
+	char mcc[OFONO_MAX_MCC_LENGTH + 1];
+	char mnc[OFONO_MAX_MNC_LENGTH + 1];
+	union {
+		struct geran geran;
+		struct utran utran;
+	};
+};
+
+
+typedef void (*ofono_cell_info_query_cb_t)(const struct ofono_error *error,
+		struct ofono_cell_info_results *results, void *data);
+
+struct ofono_cell_info_driver {
+	const char *name;
+	int (*probe)(struct ofono_cell_info *ci,
+			unsigned int vendor,
+			void *data);
+	void (*remove)(struct ofono_cell_info *ci);
+	void (*query)(struct ofono_cell_info *ci,
+			ofono_cell_info_query_cb_t cb,
+			void *data);
+};
+
+struct ofono_cell_info *ofono_cell_info_create(struct ofono_modem *modem,
+					unsigned int vendor,
+					const char *driver,
+					void *data);
+
+void ofono_cell_info_register(struct ofono_cell_info *ci);
+void ofono_cell_info_remove(struct ofono_cell_info *ci);
+int ofono_cell_info_driver_register(struct ofono_cell_info_driver *driver);
+void ofono_cell_info_driver_unregister(struct ofono_cell_info_driver *driver);
+void *ofono_cell_info_get_data(struct ofono_cell_info *ci);
+void ofono_cell_info_set_data(struct ofono_cell_info *ci, void *cid);
+
+#ifdef __cplusplus
+}
+#endif
+
+#endif /* __OFONO_CELL_INFO_H */
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 3/5 v3] Cell-info: Atom for obtaining ECID info of cells
  2011-01-12 12:05 [PATCH 0/5 v3] Neighbor Cell Info Atom Antti Paila
  2011-01-12 12:05 ` [PATCH 1/5 v3] Cell-info: CellInfo DBUS interface definition Antti Paila
  2011-01-12 12:05 ` [PATCH 2/5 v3] Cell-info: Header file for Neighbor cell info Antti Paila
@ 2011-01-12 12:05 ` Antti Paila
  2011-01-12 12:05 ` [PATCH 4/5 v3] Cell-info: New files included in compilation Antti Paila
                   ` (2 subsequent siblings)
  5 siblings, 0 replies; 12+ messages in thread
From: Antti Paila @ 2011-01-12 12:05 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 12236 bytes --]

---
 src/cell-info.c |  485 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 485 insertions(+), 0 deletions(-)
 create mode 100644 src/cell-info.c

diff --git a/src/cell-info.c b/src/cell-info.c
new file mode 100644
index 0000000..0ba6658
--- /dev/null
+++ b/src/cell-info.c
@@ -0,0 +1,485 @@
+/*
+ *
+ *  oFono - Open Source Telephony
+ *
+ *  Copyright (C) 2009-2010 Nokia Corporation and/or its subsidiary(-ies).
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License version 2 as
+ *  published by the Free Software Foundation.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
+ *
+ */
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
+#include <errno.h>
+
+#include <glib.h>
+#include <gdbus.h>
+
+#include "ofono.h"
+
+#include "common.h"
+#include "ofono/cell-info.h"
+
+
+struct ofono_cell_info {
+	DBusMessage *pending;
+	struct ofono_atom *atom;
+	const struct ofono_cell_info_driver *driver;
+	void *driver_data;
+};
+
+
+static DBusMessage *ci_get_cells(DBusConnection *, DBusMessage *, void *);
+
+static GSList *g_drivers = NULL;
+
+static GDBusMethodTable ci_methods[] = {
+	{ "GetNeighbors",	"",	"aa{sv}",	ci_get_cells,
+					G_DBUS_METHOD_FLAG_ASYNC },
+	{ }
+};
+
+static GDBusSignalTable ci_signals[] = {
+	{ }
+};
+
+int ofono_cell_info_driver_register(struct ofono_cell_info_driver *driver)
+{
+	DBG("driver: %p, name: %s", driver, driver->name);
+
+	if (driver->probe == NULL)
+		return -EINVAL;
+
+	g_drivers = g_slist_prepend(g_drivers, (void *) driver);
+
+	return 0;
+}
+
+void ofono_cell_info_driver_unregister(struct ofono_cell_info_driver *driver)
+{
+	DBG("driver: %p, name: %s", driver, driver->name);
+
+	g_drivers = g_slist_remove(g_drivers, (void *) driver);
+}
+
+void ofono_cell_info_remove(struct ofono_cell_info *ci)
+{
+	__ofono_atom_free(ci->atom);
+}
+
+static void cell_info_unregister(struct ofono_atom *atom)
+{
+	struct ofono_cell_info *ci = __ofono_atom_get_data(atom);
+	const char *path = __ofono_atom_get_path(ci->atom);
+	DBusConnection *conn = ofono_dbus_get_connection();
+	struct ofono_modem *modem = __ofono_atom_get_modem(ci->atom);
+
+	ofono_modem_remove_interface(modem, OFONO_CELL_INFO_INTERFACE);
+
+	if (!g_dbus_unregister_interface(conn, path, OFONO_CELL_INFO_INTERFACE))
+		ofono_error("Failed to unregister interface %s",
+				OFONO_CELL_INFO_INTERFACE);
+}
+
+static void cell_info_remove(struct ofono_atom *atom)
+{
+	struct ofono_cell_info *ci = __ofono_atom_get_data(atom);
+	DBG("atom: %p", atom);
+
+	if (ci == NULL)
+		return;
+
+	if (ci->driver && ci->driver->remove)
+		ci->driver->remove(ci);
+
+	g_free(ci);
+}
+
+void ofono_cell_info_register(struct ofono_cell_info *ci)
+{
+	DBusConnection *conn = ofono_dbus_get_connection();
+	struct ofono_modem *modem = __ofono_atom_get_modem(ci->atom);
+	const char *path = __ofono_atom_get_path(ci->atom);
+
+	DBG("Modem: %p", modem);
+
+	if (!g_dbus_register_interface(conn, path,
+					OFONO_CELL_INFO_INTERFACE,
+					ci_methods, ci_signals, NULL,
+					ci, NULL)) {
+		ofono_error("Could not create %s interface",
+					OFONO_CELL_INFO_INTERFACE);
+
+		return;
+	}
+
+	ofono_modem_add_interface(modem, OFONO_CELL_INFO_INTERFACE);
+
+	__ofono_atom_register(ci->atom, cell_info_unregister);
+}
+
+struct ofono_cell_info *ofono_cell_info_create(struct ofono_modem *modem,
+					unsigned int vendor,
+					const char *driver,
+					void *data)
+{
+	struct ofono_cell_info *ci;
+	GSList *l;
+
+	if (driver == NULL)
+		return NULL;
+
+	ci = g_try_new0(struct ofono_cell_info, 1);
+	if (ci == NULL)
+		return NULL;
+
+	ci->atom = __ofono_modem_add_atom(modem,
+					OFONO_ATOM_TYPE_CELL_INFO,
+					cell_info_remove, ci);
+
+	for (l = g_drivers; l; l = l->next) {
+		const struct ofono_cell_info_driver *drv = l->data;
+
+		if (g_strcmp0(drv->name, driver))
+			continue;
+
+		if (drv->probe(ci, vendor, data) < 0)
+			continue;
+
+		ci->driver = drv;
+		break;
+	}
+
+	return ci;
+}
+
+void *ofono_cell_info_get_data(struct ofono_cell_info *ci)
+{
+	return ci->driver_data;
+}
+
+void ofono_cell_info_set_data(struct ofono_cell_info *ci, void *cid)
+{
+	ci->driver_data = cid;
+}
+
+static int append_geran_meta_data(DBusMessageIter *iter,
+		 struct ofono_cell_info_results *ci)
+{
+	DBusMessageIter iter_array;
+	const char *type = "GERAN";
+	const char *mcc = ci->mcc;
+	const char *mnc = ci->mnc;
+
+	dbus_message_iter_open_container(iter,
+					DBUS_TYPE_ARRAY,
+					"{sv}",
+					&iter_array);
+
+	ofono_dbus_dict_append(&iter_array,
+				"Type",
+				DBUS_TYPE_STRING,
+				&type);
+	ofono_dbus_dict_append(&iter_array,
+				"MobileNetworkCode",
+				DBUS_TYPE_STRING,
+				&mnc);
+	ofono_dbus_dict_append(&iter_array,
+				"MobileCountryCode",
+				DBUS_TYPE_STRING,
+				&mcc);
+	ofono_dbus_dict_append(&iter_array,
+				"LocationAreaCode",
+				DBUS_TYPE_UINT16,
+				&ci->geran.lac);
+	ofono_dbus_dict_append(&iter_array,
+				"CellId",
+				DBUS_TYPE_UINT16,
+				&ci->geran.ci);
+
+	if (ci->geran.ta != 1)
+		ofono_dbus_dict_append(&iter_array,
+					"TimingAdvance",
+					DBUS_TYPE_BYTE,
+					&ci->geran.ta);
+
+	dbus_message_iter_close_container(iter, &iter_array);
+
+	return 0;
+
+}
+
+static void add_geran_neighbor(DBusMessageIter *iter,
+		struct geran_neigh_cell *cell)
+{
+	DBusMessageIter iter_array;
+
+	dbus_message_iter_open_container(iter,
+				DBUS_TYPE_ARRAY,
+				"{sv}",
+				&iter_array);
+	ofono_dbus_dict_append(&iter_array,
+				"AbsoluteRadioFrequencyChannelNumber",
+				DBUS_TYPE_UINT16,
+				&cell->arfcn);
+	ofono_dbus_dict_append(&iter_array,
+				"BaseStationIdentityCode",
+				DBUS_TYPE_BYTE,
+				&cell->bsic);
+	ofono_dbus_dict_append(&iter_array,
+				"RXLEV",
+				DBUS_TYPE_BYTE,
+				&cell->rxlev);
+
+	dbus_message_iter_close_container(iter, &iter_array);
+}
+
+static int fill_geran_ci(DBusMessage *msg,
+		  struct ofono_cell_info_results *ci)
+{
+	DBusMessageIter iter, iter_array;
+	int i;
+
+	dbus_message_iter_init_append(msg, &iter);
+	dbus_message_iter_open_container(&iter,
+					DBUS_TYPE_ARRAY,
+					"a{sv}",
+					&iter_array);
+	append_geran_meta_data(&iter_array, ci);
+
+	for (i = 0; i < ci->geran.no_cells; ++i)
+		add_geran_neighbor(&iter_array, &ci->geran.nmr[i]);
+
+	dbus_message_iter_close_container(&iter, &iter_array);
+
+	return 0;
+}
+
+static int append_utra_neigh_cell_data(DBusMessageIter *iter,
+		struct cell_measured_results *cmr)
+{
+		ofono_dbus_dict_append(iter,
+					"ScramblingCode",
+					DBUS_TYPE_UINT16,
+					&cmr->sc);
+
+		if (cmr->ucid != OFONO_CI_FIELD_UCID_UNDEFINED)
+			ofono_dbus_dict_append(iter,
+					"UniqueCellId",
+					DBUS_TYPE_UINT32,
+					&cmr->ucid);
+
+		if (cmr->ecn0 != OFONO_CI_FIELD_ECN0_UNDEFINED)
+			ofono_dbus_dict_append(iter,
+					"CPICH-ECN0",
+					DBUS_TYPE_BYTE,
+					&cmr->ecn0);
+
+		if (cmr->rscp != OFONO_CI_FIELD_RSCP_UNDEFINED)
+			ofono_dbus_dict_append(iter,
+					"CPICH-RSCP",
+					DBUS_TYPE_INT16,
+					&cmr->rscp);
+
+		if (cmr->pathloss != OFONO_CI_FIELD_PATHLOSS_UNDEFINED)
+			ofono_dbus_dict_append(iter,
+					"Pathloss",
+					DBUS_TYPE_BYTE,
+					&cmr->pathloss);
+
+	return 0;
+}
+
+static int append_utra_neigh_freq_data(DBusMessageIter *iter,
+		struct measured_results_list *mrl)
+{
+	ofono_dbus_dict_append(iter,
+				"ReceivedSignalStrengthIndicator",
+				DBUS_TYPE_BYTE,
+				&mrl->rssi);
+
+	ofono_dbus_dict_append(iter,
+				"UARFCN-DL",
+				DBUS_TYPE_UINT16,
+				&mrl->dl_freq);
+
+	if (mrl->ul_freq != OFONO_CI_FIELD_FREQ_UNDEFINED)
+		ofono_dbus_dict_append(iter,
+				"UARFCN-UL",
+				DBUS_TYPE_UINT16,
+				&mrl->ul_freq);
+
+	return 0;
+}
+
+static int append_utra_neighbors(DBusMessageIter *iter,
+			struct utran *utran)
+{
+	DBusMessageIter iter_array;
+	int i, j;
+
+	for (i = 0; i < utran->no_freq; ++i) {
+
+		for (j = 0; j < utran->mrl[i].no_cells; ++j) {
+			dbus_message_iter_open_container(iter,
+						DBUS_TYPE_ARRAY,
+						"{sv}",
+						&iter_array);
+			append_utra_neigh_freq_data(&iter_array,
+						&utran->mrl[i]);
+			append_utra_neigh_cell_data(&iter_array,
+						&utran->mrl[i].cmr[j]);
+
+			dbus_message_iter_close_container(iter,
+					&iter_array);
+		}
+	}
+
+	return 0;
+}
+
+static void append_utran_meta_data(DBusMessageIter *iter,
+		struct ofono_cell_info_results *ci)
+{
+	DBusMessageIter iter_array;
+	const char *type = "UTRA-FDD";
+	const char *mcc = ci->mcc;
+	const char *mnc = ci->mnc;
+
+	dbus_message_iter_open_container(iter,
+					DBUS_TYPE_ARRAY,
+					"{sv}",
+					&iter_array);
+
+	ofono_dbus_dict_append(&iter_array,
+				"Type",
+				DBUS_TYPE_STRING,
+				&type);
+	ofono_dbus_dict_append(&iter_array,
+				"MobileNetworkCode",
+				DBUS_TYPE_STRING,
+				&mnc);
+	ofono_dbus_dict_append(&iter_array,
+				"MobileCountryCode",
+				DBUS_TYPE_STRING,
+				&mcc);
+	ofono_dbus_dict_append(&iter_array,
+				"UniqueCellId",
+				DBUS_TYPE_UINT32,
+				&ci->utran.ucid);
+	ofono_dbus_dict_append(&iter_array,
+				"ScramblingCode",
+				DBUS_TYPE_UINT16,
+				&ci->utran.sc);
+	ofono_dbus_dict_append(&iter_array,
+				"UARFCN-DL",
+				DBUS_TYPE_UINT16,
+				&ci->utran.dl_freq);
+
+	if (ci->utran.ul_freq != OFONO_CI_FIELD_FREQ_UNDEFINED) {
+		ofono_dbus_dict_append(&iter_array,
+				"UARFCN-UL",
+				DBUS_TYPE_UINT16,
+				&ci->utran.ul_freq);
+	}
+
+	dbus_message_iter_close_container(iter, &iter_array);
+}
+
+static int fill_utra_ci(DBusMessage *msg,
+			struct ofono_cell_info_results *ci)
+{
+	DBusMessageIter iter, iter_array;
+
+	dbus_message_iter_init_append(msg, &iter);
+	dbus_message_iter_open_container(&iter,
+					DBUS_TYPE_ARRAY,
+					"a{sv}",
+					&iter_array);
+
+	append_utran_meta_data(&iter_array, ci);
+	append_utra_neighbors(&iter_array, &ci->utran);
+
+	dbus_message_iter_close_container(&iter, &iter_array);
+
+	return 0;
+}
+
+static void ofono_neigh_cell_info_query_cb(const struct ofono_error *error,
+		struct ofono_cell_info_results *ci_results, void *data)
+{
+	struct ofono_cell_info *ci = data;
+	DBusMessage *msg = ci->pending;
+	DBusMessage *reply;
+	int status;
+
+	DBG("");
+
+	if (error->type != OFONO_ERROR_TYPE_NO_ERROR) {
+		ofono_error("Neighbor cell info query failed");
+		goto error;
+	}
+
+	reply = dbus_message_new_method_return(msg);
+	if (reply == NULL) {
+		ofono_error("Failed to create response");
+		goto error;
+	}
+
+	if (ci_results->rat == OFONO_CELL_TYPE_GERAN) {
+		DBG("Geran cell info received");
+
+		status = fill_geran_ci(reply, ci_results);
+		if (status != 0) {
+			ofono_error("Failed to fill geran info");
+			goto error;
+		}
+
+	} else if (ci_results->rat == OFONO_CELL_TYPE_UTRAN_FDD) {
+		DBG("Utran cell info received");
+
+		status = fill_utra_ci(reply, ci_results);
+		if (status != 0) {
+			ofono_error("Failed to fill utran info");
+			goto error;
+		}
+
+	} else {
+		ofono_error("Unrecognized cell type");
+		goto error;
+	}
+
+	__ofono_dbus_pending_reply(&msg, reply);
+	return;
+
+error:
+	reply = __ofono_error_failed(msg);
+	__ofono_dbus_pending_reply(&msg, reply);
+	return;
+
+}
+
+static DBusMessage *ci_get_cells(DBusConnection *conn, DBusMessage *msg,
+					void *data)
+{
+	struct ofono_cell_info *ci = data;
+	DBG("");
+
+	ci->pending = dbus_message_ref(msg);
+	ci->driver->query(ci, ofono_neigh_cell_info_query_cb, ci->driver_data);
+
+	return NULL;
+}
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 4/5 v3] Cell-info: New files included in compilation
  2011-01-12 12:05 [PATCH 0/5 v3] Neighbor Cell Info Atom Antti Paila
                   ` (2 preceding siblings ...)
  2011-01-12 12:05 ` [PATCH 3/5 v3] Cell-info: Atom for obtaining ECID info of cells Antti Paila
@ 2011-01-12 12:05 ` Antti Paila
  2011-01-12 12:05 ` [PATCH 5/5 v3] Cell-info: Documentation Antti Paila
  2011-02-02  8:08 ` [PATCH 0/5 v3] Neighbor Cell Info Atom Antti Paila
  5 siblings, 0 replies; 12+ messages in thread
From: Antti Paila @ 2011-01-12 12:05 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1333 bytes --]

---
 Makefile.am |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 4dec90a..096450f 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -15,7 +15,8 @@ include_HEADERS = include/log.h include/plugin.h include/history.h \
 			include/radio-settings.h include/stk.h \
 			include/audio-settings.h include/nettime.h \
 			include/ctm.h include/cdma-voicecall.h \
-			include/cdma-sms.h
+			include/cdma-sms.h \
+			include/cell-info.h
 
 nodist_include_HEADERS = include/version.h
 
@@ -340,7 +341,7 @@ src_ofonod_SOURCES = $(gdbus_sources) $(builtin_sources) src/ofono.ver \
 			src/nettime.c src/stkagent.c src/stkagent.h \
 			src/simfs.c src/simfs.h src/audio-settings.c \
 			src/smsagent.c src/smsagent.h src/ctm.c \
-			src/cdma-voicecall.c
+			src/cdma-voicecall.c src/cell-info.c
 
 src_ofonod_LDADD = $(builtin_libadd) @GLIB_LIBS@ @DBUS_LIBS@ @CAPNG_LIBS@ -ldl
 
@@ -381,7 +382,8 @@ doc_files = doc/overview.txt doc/ofono-paper.txt doc/release-faq.txt \
 			doc/phonebook-api.txt doc/radio-settings-api.txt \
 			doc/sim-api.txt doc/stk-api.txt \
 			doc/audio-settings-api.txt doc/text-telephony-api.txt \
-			doc/calypso-modem.txt
+			doc/calypso-modem.txt \
+			doc/cell-info.txt
 
 
 test_scripts = test/backtrace \
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* [PATCH 5/5 v3] Cell-info: Documentation
  2011-01-12 12:05 [PATCH 0/5 v3] Neighbor Cell Info Atom Antti Paila
                   ` (3 preceding siblings ...)
  2011-01-12 12:05 ` [PATCH 4/5 v3] Cell-info: New files included in compilation Antti Paila
@ 2011-01-12 12:05 ` Antti Paila
  2011-02-07 19:24   ` Marcel Holtmann
  2011-02-02  8:08 ` [PATCH 0/5 v3] Neighbor Cell Info Atom Antti Paila
  5 siblings, 1 reply; 12+ messages in thread
From: Antti Paila @ 2011-01-12 12:05 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 3678 bytes --]

---
 doc/cell-info.txt |  121 +++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 121 insertions(+), 0 deletions(-)
 create mode 100644 doc/cell-info.txt

diff --git a/doc/cell-info.txt b/doc/cell-info.txt
new file mode 100644
index 0000000..64d9db6
--- /dev/null
+++ b/doc/cell-info.txt
@@ -0,0 +1,121 @@
+Cell Info hierarchy
+===================
+
+Service		org.ofono
+Interface	org.ofono.CellInfo
+Object path	[variable prefix]/{modem0,modem1,...}
+
+Methods 	aa{sv} GetNeighbors()
+
+			Calling this procedure returns properties of serving
+			and neighboring cells in GSM or WCDMA networks. This
+			information can be used to determine current location
+			using triangulation over neighboring cell tower
+			locations and estimated distances.
+
+			The returned array consists of two parts: 1) first
+			element of the array contains a dictionary of
+			common information about network and serving cell 2)
+			rest of the array comprises dictionaries containing
+			measurement results of neighboring cells. The contents
+			of the dictionaries follow the specification
+			OMA-TS-ULP-V2_0-20100816-C for user plane Location and
+			is described in properties section.
+
+			Possible errors: org.ofono.Error.Failed
+
+Properties
+
+Serving cell
+		string Type
+			Radio access network type of neighbor cell information.
+			The possible values are:
+			"geran"	Measurement results are for the GSM EDGE Radio
+				Access Network.
+			"utran"	Measurement results are for UMTS Radio Access
+				Network.
+
+		string MobileCountryCode
+			Mobile Country Code of serving cell. Possible values:
+			Values: 0...999
+
+		string MobileNetworkCode
+			Mobile Network Code of serving cell.
+			Values: 0...999
+
+		uint16 LocationAreaCode [GERAN]
+			Location area code of serving cell.
+			Values: 0...65535
+
+		uint16 CellId [GERAN]
+			Cell Id of serving cell.
+			Values: 0...65535
+
+		byte TimingAdvance [GERAN, optional]
+			Timing advance.
+			Values: 0...63
+
+		uint32 UniqueCellId [UTRA-FDD]
+			Serving WCDMA unique cell ID.
+			Values: 0...268435455
+
+		uint16 ScramblingCode [UTRA-FDD]
+			Primary scrambling code.
+			Values: 0...511
+
+		uint16 UARFCN-DL [UTRA-FDD]
+			Downlink UTRA Absolute Radio Frequency Channel Number
+			of serving cell.
+			Values: 0...16383
+
+		uint16 UARFCN-UL [UTRA-FDD, optional]
+			Uplink UTRA Absolute Radio Frequency Channel Number.
+			Values: 0...16383
+
+
+Neighbor cell measurement results
+
+		uint16 AbsoluteRadioFrequencyChannelNumber [GERAN]
+			Absolute radio frequency channel number.
+			Values: 0...1023
+
+		byte BaseStationIdentityCode [GERAN]
+			Base station identity code.
+			Values: 0...63.
+
+		byte RXLEV [GERAN]
+			Measured power of the channel.
+			Values: 0...63
+
+		byte ReceivedSignalStrengthIndicator [UTRA-FDD]
+			RX power level.
+			Values: 0...127
+
+		uint16 UARFCN-DL [UTRA-FDD]
+			Downlink UARFCN.
+			Values: 0...16383
+
+		uint16 UARFCN-UL [UTRA-FDD, optional]
+			Uplink UARFCN.
+			Values: 0...16383
+
+		uint16 ScramblingCode [UTRA-FDD]
+			Primary scrambling code.
+			Values: 0...511
+
+		uint32 UniqueCellId [UTRA-FDD, optional]
+			Unique cell ID.
+			Values: 0...268435455
+
+		byte CPICH-ECN0 [UTRA-FDD, optional]
+			 Common pilot channel RX energy per chip over noise
+			 density in dB.
+			 Values: 0...63
+
+		int16 CPICH-RSCP [UTRA-FDD, optional]
+			Common pilot channel RX carrier power in dBm
+			Values: -4...127
+
+		byte Pathloss [UTRA-FDD, optional]
+			Measured path loss in dB.
+			Values: 46...173
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 12+ messages in thread

* Re: [PATCH 0/5 v3] Neighbor Cell Info Atom
  2011-01-12 12:05 [PATCH 0/5 v3] Neighbor Cell Info Atom Antti Paila
                   ` (4 preceding siblings ...)
  2011-01-12 12:05 ` [PATCH 5/5 v3] Cell-info: Documentation Antti Paila
@ 2011-02-02  8:08 ` Antti Paila
  5 siblings, 0 replies; 12+ messages in thread
From: Antti Paila @ 2011-02-02  8:08 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 222 bytes --]

Hi,

What is the status of this set of patches? Do we still need more time
for review or can neighbor cell info atom be integrated to oFono?
Original patch set was submitted on 12/01/2011.

Best Regards,
  Antti


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/5 v3] Cell-info: Documentation
  2011-01-12 12:05 ` [PATCH 5/5 v3] Cell-info: Documentation Antti Paila
@ 2011-02-07 19:24   ` Marcel Holtmann
  2011-02-09  7:12     ` Antti Paila
  0 siblings, 1 reply; 12+ messages in thread
From: Marcel Holtmann @ 2011-02-07 19:24 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 4708 bytes --]

Hi Antti,

>  doc/cell-info.txt |  121 +++++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 files changed, 121 insertions(+), 0 deletions(-)
>  create mode 100644 doc/cell-info.txt
> 
> diff --git a/doc/cell-info.txt b/doc/cell-info.txt
> new file mode 100644
> index 0000000..64d9db6
> --- /dev/null
> +++ b/doc/cell-info.txt
> @@ -0,0 +1,121 @@
> +Cell Info hierarchy
> +===================
> +
> +Service		org.ofono
> +Interface	org.ofono.CellInfo
> +Object path	[variable prefix]/{modem0,modem1,...}
> +
> +Methods 	aa{sv} GetNeighbors()
> +
> +			Calling this procedure returns properties of serving
> +			and neighboring cells in GSM or WCDMA networks. This
> +			information can be used to determine current location
> +			using triangulation over neighboring cell tower
> +			locations and estimated distances.
> +
> +			The returned array consists of two parts: 1) first
> +			element of the array contains a dictionary of
> +			common information about network and serving cell 2)
> +			rest of the array comprises dictionaries containing
> +			measurement results of neighboring cells. The contents
> +			of the dictionaries follow the specification
> +			OMA-TS-ULP-V2_0-20100816-C for user plane Location and
> +			is described in properties section.

I am having a little bit of a problem calling this GetNeighbors and then
also retrieving the serving cell at the same time.

I am just spinning some idea here, but maybe calling the interface
org.ofono.NeighborCellInfo and the method AquireMeasurment() would be
better.

> +			Possible errors: org.ofono.Error.Failed
> +
> +Properties
> +
> +Serving cell
> +		string Type
> +			Radio access network type of neighbor cell information.
> +			The possible values are:
> +			"geran"	Measurement results are for the GSM EDGE Radio
> +				Access Network.
> +			"utran"	Measurement results are for UMTS Radio Access
> +				Network.
> +
> +		string MobileCountryCode
> +			Mobile Country Code of serving cell. Possible values:
> +			Values: 0...999
> +
> +		string MobileNetworkCode
> +			Mobile Network Code of serving cell.
> +			Values: 0...999
> +
> +		uint16 LocationAreaCode [GERAN]
> +			Location area code of serving cell.
> +			Values: 0...65535
> +
> +		uint16 CellId [GERAN]
> +			Cell Id of serving cell.
> +			Values: 0...65535
> +
> +		byte TimingAdvance [GERAN, optional]
> +			Timing advance.
> +			Values: 0...63
> +
> +		uint32 UniqueCellId [UTRA-FDD]
> +			Serving WCDMA unique cell ID.
> +			Values: 0...268435455
> +
> +		uint16 ScramblingCode [UTRA-FDD]
> +			Primary scrambling code.
> +			Values: 0...511
> +
> +		uint16 UARFCN-DL [UTRA-FDD]
> +			Downlink UTRA Absolute Radio Frequency Channel Number
> +			of serving cell.
> +			Values: 0...16383

Do we wanna keep the UARFCN acronym?

> +		uint16 UARFCN-UL [UTRA-FDD, optional]
> +			Uplink UTRA Absolute Radio Frequency Channel Number.
> +			Values: 0...16383

I am still going forth and back if it is a good idea to make cell[0]
special as the serving cell. There are common fields, but also other
fields that are totally different.

So one question that came to my mind is how this mixes when the serving
cell is UMTS, can the neighbors cells also report GSM? Do we have a mix
of values in the dictionary anyway?

> +Neighbor cell measurement results
> +
> +		uint16 AbsoluteRadioFrequencyChannelNumber [GERAN]
> +			Absolute radio frequency channel number.
> +			Values: 0...1023
> +
> +		byte BaseStationIdentityCode [GERAN]
> +			Base station identity code.
> +			Values: 0...63.
> +
> +		byte RXLEV [GERAN]
> +			Measured power of the channel.
> +			Values: 0...63

I think we can find something better name than RXLEV.

> +		byte ReceivedSignalStrengthIndicator [UTRA-FDD]
> +			RX power level.
> +			Values: 0...127
> +
> +		uint16 UARFCN-DL [UTRA-FDD]
> +			Downlink UARFCN.
> +			Values: 0...16383
> +
> +		uint16 UARFCN-UL [UTRA-FDD, optional]
> +			Uplink UARFCN.
> +			Values: 0...16383
> +
> +		uint16 ScramblingCode [UTRA-FDD]
> +			Primary scrambling code.
> +			Values: 0...511
> +
> +		uint32 UniqueCellId [UTRA-FDD, optional]
> +			Unique cell ID.
> +			Values: 0...268435455
> +
> +		byte CPICH-ECN0 [UTRA-FDD, optional]
> +			 Common pilot channel RX energy per chip over noise
> +			 density in dB.
> +			 Values: 0...63

Any better name than CPICH?

> +		int16 CPICH-RSCP [UTRA-FDD, optional]
> +			Common pilot channel RX carrier power in dBm
> +			Values: -4...127
> +
> +		byte Pathloss [UTRA-FDD, optional]
> +			Measured path loss in dB.
> +			Values: 46...173

Regards

Marcel



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 1/5 v3] Cell-info: CellInfo DBUS interface definition
  2011-01-12 12:05 ` [PATCH 1/5 v3] Cell-info: CellInfo DBUS interface definition Antti Paila
@ 2011-02-07 19:27   ` Marcel Holtmann
  0 siblings, 0 replies; 12+ messages in thread
From: Marcel Holtmann @ 2011-02-07 19:27 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 1306 bytes --]

Hi Antti,

>  include/dbus.h |    1 +
>  src/ofono.h    |    1 +
>  2 files changed, 2 insertions(+), 0 deletions(-)
> 
> diff --git a/include/dbus.h b/include/dbus.h
> index 12768f6..f2e18bf 100644
> --- a/include/dbus.h
> +++ b/include/dbus.h
> @@ -45,6 +45,7 @@ extern "C" {
>  #define OFONO_MESSAGE_WAITING_INTERFACE "org.ofono.MessageWaiting"
>  #define OFONO_NETWORK_REGISTRATION_INTERFACE "org.ofono.NetworkRegistration"
>  #define OFONO_NETWORK_OPERATOR_INTERFACE "org.ofono.NetworkOperator"
> +#define OFONO_CELL_INFO_INTERFACE "org.ofono.CellInfo"
>  #define OFONO_PHONEBOOK_INTERFACE "org.ofono.Phonebook"
>  #define OFONO_RADIO_SETTINGS_INTERFACE "org.ofono.RadioSettings"
>  #define OFONO_AUDIO_SETTINGS_INTERFACE "org.ofono.AudioSettings"
> diff --git a/src/ofono.h b/src/ofono.h
> index cab70cd..820e3a3 100644
> --- a/src/ofono.h
> +++ b/src/ofono.h
> @@ -127,6 +127,7 @@ enum ofono_atom_type {
>  	OFONO_ATOM_TYPE_NETTIME = 21,
>  	OFONO_ATOM_TYPE_CTM = 22,
>  	OFONO_ATOM_TYPE_CDMA_VOICECALL_MANAGER = 23,
> +	OFONO_ATOM_TYPE_CELL_INFO = 24,
>  };

This is a little bit confusing since the atom enum doesn't really have
to do anything with the D-Bus interface name. You might wanna feed that
into some other patch or split it out.

Regards

Marcel



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/5 v3] Cell-info: Header file for Neighbor cell info
  2011-01-12 12:05 ` [PATCH 2/5 v3] Cell-info: Header file for Neighbor cell info Antti Paila
@ 2011-02-07 19:30   ` Marcel Holtmann
  2011-02-09  6:54     ` Antti Paila
  0 siblings, 1 reply; 12+ messages in thread
From: Marcel Holtmann @ 2011-02-07 19:30 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 655 bytes --]

Hi Antti,

> +#define OFONO_CI_FIELD_TA_UNDEFINED 0xFF
> +#define OFONO_CI_FIELD_UCID_UNDEFINED 0xFFFFFFFF
> +#define OFONO_CI_FIELD_ECN0_UNDEFINED 0xFF
> +#define OFONO_CI_FIELD_RSCP_UNDEFINED -127
> +#define OFONO_CI_FIELD_PATHLOSS_UNDEFINED 0xFF
> +#define OFONO_CI_FIELD_FREQ_UNDEFINED 0xFFFF
> +
> +#define OFONO_MAX_NMR_COUNT 15
> +#define OFONO_MAX_MEASURED_CELL_COUNT 32
> +#define OFONO_MAX_MEAS_RES_LIST_COUNT 8
> +
> +enum ofono_cell_type {
> +	OFONO_CELL_TYPE_GERAN,
> +	OFONO_CELL_TYPE_UTRAN_FDD
> +};

anything we have to keep in mind for LTE here? Or does LTE not matter
for neighbor cell info?

Regards

Marcel



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 2/5 v3] Cell-info: Header file for Neighbor cell info
  2011-02-07 19:30   ` Marcel Holtmann
@ 2011-02-09  6:54     ` Antti Paila
  0 siblings, 0 replies; 12+ messages in thread
From: Antti Paila @ 2011-02-09  6:54 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 969 bytes --]

Hi Marcel,

On Mon, 2011-02-07 at 11:30 -0800, ext Marcel Holtmann wrote:
> Hi Antti,
> 
> > +#define OFONO_CI_FIELD_TA_UNDEFINED 0xFF
> > +#define OFONO_CI_FIELD_UCID_UNDEFINED 0xFFFFFFFF
> > +#define OFONO_CI_FIELD_ECN0_UNDEFINED 0xFF
> > +#define OFONO_CI_FIELD_RSCP_UNDEFINED -127
> > +#define OFONO_CI_FIELD_PATHLOSS_UNDEFINED 0xFF
> > +#define OFONO_CI_FIELD_FREQ_UNDEFINED 0xFFFF
> > +
> > +#define OFONO_MAX_NMR_COUNT 15
> > +#define OFONO_MAX_MEASURED_CELL_COUNT 32
> > +#define OFONO_MAX_MEAS_RES_LIST_COUNT 8
> > +
> > +enum ofono_cell_type {
> > +	OFONO_CELL_TYPE_GERAN,
> > +	OFONO_CELL_TYPE_UTRAN_FDD
> > +};
> 
> anything we have to keep in mind for LTE here? Or does LTE not matter
> for neighbor cell info?

Neighbor cell info does matter for LTE. I quickly browsed through the
OMA spec and it seems that eutra follows the same format as geran and
utran. Have not had time to get the details yet.

Best Regards,
  Antti


^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: [PATCH 5/5 v3] Cell-info: Documentation
  2011-02-07 19:24   ` Marcel Holtmann
@ 2011-02-09  7:12     ` Antti Paila
  0 siblings, 0 replies; 12+ messages in thread
From: Antti Paila @ 2011-02-09  7:12 UTC (permalink / raw)
  To: ofono

[-- Attachment #1: Type: text/plain, Size: 5655 bytes --]

Hi Marcel,

On Mon, 2011-02-07 at 11:24 -0800, ext Marcel Holtmann wrote:
> Hi Antti,
> 
> >  doc/cell-info.txt |  121 +++++++++++++++++++++++++++++++++++++++++++++++++++++
> >  1 files changed, 121 insertions(+), 0 deletions(-)
> >  create mode 100644 doc/cell-info.txt
> > 
> > diff --git a/doc/cell-info.txt b/doc/cell-info.txt
> > new file mode 100644
> > index 0000000..64d9db6
> > --- /dev/null
> > +++ b/doc/cell-info.txt
> > @@ -0,0 +1,121 @@
> > +Cell Info hierarchy
> > +===================
> > +
> > +Service		org.ofono
> > +Interface	org.ofono.CellInfo
> > +Object path	[variable prefix]/{modem0,modem1,...}
> > +
> > +Methods 	aa{sv} GetNeighbors()
> > +
> > +			Calling this procedure returns properties of serving
> > +			and neighboring cells in GSM or WCDMA networks. This
> > +			information can be used to determine current location
> > +			using triangulation over neighboring cell tower
> > +			locations and estimated distances.
> > +
> > +			The returned array consists of two parts: 1) first
> > +			element of the array contains a dictionary of
> > +			common information about network and serving cell 2)
> > +			rest of the array comprises dictionaries containing
> > +			measurement results of neighboring cells. The contents
> > +			of the dictionaries follow the specification
> > +			OMA-TS-ULP-V2_0-20100816-C for user plane Location and
> > +			is described in properties section.
> 
> I am having a little bit of a problem calling this GetNeighbors and then
> also retrieving the serving cell at the same time.
> 
> I am just spinning some idea here, but maybe calling the interface
> org.ofono.NeighborCellInfo and the method AquireMeasurment() would be
> better.

Sounds better to me also.

> > +			Possible errors: org.ofono.Error.Failed
> > +
> > +Properties
> > +
> > +Serving cell
> > +		string Type
> > +			Radio access network type of neighbor cell information.
> > +			The possible values are:
> > +			"geran"	Measurement results are for the GSM EDGE Radio
> > +				Access Network.
> > +			"utran"	Measurement results are for UMTS Radio Access
> > +				Network.
> > +
> > +		string MobileCountryCode
> > +			Mobile Country Code of serving cell. Possible values:
> > +			Values: 0...999
> > +
> > +		string MobileNetworkCode
> > +			Mobile Network Code of serving cell.
> > +			Values: 0...999
> > +
> > +		uint16 LocationAreaCode [GERAN]
> > +			Location area code of serving cell.
> > +			Values: 0...65535
> > +
> > +		uint16 CellId [GERAN]
> > +			Cell Id of serving cell.
> > +			Values: 0...65535
> > +
> > +		byte TimingAdvance [GERAN, optional]
> > +			Timing advance.
> > +			Values: 0...63
> > +
> > +		uint32 UniqueCellId [UTRA-FDD]
> > +			Serving WCDMA unique cell ID.
> > +			Values: 0...268435455
> > +
> > +		uint16 ScramblingCode [UTRA-FDD]
> > +			Primary scrambling code.
> > +			Values: 0...511
> > +
> > +		uint16 UARFCN-DL [UTRA-FDD]
> > +			Downlink UTRA Absolute Radio Frequency Channel Number
> > +			of serving cell.
> > +			Values: 0...16383
> 
> Do we wanna keep the UARFCN acronym?
> 
> > +		uint16 UARFCN-UL [UTRA-FDD, optional]
> > +			Uplink UTRA Absolute Radio Frequency Channel Number.
> > +			Values: 0...16383
> 
> I am still going forth and back if it is a good idea to make cell[0]
> special as the serving cell. There are common fields, but also other
> fields that are totally different.
> 
> So one question that came to my mind is how this mixes when the serving
> cell is UMTS, can the neighbors cells also report GSM? Do we have a mix
> of values in the dictionary anyway?

At the moment the dictionary can contain only geran or utran cells but
not both at the same time. Having thought this over, it might be
reasonable to allow the dictionary contain also mixed entries. I don't
know if it is technically possible at the moment to measure different
radio technologies but we might not want to limit this possibility on
the API level.

> > +Neighbor cell measurement results
> > +
> > +		uint16 AbsoluteRadioFrequencyChannelNumber [GERAN]
> > +			Absolute radio frequency channel number.
> > +			Values: 0...1023
> > +
> > +		byte BaseStationIdentityCode [GERAN]
> > +			Base station identity code.
> > +			Values: 0...63.
> > +
> > +		byte RXLEV [GERAN]
> > +			Measured power of the channel.
> > +			Values: 0...63
> 
> I think we can find something better name than RXLEV.

These are sort of standard acronyms and anyone needing them most
probably is also familiar with the acronym. If we invent our own name it
might be even confusing.

> > +		byte ReceivedSignalStrengthIndicator [UTRA-FDD]
> > +			RX power level.
> > +			Values: 0...127
> > +
> > +		uint16 UARFCN-DL [UTRA-FDD]
> > +			Downlink UARFCN.
> > +			Values: 0...16383
> > +
> > +		uint16 UARFCN-UL [UTRA-FDD, optional]
> > +			Uplink UARFCN.
> > +			Values: 0...16383
> > +
> > +		uint16 ScramblingCode [UTRA-FDD]
> > +			Primary scrambling code.
> > +			Values: 0...511
> > +
> > +		uint32 UniqueCellId [UTRA-FDD, optional]
> > +			Unique cell ID.
> > +			Values: 0...268435455
> > +
> > +		byte CPICH-ECN0 [UTRA-FDD, optional]
> > +			 Common pilot channel RX energy per chip over noise
> > +			 density in dB.
> > +			 Values: 0...63
> 
> Any better name than CPICH?
> 
> > +		int16 CPICH-RSCP [UTRA-FDD, optional]
> > +			Common pilot channel RX carrier power in dBm
> > +			Values: -4...127
> > +
> > +		byte Pathloss [UTRA-FDD, optional]
> > +			Measured path loss in dB.
> > +			Values: 46...173

Best Regards,
  Antti


^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2011-02-09  7:12 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-12 12:05 [PATCH 0/5 v3] Neighbor Cell Info Atom Antti Paila
2011-01-12 12:05 ` [PATCH 1/5 v3] Cell-info: CellInfo DBUS interface definition Antti Paila
2011-02-07 19:27   ` Marcel Holtmann
2011-01-12 12:05 ` [PATCH 2/5 v3] Cell-info: Header file for Neighbor cell info Antti Paila
2011-02-07 19:30   ` Marcel Holtmann
2011-02-09  6:54     ` Antti Paila
2011-01-12 12:05 ` [PATCH 3/5 v3] Cell-info: Atom for obtaining ECID info of cells Antti Paila
2011-01-12 12:05 ` [PATCH 4/5 v3] Cell-info: New files included in compilation Antti Paila
2011-01-12 12:05 ` [PATCH 5/5 v3] Cell-info: Documentation Antti Paila
2011-02-07 19:24   ` Marcel Holtmann
2011-02-09  7:12     ` Antti Paila
2011-02-02  8:08 ` [PATCH 0/5 v3] Neighbor Cell Info Atom Antti Paila

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.