Вы находитесь на странице: 1из 16

16 de Agosto de 2012

Programao WEB
HTML > Java Script > A SP / A SP.NET > CGI / PERL > PHP
>
.

Sistemas Operacionais - Montando uma rede GSM COMO VOC CLA SSIFICA ESTA DICA ? Boa .

Design / Editores
.

Corel Draw Fire Works > Photo Shop > Flash > Dreanweaver > Front Page
> >
.

Obs.: Esse artigo tem fins educacionais. O uso do mesmo para outras atividades de inteira responsabilidade de quem o fizer. A rede GSM um sistema complexo composto por vrios componentes. A ltima milha desse sistema chamada de BTS (Base Transceiver Station). A BTS responsvel por transmitir e receber sinais de RF (Rdio Frequncia) para o usurio de terminais GSM (telefone celular, PDA, modem etc). As BTSs so controladas por uma BSC (Base Station Controller), que conectada ao MSC/VLR (Mobile Switching Center/Visitor Location Register). Basicamente, o MSC/VLR responsvel pela autenticao do usurio no banco de dados (HLR - Home Location Register, AuC - Authentication Center).

Programao Sistema
.

> >
.

C / C++ / C# Delphi / Pascal

Informtica
Hardware > Rede e Internet > Sistemas Operacionais
>

Estatsticas
Usurios no site: 1 Total de artigos: 3853

Atendimento
Estam os se m pre prontos para lhe ate nde r: A tendimento On-line Segunda Sexta 09:00 s 18:00

O projeto OpenBTS um esforo para construir uma aplicao de cdigo aberto usando um hardware de baixo custo, chamado USRP (Universal Software Radio Peripheral), para apresentar uma interface area GSM ("Um") para equipamentos compatveis, usando o PBX Asterisk para conectar as chamadas. O OpenBTS usa o hardware USRP para receber e transmitir a sinalizao GSM. Isso feito usando o framework GNU Radio. O Asterisk usado para fazer a interface entre as chamadas dos terminais GSM sobre a rede do OpenBTS. Qualquer outro dispositivo que possa ser conectado ao Asterisk tambm pode ser utilizado para fazer e receber chamadas. Linux: Montando uma rede GSM

O GNU Radio uma ferramenta livre para desenvolvimento que fornece um "runtime" de processamento de sinais para implementao de sistemas de rdio baseados em software usando hardware de RF de baixo custo (nesse caso o USRP). O USRP (Universal Software Radio Peripheral) um hardware desenvolvido pela Ettus Research que permite a computadores funcionarem com rdios de alta

www.hospedar-se.com/dicas/?dica=3214

1/16

pela Ettus Research que permite a computadores funcionarem com rdios de alta largura de banda. Na essncia, ele funciona com um circuito de banda bsica e FI (Frequncia Intermediria) de um sistema de radiocomunicao. Existem modelos de placas de RF que podem ser usadas com o USRP. No nosso caso, podemos usar a RFX900 para cobertura das bandas de 850 e 900 MHz ou a RFX1800 para cobertura das bandas de 1800 e 1900 MHz. Esse guia vai cobrir a instalao em uma mquina com GNU/Linux. altamente recomendvel seguir todos os requisitos de hardware e software cobertos nesse guia. Hardware: 01 - Computador (Core 2 Duo 2.0 GHz, 2GB RAM, porta USB); 01 - USRP-PKG (Kit USRP, que contm a placa-me, 2 cabos de RF, 1 cabo USB, Fonte de Alimentao e Caixa - custo USD 700); 02 - RFX900 para GSM 850/900 (Transceptor de 800 - 1000 MHz, sada de 200 mW - USD 275 cada); 02 - RFX1800 para GSM 1800/1900 (Transceptor de 1.5 - 2.1 GHz, sada de 100 mW - USD 275 cada); 02 - VERT900 (Antena para a RFX900 / RFX1800); 01 - Telefone celular destravado; 01 - SIM Card (de preferncia que possa ter a lista de rede editada). O hardware USRP e os componentes de RF podem ser encontrados diretamente na Ettus Research. Software: GNU/Linux - Ubuntu 8.04 - 32 bits; OpenBTS 2.3; GNURadio 3.1.3; C++ Boost 1.37.

