Change in osmo-bts[master]: Add OC-2G to build

This is merely a historical archive of years 2008-2021, before the migration to mailman3.

A maintained and still updated list archive can be found at https://lists.osmocom.org/hyperkitty/list/gerrit-log@lists.osmocom.org/.

Omar Ramadan gerrit-no-reply at lists.osmocom.org
Tue Oct 23 22:49:10 UTC 2018


Omar Ramadan has uploaded this change for review. ( https://gerrit.osmocom.org/11449


Change subject: Add OC-2G to build
......................................................................

Add OC-2G to build

Change-Id: I4a8dcf759a2818c8e457bcb82775c4e60c94d771
---
M configure.ac
M include/osmo-bts/gsm_data_shared.h
M include/osmo-bts/l1sap.h
M include/osmo-bts/phy_link.h
M src/Makefile.am
M src/common/gsm_data_shared.c
6 files changed, 55 insertions(+), 2 deletions(-)



  git pull ssh://gerrit.osmocom.org:29418/osmo-bts refs/changes/49/11449/1

diff --git a/configure.ac b/configure.ac
index f2d4f84..9a8d58f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -279,6 +279,27 @@
 	CPPFLAGS=$oldCPPFLAGS
 fi
 
+AC_MSG_CHECKING([whether to enable NuRAN Wireless OC-2G hardware support])
+AC_ARG_ENABLE(oc2g,
+		AC_HELP_STRING([--enable-oc2g],
+				[enable code for NuRAN Wireless OC-2G bts [default=no]]),
+		[enable_oc2g="yes"],[enable_oc2g="no"])
+AC_ARG_WITH([oc2g], [AS_HELP_STRING([--with-oc2g=INCLUDE_DIR], [Location of the OC-2G API header files])],
+			 [oc2g_incdir="$withval"],[oc2g_incdir="$incdir"])
+AC_SUBST([OC2G_INCDIR], -I$oc2g_incdir)
+AC_MSG_RESULT([$enable_oc2g])
+AM_CONDITIONAL(ENABLE_OC2GBTS, test "x$enable_oc2g" = "xyes")
+if test "$enable_oc2g" = "yes"; then
+	oldCPPFLAGS=$CPPFLAGS
+	CPPFLAGS="$CPPFLAGS $OC2G_INCDIR -I$srcdir/include"
+	AC_CHECK_HEADER([nrw/oc2g/oc2g.h],[],
+			[AC_MSG_ERROR([nrw/oc2g/oc2g.h can not be found in $oc2g_incdir])],
+			[#include <nrw/oc2g/oc2g.h>])
+	PKG_CHECK_MODULES(LIBSYSTEMD, libsystemd)
+        PKG_CHECK_MODULES(LIBGPS, libgps)
+	CPPFLAGS=$oldCPPFLAGS
+fi
+
 # https://www.freedesktop.org/software/systemd/man/daemon.html
 AC_ARG_WITH([systemdsystemunitdir],
      [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])],,
@@ -307,6 +328,7 @@
     src/osmo-bts-omldummy/Makefile
     src/osmo-bts-sysmo/Makefile
     src/osmo-bts-litecell15/Makefile
+    src/osmo-bts-oc2g/Makefile
     src/osmo-bts-trx/Makefile
     src/osmo-bts-octphy/Makefile
     include/Makefile
diff --git a/include/osmo-bts/gsm_data_shared.h b/include/osmo-bts/gsm_data_shared.h
index 794eaea..80784af 100644
--- a/include/osmo-bts/gsm_data_shared.h
+++ b/include/osmo-bts/gsm_data_shared.h
@@ -411,6 +411,9 @@
 	uint16_t arfcn;
 	int nominal_power;		/* in dBm */
 	unsigned int max_power_red;	/* in actual dB */
+        uint8_t max_power_backoff_8psk; /* in actual dB */
+        uint8_t c0_idle_power_red;      /* in actual dB */
+
 
 	struct trx_power_params power_params;
 	int ms_power_control;
@@ -437,6 +440,7 @@
 enum gsm_bts_type_variant {
 	BTS_UNKNOWN,
 	BTS_OSMO_LITECELL15,
+        BTS_OSMO_OC2G,
 	BTS_OSMO_OCTPHY,
 	BTS_OSMO_SYSMO,
 	BTS_OSMO_TRX,
@@ -746,7 +750,14 @@
 		struct timeval tv_clock;
 		struct osmo_timer_list fn_timer;
 	} vbts;
-
+#ifdef ENABLE_OC2GBTS
+        /* specific to Open Cellular 2G BTS */
+        struct {
+                uint8_t led_ctrl_mode;                                  /* 0: control by BTS, 1: not control by BTS */
+                struct llist_head ceased_alarm_list;    /* ceased alarm list*/
+                unsigned int rtp_drift_thres_ms;                /* RTP timestamp drift detection threshold */
+        } oc2g;
+#endif
 };
 
 
diff --git a/include/osmo-bts/l1sap.h b/include/osmo-bts/l1sap.h
index 3cf0ea5..4c30589 100644
--- a/include/osmo-bts/l1sap.h
+++ b/include/osmo-bts/l1sap.h
@@ -50,7 +50,7 @@
 static inline uint8_t l1sap_chan2ss(uint8_t chan_nr)
 {
 	if (L1SAP_IS_CHAN_BCCH(chan_nr))
-                return L1SAP_CHAN2SS_BCCH(chan_nr);
+		return L1SAP_CHAN2SS_BCCH(chan_nr);
 	if (L1SAP_IS_CHAN_SDCCH8(chan_nr))
 		return L1SAP_CHAN2SS_SDCCH8(chan_nr);
 	if (L1SAP_IS_CHAN_SDCCH4(chan_nr))
diff --git a/include/osmo-bts/phy_link.h b/include/osmo-bts/phy_link.h
index 36e34e1..2472c05 100644
--- a/include/osmo-bts/phy_link.h
+++ b/include/osmo-bts/phy_link.h
@@ -135,6 +135,20 @@
 			uint8_t tx_pwr_adj_mode;	/* 0: no auto adjust power, 1: auto adjust power using RMS detector */
 			uint8_t tx_pwr_red_8psk;	/* 8-PSK maximum Tx power reduction level in dB */
 		} lc15;
+                struct {
+                        /* configuration */
+                        uint32_t dsp_trace_f;
+                        char *calib_path;
+                        int minTxPower;
+                        int maxTxPower;
+                        struct oc2gl1_hdl *hdl;
+                        uint8_t max_cell_size;          /* 0:166 qbits*/
+                        uint8_t pedestal_mode;          /* 0: unused TS is OFF, 1: unused TS is in minimum Tx power */
+                        uint8_t dsp_alive_period;       /* DSP alive timer period  */
+                        uint8_t tx_pwr_adj_mode;        /* 0: no auto adjust power, 1: auto adjust power using RMS detector */
+                        uint8_t tx_pwr_red_8psk;        /* 8-PSK maximum Tx power reduction level in dB */
+                        uint8_t tx_c0_idle_pwr_red;     /* C0 idle slot Tx power reduction level in dB */
+                } oc2g;
 	} u;
 };
 
