2 * (C) 2010 by Andreas Eversberg <jolly@eversberg.eu>
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License along
17 * with this program; if not, write to the Free Software Foundation, Inc.,
18 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
26 #include <osmocom/osmocom_data.h>
28 void gsm_support_init(struct osmocom_ms *ms)
30 struct gsm_support *sup = &ms->support;
33 memset(sup, 0, sizeof(*sup));
35 /* rf power capability */
36 sup->pwr_lev_900 = 3; /* CLASS 4: Handheld 2W */
37 sup->pwr_lev_1800 = 0; /* CLASS 1: Handheld 1W */
38 /* controlled early classmark sending */
39 sup->es_ind = 0; /* no */
41 sup->rev_lev = 1; /* phase 2 mobile station */
43 sup->vgcs = 0; /* no */
45 sup->vbs = 0; /* no */
47 sup->sms_ptp = 1; /* yes */
48 /* screening indicator */
49 sup->ss_ind = 1; /* phase 2 error handling */
50 /* pseudo synchronised capability */
51 sup->ps_cap = 0; /* no */
52 /* CM service prompt */
53 sup->cmsp = 0; /* no */
55 sup->solsa = 0; /* no */
56 /* location service support */
57 sup->lcsva = 0; /* no */
58 sup->loc_serv = 0; /* no */
60 sup->a5_1 = 0; /* currently not */
68 sup->p_gsm = 1; /* P-GSM only */
69 sup->e_gsm = 0; /* E-GSM */
70 sup->r_gsm = 0; /* R-GSM */
72 sup->low_capa = 4; /* p,e,r power class */
74 /* set supported frequencies */
75 if (sup->e_gsm || sup->r_gsm)
76 sup->freq_map[0] |= 1;
77 if (sup->p_gsm || sup->e_gsm || sup->r_gsm)
78 for(i = 1; i <= 124; i++)
79 sup->freq_map[i >> 3] |= (1 << (i & 7));
81 for(i = 512; i <= 885; i++)
82 sup->freq_map[i >> 3] |= (1 << (i & 7));
84 for(i = 975; i <= 1023; i++)
85 sup->freq_map[i >> 3] |= (1 << (i & 7));
86 // for(i = 978; i <= 978; i++)
87 // sup->freq_map[i >> 3] |= (1 << (i & 7));
89 for(i = 955; i <= 1023; i++)
90 sup->freq_map[i >> 3] |= (1 << (i & 7));
91 sup->dcs_capa = 1; /* dcs power class */
92 /* multi slot support */
93 sup->ms_sup = 0; /* no */
95 sup->ucs2_treat = 0; /* default */
96 /* support extended measurements */
97 sup->ext_meas = 0; /* no */
98 /* support switched measurement capability */
99 sup->meas_cap = 0; /* no */
104 sprintf(sup->imei, "000000000000000");
105 sprintf(sup->imeisv, "0000000000000000");
108 sup->min_rxlev_db = -60; // TODO
109 sup->sync_to = 6; /* how long to wait sync (0.9 s) */
110 sup->scan_to = 4; /* how long to wait for all sysinfos (>=4 s) */
113 /* (3.2.1) maximum channels to scan within each band */
114 struct gsm_support_scan_max gsm_sup_smax[] = {
123 // { 955, 125, 1, 0 }, /* we support only one ARFCN */