Instalao do GNU Radio


a. Instalar as dependncias: $ sudo apt-get update $ sudo apt-get -y install swig g++ automake1.9 libtool python-dev libcppunit-dev sdcc libusb-dev libasound2-dev libsdl1.2-dev pythonwxgtk2.8 subversion guile-1.8-dev libqt4-dev ccache python-opengl libgsl0-dev python-cheetah python-lxml libqwt5-qt4-dev libqwtplot3d-qt4dev qt4-dev-tools fftw3-dev doxygen python-numpy-ext b. Baixar e instalar a biblioteca do C++ boost: $ wget http://kent.dl.sourceforge.net/sourceforge/boost/boost_1_37_0.tar.gz $ tar xvzf boost_1_37_0.tar.gz $ cd boost_1_37_0 $ BOOST_PREFIX=/opt/boost_1_37_0

www.hospedar-se.com/dicas/?dica=3214

2/16

$ BOOST_PREFIX=/opt/boost_1_37_0 $ ./configure --prefix=$BOOST_PREFIX --withlibraries=thread,date_time,program_options $ make $ sudo make install c. Baixar e instalar o GNU Radio: $ cd $ wget ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-3.1.3.tar.gz $ tar xvzf gnuradio-3.1.3.tar.gz $ cd gnuradio-3.1.3 $ ./configure --with-boost-include-dir=$BOOST_PREFIX/include/boost1_37/ $ make $ sudo make install $ sudo ldconfig d. Adicionar permisses para o usurio trabalhar com o USRP: $ sudo addgroup usrp $ sudo addgroup SEU_USURIO usrp $ echo 'ACTION=="add", BUS=="usb", SYSFS{idVendor}=="fffe", SYSFS{idProduct}=="0002", GROUP:="usrp", MODE:="0660"' > tmpfile $ sudo chown root.root tmpfile $ sudo mv tmpfile /etc/udev/rules.d/10-usrp.rules e. Testando o USRP: Reinicie o computador (deveria funcionar sem esse passo, mas mesmo depois de reinicializar o servio udev, o USRP s funcionava como root): $ sudo reboot Conectar o USRP na porta USB e testar a velocidade mxima da conexo: $ cd /usr/local/share/gnuradio/examples/usrp/ $ ./usrp_benchmark_usb.py
T e s t i n g2 M B / s e c . . .u s b _ t h r o u g h p u t=2 M n t o t a l =1 0 0 0 0 0 0 n r i g h t =9 9 8 4 3 5 r u n l e n g t h=9 9 8 4 3 5 d e l t a =1 5 6 5 O K T e s t i n g4 M B / s e c . . .u s b _ t h r o u g h p u t=4 M n t o t a l =2 0 0 0 0 0 0 n r i g h t =1 9 9 8 0 4 1 r u n l e n g t h=1 9 9 8 0 4 1 d e l t a =1 9 5 9 O K T e s t i n g8 M B / s e c . . .u s b _ t h r o u g h p u t=8 M n t o t a l =4 0 0 0 0 0 0 n r i g h t =3 9 9 9 2 7 2 r u n l e n g t h=3 9 9 9 2 7 2 d e l t a =7 2 8
www.hospedar-se.com/dicas/?dica=3214 3/16

