Skip to contentSkip to conversation

netmon: support cell type LTE

PATCH In review JongSeok Won 3 participants 4 messages Jul 20, 2020 – Jul 28, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 netmon: support cell type LTE

---
 include/netmon.h |  3 +++
 src/netmon.c     | 24 +++++++++++++++++++++++-
 2 files changed, 26 insertions(+), 1 deletion(-)
include/netmon.h +3 -0
index a99d6ca9..53f9d393 100644
@@ -72,6 +72,9 @@ enum ofono_netmon_info {
 	OFONO_NETMON_INFO_EARFCN, /* int */
 	OFONO_NETMON_INFO_EBAND, /* int */
 	OFONO_NETMON_INFO_CQI, /* int */
+	OFONO_NETMON_INFO_PCI, /* int */
+	OFONO_NETMON_INFO_TAC, /* int */
+	OFONO_NETMON_INFO_SNR, /* int */
 	OFONO_NETMON_INFO_INVALID,
 };
 
src/netmon.c +23 -1
index 9eacb3ca..320c8425 100644
@@ -138,7 +138,7 @@ static void netmon_cell_info_dict_append(DBusMessageIter *dict,
 			intval = va_arg(*arglist, int);
 
 			CELL_INFO_DICT_APPEND(dict, "TimingAdvance",
-					intval, uint8_t, DBUS_TYPE_BYTE);
+					intval, uint32_t, DBUS_TYPE_UINT32);
 			break;
 
 		case OFONO_NETMON_INFO_PSC:
@@ -213,6 +213,28 @@ static void netmon_cell_info_dict_append(DBusMessageIter *dict,
 					intval, uint8_t, DBUS_TYPE_BYTE);
 			break;
 
+		case OFONO_NETMON_INFO_PCI:
+			intval = va_arg(*arglist, int);
+
+			CELL_INFO_DICT_APPEND(dict, "PhysicalCellId",
+					intval, uint16_t, DBUS_TYPE_UINT16);
+			break;
+
+		case OFONO_NETMON_INFO_TAC:
+			intval = va_arg(*arglist, int);
+
+			CELL_INFO_DICT_APPEND(dict, "TrackingAreaCode",
+					intval, uint16_t, DBUS_TYPE_UINT16);
+			break;
+
+		case OFONO_NETMON_INFO_SNR:
+			intval = va_arg(*arglist, int);
+
+			ofono_dbus_dict_append(dict, "SingalToNoiseRatio",
+					DBUS_TYPE_INT32, &intval);
+
+			break;
+
 		case OFONO_NETMON_INFO_INVALID:
 			break;
 		}
Signature · 1 line
2.17.1
#1 lore raw

Hi JongSeok,

Quoted 24 lines · JongSeok Won
---
  include/netmon.h |  3 +++
  src/netmon.c     | 24 +++++++++++++++++++++++-
  2 files changed, 26 insertions(+), 1 deletion(-)
include/netmon.h +3 -0
index a99d6ca9..53f9d393 100644
@@ -72,6 +72,9 @@ enum ofono_netmon_info {
  	OFONO_NETMON_INFO_EARFCN, /* int */
  	OFONO_NETMON_INFO_EBAND, /* int */
  	OFONO_NETMON_INFO_CQI, /* int */
+	OFONO_NETMON_INFO_PCI, /* int */
+	OFONO_NETMON_INFO_TAC, /* int */
+	OFONO_NETMON_INFO_SNR, /* int */
  	OFONO_NETMON_INFO_INVALID,
  };
 
src/netmon.c +0 -0
index 9eacb3ca..320c8425 100644

