-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathWCDMA_attributes.py
347 lines (315 loc) · 13.4 KB
/
WCDMA_attributes.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
#!/usr/bin/env python
# for instrument/phone setting
# William Chang
#Test for git
#Instrument setting
Instrument_GPIB = 14 #GPIB
Average_times = 20 # average times for Txp and ACLR measurement
IMSI = '001010123456789'
path_loss = {700: -0.3, 1200: -0.3, 1500: -0.6, 2300: -0.6, 2500: -0.7, 2700: -0.7} #initiate path loss table (using dict)
#Anritsu 8820C setting
Integrity = 1 # Integrity ON|OFF
#Phone settings
bUseQPST = 1 # bUseQPST = true to use QPST, FALSE to use QPHONEMS
Phone_Com_Port = 15 # Phone COM port
bSet_WCDMA_Waveform = 0 # For GLU(MSM8974), not to set WCDMA waveform
bSet_CDMA_Waveform = 1 # Reserve this parameter
PDM_init = 88 # Start PDM (High gain mode default PDM) (RTR6285:210, WTR1605:90)
PDM_low = 50 # PDM for -20dBm (Low gain mode PDM) (RTR6285:140, WTR1605:60)
PDM_max = 255 # PDM Max (RTR6285:255, WTR1605:127)
PDM_min = 0
iPArange_high = 0 # for high gain mode (RTR6285:3, WTR1605:0)
iPArange_low = 3 # for low gain mode (RTR6285:0, WTR1605:3)
PA_range_map = dict(B7=(0,1), # for different Band-PA setting => Band=(HPM,LPM)
B20=(0,3),
)
"""
0 - R0 = 0, R1 = 0,
1 - R0 = 1, R1 = 0,
2 - R0 = 0, R1 = 1,
3 - R0 = 1, R1 = 1
"""
SMPS_ON_init = 1 #SMPS ON(1)/OFF(0)
SMPS_init = 3400 #SMPS value (for High gain mode) (MSM8x25/RTR6285:380/511, MSM8x30/WTR1605:780, MSM8974/WTR1605:1000)
SMPS_low = 1000 #SMPS value for -20dBm (for Low gain mode) (MSM8x25/RTR6285:95, MSM8x30/WTR1605:230, MSM8974/WTR1605:1000)
# Tuning sweep
TARGET_PWR = 23.5
PDM_start = 80
PDM_end = 90
# Tested Power Supply list
Power_Suppply_list = ["GOOD WILL;PPT-1830;", "HEWLETT-PACKARD,E3631A,", "Agilent Technologies,66319D"]
# WCDMA attributes
#channel list
WCDMA_B1_DL_ch = [10562, 10700, 10838]
WCDMA_B1_UL_ch = [9612, 9750, 9888]
WCDMA_B2_DL_ch = [9662, 9800,9938]
WCDMA_B2_UL_ch = [9262, 9400, 9538]
WCDMA_B4_DL_ch = [1537, 1675, 1738]
WCDMA_B4_UL_ch = [1312, 1450, 1513]
WCDMA_B5_DL_ch = [4357, 4400, 4458]
WCDMA_B5_UL_ch = [4132, 4175, 4233]
WCDMA_B8_DL_ch = [2937, 3013, 3088]
WCDMA_B8_UL_ch = [2712, 2788, 2863]
WCDMA_B9_DL_ch = [9237, 9312, 9387]
WCDMA_B9_UL_ch = [8762, 8837, 8912]
WCDMA_B19_DL_ch = [712, 738, 763]
WCDMA_B19_UL_ch = [312, 338, 363]
#band-channel mapping
Band_DL_ch_map = dict(B1=WCDMA_B1_DL_ch, B2=WCDMA_B2_DL_ch,
B4=WCDMA_B4_DL_ch, B5=WCDMA_B5_DL_ch,
B8=WCDMA_B8_DL_ch, B9=WCDMA_B9_DL_ch, B19=WCDMA_B19_DL_ch)
Band_UL_ch_map = dict(B1=WCDMA_B1_UL_ch, B2=WCDMA_B2_UL_ch,
B4=WCDMA_B4_UL_ch, B5=WCDMA_B5_UL_ch,
B8=WCDMA_B8_UL_ch, B9=WCDMA_B9_UL_ch, B19=WCDMA_B19_UL_ch)
# LTE attributes
# channel list
LTE_B1_DL_ch_5M = [25, 300, 575]
LTE_B1_UL_ch_5M = [18025, 18300, 18575]
LTE_B2_DL_ch_5M = [625, 900, 1175]
LTE_B2_UL_ch_5M = [18625, 18900, 19175]
LTE_B3_DL_ch_5M = [1225, 1575, 1925]
LTE_B3_UL_ch_5M = [19225, 19575, 19925]
LTE_B4_DL_ch_5M = [1975, 2175, 2375]
LTE_B4_UL_ch_5M = [19975, 20175, 20375]
LTE_B5_DL_ch_5M = [2425, 2525, 2625]
LTE_B5_UL_ch_5M = [20425, 20525, 20625]
LTE_B7_DL_ch_5M = [2775, 3100, 3425]
LTE_B7_UL_ch_5M = [20775, 21100, 21425]
LTE_B8_DL_ch_5M = [3475, 3625, 3775]
LTE_B8_UL_ch_5M = [21475, 21625, 21775]
LTE_B11_DL_ch_5M = [4775, 4850, 4925]
LTE_B11_UL_ch_5M = [22775, 22850, 22925]
LTE_B13_DL_ch_5M = [5205, 5230, 5255]
LTE_B13_UL_ch_5M = [23205, 23230, 23255]
LTE_B17_DL_ch_5M = [5755, 5790, 5825]
LTE_B17_UL_ch_5M = [23755, 23790, 23825]
LTE_B19_DL_ch_5M = [6025, 6075, 6125]
LTE_B19_UL_ch_5M = [24025, 24075, 24125]
LTE_B20_DL_ch_5M = [6175, 6300, 6425]
LTE_B20_UL_ch_5M = [24175, 24300, 24425]
LTE_B21_DL_ch_5M = [6475, 6525, 6575]
LTE_B21_UL_ch_5M = [24475, 24525, 24575]
LTE_B25_DL_ch_5M = [8065, 8365, 8665]
LTE_B25_UL_ch_5M = [26065, 26365, 26665]
LTE_B26_DL_ch_5M = [8715, 8865, 9015]
LTE_B26_UL_ch_5M = [26715, 26865, 27015]
LTE_B28A_DL_ch_5M = [9235, 9335, 9434]
LTE_B28A_UL_ch_5M = [27235, 27335, 27434]
LTE_B28B_DL_ch_5M = [9435, 9535, 9635]
LTE_B28B_UL_ch_5M = [27435, 27535, 27635]
LTE_B30_DL_ch_5M = [9795, 9820, 9845]
LTE_B30_UL_ch_5M = [27685, 27710, 27735]
# band-channel mapping
LTE_Band_DL_ch_map_5M = dict(B1=LTE_B1_DL_ch_5M, B2=LTE_B2_DL_ch_5M, B3=LTE_B3_DL_ch_5M, B4=LTE_B4_DL_ch_5M, B5=LTE_B5_DL_ch_5M, B7=LTE_B7_DL_ch_5M,
B8=LTE_B8_DL_ch_5M, B11=LTE_B11_DL_ch_5M, B13=LTE_B13_DL_ch_5M, B17=LTE_B17_DL_ch_5M,
B19=LTE_B19_DL_ch_5M, B20=LTE_B20_DL_ch_5M, B21=LTE_B21_DL_ch_5M, B25=LTE_B25_DL_ch_5M,
B26=LTE_B26_DL_ch_5M, B281=LTE_B28A_DL_ch_5M, B282=LTE_B28B_DL_ch_5M, B30=LTE_B30_DL_ch_5M)
LTE_Band_UL_ch_map_5M = dict(B1=LTE_B1_UL_ch_5M, B2=LTE_B2_UL_ch_5M, B3=LTE_B3_UL_ch_5M, B4=LTE_B4_UL_ch_5M, B5=LTE_B5_UL_ch_5M, B7=LTE_B7_UL_ch_5M,
B8=LTE_B8_UL_ch_5M, B11=LTE_B11_UL_ch_5M, B13=LTE_B13_UL_ch_5M, B17=LTE_B17_UL_ch_5M,
B19=LTE_B19_UL_ch_5M, B20=LTE_B20_UL_ch_5M, B21=LTE_B21_UL_ch_5M, B25=LTE_B25_UL_ch_5M,
B26=LTE_B26_UL_ch_5M, B281=LTE_B28A_UL_ch_5M, B282=LTE_B28B_UL_ch_5M, B30=LTE_B30_UL_ch_5M)
# GSM attributes
# channel list
GSM_EGSM_DL_ch = [975, 37, 124]
GSM_EGSM_UL_ch = GSM_EGSM_DL_ch
GSM_GSM850_DL_ch = [128, 190, 251]
GSM_GSM850_UL_ch = GSM_GSM850_DL_ch
GSM_DCS_DL_ch = [512, 700, 885]
GSM_DCS_UL_ch = GSM_DCS_DL_ch
GSM_PCS_DL_ch = [512, 661, 810]
GSM_PCS_UL_ch = GSM_PCS_DL_ch
# band-channel mapping
GSM_Band_DL_ch_map = dict(EGSM=GSM_EGSM_DL_ch, GSM850=GSM_GSM850_DL_ch, DCS=GSM_DCS_DL_ch, PCS=GSM_PCS_DL_ch)
GSM_Band_UL_ch_map = GSM_Band_DL_ch_map
# C2k attributes
# channel list
CDMA_BC0_DL_ch = [1013, 384, 777]
CDMA_BC0_UL_ch = CDMA_BC0_DL_ch
CDMA_BC1_DL_ch = [25, 600, 1175]
CDMA_BC1_UL_ch = CDMA_BC1_DL_ch
CDMA_BC10_DL_ch = [476, 562, 684]
CDMA_BC10_UL_ch = CDMA_BC10_DL_ch
# band-channel mapping
CDMA_Band_DL_ch_map = dict(BC0=CDMA_BC0_DL_ch, BC1=CDMA_BC1_DL_ch, BC10=CDMA_BC10_DL_ch)
CDMA_Band_UL_ch_map = CDMA_Band_DL_ch_map
# Below is QMSL defined variable
# Just copy from QLib_Defines.h. It should be better way to include or reference, but I don't know at this moment.
# Definition of the COM port value that will be used to "auto detect" the COM port
QLIB_COM_AUTO_DETECT = 0xFFFF
# Phone modes
MODE_OFFLINE_A_F = 0 #Go to offline analog
MODE_OFFLINE_D_F = 1 #Go to offline digital
MODE_RESET_F = 2 #Reset. Only exit from offline
MODE_FTM_F = 3 #FTM mode
MODE_ONLINE_F = 4 #Go to Online
MODE_LPM_F = 5 #Low Power Mode (if supported)
MODE_POWER_OFF_F = 6 #Power off (if supported)
MODE_MAX_F = 7 #Last (and invalid) mode enum value
# Phone logging settings
LOG_NOTHING = 0x0000 # log nothing
LOG_C_HIGH_LEVEL_START = 0x0200 # High level C function start, indicates the begining of a high level C function, which
# calls other low level C functions internal to the library
LOG_C_HIGH_LEVEL_STOP = 0x4000 # High level C function stop
LOG_IO = 0x0001 # data IO (data bytes)
LOG_FN = 0x0002 # function calls with parameters
LOG_RET = 0x0004 # function return data
LOG_INF = 0x0008 # general information (nice to know)--do not use this one, as
# this space needs to be reserved for async messages
LOG_ASYNC = 0x0008 # asynchronous messages
LOG_ERR = 0x0010 # critical error information
LOG_IO_AHDLC = 0x0020 # HDLC IO tracing (data bytes)
LOG_FN_AHDLC = 0x0040 # HDLC layer function calls
LOG_RET_AHDLC = 0x0080 # HDLC function return data
LOG_INF_AHDLC = 0x0100 # HDLC general information
LOG_ERR_AHDLC = LOG_INF_AHDLC # HDLC Error info merged with LOG_INF_AHDLC, to free up the log bit
LOG_IO_DEV = 0x0400 # device IO tracing (data bytes)
LOG_FN_DEV = 0x0800 # device layer function calls
LOG_RET_DEV = 0x1000 # device function return data
LOG_INF_DEV = 0x2000 # device general information
LOG_ERR_DEV = LOG_INF_DEV # device error information, merged with LOG_INF_DEV to free up the log bit
LOG_DEFAULT = (LOG_C_HIGH_LEVEL_START|LOG_C_HIGH_LEVEL_STOP|LOG_FN|LOG_IO|LOG_RET|LOG_ERR|LOG_ASYNC) # default settings
LOG_ALL = 0xFFFF # everything
# Set FTM Mode
FTM_MODE_ID_CDMA_1X = 0
FTM_MODE_ID_WCDMA = 1
FTM_MODE_ID_GSM = 2
FTM_MODE_ID_CDMA_1X_RX1 = 3
FTM_MODE_ID_BLUETOOTH = 4
FTM_MODE_ID_CDMA_1X_CALL= 7
FTM_MODE_ID_LOGGING = 9
FTM_MODE_ID_AGPS = 10
FTM_MODE_ID_PMIC = 11
FTM_MODE_GSM_BER = 13
FTM_MODE_ID_AUDIO = 14
FTM_MODE_ID_CAMERA = 15
FTM_MODE_WCDMA_BER = 16
FTM_MODE_ID_GSM_EXTENDED_C = 17
FTM_MODE_CDMA_API_V2 = 18
FTM_MODE_ID_MF_C = 19
FTM_MODE_RF_COMMON = 20
FTM_MODE_WCDMA_RX1 = 21
FTM_MODE_ID_LTE = 29 # LTE FTM Calibration
FTM_MODE_LTE_NS = 30 # LTE FTM Non-Signaling
FTM_MODE_CDMA_C2 = 32
FTM_MODE_CDMA_C3 = 40
FTM_MODE_CDMA_C4 = 45
FTM_MODE_ID_PRODUCTION = 0x8000
FTM_MODE_ID_LTM = 0x8001 # LTM
# For FTM Mode/Band setting
PHONE_MODE_FM = 1 #(FM)
PHONE_MODE_SLEEP = 2 #(Sleep Mode)
PHONE_MODE_GPS = 3 #(GPS)
PHONE_MODE_GPS_SINAD = 4 #(GPS SINAD)
PHONE_MODE_CDMA_800 = 5 #(CDMA 800)
PHONE_MODE_CDMA_1900 = 6 #(CDMA 1900)
PHONE_MODE_CDMA_1800 = 8 #(CDMA 1800)
PHONE_MODE_J_CDMA = 14 #(JCDMA)
PHONE_MODE_CDMA_450 = 17 #(CDMA 450)
PHONE_MODE_CDMA_IMT = 19 #(CDMA IMT)
PHONE_MODE_CDMA_1900_EXT = 26 # Secndary CDMA 1900MHz Band, Band Class 14
PHONE_MODE_CDMA_450_EXT = 27 # CDMA BC 11 (450 Extension)
PHONE_MODE_CDMA_800_SEC = 33 # Secondary CDMA 800MHz Band, Band Class 10
PHONE_MODE_WCDMA_IMT =9 #(WCDMA IMT, Band I)
PHONE_MODE_GSM_900 =10 #(GSM 900)
PHONE_MODE_GSM_1800 =11 #(GSM 1800)
PHONE_MODE_GSM_1900 =12 #(GSM 1900)
PHONE_MODE_WCDMA_1900A =15 #(WCDMA 1900 A, Band II Add)
PHONE_MODE_WCDMA_1900B =16 #(WCDMA 1900 B, Band II Gen)
PHONE_MODE_GSM_850 =18 #(GSM 850)
PHONE_MODE_WCDMA_800 =22 #(WCDMA 800, Band V Gen)
PHONE_MODE_WCDMA_800A =23 #(WCDMA 800, Band V Add)
PHONE_MODE_WCDMA_1800 =25 #(WCDMA 1800, Band III)
PHONE_MODE_WCDMA_BC4 =28 #(WCDMA BC4-used for both Band IV Gen and Band IV Add)
PHONE_MODE_WCDMA_BC8 =29 #(WCDMA BC8, Band VIII)
PHONE_MODE_MF_700 =30 #(MediaFLO)
PHONE_MODE_WCDMA_BC9 =31 #(WCDMA BC9 (1750MHz & 1845MHz), Band IX)
PHONE_MODE_CDMA_BC15 =32 #(CDMA Band Class 15)
PHONE_MODE_LTE_B1 =34 #(LTE Band Class 1)
PHONE_MODE_LTE_B7 =35 #(LTE Band Class 7)
PHONE_MODE_LTE_B4 =42 #(LTE Band Class 4)
PHONE_MODE_LTE_B11 =41 #(LTE Band Class 11)
PHONE_MODE_LTE_B13 =36 #(LTE Band Class 13)
PHONE_MODE_LTE_B17 =37 #(LTE Band Class 17)
PHONE_MODE_LTE_B38 =38 #(LTE Band Class 38)
PHONE_MODE_LTE_B40 =39 #(LTE Band Class 40)
PHONE_MODE_WCDMA_1500 =40
PHONE_MODE_LTE_B11 = 41
PHONE_MODE_LTE_B2=43
PHONE_MODE_LTE_B3=44
PHONE_MODE_LTE_B5=45
PHONE_MODE_LTE_B6=46
PHONE_MODE_LTE_B8=47
PHONE_MODE_LTE_B9=48
PHONE_MODE_LTE_B10=49
PHONE_MODE_LTE_B12=50
PHONE_MODE_LTE_B14=51
PHONE_MODE_LTE_B15=52
PHONE_MODE_LTE_B16=53
PHONE_MODE_LTE_B18=54
PHONE_MODE_LTE_B19=55
PHONE_MODE_LTE_B20=56
PHONE_MODE_LTE_B21=57
PHONE_MODE_LTE_B22=58
PHONE_MODE_LTE_B23=59
PHONE_MODE_LTE_B24=60
PHONE_MODE_LTE_B25=61
PHONE_MODE_LTE_B26=62
PHONE_MODE_LTE_B27=63
PHONE_MODE_LTE_B28=64
PHONE_MODE_LTE_B29=65
PHONE_MODE_LTE_B30=66
PHONE_MODE_LTE_B31=67
PHONE_MODE_LTE_B32=68
PHONE_MODE_LTE_B33=69
PHONE_MODE_LTE_B34=70
PHONE_MODE_LTE_B35=71
PHONE_MODE_LTE_B36=72
PHONE_MODE_LTE_B37=73
PHONE_MODE_LTE_B39=74
PHONE_MODE_WCDMA_BC19=75
PHONE_MODE_LTE_B41=76
#TDSCDMA reserves 90 - 99
PHONE_MODE_TDSCDMA_B34=90
PHONE_MODE_TDSCDMA_B39=91
PHONE_MODE_TDSCDMA_B40=92
PHONE_MODE_MAX =255 #(Last possible value, not a valid mode)
# LTE Bandwidth
RFCOM_BW_LTE_1P4MHz = 0
RFCOM_BW_LTE_3MHz = 1
RFCOM_BW_LTE_5MHz = 2
RFCOM_BW_LTE_10MHz = 3
RFCOM_BW_LTE_15MHz = 4
RFCOM_BW_LTE_20MHz = 5
#GSM TX DataSources Enum
FTM_GSM_TX_DATA_SOURCE_PSDRND = 0 #Pseudorandom
FTM_GSM_TX_DATA_SOURCE_TONE = 1 #Single tone
FTM_GSM_TX_DATA_SOURCE_BUFFER = 2 #Buffer
FTM_GSM_TX_DATA_SOURCE_TWOTONE = 3 #2 tone
#Band-QMSL variable mapping
Band_QMSL_map = dict(B1=PHONE_MODE_WCDMA_IMT, B2=PHONE_MODE_WCDMA_1900B,
B4=PHONE_MODE_WCDMA_BC4, B5=PHONE_MODE_WCDMA_800, B8=PHONE_MODE_WCDMA_BC8,
B9=PHONE_MODE_WCDMA_BC9,B19=PHONE_MODE_WCDMA_BC19)
LTE_Band_QMSL_map = dict(B1=PHONE_MODE_LTE_B1, B2=PHONE_MODE_LTE_B2, B3=PHONE_MODE_LTE_B3, B4=PHONE_MODE_LTE_B4, B5=PHONE_MODE_LTE_B5, B7=PHONE_MODE_LTE_B7,
B8=PHONE_MODE_LTE_B8, B11=PHONE_MODE_LTE_B11, B13=PHONE_MODE_LTE_B13, B17=PHONE_MODE_LTE_B17,
B19=PHONE_MODE_LTE_B19, B20=PHONE_MODE_LTE_B20, B21=PHONE_MODE_LTE_B21, B25=PHONE_MODE_LTE_B25,
B26=PHONE_MODE_LTE_B26, B281=PHONE_MODE_LTE_B28, B282=PHONE_MODE_LTE_B28, B30=PHONE_MODE_LTE_B30)
GSM_Band_QMSL_map = dict(EGSM=PHONE_MODE_GSM_900, GSM850=PHONE_MODE_GSM_850, DCS=PHONE_MODE_GSM_1800, PCS=PHONE_MODE_GSM_1900)
CDMA_Band_QMSL_map = dict(BC0=PHONE_MODE_CDMA_800, BC1=PHONE_MODE_CDMA_1900, BC10=PHONE_MODE_CDMA_800_SEC)
#Anritsu 8820C CALL Status
ANRITSU_OFF = 0 #Call processing function set to Off
ANRITSU_IDLE = 1 #Idle state
ANRITSU_IDLE_REGIST = 2 #Idle( Regist ) Idle state (location registered)
ANRITSU_REGIST = 3 # Under location registration
ANRITSU_ORIGIN = 4 # Origination from a terminal
ANRITSU_TERMIN = 5 # Origination from the MT8815B/MT8820B (network)
ANRITSU_COMMUN = 6 # Under communication
ANRITSU_LOOP_1 = 7 # Loopback mode 1
ANRITSU_LOOP_1_OPEN = 8 # Loopback mode 1 open
ANRITSU_LOOP_1_CLOSE = 9 # Loopback mode 1 close
ANRITSU_LOOP_2 = 10 # Loopback mode 2
ANRITSU_LOOP_2_OPEN = 11 # Loopback mode 2 open
ANRITSU_LOOP_2_CLOSE = 12 # Loopback mode 2 close
ANRITSU_HAND = 13 # Under handover
ANRITSU_NW_RELEASE = 14 # Release by the MT8815B/MT8820B (network)
ANRITSU_UE_RELEASE = 15 # Release by a terminal
ANRITSU_OTHER = 16 # Other