O K T e s t i n g1 6 M B / s e c . . .u s b _ t h r o u g h p u t=1 6 M n t o t a l =8 0 0 0 0 0 0 n r i g h t =7 9 9 2 1 5 3 r u n l e n g t h=7 9 9 2 1 5 3 d e l t a =7 8 4 7 O K T e s t i n g3 2 M B / s e c . . .u s b _ t h r o u g h p u t=3 2 M n t o t a l =1 6 0 0 0 0 0 0 n r i g h t =1 5 9 8 6 2 3 9 r u n l e n g t h=1 5 9 8 6 2 3 9 d e l t a =1 3 7 6 1 O K M a xU S B / U S R Pt h r o u g h p u t=3 2 M B / s e c

Verifique se a velocidade de transferncia mxima da conexo USB 32 MB/seg.

Instalao do OpenBTS
a. Instalar as dependncias: $ cd $ sudo apt-get install asterisk libosip2-dev libortp7-* b. Baixar o cdigo fonte: O cdigo fonte est disponvel somente aos participantes da lista de discusso. necessrio inscrever-se na lista para conseguir a senha de acesso: http://openbts.sourceforge.net/ Depois de conseguir a senha baixe o cdigo fonte conforme abaixo: $ sftp openbts@kestrelsp.com password: "pegar_a_senha_na_lista" $ sftp> get openbts-2.3JeanLafitteOE.tar.gz $ Fetching /Users/openbts/openbts-2.3JeanLafitteOE.tar.gz to openbts2.3JeanLafitteOE.tar.gz $ exit c. Instalao: $ tar xvzf openbts-2.3JeanLafitteOE.tar.gz $ mv openbts-2.3JeanLafitte openbts-2.3 $ cd openbts-2.3 $ export LIBS=-lpthread $ ./configure $ make $ sudo make install Esse um passo muito importante. Depois de instalar todos os pacotes, hora de configurar o OpenBTS. Abra o arquivo apps/OpenBTS.config com um editor

www.hospedar-se.com/dicas/?dica=3214

4/16

de configurar o OpenBTS. Abra o arquivo apps/OpenBTS.config com um editor de sua preferncia. O GSM.MCC (Mobile Country Code) pode ser configurado de acordo com o seu pas. Uma tabela completa com os cdigos pode ser encontrada aqui. O GSM.MNC (Mobile Network Code) deve ser qualquer nmero entre 0 e 99, desde que ele no seja usado por uma operadora local. Uma maneira de verificar quais cdigos esto sendo usados pelas operadoras na sua regio procurar as redes disponveis usando o prprio telefone. Normalmente o cdigo mostrado no formato MCC-MNC (ex: 724-05). Isso significa que o pas o Brasil e o cdigo da operadora 05. O GSM.Band define a banda de GSM que o OpenBTS vai operar. O melhor usar uma banda no alocada na sua regio, mas algumas vezes isso no possvel. Se esse o seu caso, voc vai precisar usar um Analisador de Espectro para descobrir que banda possui espao livre. O link abaixo mostra a alocao de frequncia e canal nas bandas de GSM (OBS: O downlink a frequncia transmitida pela BTS, ento com essa que precisamos nos preocupar): GSM frequency ranges - Wikipedia Considerando que esse um projeto para construir uma BTS de baixo custo, voc provavelmente no ter um Analisador de Espectro. A boa notcia que o GNU Radio tem um Analisado de Espectro bem simples, mas que pode ser usado para verificar a alocao de banda e canal. Para us-lo, v para o diretrio de exemplos do GNU Radio e execute o usrp_wfm_rcv_pll.py: $ cd /usr/local/share/gnuradio/examples/usrp $ ./usrp_wfm_rcv_pll.py Podemos procurar dentro das bandas de GSM mudando a frequncia (campo "Freq:") para verificar um espao livre para operao. A figura abaixo mostra que os canais prximos a 938 MHz esto sendo utilizados. A opo de "Peak Hold" pode ser til nessa verificao: Linux: Montando uma rede GSM

A figura abaixo mostra que os canais prximos a frequncia de 937 MHz no esto sendo usados: Linux: Montando uma rede GSM

www.hospedar-se.com/dicas/?dica=3214

5/16

