Anybody using a BTS for debugging?

Mohammad Hosein mhtajik at gmail.com
Thu May 19 16:39:04 UTC 2011


most of the test systems are not built to be used for on-air operations .
the ones that offer such features must be used in Shield rooms where no
signal gets in or out . these rooms are expensive but usually tech
universities have some rental hours for their shield and antenna rooms . its
expensive as well , otherwise you are probably going to have some conflict
with local regulatory sooner or later
regards

On Thu, May 19, 2011 at 9:04 PM, Gianni Tedesco <gianni at scaramanga.co.uk>wrote:

> On Fri, 2011-05-13 at 15:00 +0430, Mohammad Hosein wrote:
> > you could use most GSM test systems for such purpose . on ebay you
> > might find very cheap ones
> > regards
>
> I managed to track down a Racal 6103. It should arrive in next couple of
> days.
>
> As a followup question then, I guess that these are intended for wired
> rf connection or at least they transmit at very low power, and tell the
> phone to do the same.
>
> However, one would feel a lot better using a channel unused by other
> cells in my location. I've been using cell_log to put together a list of
> active ARFCN's that my handset receives broadcasts from. Script for
> parsing cell_log logs is attached.
>
> Am I to conclude that if cell_log hasn't dumped:
>
> [sysinfo]
> arfcn 99
>
> for example, after running for a reasonably long period of time (say
> 24hrs) that operating test equipment on channel 99 should be safe?
>
> Gianni
>
> --
>
> #!/usr/bin/python
>
> def getline(f):
>        while True:
>                l = f.readline()
>                if not l:
>                        raise StopIteration
>                l = l.rstrip('\r\n')
>                if not l:
>                        continue
>                yield l
> def bsic(v):
>        (a,b) = v.split(',')
>        return (int(a),int(b))
>
> def hexdump(v):
>        ret = bytearray()
>        for x in v.split():
>                ret.append(int(x, 16))
>        return ret
>
> class Parser:
>        pass
>
> class Power(Parser):
>        def line(self, s):
>                return
>
> class mcc:
>        tbl = {0x234: 'UK and Northern Ireland'}
>        def __init__(self, num):
>                x = ((num & 0xf00) >> 8,
>                        (num & 0xf000) >> 12,
>                        (num & 0xf))
>                self.val = (x[0] << 8) | x[1] << 4 | x[2]
>        def __int__(self):
>                return self.val
>        def __str__(self):
>                return self.tbl.get(self.val, '%.3x'%self.val)
>
> class mnc:
>        tbl = {0x15: 'Vodafone',
>                0x30: 'T-Mobile',
>                0x10: 'O2',
>                0x33: 'Orange',
>                }
>        def __init__(self, num):
>                x = ((num & 0xf0) >> 4,
>                        (num & 0xf))
>                self.val = (x[1] << 4) | x[0]
>        def __int__(self):
>                return self.val
>        def __str__(self):
>                return self.tbl.get(self.val, '%.2x'%self.val)
>
> class SystemInfo:
>        pass
>
> class SystemInfo3(SystemInfo):
>        def __init__(self, b):
>                if isinstance(b, str):
>                        b = hexdump(b)
>                assert(b[0] > 9) # len
>                assert(b[1] == 0x06) # discr
>                assert(b[2] == 0x1b) # sysinfo3
>                self.cell = (b[3] << 8) | b[4]
>                self.mcc = mcc((b[5] << 8) | b[6])
>                self.mnc = mnc(b[7])
>                self.lac = (b[8] << 8) | b[9]
>        def __str__(self):
>                return 'Cell(%s, %s)'%(self.mcc,self.mnc)
>
> class SystemInfo4(SystemInfo):
>        def __init__(self, b):
>                if isinstance(b, str):
>                        b = hexdump(b)
>                assert(b[0] > 7) # len
>                assert(b[1] == 0x06) # discr
>                assert(b[2] == 0x1c) # sysinfo4
>                self.cell = None
>                self.mcc = mcc((b[3] << 8) | b[4])
>                self.mnc = mnc(b[5])
>                self.lac = (b[6] << 8) | b[7]
>        def __str__(self):
>                return 'Cell(%s, %s)'%(self.mcc,self.mnc)
>
> class Sysinfo(Parser):
>        _keys = {'arfcn':int,
>                'time':int,
>                'rxlev':int,
>                'bsic':bsic,
>                'si1':hexdump,
>                'si2':hexdump,
>                'si2bis':hexdump,
>                'si2ter':hexdump,
>                'si3':SystemInfo3,
>                'si4':SystemInfo4,
>                'ta':int}
>        def line(self, s):
>                (k,v) = s.split(None, 1)
>                if self._keys.has_key(k):
>                        setattr(self, k, self._keys[k](v))
>                else:
>                        print k, v
>                return
>
> class RFMap:
>        arfcns = {}
>        cells = {}
>        def commit(self, obj):
>                if isinstance(obj, Sysinfo):
>                        self.arfcns.setdefault(obj.arfcn, {})
>                        self.arfcns[obj.arfcn][str(obj.si3.mnc)] = None
>                        self.arfcns[obj.arfcn][str(obj.si4.mnc)] = None
>
>                        self.cells.setdefault(obj.si3.cell, {})
>                        self.cells[obj.si3.cell][str(obj.si3.mnc)] = None
>                elif isinstance(obj, Power):
>                        return
>                assert(isinstance(obj, Parser))
>
> def rf_map(f):
>        smap = {'[power]':Power, '[sysinfo]':Sysinfo}
>        obj = None
>        m = RFMap()
>
>        for x in getline(f):
>                if x[0] == '[':
>                        if obj is not None:
>                                m.commit(obj)
>                        obj = smap[x]()
>                        continue
>                if obj is None:
>                        raise ValueError, 'Bad state'
>                obj.line(x)
>
>        if obj is not None:
>                m.commit(obj)
>
>        print 'Active ARFCNs:'
>        x = m.arfcns.keys()
>        x.sort()
>        for i in x:
>                print ' %4d:'%i, ','.join(m.arfcns[i])
>        print
>
>        print 'Active Cells:'
>        x = m.cells.keys()
>        x.sort()
>        for i in x:
>                print ' 0x%.4x'%i, ','.join(m.cells[i])
>        print
>
> def main(argv):
>        if len(argv) > 1:
>                infile = open(argv[1])
>        else:
>                from sys import stdin
>                infile = stdin
>
>        rf_map(infile)
>        return 0
>
> if __name__ == '__main__':
>        from sys import argv
>        raise SystemExit, main(argv)
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osmocom.org/pipermail/baseband-devel/attachments/20110519/ec02312f/attachment.html>


More information about the baseband-devel mailing list