aboutsummaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-02-05 23:42:12 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-02-13 10:34:40 +0100
commit6ac2e684678a27f13966b7ae8d9937f43cb7adc9 (patch)
tree1859db36501d8658d44f4416b0f53108c7dc46cf /contrib
parent225cf8229020e5474a5dc9824d012e50c2aa2ad8 (diff)
calib: Print the frame number decoded as t1/t2/t3
Diffstat (limited to 'contrib')
-rw-r--r--contrib/sysmobts-calib/Makefile2
-rw-r--r--contrib/sysmobts-calib/sysmobts-calib.c9
2 files changed, 9 insertions, 2 deletions
diff --git a/contrib/sysmobts-calib/Makefile b/contrib/sysmobts-calib/Makefile
index ba74ec1d..9f16aee0 100644
--- a/contrib/sysmobts-calib/Makefile
+++ b/contrib/sysmobts-calib/Makefile
@@ -1,5 +1,5 @@
CFLAGS=`pkg-config --cflags libosmocore` -Wall -Werror
-LIBS=`pkg-config --libs libosmocore`
+LIBS=`pkg-config --libs libosmocore libosmogsm`
all: sysmobts-calib
diff --git a/contrib/sysmobts-calib/sysmobts-calib.c b/contrib/sysmobts-calib/sysmobts-calib.c
index 3204db72..3cfe7d8d 100644
--- a/contrib/sysmobts-calib/sysmobts-calib.c
+++ b/contrib/sysmobts-calib/sysmobts-calib.c
@@ -33,6 +33,8 @@
#include <sysmocom/femtobts/superfemto.h>
#include <sysmocom/femtobts/gsml1types.h>
+#include <osmocom/gsm/gsm_utils.h>
+
#include <osmocom/core/utils.h>
#include "sysmobts-layer1.h"
@@ -438,12 +440,17 @@ static int bcch_follow(void)
uint8_t block;
uint8_t data[23];
size_t size;
+ struct gsm_time gsmtime;
rc = wait_for_data(data, &size, &fn, &block);
if (rc == 1)
continue;
CHECK_RC_MSG(rc, "No Data Indication");
- printf("Data: %s\n", osmo_hexdump(data, size));
+
+ gsm_fn2gsmtime(&gsmtime, fn);
+ printf("%02u/%02u/%02u %s\n",
+ gsmtime.t1, gsmtime.t2, gsmtime.t3,
+ osmo_hexdump(data, size));
}
rc = mph_close(layer1);