Agora podemos configurar o GSM.ARFCN (Absolute RF Channel). Essa aplicao WEB gera as tabelas de frequncias e canais para as 4 bandas GSM utilizadas no Brasil: arfcn-calculator - aubraux.com Para a faixa de 900 MHz, essa a tabela: Linux: Montando uma rede GSM

Para a freqncia de downlink de 937 MHz (da BTS para o telefone celular), o ARFCN 10. Segue abaixo meu arquivo OpenBTS.config: # Sample OpenBTS configuration file # Format of each line is. # The key name can contain no spaces. # Everything between the first space and the end of the line becomes the value. # Comments must start with "#" at the beginning of the line. # Blank lines are OK. # As a gerenal rule, non-valid configuration values will crash OpenBTS. # # Logging parameters # # The initial global logging level: ERROR, WARNING, NOTICE, INFO, DEBUG, DEEPDEBUG LogLevel INFO # The log file path. If not set, logging goes to stdout. # LogFileName test.out # # Transceiver parameters # # Transceiver interface # This TRX.IP is not really adjustable. Just leave it as 127.0.0.1.

www.hospedar-se.com/dicas/?dica=3214

6/16

# This TRX.IP is not really adjustable. Just leave it as 127.0.0.1. TRX.IP 127.0.0.1 # This value is hard-coded in the transcevier. Just leave it alone. TRX.Port 5700 # Path to transceiver binary TRX.Path ../Transceiver/transceiver # TRX logging. # Logging level. TRX.LogLevel ERROR # Logging file. If not defined, logs to stdout. # TRX.LogFileName test.out # # SIP, RTP, servers # # Asterisk PBX Asterisk.IP 127.0.0.1 Asterisk.Port 5060 # Messaging server Messenger.IP 127.0.0.1 Messenger.Port 5063 # Local SIP/RTP ports SIP.Port 5062 RTP.Start 16484 RTP.Range 98 # Local SMS port for short code delivery. SMSLoopback.Port 5064 # # Special extensions. # # Routing extension for emergency calls. # PBX.Emergency 2101 # # SIP parameters # # SIP registration period in seconds. # Ideally, this should be slightly longer than GSM.T3212. SIP.RegistrationPeriod 3600 # # SIP Internal Timers. All timer values are given in millseconds. # These are from RFC-3261 Table A. #
www.hospedar-se.com/dicas/?dica=3214 7/16

# SIP Timer A, the INVITE retry period, RFC-3261 Section 17.1.1.2 SIP.Timer.A 1000 # # SMS parameters # # ISDN address of source SMSC when we fake out a source SMSC. SMS.FakeSrcSMSC 0000 # ISDN address of destination SMSC when a fake value is needed. SMS.DefaultDestSMSC 0000 # The SMS HTTP gateway. # Comment out if you don't have one. # SMS.HTTP.Gateway api.clickatell.com # IF SMS.HTTP.Gateway IS DEFINED, SMS.HTTP.AccessString MUST ALSO BE DEFINED. # SMS.HTTP.AccessString sendmsg?user=xxxx&password=xxxx&api_id=xxxx # The "Welcome Message" is sent to uprovisioned handsets that try to register. # Comment out if you don't want this feature. # WELCOME MESSAGE MUST BE LESS THAN 161 CHARACTERS. # SMS.WelcomeMessage Welcome to OpenBTS # SMS.WelcomeMessage Your handset attempted to register with OpenBTS. # IF SMS.WelcomeMessage IS DEFINED, SMS.WelcomeShortCode MUST ALSO BE DEFINED. SMS.WelcomeShortCode 0000 # # GSM # # Network and cell identity. # Network Color Code, 0-7 GSM.NCC 0 # Basesation Color Code, 0-7 GSM.BCC 0 # Mobile Country Code, 3 digits. # MCC MUST BE 3 DIGITS. Prefix with 0s if needed. GSM.MCC 724 # Mobile Network Code, 2 or 3 digits. GSM.MNC 66 # Location Area Code, 0-65535 GSM.LAC 667 # Cell ID, 0-65535 GSM.CI 0 # Network "short name" to display on the handset. # SHORT NAME MUST BE LESS THAN 8 CHARACTERS. GSM.ShortName OpenBTS # Assignment type for call setup. # This is defined in an enum AssignmentType in GSMCommon.h.

