summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/host/layer23/src/misc/app_cell_log.c13
-rw-r--r--src/host/layer23/src/misc/cell_log.c3
2 files changed, 14 insertions, 2 deletions
diff --git a/src/host/layer23/src/misc/app_cell_log.c b/src/host/layer23/src/misc/app_cell_log.c
index a0a1c093..84f5a83d 100644
--- a/src/host/layer23/src/misc/app_cell_log.c
+++ b/src/host/layer23/src/misc/app_cell_log.c
@@ -38,6 +38,7 @@ extern struct log_target *stderr_target;
extern void *l23_ctx;
char *logname = "/var/log/osmocom.log";
+int RACH_MAX = 2;
int _scan_work(struct osmocom_ms *ms)
{
@@ -88,6 +89,8 @@ static int l23_getopt_options(struct option **options)
{
static struct option opts [] = {
{"logfile", 1, 0, 'l'},
+ {"rach", 1, 0, 'r'},
+ {"no-rach", 1, 0, 'n'},
};
*options = opts;
@@ -98,6 +101,8 @@ static int l23_cfg_print_help()
{
printf("\nApplication specific\n");
printf(" -l --logfile LOGFILE Logfile for the cell log.\n");
+ printf(" -r --rach RACH Nr. of RACH bursts to send.\n");
+ printf(" -n --no-rach Send no rach bursts.\n");
return 0;
}
@@ -107,6 +112,12 @@ static int l23_cfg_handle(int c, const char *optarg)
case 'l':
logname = talloc_strdup(l23_ctx, optarg);
break;
+ case 'r':
+ RACH_MAX = atoi(optarg);
+ break;
+ case 'n':
+ RACH_MAX = 0;
+ break;
}
return 0;
@@ -114,7 +125,7 @@ static int l23_cfg_handle(int c, const char *optarg)
static struct l23_app_info info = {
.copyright = "Copyright (C) 2010 Andreas Eversberg\n",
- .getopt_string = "l:",
+ .getopt_string = "l:r:n",
.cfg_supported = l23_cfg_supported,
.cfg_getopt_opt = l23_getopt_options,
.cfg_handle_opt = l23_cfg_handle,
diff --git a/src/host/layer23/src/misc/cell_log.c b/src/host/layer23/src/misc/cell_log.c
index ce68ef06..93616f2a 100644
--- a/src/host/layer23/src/misc/cell_log.c
+++ b/src/host/layer23/src/misc/cell_log.c
@@ -47,7 +47,6 @@
#include "../../../gsmmap/geo.h"
#define READ_WAIT 2, 0
-#define RACH_MAX 2
#define RACH_WAIT 0, 900000
#define MIN_RXLEV -106
#define MAX_DIST 2000
@@ -89,6 +88,8 @@ static int arfcn;
static int rach_count;
static FILE *logfp = NULL;
extern char *logname;
+extern int RACH_MAX;
+
static struct gsm48_sysinfo sysinfo;