Project

General

Profile

Isdnsync » History » Version 25

dexter, 02/19/2016 10:47 PM

1 9 dexter
Note: This Howto is still incomplete and will be finished soon. Please do not try anything described in this howto unless we have checked and verified everything with our own equipment!
2 6 dexter
---------------------------------------------------------------
3 1 dexter
4
5 7 dexter
== Abstract ==
6 6 dexter
7 11 dexter
In a state of the art telephone network everything is syncronized by a central, very high accuracy clock. The BTS also uses this clock for various things like channel allocation, frame clock, bitclock ect. If the clock gets a little bit incorrect (more than 50Hz) the BTS will transmit on a wrong frequency and there will be lots of other effects that might destabilize the radio transmission.
8 1 dexter
9 11 dexter
The BS11 is shipped with a precalibrated internal oscillator. If you are lucky the calibration (that is made over 10 years ago) in your BTS is still correct. If not your setup will not work unless you recalibrate the oscillator.
10 1 dexter
11
This document illustrates how you can use a ceap HFC-S card with the public telephone network as frequency standard for your E1 line. 
12
13 7 dexter
== Modifieing the HFC-S Card ==
14 6 dexter
15 1 dexter
All in all we need 2 Signals from the HFC-S Card: F0IO and C4IO. This signals are provided by the HFC-S Chip on the card and can be taken from pin 55 (F0IO) and 54 (C4IO) at the HFC-S Chip. (See also Datasheet page 8).
16 2 dexter
17 4 dexter
[[Image(hfc-s_card.jpg, 20%)]]
18 5 dexter
19
All you need to do is to solder a wire to C4IO and F0I0. The following image shows our modified card:
20 1 dexter
21
[[Image(hfc-s_card_modified.jpg, 20%)]]
22 8 dexter
23 18 dexter
Note: We used an old led-wire from an old PC-Tower case. The green wire is connected to F0IO and the black one is connected to C4IO
24 1 dexter
25 20 dexter
After you have modified the card you should verify if the card works as expected. Start isdnsync and measure the signals with an oscillosope.
26
27
{{{
28
$ ./isdnsync 1
29
DL_INFORMATION (tei 0 sapi 0)
30
-> activating layer 2
31
PH_ACTIVATE
32
*** Sync available from interface :-)
33
DL_ESTABLISH
34
}}}
35
36
[[Image(hfc-s_C4IO_bitclock.jpg, 20%)]]
37
[[Image(hfc-s_F0IO_frameclock.jpg, 20%)]]
38
39
From left to right:  F0IO (4,096Mhz bitclock), C4I0 (8kHz frameclock)
40
41
42 9 dexter
== Connecting the modified HFC-S card to your E1 Card ==
43 1 dexter
44 18 dexter
Your HFC-E1 card has two so called PCM-Connectors. (the two connectors in the upper right corner of the card) The signal inputs for C4IO and F0IO can be found on Pin 9 and Pin 10 of the HFC-E1 card.
45 1 dexter
46 21 dexter
[[Image(hfc-e1_connected_to_hfc-s.jpg, 40%)]]
47 18 dexter
48 1 dexter
The image shows how plug from the HFC-S card is connected to the HFC-E1 card.
49 21 dexter
50
Note: We used an old led-wire from an old PC-Tower case. The green wire is connected to F0IO and the black one is connected to C4IO
51 18 dexter
52
Note: You should have received a printed documentation with your HFC-E1 card. You will find a detailed pinout of the PCM connectors there.
53
54 9 dexter
== Perform the calibration procedure ==
55 12 dexter
56 19 dexter
The calibration of the internal oscillator is an ongoing process. In a commerical telephone network the BTSs are calibrated at all times. In an experimental Setup it should be ok to operate the BTS in standalone mode and syncronize it from time to time just as shown here:
57 12 dexter
58
Things to do:
59 9 dexter
60 13 dexter
 * Connect the HFC-S Card to the S0 line. 
61 22 dexter
 * Add type=0x00800 to the modprobe hfcmulti ... commandline:
62
 * start isdynsync:
63
64
{{{
65
$ ./isdnsync 1
66
DL_INFORMATION (tei 0 sapi 0)
67
-> activating layer 2
68
PH_ACTIVATE
69
*** Sync available from interface :-)
70
DL_ESTABLISH
71
}}}
72
73
 * Configure your BTS from standalone to E1 locked:
74
75
{{{
76
dexter@da-laptop-w3:~/openbsc/openbsc/src$ ./bs11_config pll-e1-locked
77
bs11_config (C) 2009 by Harald Welte and Dieter Spaar
78
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
79
80
LMT LOGON: ACK
81
82
PHASE: 2 Maintenance          MBCCU0: Load        MBCCU1: Load        Abis-link: Down      
83
SET ATTRIBUTE ObjClass=0xa5 ObjInst=(7,0,0) ACK
84
LMT LOGOFF: ACK
85
}}}
86
87
 * start bsc_hack (just as normal)