www.hospedar-se.com/dicas/?dica=3214

8/16

# This is defined in an enum AssignmentType in GSMCommon.h. # 0=Early, 1=VeryEarly. GSM.AssignmentType 1 # Band and Frequency # Valid band values are 850, 900, 1800, 1900. GSM.Band 900 # Valid ARFCN range depends on the band. #GSM.ARFCN 29 GSM.ARFCN 10 # Downlink tx power level, dB wrt full power GSM.PowerAttenDB 0 # Beacon parameters. # L1 radio link timeout advertised on BCCH. # This is the RAW parameter sent on the BCCH. # See GSM 10.5.2.3 for encoding. # Value of 15 gives 64-frame timeout, about 30 seconds on the TCH. # This should be coordinated with T3109. GSM.RADIO_LINK_TIMEOUT 15 # Attach/detach flag. # Set to 1 to use attach/detach procedure, 0 otherwise. # This will make initial registration more prompt. # It will also cause an un-regstration if the handset powers off. GSM.ATT 1 # CCCH_CONF # See GSM 10.5.2.11 for encoding. # Value of 1 means we are using a C-V beacon. GSM.CCCH_CONF 1 # Maximum RACH retransmission attempts # This is the RAW parameter sent on the BCCH. # See GSM 04.08 10.5.2.29 for encoding. GSM.RACH.MaxRetrans 3 # Parameter to spread RACH busts over time. # This is the RAW parameter sent on the BCCH. # See GSM 04.08 10.5.2.29 for encoding. GSM.RACH.TxInteger 14 # Access class flags. # This is the RAW parameter sent on the BCCH. # See GSM 04.08 10.5.2.29 for encoding. # Set to 0 to allow full access. GSM.RACH.AC 0 # # GSM Timers. All timer values are given in milliseconds unless stated otherwise. # These come from GSM 04.08 11.2.
www.hospedar-se.com/dicas/?dica=3214 9/16

# These come from GSM 04.08 11.2. # # T3212, registration timer. # Unlike most timers, this is given in MINUTES. #Actual period will be rounded down to a multiple of 6 minutes. # Any value below 6 minutes disables periodic registration. # Ideally, this should be slightly less than the SIP.RegistrationPeriod. GSM.T3212 6 a. Verificar o IMSI do SIM Card (International Mobile Subscriber Identity): O registro do terminal na rede baseado no nmero do IMSI armazenado no SIM Card. Se voc no tem esse nmero, possvel usar o script Python abaixo para verific-lo. Crie um novo arquivo no editor de texto e cole o script abaixo. Tome cuidado com a endentao, pois ela importante no Python: #!/usr/bin/env python # Coded by Alexsander Loula # Email: alex.loula@gmail.com import serial,string def readuntilok(s): ol=[] while 1: c=s.read() if not c: break ol.append(c) ostring="".join(ol) if len(ol)>3 and ostring[-4:]=="OK\r\n": break return ostring def cmd(s,cmd): s.write(cmd+"\r") r=readuntilok(s) r=r.split("\n") for i in range(len(r)): r[i]=r[i][:-1] return r ### INIT Serial Port ser=serial.Serial('/dev/ttyACM0',115200,timeout=3) ser.write('ATZ\r') line=ser.read(10) ### Read IMSI imsi = cmd(ser,'AT+CIMI')[1] imsi = imsi.split()[-1] imsi = 'IMSI: ' + imsi[1:16] print imsi
www.hospedar-se.com/dicas/?dica=3214

### Close Serial Port

10/16

