OpenBTS: Kalibrasi

From OnnoWiki
Revision as of 15:29, 2 May 2011 by Onnowpurbo (talk | contribs)
Jump to navigation Jump to search

Sumber: http://gnuradio.org/redmine/wiki/1/OpenBTSClockCalibration


Jika kita tidak mempunyai peralatan lab yang baik dan kita ingin mengetahui akurasi clock USRP, kita dapat menggunakan aplikasi Kalibrator (Copyright (c) 2009 Joshua Lackey, Alexander Chemeris). Tentunya kita tidak mungkin memperoleh hasil yang baik seperti hi-tech lab, tapi cukup lah untuk mengetahui error kalibrasi clock yang ada.


Latest version of Kalibrator today is 0.2 and is available here. Starting from the next update of OpenBTS Kalibrator will be distributed as a part of OpenBTS standard package.

How it works¶

Kalibrator takes advantage of the existing real networks and their accuracy. So you need to be in range within some operator's BTS. You pass the downlink frequency of the previously scanned ARFCN as a command line parameter for Kalibrator. Using some math Kalibrator can estimate the value of frequency difference between the frequency it tunes USRP to and the frequency of a BTS working in +-200kHz range near that frequency.

Building and running¶

To build Kalibrator with gnuradio 3.2.2 (ver. 3.1.3 is not currently supported) run 'make' and you will get binary file 'kal' which is ready for use.

Now you need to know which ARFCN is better to use. With any GPRS modem supporting AT commands it is possible to find an ARFCN with the strongest signal. Without such modem, you have to scan whole band by manual iteration through downlink frequencies (it can be inconvenient especially on 1800/1900 band). Search this file for specific downlinks all_gsm_channels_arfcn.txt.

Suitable channels must have at least -70 to -80dBm strenght, else you got to much overruns and the result could be misguiding. That's just good to have more channels to scan to eliminate possible wrong error. There is an example of network scan from GPRS modem (offset values are added manually).

T-Mobile operator
=================

at^moni
Serving Cell                                          I Dedicated channel
chann rs  dBm MCC MNC  LAC cell NCC BCC PWR RXLev  C1 I chann TS timAdv PWR  dBm Q ChMod    offset
   58 53  -57 230  01 4358 719D   2   4  33  -106  48 I    Limited Service            -2197 Hz

OK
at^monp
chann rs  dBm MCC MNC BCC  C1  C2    offset
  106 45  -65 230  01   7  40  40    -2507 Hz
   75 37  -73 230  01   2  32  32    -2367 Hz
   28 21  -89 230  01   4  16  16    N/A
   80 17  -93 230  01   1  12  12    N/A  
OK
Telefonica O2 operator
======================
at^moni
Serving Cell                                       Z   I Dedicated channel
chann rs  dBm MCC MNC  LAC cell NCC BCC PWR RXLev  C1 I chann TS timAdv PWR  dBm Q ChMod    offset
   86 59  -51 230  02 04BC 090B   1   3  33  -106  54 I    Limited Service            -2496 Hz
OK
at^monp
chann rs  dBm MCC MNC BCC  C1  C2    offset
  114 47  -63 230  02   4  42  42    N/A
  112 30  -80 230  02   7  25  25    N/A
   93 19  -91 230  02   7  14  14    N/A
OK

Here is obvious how the values were obtained.

[openBTS@openBTS kal-0.2]# ./kal -f 946600000 -u
USRP side: B
FPGA clock: 52000000
Decimation: 192
Antenna: RX2
Sample rate: 270833.343750
average [min, max] (range, stddev)
-2197.789062 [-2431, -1843] (588, 146.761444)
overruns: 0
not found: 0
[openBTS@openBTS kal-0.2]# ./kal -f 956200000 -u
USRP side: B
FPGA clock: 52000000
Decimation: 192
Antenna: RX2
Sample rate: 270833.343750
average [min, max] (range, stddev)
-2507.531006 [-2575, -2436] (139, 40.815132)
overruns: 0
not found: 0
[openBTS@openBTS kal-0.2]# ./kal -f 950000000 -u
USRP side: B
FPGA clock: 52000000
Decimation: 192
Antenna: RX2
Sample rate: 270833.343750
average [min, max] (range, stddev)
-2367.053467 [-2431, -2275] (156, 43.972340)
overruns: 0
not found: 0
[openBTS@openBTS kal-0.2]# ./kal -f 952200000 -u
USRP side: B
FPGA clock: 52000000
Decimation: 192
Antenna: RX2
Sample rate: 270833.343750
average [min, max] (range, stddev)
-2496.760254 [-2592, -2375] (217, 61.745182)
overruns: 0
not found: 0

By default RX and side are set to ones used by OpenBTS, so usually you need only one mandatory parameter '-f'. You can use -u is optional parameter for continous display.

... page in progress


Download

Download dari

http://thre.at/kalibrate/kal-v0.4.1.tar.bz2


Compile

cp kal-v0.4.1.tar.bz2 /usr/local/src/
cd /usr/local/src
tar jxvf kal-v0.4.1.tar.bz2 
cd /usr/local/src/kal-v0.4.1
./bootstrap && CXXFLAGS='-W -Wall -O3' ./configure && make


Menjalankan

cd /usr/local/src/kal-v0.4.1/src/

Cara menjalankan

./kal -h

Hasil

kalibrate v0.4.1, Copyright (c) 2010, Joshua Lackey

Usage:
	GSM Base Station Scan:
		kal <-s band indicator> [options]

	Clock Offset Calculation:
		kal <-f frequency | -c channel> [options]

Where options are:
	-s	band to scan (GSM850, GSM900, EGSM, DCS, PCS) 
	-f	frequency of nearby GSM base station
	-c	channel of nearby GSM base station
	-b	band indicator (GSM850, GSM900, EGSM, DCS, PCS)
	-R	side A (0) or B (1), defaults to B
	-A	antenna TX/RX (0) or RX2 (1), defaults to RX2
	-g	gain as % of range, defaults to 45%
	-F	FPGA master clock frequency, defaults to 52MHz
	-v	verbose
	-D	enable debug messages
	-h	help


Menjalankan

./kal -s 1800

Hasil


Menjalankan

./kal -s 900

Hasil


Menjalankan

./kal -s 850

Hasil

kal: Scanning for GSM-850 base stations.
GSM-850:

chan: 128 (869.2MHz - 13Hz) power: 9400.80 chan: 131 (869.8MHz + 7Hz) power: 4081.75 chan: 139 (871.4MHz + 10Hz) power: 2936.20 chan: 145 (872.6MHz - 7Hz) power: 33605.48

Menjalankan

./kal -c 145

Hasil

kal: Calculating clock frequency offset.
Using GSM-850 channel 145 (872.6MHz)
average		[min, max]	(range, stddev)
-   1Hz		[-8, 7]	(14, 3.948722)
overruns: 0
not found: 0


Referensi


Pranala Menarik