diff --git a/src/Makefile.am b/src/Makefile.am
index 501591d..70e4d96 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -15,3 +15,8 @@
 if ENABLE_LC15BTS
 SUBDIRS += osmo-bts-litecell15
 endif
+
+if ENABLE_OC2GBTS
+SUBDIRS += osmo-bts-oc2g
+endif
+
diff --git a/src/common/gsm_data_shared.c b/src/common/gsm_data_shared.c
index 588d0fd..21e5781 100644
--- a/src/common/gsm_data_shared.c
+++ b/src/common/gsm_data_shared.c
@@ -71,6 +71,7 @@
 const struct value_string osmo_bts_variant_names[_NUM_BTS_VARIANT + 1] = {
 	{ BTS_UNKNOWN,		"unknown" },
 	{ BTS_OSMO_LITECELL15,	"osmo-bts-lc15" },
+	{ BTS_OSMO_OC2G,	"osmo-bts-oc2g" },
 	{ BTS_OSMO_OCTPHY,	"osmo-bts-octphy" },
 	{ BTS_OSMO_SYSMO,	"osmo-bts-sysmo" },
 	{ BTS_OSMO_TRX,		"omso-bts-trx" },

-- 
To view, visit https://gerrit.osmocom.org/11449
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings

Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I4a8dcf759a2818c8e457bcb82775c4e60c94d771
Gerrit-Change-Number: 11449
Gerrit-PatchSet: 1
Gerrit-Owner: Omar Ramadan <omar.ramadan93 at gmail.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/gerrit-log/attachments/20181023/c3d4199e/attachment.htm>


More information about the gerrit-log mailing list