### Close Serial Port ser.close() Salve o arquivo com getimsi.py; O script depende do mdulo serial para controlar o telefone via porta serial (RS232 ou USB) atravs de comandos AT. Para instal-lo, digite: $ sudo apt-get install python-serial Torne o script executvel: $ sudo chmod +x getimsi.py Conecte um telefone que suporte comandos AT atravs da porta serial e rode o script: $ ./getimsi.py Deve ser mostrado algo como: IMSI: 724311320422052 Esse o IMSI do SIM Card que ser usado para configurar o Asterisk. b. Faa o backup dos arquivos "/etc/extensions.conf" e "/etc/sip.conf": $ cd /etc/asterisk $ sudo cp extensions.conf extensions.conf_ori $ sudo cp sip.conf sip.conf_ori c. Copie o "~/openbts-2.3/AsteriskConfig/extensions.conf" e "sip.conf" para o "/etc/asterisk": $ sudo cp ~/openbts-2.3/AsteriskConfig/sip.conf . $ sudo cp ~/openbts-2.3/AsteriskConfig/extensions.conf . d. Edite o /etc/asterisk/extension.conf : ... [sip-local] ; local extensions exten => 2100,1,Macro(dialSIP,wiredPhone) exten => 2101,1,Macro(dialSIP,softPhone) ; This is a simple mapping between extensions and IMSIs. exten => 2102,1,Macro(dialSIP,724311320422052) ... O nmero (ramal) 2101 ser usado pelo softphone e o 2102 pelo telefone celular (724311320422052 o IMSI). e. Edite o /etc/asterisk/sip.conf : ...
www.hospedar-se.com/dicas/?dica=3214 11/16

[softPhone] callerid=2101 canreinvite=no type=friend context=sip-external allow=ulaw allow=gsm host=dynamic ; This is a GSM handset entry. ; You need one for each SIM. ; The IMSI is a 15-digit code in the SIM. ; You can see it in the Control log whenever a phone tries to register. [724311320422052]; <- The IMSI is used as a SIP user ID. canreinvite=no type=friend context=sip-external allow=gsm host=dynamic ... f.Reinicie o Asterisk: $ sudo /etc/init.d/asterisk restart

Teste do OpenBTS
a. Configurao do telefone: As configuraes do telefone so cruciais para o teste do OpenBTS. Primeiramente precisamos ter certeza que a configurao de rede esta de acordo com a banda selecionada no arquivo OpenBTS.config. Um SIM Card de operadora normalmente vm com uma lista de operadoras preferenciais. Essa lista tambm conhecida como PLMN (Public Land Mobile Network) que composta pelo cdigo do pas e cdigo da operadora (MCCMNC). Para garantir que o telefone comear procurando pela nossa rede, precisamos colocar o PLMN (MCC-MNC), configurado anteriormente no OpenBTS.config, como a primeira rede preferencial. Quando um terminal registrado na rede ele recebe o TMSI (Temporary Mobile Subscriber Identity). O TMSI gerado aleatoriamente pelo VLR para cada terminal registrado na rede. bom limpar o TMSI para fazer o primeiro registro no OpenBTS. Uma maneira de fazer isso desligar o telefone e tirar a bateria. b. Execute o OpenBTS: $ cd ~/openbts-2.3/apps $ ./OpenBTS
www.hospedar-se.com/dicas/?dica=3214 12/16

