calib: Print the frame number decoded as t1/t2/t3

This commit is contained in:
Holger Hans Peter Freyther 2013-02-05 23:42:12 +01:00
parent 225cf82290
commit 6ac2e68467
2 changed files with 9 additions and 2 deletions

View File

@ -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

View File

@ -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);