Configuración de la BTS
Contents
Conectando las antenas:
La antena de transmisión deberá ser de doble banda/ la recepción no importa
Recomendamos utilizar un atenuador como este [1]. O dejar que la BTS emita algo de radiación hasta que puedas lograr apagar los amplificadores!!!
En la computadora que utilizas para la configuración
Crea una conexión compartida de ethernet: establece la configuración ipv4 como "Compartida con otras computadoras"
Obten las 2 ips de la BTS:
arp -n #muestra la tabla de arp
prende la bts - al hacerlo se asignarán ip's a la BTS
arp-n # mostrará 2 ip's nuevas, probablemente en eth0 (recuerda que cada caja tiene 2 bts)
ipaccess-find puede utilizarse para encontrar BTS's en una interface:
$ ipaccess-find eth0 ipaccess-find (C) 2009 by Harald Welte This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY Trying to find ip.access BTS by broadcast UDP... MAC_Address='24:62:78:00:00:5a' IP_Address='192.168.0.80' Serial_Number='162' Unit_ID='sysmoBTS 1002'
entra en la BTS:
ssh root@IP #cualquiera de las direcciones IP que obtuviste la segunda vez que escribiste arp -n
sbts2050-util
checa el estatus de encendido o apagado:
sbts2050-util sbts2050-pwr-status
por ejemplo:
root@NTQ0107973S:~# sbts2050-util sbts2050-pwr-status Main Supply :(ON) [(24.00)Vdc, 1.34 A] Master SF : ON [ 4.97 Vdc, 0.97 A] Slave SF : ON [ 4.97 Vdc, 0.91 A] Power Amp : ON [ 24.75 Vdc, 0.77 A] PA Bias: ON [ 9.00 Vdc, ---- A]
(este amplificador esta encendido se indica con la palabra ON)
apaga el amplificador
sbts2050-util sbts2050-pwr-enable 1 1 0 #1 1 0 = el amplificador del master slave
Para que el amplificador este apagado esto debe aparecer como se muestra a continuación:
root@NTQ0107973S:~# sbts2050-util sbts2050-pwr-status Main Supply :(ON) [(24.00)Vdc, 0.56 A] Master SF : ON [ 4.94 Vdc, 0.98 A] Slave SF : ON [ 4.97 Vdc, 0.91 A] Power Amp : OFF [ 10.75 Vdc, 0.05 A] PA Bias: OFF [ 0.00 Vdc, ---- A] #significa que el amplificador esta apagado OFF!
sbts2050-util sbts2050-temp
- durante el disgnóstico : 75 C es una tenperatura muy alta, 50-60 C es normal
sysmobts-util :
Esta es la interface de línea de comando de sysmoBTS :
sysmobts-util trx-nr #muestra en cuál transreceptor estamos (0 master, 1 slave)
Posibles nombres de paŕametros: ethaddr clk-factory temp-dig-max temp-rf-max serial-nr hours-running boot-count key model-nr model-flags trx-nr
Corre el script
En la computadora que utilizas para configurar la BTS, copia el siguiente código en el archivo llamado setup-bts.py
#!/usr/bin/fab -f """ Rhizomatica BTS Toolkit Automate maintenance on the BTS """ import sys from fabric.api import env, run, task def ssh(): env.user = 'root' env.password = '' @task def setup(): ssh() run('sbts2050-util sbts2050-pwr-enable 1 1 0') run('sed -i s/NO_START=0/NO_START=1/ /etc/default/osmo-nitb') run('mv /etc/rc5.d/S90gprs.sh /home/root/ || true') run('mv /etc/rc5.d/S30osmo-bsc /etc/rc5.d/K30osmo-bsc || true') run('mv /etc/rc5.d/S30osmo-bsc-mgcp /etc/rc5.d/K30osmo-bsc-mgcp || true') run('mv /etc/rc5.d/S30osmo-nitb /etc/rc5.d/K30osmo-nitb || true') run('sed -i -e "s/sysmobts-2050\/201208\//sysmobts-2050\/201208-testing\//g" /etc/opkg/*') run('opkg remove openggsn osmo-sgsn lcr') run('opkg update') run('opkg upgrade || true') run('opkg upgrade') trx_nr = int(run('sysmobts-util trx-nr')) osmo(trx_nr) network(trx_nr) def osmo(trx_nr): etc_osmo_bts = """ ! ! OsmoBTS () configuration saved from vty !! ! log stderr logging color 0 logging timestamp 0 logging level all everything logging level rsl info logging level oml info logging level rll notice logging level rr notice logging level meas notice logging level pag info logging level l1c info logging level l1p info logging level dsp debug logging level abis notice ! line vty no login ! bts 0 band 850 ipa unit-id 1000 %(trx_nr)d oml remote-ip 172.16.0.1 """ % {'trx_nr': trx_nr} run("echo '%s' > /etc/osmocom/osmo-bts.cfg" % (etc_osmo_bts,)) def network(trx_nr): if trx_nr == 0: ip = "172.16.0.11" # master else: ip = "172.16.0.12" # slave interfaces = """ auto lo iface lo inet loopback auto eth0 iface eth0 inet static address %s netmask 255.255.255.0 """ % (ip,) run("echo '%s' > /etc/network/interfaces" % (interfaces,)) @task(default=True) def help(): print "%s -H bts_ip setup" % (sys.argv[0],)
Conviértelo en archivo ejectuble y ejecutalo:
chmod +x setup-bts.py # convierte el script en ejecutable ./setup-bts.py -H btsip setup
espera un poco hasta que termine, una vez que termine haz lo mismo en la otra bts
una vez que ambos han terminado, entra como ssh en cada bts y reinicia ambas
Después del reinicio, las IP DHCP será reemplazada por una IP estática, para cada BTS: 172.16.0.11 y 172.16.0.12
La luz BTS estará prendida ahora solamente si la BSC esta conectada
Connect to web interface on the BSC:
Get the ip from Oaxaca (10.23.1.0/24) table at :new_network_scheme
eg. for Alotepec: 10.23.1.16/rai
admin:admin1
Copy keys to BTS from BSC
from inside BSC: ssh-copy-id root@172.16.0.11
NOW TEST IT!
☎☎ make some calls! ☎☎
Troubleshooting
Crashing network script:
Problem: Sometimes setup-bts.py has trouble with updating packages.
ssh into the BTS and run package scripts by hand:
opkg update
opkg upgrade
go back and run the script again.
Quick and dirty fix
That is caused by some SSL/HTTPS misconfiguration. Quick and dirty way to fix it:
sed -i -e 's/https/http/g' /etc/opkg/*.conf
Malconfigured IP Address (still looking for IP via DHCP)
How to look for DHCP and/or ARP packets:
tcpdump -v -n -i eth1 port 67 or port 68 or arp
Configure the 172.16.0.0/24 network in /etc/dhcp/dhcpd.conf, rebooted the secondary BTS, it might have something like 172.16.0.100 assigned. Ssh into it, configure /etc/network/interfaces manually, adding:
gateway 172.16.0.1
as the last line. also:
echo "nameserver 8.8.8.8" > /etc/resolv.conf
Reboot it, then copy setup-bts.py on the BSC and run it against the secondary BTS (who was now on 172.16.0.2).
BTS Can't get to the internets - opkg fails
Check if BTS can connect:
ping 8.8.8.8
BTS probably needs a gateway:
change ip to 192.168.x.x range (if that's a succesful gateway - try route -n on a computer with working internet)
ifconfig eth0 192.168.0.49
reconnect again with the new ip:
ssh root@192.168.0.49
now add a gateway on the same subnet that works:
route add default gw 192.168.0.1
you might want add nameserveer to resolve.conf:
vi /etc/resolv.conf
add:
nameserver 8.8.8.8
now try to ping google or run opkg update.
If it works, run the setup script at the new ip:
./setup-bts.py -H 192.168.0.49 setup