src/netmon.c static void netmon_cell_info_dict_append(DBusMessageIter *dict, · line 141

Quoted 5 lines
src/netmon.c +1 -1
@@ -138,7 +138,7 @@ static void netmon_cell_info_dict_append(DBusMessageIter *dict,
  			intval = va_arg(*arglist, int);
 
  			CELL_INFO_DICT_APPEND(dict, "TimingAdvance",
-					intval, uint8_t, DBUS_TYPE_BYTE);
+					intval, uint32_t, DBUS_TYPE_UINT32);

This breaks the NetworkMonitor API since the signature for that particular property is documented as a 'byte'. From what I recall this value has a range of 0..63 ?

Quoted 23 lines
src/netmon.c +15 -0
  			break;
 
  		case OFONO_NETMON_INFO_PSC:
@@ -213,6 +213,28 @@ static void netmon_cell_info_dict_append(DBusMessageIter *dict,
  					intval, uint8_t, DBUS_TYPE_BYTE);
  			break;
 
+		case OFONO_NETMON_INFO_PCI:
+			intval = va_arg(*arglist, int);
+
+			CELL_INFO_DICT_APPEND(dict, "PhysicalCellId",
+					intval, uint16_t, DBUS_TYPE_UINT16);
+			break;
+
+		case OFONO_NETMON_INFO_TAC:
+			intval = va_arg(*arglist, int);
+
+			CELL_INFO_DICT_APPEND(dict, "TrackingAreaCode",
+					intval, uint16_t, DBUS_TYPE_UINT16);
+			break;
+
+		case OFONO_NETMON_INFO_SNR:

src/netmon.c static void netmon_cell_info_dict_append(DBusMessageIter *dict, · line 240

Quoted 10 lines
src/netmon.c +7 -0
+			intval = va_arg(*arglist, int);
+
+			ofono_dbus_dict_append(dict, "SingalToNoiseRatio",
+					DBUS_TYPE_INT32, &intval);
+
+			break;
+
  		case OFONO_NETMON_INFO_INVALID:
  			break;
  		}

These should also be documented in doc/networkmonitor-api.txt.

Regards,
-Denis

#2 lore raw

Hi Denis

This breaks the NetworkMonitor API since the signature for that particular

Quoted 4 lines

property is documented as a 'byte'. From what I recall this value has a range
of 0..63 ?

I was confused about the value of TimingAdvance. In the description of RIL_LTE_SignalStrength_v8, the range of timingAdvance is 0 to 0x7FFFFFFE and 0x7FFFFFFF is invalid.
But, you are correct. In the 3GPP 36.321 section 6.1.3.5, Ta value is from 0 to 63.

These should also be documented in doc/networkmonitor-api.txt.

Quoted 1 line

Okay, I'll update and upload re-patch with description in doc/networkmonitor-api.txt.

Best Regards,
JongSeok

2020년 7월 21일 (화) 오후 10:55, Denis Kenzior <[email protected]>님이 작성:

Quoted 82 lines

Hi JongSeok,

src/netmon.c static void

Quoted 24 lines · JongSeok Won
---
  include/netmon.h |  3 +++
  src/netmon.c     | 24 +++++++++++++++++++++++-
  2 files changed, 26 insertions(+), 1 deletion(-)
include/netmon.h +3 -0
index a99d6ca9..53f9d393 100644
@@ -72,6 +72,9 @@ enum ofono_netmon_info {
      OFONO_NETMON_INFO_EARFCN, /* int */
      OFONO_NETMON_INFO_EBAND, /* int */
      OFONO_NETMON_INFO_CQI, /* int */
+     OFONO_NETMON_INFO_PCI, /* int */
+     OFONO_NETMON_INFO_TAC, /* int */
+     OFONO_NETMON_INFO_SNR, /* int */
      OFONO_NETMON_INFO_INVALID,
  };
 
src/netmon.c +0 -0
index 9eacb3ca..320c8425 100644
@@ -138,7 +138,7 @@ static void

netmon_cell_info_dict_append(DBusMessageIter *dict,

src/netmon.c static void netmon_cell_info_dict_append(DBusMessageIter *dict,

Quoted 5 lines
src/netmon.c +1 -1
                      intval = va_arg(*arglist, int);
 
                      CELL_INFO_DICT_APPEND(dict, "TimingAdvance",
-                                     intval, uint8_t, DBUS_TYPE_BYTE);
+                                     intval, uint32_t,

DBUS_TYPE_UINT32);

This breaks the NetworkMonitor API since the signature for that particular property is documented as a 'byte'. From what I recall this value has a range
of 0..63 ?

src/netmon.c static void

Quoted 4 lines
src/netmon.c +0 -0
                      break;
 
              case OFONO_NETMON_INFO_PSC:
@@ -213,6 +213,28 @@ static void

netmon_cell_info_dict_append(DBusMessageIter *dict,

src/netmon.c static void netmon_cell_info_dict_append(DBusMessageIter *dict,

Quoted 8 lines
src/netmon.c +5 -0
                                      intval, uint8_t, DBUS_TYPE_BYTE);
                      break;
 
+             case OFONO_NETMON_INFO_PCI:
+                     intval = va_arg(*arglist, int);
+
+                     CELL_INFO_DICT_APPEND(dict, "PhysicalCellId",
+                                     intval, uint16_t,

DBUS_TYPE_UINT16);

src/netmon.c static void netmon_cell_info_dict_append(DBusMessageIter *dict,

Quoted 7 lines
src/netmon.c +7 -0
+                     break;
+
+             case OFONO_NETMON_INFO_TAC:
+                     intval = va_arg(*arglist, int);
+
+                     CELL_INFO_DICT_APPEND(dict, "TrackingAreaCode",
+                                     intval, uint16_t,

DBUS_TYPE_UINT16);

Quoted 4 lines
src/netmon.c +3 -0
+                     break;
+
+             case OFONO_NETMON_INFO_SNR:

src/netmon.c static void netmon_cell_info_dict_append(DBusMessageIter *dict, · line 240

Quoted 10 lines
src/netmon.c +7 -0
+                     intval = va_arg(*arglist, int);
+
+                     ofono_dbus_dict_append(dict, "SingalToNoiseRatio",
+                                     DBUS_TYPE_INT32, &intval);
+
+                     break;
+
              case OFONO_NETMON_INFO_INVALID:
                      break;
              }

These should also be documented in doc/networkmonitor-api.txt.

Regards,
-Denis

#3 lore raw

Yeah, this really breaks the NetworkMonitor API since it only has a range of 0 to 63.