OpenBTS, Copyright 2008, 2009 Free Software Foundation, Inc. Contributors: Kestrel Signal Processing, Inc.: David Burgess, Harvind Samra, Raffi Sevlian, Roshan Baliga GNU Radio: Johnathan Corgan Incorporated GPL libraries and components: libosip2, liportp2 This program comes with ABSOLUTELY NO WARRANTY. This is free software; you are welcome to redistribute it under the terms of GPLv3. Use of this software may be subject to other legal restrictions, including patent licsensing and radio spectrum licensing. All users of this software are expected to comply with applicable regulations. 1242936099.801724 3082733248: Starting the system... 1242936100.8228 WARNING 3082733248 TRXManager.cpp:269: retrying transceiver command after response timeout 1242936101.0380 INFO 3052067728 RadioResource.cpp:366: Pager::pageAll paging 0 mobile(s) 1242936101.0382 INFO 3082733248 OpenBTS.cpp:199: system ready 1242936101.038262 3082733248: Welcome to OpenBTS. Type "help" to see available commands. OpenBTS> c. Ligue o telefone Deve ser mostrada uma sada como a abaixo na CLI (Command Line Interface) do OpenBTS no momento do registro do telefone: 1242936116.4806 INFO 3073633168 RadioResource.cpp:150: AccessGrantResponder RA=0x18 when=0:1778916 age=24 1242936116.4809 INFO 3073633168 RadioResource.cpp:191: AccessGrantResponder sending PageMode=(0) DedicatedModeOrTBF= (TMA=0 Downlink=0 DMOrTBF=0) ChannelDescription= (typeAndOffset=SDCCH/4-1 TN=0 TSC=0 ARFCN=10) RequestReference= (RA=24 T1'=29 T2=22 T3=36) TimingAdvance=0 1242936116.9887 INFO 3069905808 MobilityManagement.cpp:117: LocationUpdatingController MM Location Updating Request LAI=(MCC=724 MNC=31 LAC=0x3eee) MobileIdentity=(IMSI=724311320422052) 1242936116.9911 INFO 3069905808 MobilityManagement.cpp:170: LocationUpdatingController registration SUCCESS: IMSI=724311320422052 1242936133.4187 INFO 3073633168 RadioResource.cpp:150: AccessGrantResponder RA=0xe7 when=0:1782585 age=24 1242936133.4189 INFO 3073633168 RadioResource.cpp:191: AccessGrantResponder sending PageMode=(0) DedicatedModeOrTBF= (TMA=0 Downlink=0 DMOrTBF=0) ChannelDescription= (typeAndOffset=SDCCH/4-3 TN=0 TSC=0 ARFCN=10) RequestReference= (RA=231 T1'=0 T2=25 T3=33) TimingAdvance=0 1242936133.7486 INFO 3066710928 MobilityManagement.cpp:59: CMServiceResponder MM CM Service Request serviceType=MOC

www.hospedar-se.com/dicas/?dica=3214

13/16

CMServiceResponder MM CM Service Request serviceType=MOC mobileIdentity=(TMSI=0x4a15b323) d. Teste de chamada para o telefone celular (MT - Mobile Terminate): Podemos usar um softphone SIP para fazer esse teste. Recomendo o Twinkle: $ sudo apt-get install twinkle Configure o Twinkle para se registrar no Asterisk e faa uma chamada para o telefone celular (nmero 2102 - que foi definido na configurao do Asterisk). O telefone deve comear tocar. As mensagens na CLI do OpenBTS devem ser parecidas com essas: 1242936133.7487 INFO 3066710928 CallControl.cpp:556: MOC: MM CM Service Request serviceType=MOC mobileIdentity=(TMSI=0x4a15b323) 1242936134.2190 INFO 3066710928 CallControl.cpp:615: MOC: CC Setup TI=(0,0) CalledPartyBCDNumber=(type=unknown plan=E.164/ISDN digits=2101) 1242936134.2193 INFO 3066710928 CallControl.cpp:179: assignTCHF sending AssignmentCommand for 0xbff5e798 on 0xbff5e9b4 1242936134.9155 INFO 3057658768 RadioResource.cpp:276: AssignmentCompleteHandler service=MOC 1242936134.9156 INFO 3057658768 CallControl.cpp:697: MOC: transaction: ID=1804289383 TI=(0,0) IMSI=724311320422052 to=2101 Q.931State=MOC initiated SIPState=Starting 1242936134.9498 INFO 3057658768 CallControl.cpp:715: MOC A: wait for Ringing or OK 1242936135.1865 INFO 3057658768 CallControl.cpp:715: MOC A: wait for Ringing or OK 1242936135.1866 INFO 3057658768 CallControl.cpp:726: MOC A: SIP:Ringing, send Alerting and move on 1242936135.4046 INFO 3057658768 CallControl.cpp:756: MOC: wait for SIP OKAY 1242936136.7268 INFO 3057658768 CallControl.cpp:793: MOC: sending Connect to handset 1242936136.9539 INFO 3057658768 CallControl.cpp:538: MOC MTC connected, entering callManagementLoop Atenda a chamada no telefone celular e inicie a conversao. e. Teste de chamada do telefone celular (MO - Mobile Originate): Chame o softphone (nmero 2101 - definido nas configuraes do Asterisk) a partir do telefone celular. O softphone deve comear a tocar: 1242936158.0970 INFO 3063249808 RadioResource.cpp:330: Pager::removeID IMSI=724311320422052 1242936158.0970 INFO 3063249808 RadioResource.cpp:237: PagingResponseHandler service=MTC 1242936158.0970 INFO 3063249808 CallControl.cpp:823: MTC on FACCH
www.hospedar-se.com/dicas/?dica=3214 14/16