88 1 dexter
 * use bs11_config to monitor the calibration process. The internal oscillator will now take over the E1 clock. You should see that the PLL values changing from time to time. If you see the PLL values leveling off, the calibration is done.
89 22 dexter
90
{{{
91
Here comes an example: 
92
93
bs11_config (C) 2009 by Harald Welte and Dieter Spaar
94
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
95
96
LMT LOGON: ACK
97
98
PHASE: 3 Normal               MBCCU0: Load        MBCCU1: Load        Abis-link: Up        
99
100
BS11 ATTRIBUTES:
101
	BS-11 ESN PCB Serial Number: 001107
102
	BS-11 ESN Hardware Code Number: 135-2044/03.07
103
	BS-11 ESN Firmware Code Number: 135-2044/03.07
104
	PLL Set Value=1047, Work Value=653
105
106
SITE MANAGER ATTRIBUTES:
107
	E1 Channel: Port=0 Timeslot=1 (Full Slot)
108
	TEI: 25
109
110
BS11 Line Interface ATTRIBUTES:
111
	PLL Mode: E1 Locked
112
113
BS11 CCLK ATTRIBUTES:
114
	CCLK Accuracy: Medium (0)
115
116
BS11 Power Amplifier 0 ATTRIBUTES:
117
	TRX Power: 30mW (GSM)
118
119
LMT LOGOFF: ACK
120
121 25 dexter
The output was taken from a BS11 that was totally misaligned. The misalignment
122
came from exidently operating the BS11 in E1-locked mode withoud a proper
123
frequency standard (the internal oscillator of the HFC-E1 card far from being
124
exact enough!). 
125 22 dexter
126
bs11_config (C) 2009 by Harald Welte and Dieter Spaar
127
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
128
129
LMT LOGON: ACK
130
131
PHASE: 3 Normal               MBCCU0: Load        MBCCU1: Load        Abis-link: Up        
132
133
BS11 ATTRIBUTES:
134
	BS-11 ESN PCB Serial Number: 001107
135
	BS-11 ESN Hardware Code Number: 135-2044/03.07
136
	BS-11 ESN Firmware Code Number: 135-2044/03.07
137
	PLL Set Value=1047, Work Value=1046
138
139
SITE MANAGER ATTRIBUTES:
140
	E1 Channel: Port=0 Timeslot=1 (Full Slot)
141
	TEI: 25
142
143
BS11 Line Interface ATTRIBUTES:
144
	PLL Mode: E1 Locked
145
146
BS11 CCLK ATTRIBUTES:
147
	CCLK Accuracy: Medium (0)
148
149
BS11 Power Amplifier 0 ATTRIBUTES:
150
	TRX Power: 30mW (GSM)
151
152
LMT LOGOFF: ACK
153
154 23 dexter
And that output was taken from the BS11 after operating it for about 1,5h with our
155
hfc-s/PSTN based frequency standard. As you can see the the Workvalue has changed
156
dramaticly.
157 1 dexter
158 23 dexter
With our testequipment we could verify that the frequency accuracy of the BS11 now
159
in the same range as the commercial BTS in the neigbourhood. 
160 1 dexter
}}}
161 22 dexter
162 23 dexter
 * Configure your BTS from E1 locked to standalone to finish the procedure.
163 1 dexter
164 23 dexter
{{{
165
dexter@da-laptop-w3:~/openbsc/openbsc/src$ ./bs11_config pll-e1-locked
166
bs11_config (C) 2009 by Harald Welte and Dieter Spaar
167
This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY
168 1 dexter
169 23 dexter
LMT LOGON: ACK
170 1 dexter
171 23 dexter
PHASE: 2 Maintenance          MBCCU0: Load        MBCCU1: Load        Abis-link: Down      
172
SET ATTRIBUTE ObjClass=0xa5 ObjInst=(7,0,0) ACK
173
LMT LOGOFF: ACK
174
}}}
175 1 dexter
176 23 dexter
177 14 dexter
Note: If you do this the first time it is higly recomended to check if valid signals are present at C4IO and F0IO.
178
179 22 dexter
Note: The process takes some time. We recommend to warm up the BTS before you start for at least one hour. It is important that the calibration takes place with work temperature.
180
181 14 dexter
182
183 15 dexter
== Sources: ==
184 14 dexter
 * http://lists.gnumonks.org/pipermail/openbsc/2009-June/000387.html
185
 * http://lists.gnumonks.org/pipermail/openbsc/2009-July/000627.html
Add picture from clipboard (Maximum size: 48.8 MB)