1242936158.0970 INFO 3063249808 CallControl.cpp:823: MTC on FACCH transaction: ID=1804289386 TI=(1,0) IMSI=724311320422052 from=2101 Q.931State=MTC paging SIPState=Null 1242936158.0970 INFO 3063249808 CallControl.cpp:845: MTC: sending GSM Setup to call type=national plan=E.164/ISDN digits=2101 1242936158.2269 INFO 3052067728 RadioResource.cpp:366: Pager::pageAll paging 0 mobile(s) 1242936158.7152 INFO 3063249808 CallControl.cpp:906: MTC:: waiting for GSM Alerting and Connect 1242936165.5375 INFO 3063249808 CallControl.cpp:921: MTC:: allocating port and sending SIP OKAY 1242936165.5728 INFO 3063249808 CallControl.cpp:538: MOC MTC connected, entering callManagementLoop Atenda a chamada e inicie a conversao; Voc pode verificar as opes de comandos da CLI do OpenBTS digitando "help" no prompt: OpenBTS> help assignment [type] -- get/set assignment type (early, veryearly) calls -- print the transaction table exit -- exit the application. help -- list available commands or gets help on a specific command. lai [MCC] [MNC] [hex-LAC] -- get/set location area identity (MCC, MNC, LAC) load -- print the current activity loads. loglevel [level] -- get/set the logging level, one of {ERROR, ALARM, WARN, NOICE, INFO, DEBUG, DEEPDEBUG}. sendsms <IMSI> -- send SMS to <IMSI>, addressed from , after prompting. setlogfile <path> -- set the logging file to <path>. tmsis ["clear"] -- print/clear the TMSI table. uptime -- show BTS uptime and BTS frame number. Segue abaixo um screenshot mostrando o OpenBTS, Asterisk e Twinkle numa chamada MO: Linux: Montando uma rede GSM

Concluso
www.hospedar-se.com/dicas/?dica=3214

Trazer o stack (pilha) do GSM para um hardware de baixo custo no uma

15/16

Trazer o stack (pilha) do GSM para um hardware de baixo custo no uma tarefa fcil. O OpenBTS est dando esse poder para ns, e como um projeto de cdigo aberto, pode ser usado como um excelente ponto de partida para aprender como o sistema GSM funciona. Referncias: http://gnuradio.org/trac/wiki/OpenBTS http://gnuradio.org/trac http://en.wikipedia.org/wiki/GSM http://www.ettus.com/

Hospedar-se .Com 2003 - 2008. Todos os dire itos R e se rvados.

192.168.3.100

www.hospedar-se.com/dicas/?dica=3214

16/16

Вам также может понравиться