Osmocom-bb (IMSI catcher) + Prebuilt VM

UPDATE IN PROGRESS ! nov 4 2019

In this post we will see how to make a base station with two motorola compatible phones C 115/118/123 and two cables usb serial jack 2.5mm PL2303

OS: kali rolling 2018.1

VMware or virtualbox : with the VM you can jump directly to running without install software Prebuilt VM (2018.1): HERE Virtual Machine (v2) Don’t double click on the kali-linux-2018.1-vbox-amd64.ova file but it is Kali-Linux-2018.1-vbox-amd64-disk001.vmdk which had to be selected manually in vbox hd I have made the mistake to let the blank kali vm in the zip sorry i must change that there is to much people who as asking me You will have osmocombb at the root folder then. For data support HERE CalypsoBTS GPRS Testing For installation simplified HERE Ansible installation

First step : build the toolchain

To get it more quickly go HERE

# nano /etc/apt/sources.list 

add

deb http://deb.debian.org/debian/ jessie main

# apt install gcc-4.9 g++-4.9 # nano /etc/apt/sources.list

comment kali sana

# apt-get update && apt-get upgrade 
# apt-get install build-essential libgmp-dev libx11-6 libx11-dev flex libncurses5 libncurses5-dev libncursesw6 libpcsclite-dev zlib1g-dev libmpfr4 libmpc3 lemon aptitude libtinfo-dev libtool shtool autoconf git-core pkg-config make libmpfr-dev libmpc-dev libtalloc-dev libfftw3-dev libgnutls28-dev libssl1.0-dev libtool-bin libxml2-dev sofia-sip-bin libsofia-sip-ua-dev sofia-sip-bin libncursesw5-dev  bison libgmp3-dev alsa-oss cmake 
# sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 49 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
# sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 90 --slave /usr/bin/g++ g++ /usr/bin/g++-9
# update-alternatives --config gcc # update-alternatives --config g++

(choose 4.9)

# apt remove texinfo 
# cd /root 
# wget http://ftp.gnu.org/gnu/texinfo/texinfo-4.13.tar.gz # gzip -dc < texinfo-4.13.tar.gz | tar -xf - 
# cd texinfo-4.13 
# ./configure 
# make 
# make install # git clone https://github.com/axilirator/gnu-arm-installer.git gnuarm 
# cd gnuarm

Run this scripts:

# ./download.sh 
# ./build.sh 
# export PATH=$PATH:/root/gnuarm/install/bin

Now you have cross-compiler ready

# cd /root # git clone git://git.osmocom.org/libosmocore.git # cd libosmocore 
# autoreconf -i 
# ./configure 
# make 
# make install 
# ldconfig 
# cd .. 
# git clone git://git.osmocom.org/libosmo-dsp.git 
# cd libosmo-dsp 
# autoreconf -i 
# ./configure 
# make 
# make install 
# cd .. 
# git clone https://github.com/osmocom/osmocom-bb trx 
# cd trx
# git checkout jolly/testing 
# cd src 
# nano target/firmware/Makefile

It needs TX support Just uncomment ‘CFLAGS += -DCONFIG_TX_ENABLE

# make HOST_layer23_CONFARGS=--enable-transceiver 
# cd /root 
#git clone https://github.com/bastienbaranoff/imsi-catcher

Asterisk version (1.8.13.1) :

# nano /etc/apt/sources.list

comment kali rolling and add

# apt update 
# wget https://downloads.asterisk.org/pub/telephony/asterisk/old-releases/asterisk-1.8.13.1.tar.gz

# gzip -dc < asterisk-1.8.13.1.tar.gz | tar -xf - 
# cd /root/asterisk-1.8.13.1 
# nano /root/asterisk-1.8.13.1/main/tcptls.c ctrl-W SSLv3 and change cfg->ssl_ctx = SSL_CTX_new(SSLv3_client_method()), by cfg->ssl_ctx = SSL_CTX_new(SSLv23_client_method()); 
#./configure  
# make 
# make install
# ldconfig

# apt-get update 
# apt install asn1c libdbd-sqlite3 
# git clone git://git.osmocom.org/osmo-ggsn 
# git clone git://git.osmocom.org/osmo-sgsn 
# git clone git://git.osmocom.org/osmo-bts 
# git clone git://git.osmocom.org/osmo-trx 
# git clone git://git.osmocom.org/osmo-pcu 
# git clone git://git.osmocom.org/openbsc

For each in this order do the following

cd dir_to_compile (twice for openbsc aka cd openbsc/openbsc)

# autoreconf -fi 
# ./configure

execption for libosmo-ggsn

./configure --enable-gtp-linux 

execption for libosmo-bts

# ./configure --enable-trx  
# make -j8 # make install 
# ldconfig

Then

# git clone https://github.com/bbaranoff/osmonitb nitb 
# cd nitb
# chmod +x tun.sh
# cp -r /root/imsi-catcer/asterisk/. /etc/asterisk/.

Download open-core-amr

# tar xvzf opencore-amr-0.1.5.tar.gz 
# cd opencore-amr-0.1.5 
# ./configure 
# make # sudo make install 
# sudo ldconfig

mISDN

# rm -Rf /lib/modules/$(uname -r)/kernel/drivers/isdn/hardware/mISDN 
# rm -Rf /lib/modules/$(uname -r)/kernel/drivers/isdn/mISDN/ 
# depmod -a 
# apt-get install git build-essential libtool autoconf automake linux-headers-4.15.0-kali2-all-amd64 
# git clone https://github.com/ISDN4LINUX/mISDN 
# git clone https://github.com/ISDN4LINUX/mISDNuser 
# git clone https://github.com/bbaranoff/mISDN_patch 
# git clone https://github.com/bbaranoff/osmocombb-ansible 
# cd mISDN 
# patch -p1 ../mISDN/mISDN.patch 
# patch -p1 ../mISDN_patch/mISDNuser.patch

As of Debian 8.5, there is an automake version mismatch, fix it via:

# aclocal; automake --add-missing 
# ./configure # cp /root/osmocombb-ansible/mISDN.cfg.default standalone/mISDN.cfg 
# make modules 
# make modules_install 
# depmod -a 
# cd ../mISDNuser # make 
# ./configure # make 
# make install 
# cd example # make 
# cd 
# git clone https://github.com/fairwaves/lcr 
# cd lcr 
# autoreconf -i 
# ./configure --with-sip --with-gsm-bs --with-gsm-ms --with-asterisk 
# make 
# make install 
# ldconfig 
# cp chan_lcr.so /usr/lib/asterisk/modules/ 
# cp -r /root/imsi-catcher/. /usr/local/etc/lcr/.

Change in /etc/asterisk/sip.conf with your sip provider login and pass (ex diamondcard)

# apt-get install alsa-oss 
# modprobe snd_pcm_oss 
# modprobe snd_mixer_oss 
# modprobe mISDN_core
# modprobe mISDN_dsp

RUNNING !!!

First search strong rssi

# cd trx/src/ 
# sudo host/osmocon/osmocon -m c123xor -p /dev/ttyUSB0 -c target/firmware/board/compal_e88/rssi.highram.bin

Ctrl-C remove and put the battery

Shell #1

# cd trx/src/ 
#. /host/osmocon/osmocon -m c123xor -p /dev/ttyUSB0 -s /tmp/osmocom_l2 -c target/firmware/board/compal_e88/trx.highram.bin -r 99

Shell #2

# cd trx/src
# ./host/osmocon/osmocon -m c123xor -p /dev/ttyUSB1 -s /tmp/osmocom_l2.2 -c target/firmware/board/compal_e88/trx.highram.bin -r 99

Shell #3

# cd trx/src/host/layer23/src/transceiver/ 
# sudo ./transceiver -a [YOUR ARFCN FOUND WITH RSSI] -2 -r 99

shell #4

# cd osmonitb 
# ./second_dhclient.sh eth0

Replace eth0 with your network interface

# ./tun.sh 
# ./osmo-all start

Check with

# ./osmo-all status

And stop with

# ./osmo-all stop

Shell #4

# osmo-nitb -c ~/.osmocom/open-bsc.cfg -l ~/.osmocom/hlr.sqlite3 -P -m -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM 

Shell #5

# lcr start

Shell #6

# osmo-bts-trx -c ~/.osmocom/osmo-bts.cfg -r 99

Shell #7

# asterisk 
# asterisk -rvvvvvv

if you use FTDI cable you have to modify osmocon command by

known problems. In some situations (like, apparently, using FTDI serial cables), you might need the -m c123 mode for your MotorolaC123 instead of the normal -m c123xor see THIS

To make your imsi catcher work you have to change Location Area Code LAC in ~/.osmocom/open-bsc.cfg to fit with a LAC near you you can find it in RSSI app

102 thoughts on “Osmocom-bb (IMSI catcher) + Prebuilt VM”

  1. Why are two phones needed?
    Is there some experiments that can be done with a single unmodified motorola c118 + the cable ?
    Also, what’s the range of disturbances?
    Putting myself, the laptop and the phone in a faraday cage is not practical

  2. Theorically, you could use a single phone , follow the tutorial by osmocon about osmo-bts
    the cable, it’s depends of countries to find it but you can use also arduino nano or ftdi cable.
    the range if you don’t change the filter of replacement (filter uplink) it is about 30-50meter.

  3. I could use my IMSI only two phone if anyone could with one phone I am interrested in 29C3 description you can see Using the Wireshark sniffer, Munaut demonstrated that a COUPLE of mobile phones in the lecture hall had already logged into the cell he established, and that an SMS text message had already been sent through it.

    1. “RUNNING !!!
      First search strong rssi
      # cd trx/src/
      # sudo host/osmocon/osmocon -m c123xor -p /dev/ttyUSB0 -c target/firmware/board/compal_e88/rssi.highram.bin”
      for this I get the output from
      Cannot open serial device /dev/ttyUSB0
      whats wrong?
      Can you help me?

  4. you should active the cable on the VM. if you use vmware , you can find a icon like usb on blue color, press right clic and clic with active the ftdi cable !

  5. I have a 2. Problem with this command….
    [email protected]:~/trx/src/host/layer23/src/transceiver# cd
    [email protected]:~# osmo-nitb -c ~/.osmocom/open-bsc.cfg -l ~/.osmocom/hlr.sqlite3 -P -m -C –debug=DRLL:DCC:DMM:DRR:DRSL:DNM
    it displayed the follow….
    bsc_init.c:423
    WARNING: You are running an ‘accept-all’ network on a BTS that is not barred. This configuration is likely to interfere with production GSM networks and should only be used in a RF shielded environment such as a faraday cage!
    DB: Database initialized.
    DB: Database prepared.
    abis_nm.c:316 OC=RADIO-CARRIER(02) INST=(00,00,ff) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff)
    abis_nm.c:316 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff)
    abis_nm.c:2426 OC=BASEBAND-TRANSCEIVER(04) INST=(00,00,ff) IPACCESS(0xe1): RSL CONNECT ACK
    bsc_init.c:286 bootstrapping RSL for BTS/TRX (0/0) on ARFCN 2 using MCC=208 MNC=1 LAC=1 CID=0 BSIC=63 TSC=7
    system_information.c:372 Serving cell: 2
    bsc_init.c:104 SI1: 55 06 19 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 02 e5 04 00 2b
    bsc_init.c:104 SI2: 59 06 1a 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 ff e5 04 00
    bsc_init.c:104 SI3: 49 06 1b 00 00 02 f8 10 00 01 49 03 05 27 e5 40 e5 04 00 3b 2b 2b 2b
    bsc_init.c:104 SI4: 31 06 1c 02 f8 10 00 01 e5 40 e5 04 00 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
    bsc_init.c:104 SI5: 49 06 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 2b 2b 2b 2b
    bsc_init.c:104 SI6: 2d 06 1e 00 00 02 f8 10 00 01 27 ff 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b 2b
    abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,00) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff)
    abis_nm.c:316 OC=CHANNEL(03) INST=(00,00,01) STATE CHG: OP_STATE=Enabled AVAIL=OK(ff)
    here is the ARFCN 2 and the MCC 208 should be 27 / 262 and MNC 02 , change it for in the open-bsc.cfg .
    Whats wrong with this?
    Can you help me please?
    Thank you

  6. sorry i don´t know why I could write the post not under Peseta3,
    I don´t know whats happen????
    It was under the vm ware image.
    sorry sorry sorry

  7. Hello, i want try, what is the phone that you use? What is the more simply to found? Is it necessary to have 2 phone for intercept incoming call?

  8. abis_rsl.c:1423 BTS 0 CHAN RQD: no resources for SDCCH 0x1
    abis_rsl.c:1423 BTS 0 CHAN RQD: no resources for SDCCH 0xc
    abis_rsl.c:1423 BTS 0 CHAN RQD: no resources for SDCCH 0x6
    abis_rsl.c:1423 BTS 0 CHAN RQD: no resources for SDCCH 0x1
    abis_rsl.c:1423 BTS 0 CHAN RQD: no resources for SDCCH 0xf
    abis_rsl.c:1423 BTS 0 CHAN RQD: no resources for SDCCH 0xe
    abis_rsl.c:1423 BTS 0 CHAN RQD: no resources for SDCCH 0xb
    abis_rsl.c:1423 BTS 0 CHAN RQD: no resources for SDCCH 0x0
    abis_rsl.c:1423 BTS 0 CHAN RQD: no resources for SDCCH 0x3
    abis_rsl.c:1423 BTS 0 CHAN RQD: no resources for SDCCH 0xa

    1. I think i know what is wrong… the extensions.conf in asterisk is set to France search for 0033 in the file extensions.conf and set it to your country
      When you place your call dont add 00xx tell me if it works please

  9. place this in your folder /etc/asterisk/extensions.conf where 0033 is the prefix for your country
    [from-lcr]
    include => default
    exten => _X.,1,Set(CALLERID(number)=0678787878)
    exten => _X.,2,Monitor(wav,myfilename2)
    exten => _X.,3,Dial(SIP/0033${EXTEN:1}@diamondcard)
    exten => _X.,4,Congestion
    exten => _011.,1,Dial(LCR/ast/${EXTEN:3},60)

  10. Thank you,I think I figured it out.How can I connect my sip operator? I live in Russia, so I would like connects to a local sip provider,it is possible, please see the site title “zadarma sip” is a free sip

  11. /root/asterisk-1.8.13.1/main/tcptls.c:317: undefined reference to `SSLv2_client_method’
    collect2: error: ld returned 1 exit status
    Makefile:182: recipe for target ‘asterisk’ failed
    make[1]: *** [asterisk] Error 1
    Makefile:348: recipe for target ‘main’ failed
    make: *** [main] Error 2
    [email protected]:~/asterisk-1.8.13.1#

  12. [email protected]:~/sofia-sip-1.12.11/mISDN# make modules
    CDPATH=”${ZSH_VERSION+.}:” && cd . && autoconf
    /bin/bash ./config.status –recheck
    running CONFIG_SHELL=/bin/bash /bin/bash ./configure –no-create –no-recursion
    checking for a BSD-compatible install… /usr/bin/install -c
    checking whether build environment is sane… yes
    /root/sofia-sip-1.12.11/mISDN/missing: Unknown `–is-lightweight’ option
    Try `/root/sofia-sip-1.12.11/mISDN/missing –help’ for more information
    configure: WARNING: ‘missing’ script is too old or missing
    checking for a thread-safe mkdir -p… /bin/mkdir -p
    checking for gawk… gawk
    checking whether make sets $(MAKE)… yes
    checking whether make supports nested variables… yes
    checking for gcc… gcc
    checking whether the C compiler works… yes
    checking for C compiler default output file name… a.out
    checking for suffix of executables…
    checking whether we are cross compiling… no
    checking for suffix of object files… o
    checking whether we are using the GNU C compiler… yes
    checking whether gcc accepts -g… yes
    checking for gcc option to accept ISO C89… none needed
    checking whether gcc understands -c and -o together… yes
    checking for style of include used by make… GNU
    checking dependency style of gcc… none
    checking whether make sets $(MAKE)… (cached) yes
    checking for a sed that does not truncate output… /bin/sed
    checking for grep that handles long lines and -e… /bin/grep
    checking for gawk… (cached) gawk
    checking for find… /usr/bin/find
    checking for diff… /usr/bin/diff
    checking for patch… /usr/bin/patch
    checking for ifnames… /usr/bin/ifnames
    checking for sort… /usr/bin/sort
    configure: Configured for 4.13 kernel build /lib/modules/4.13.0-kali1-686-pae/build source /lib/modules/4.13.0-kali1-686-pae/source
    checking that generated files are newer than configure… done
    configure: creating ./config.status
    /bin/bash ./config.status
    config.status: creating Makefile
    config.status: creating standalone/Makefile
    config.status: creating config.h
    config.status: config.h is unchanged
    config.status: executing depfiles commands
    make -C standalone INSTALL_MOD_PATH= modules
    make[1]: Entering directory ‘/root/sofia-sip-1.12.11/mISDN/standalone’
    rm -rf drivers include series .pc
    make btree
    make[2]: Entering directory ‘/root/sofia-sip-1.12.11/mISDN/standalone’
    preparing misdn.sed
    mkdir -p drivers/isdn
    mkdir -p drivers/isdn/hardware
    mkdir -p drivers/isdn/hardware/mISDN
    mkdir -p drivers/isdn/mISDN
    mkdir -p drivers/isdn/mISDN/octvqe
    mkdir -p include/
    mkdir -p include/linux
    preparing drivers/isdn/hardware/mISDN/hwskel.h
    preparing drivers/isdn/hardware/mISDN/hfc_multi_8xx.h
    preparing drivers/isdn/hardware/mISDN/xhfc_su.c
    preparing drivers/isdn/hardware/mISDN/netjet.h
    preparing drivers/isdn/hardware/mISDN/mISDNinfineon.c
    preparing drivers/isdn/hardware/mISDN/hfcsusb.h
    preparing drivers/isdn/hardware/mISDN/mISDNisar.c
    preparing drivers/isdn/hardware/mISDN/hfc_pci.h
    preparing drivers/isdn/hardware/mISDN/hwskel.c
    preparing drivers/isdn/hardware/mISDN/avmfritz.c
    preparing drivers/isdn/hardware/mISDN/compat_ids.h
    preparing drivers/isdn/hardware/mISDN/speedfax.c
    preparing drivers/isdn/hardware/mISDN/w6692.c
    preparing drivers/isdn/hardware/mISDN/isar.h
    preparing drivers/isdn/hardware/mISDN/netjet.c
    preparing drivers/isdn/hardware/mISDN/hfc_multi.h
    preparing drivers/isdn/hardware/mISDN/xhfc_su.h
    preparing drivers/isdn/hardware/mISDN/l1loop.h
    preparing drivers/isdn/hardware/mISDN/hfcmulti.c
    preparing drivers/isdn/hardware/mISDN/hfcsusb.c
    preparing drivers/isdn/hardware/mISDN/iohelper.h
    preparing drivers/isdn/hardware/mISDN/w6692.h
    preparing drivers/isdn/hardware/mISDN/ipac.h
    preparing drivers/isdn/hardware/mISDN/xhfc_pci2pi.h
    preparing drivers/isdn/hardware/mISDN/mISDNipac.c
    preparing drivers/isdn/hardware/mISDN/xhfc_pci2pi.c
    preparing drivers/isdn/hardware/mISDN/hfcpci.c
    preparing drivers/isdn/hardware/mISDN/xhfc24sucd.h
    preparing drivers/isdn/hardware/mISDN/l1loop.c
    preparing drivers/isdn/mISDN/dsp_oslec.h
    preparing drivers/isdn/mISDN/stack.c
    preparing drivers/isdn/mISDN/layer2.h
    preparing drivers/isdn/mISDN/core.h
    preparing drivers/isdn/mISDN/dsp_mec2_const.h
    preparing drivers/isdn/mISDN/dsp_kb1ec_const.h
    preparing drivers/isdn/mISDN/fsm.h
    preparing drivers/isdn/mISDN/dsp_pipeline.c
    preparing drivers/isdn/mISDN/dsp_octwareec.c
    preparing drivers/isdn/mISDN/dsp_kb1ec.h
    preparing drivers/isdn/mISDN/layer2.c
    preparing drivers/isdn/mISDN/dsp_hwec.h
    preparing drivers/isdn/mISDN/l1oip_core.c
    preparing drivers/isdn/mISDN/octvqe/octvqe_linux.c
    preparing drivers/isdn/mISDN/octvqe/octvqe_linux.h
    preparing drivers/isdn/mISDN/octvqe/octvqe_ioctl.h
    preparing drivers/isdn/mISDN/dsp_ecdis.h
    preparing drivers/isdn/mISDN/l1oip_codec.c
    preparing drivers/isdn/mISDN/dsp_kb1ec.c
    preparing drivers/isdn/mISDN/dsp_audio.c
    preparing drivers/isdn/mISDN/dsp_cmx.c
    preparing drivers/isdn/mISDN/dtmf.c
    preparing drivers/isdn/mISDN/clock.c
    preparing drivers/isdn/mISDN/layer1.c
    preparing drivers/isdn/mISDN/oslec_wrap.c
    preparing drivers/isdn/mISDN/dsp_cancel.h
    preparing drivers/isdn/mISDN/oslec.h
    preparing drivers/isdn/mISDN/dsp_octwareec.h
    preparing drivers/isdn/mISDN/dsp_mg2ec.c
    preparing drivers/isdn/mISDN/oslec_bit_operations.h
    preparing drivers/isdn/mISDN/oslec_echo.h
    preparing drivers/isdn/mISDN/dsp_hwec.c
    preparing drivers/isdn/mISDN/timerdev.c
    preparing drivers/isdn/mISDN/oslec_echo.c
    preparing drivers/isdn/mISDN/dsp_dtmf.c
    preparing drivers/isdn/mISDN/dsp_mec2.c
    preparing drivers/isdn/mISDN/socket.c
    preparing drivers/isdn/mISDN/layer1.h
    preparing drivers/isdn/mISDN/dsp_arith.h
    preparing drivers/isdn/mISDN/dsp_mec2.h
    preparing drivers/isdn/mISDN/l1oip.h
    preparing drivers/isdn/mISDN/fsm.c
    preparing drivers/isdn/mISDN/core.c
    preparing drivers/isdn/mISDN/tei.c
    preparing drivers/isdn/mISDN/dsp_mg2ec.h
    preparing drivers/isdn/mISDN/dsp_oslec.c
    preparing drivers/isdn/mISDN/dsp_tones.c
    preparing drivers/isdn/mISDN/oslec_fir.h
    preparing drivers/isdn/mISDN/hwchannel.c
    preparing drivers/isdn/mISDN/dsp.h
    preparing drivers/isdn/mISDN/dsp_mg2ec_const.h
    preparing drivers/isdn/mISDN/dsp_blowfish.c
    preparing drivers/isdn/mISDN/dsp_biquad.h
    preparing drivers/isdn/mISDN/dsp_core.c
    preparing include/linux/mISDNdsp_s.h
    preparing include/linux/mISDNhw_s.h
    preparing include/linux/mISDNif_s.h
    preparing drivers/isdn/hardware/mISDN/Makefile
    preparing drivers/isdn/mISDN/octvqe/Makefile
    preparing drivers/isdn/mISDN/Makefile
    make[2]: Leaving directory ‘/root/sofia-sip-1.12.11/mISDN/standalone’
    rm -f patched
    if test -f ../series/series_4.13; then \
    cp ../series/series_4.13 series; \
    else \
    echo “no series for kernel version 4.13”; \
    fi
    no series for kernel version 4.13
    if test -f series -a ! -f patched; then \
    ../scripts/apply_patch_series series; \
    touch patched; \
    else \
    echo “no series found”; \
    echo “no series found” > .patchOK; \
    fi
    no series found
    cat .patchOK
    no series found
    rm -f mISDN.cfg.D
    rm -f mISDN.cfg.M
    enable CONFIG_MISDN_HFCPCI
    enable CONFIG_MISDN_HFCMULTI
    disable CONFIG_MISDN_HFCMULTI_8xx
    enable CONFIG_MISDN_HFCUSB
    enable CONFIG_MISDN_XHFC
    enable CONFIG_MISDN_AVMFRITZ
    enable CONFIG_MISDN_SPEEDFAX
    enable CONFIG_MISDN_INFINEON
    enable CONFIG_MISDN_W6692
    enable CONFIG_MISDN_NETJET
    enable CONFIG_MISDN_IPAC
    enable CONFIG_MISDN_ISAR
    enable CONFIG_MISDN_L1LOOP
    enable CONFIG_MISDN
    enable CONFIG_MISDN_DSP
    enable CONFIG_MISDN_L1OIP
    make modules_
    make[2]: Entering directory ‘/root/sofia-sip-1.12.11/mISDN/standalone’
    rm -f modules
    export MISDN_INC=/root/sofia-sip-1.12.11/mISDN/standalone/include; export MISDN_CFLAGS=”-D_MCONFIG_MISDN_HFCPCI -D_MCONFIG_MISDN_HFCMULTI -D_MCONFIG_MISDN_HFCUSB -D_MCONFIG_MISDN_XHFC -D_MCONFIG_MISDN_AVMFRITZ -D_MCONFIG_MISDN_SPEEDFAX -D_MCONFIG_MISDN_INFINEON -D_MCONFIG_MISDN_W6692 -D_MCONFIG_MISDN_NETJET -D_MCONFIG_MISDN_IPAC -D_MCONFIG_MISDN_ISAR -D_MCONFIG_MISDN_L1LOOP -D_MCONFIG_MISDN -D_MCONFIG_MISDN_DSP -D_MCONFIG_MISDN_L1OIP”; make -C /lib/modules/4.13.0-kali1-686-pae/build _MCONFIG_MISDN_HFCPCI=m _MCONFIG_MISDN_HFCMULTI=m _MCONFIG_MISDN_HFCUSB=m _MCONFIG_MISDN_XHFC=m _MCONFIG_MISDN_AVMFRITZ=m _MCONFIG_MISDN_SPEEDFAX=m _MCONFIG_MISDN_INFINEON=m _MCONFIG_MISDN_W6692=m _MCONFIG_MISDN_NETJET=m _MCONFIG_MISDN_IPAC=m _MCONFIG_MISDN_ISAR=m _MCONFIG_MISDN_L1LOOP=m _MCONFIG_MISDN=m _MCONFIG_MISDN_DSP=m _MCONFIG_MISDN_L1OIP=m SUBDIRS=/root/sofia-sip-1.12.11/mISDN/standalone/drivers/isdn/mISDN modules
    make[3]: Entering directory ‘/usr/src/linux-headers-4.13.0-kali1-686-pae’
    CC [M] /root/sofia-sip-1.12.11/mISDN/standalone/drivers/isdn/mISDN/core.o
    CC [M] /root/sofia-sip-1.12.11/mISDN/standalone/drivers/isdn/mISDN/fsm.o
    CC [M] /root/sofia-sip-1.12.11/mISDN/standalone/drivers/isdn/mISDN/socket.o
    /root/sofia-sip-1.12.11/mISDN/standalone/drivers/isdn/mISDN/socket.c: In function ‘mISDN_sock_recvmsg’:
    /root/sofia-sip-1.12.11/mISDN/standalone/drivers/isdn/mISDN/socket.c:161:15: error: passing argument 1 of ‘atomic_dec’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    atomic_dec(&skb->users);
    ^
    In file included from /usr/src/linux-headers-4.13.0-kali1-common/arch/x86/include/asm/msr.h:66:0,
    from /usr/src/linux-headers-4.13.0-kali1-common/arch/x86/include/asm/processor.h:20,
    from /usr/src/linux-headers-4.13.0-kali1-common/arch/x86/include/asm/cpufeature.h:4,
    from /usr/src/linux-headers-4.13.0-kali1-common/arch/x86/include/asm/thread_info.h:52,
    from /usr/src/linux-headers-4.13.0-kali1-common/include/linux/thread_info.h:37,
    from /usr/src/linux-headers-4.13.0-kali1-common/include/linux/uio.h:13,
    from /usr/src/linux-headers-4.13.0-kali1-common/include/linux/socket.h:7,
    from /root/sofia-sip-1.12.11/mISDN/standalone/include/linux/mISDNif_s.h:24,
    from /root/sofia-sip-1.12.11/mISDN/standalone/drivers/isdn/mISDN/socket.c:18:
    /usr/src/linux-headers-4.13.0-kali1-common/arch/x86/include/asm/atomic.h:101:29: note: expected ‘atomic_t * {aka struct *}’ but argument is of type ‘refcount_t * {aka struct refcount_struct *}’
    static __always_inline void atomic_dec(atomic_t *v)
    ^~~~~~~~~~
    cc1: some warnings being treated as errors
    /usr/src/linux-headers-4.13.0-kali1-common/scripts/Makefile.build:307: recipe for target ‘/root/sofia-sip-1.12.11/mISDN/standalone/drivers/isdn/mISDN/socket.o’ failed
    make[6]: *** [/root/sofia-sip-1.12.11/mISDN/standalone/drivers/isdn/mISDN/socket.o] Error 1
    /usr/src/linux-headers-4.13.0-kali1-common/Makefile:1529: recipe for target ‘_module_/root/sofia-sip-1.12.11/mISDN/standalone/drivers/isdn/mISDN’ failed
    make[5]: *** [_module_/root/sofia-sip-1.12.11/mISDN/standalone/drivers/isdn/mISDN] Error 2
    Makefile:145: recipe for target ‘sub-make’ failed
    make[4]: *** [sub-make] Error 2
    Makefile:8: recipe for target ‘all’ failed
    make[3]: *** [all] Error 2
    make[3]: Leaving directory ‘/usr/src/linux-headers-4.13.0-kali1-686-pae’
    Makefile:154: recipe for target ‘modules_’ failed
    make[2]: *** [modules_] Error 2
    make[2]: Leaving directory ‘/root/sofia-sip-1.12.11/mISDN/standalone’
    Makefile:162: recipe for target ‘modules’ failed
    make[1]: *** [modules] Error 2
    make[1]: Leaving directory ‘/root/sofia-sip-1.12.11/mISDN/standalone’
    Makefile:779: recipe for target ‘modules’ failed
    make: *** [modules] Error 2
    [email protected]:~/sofia-sip-1.12.11/mISDN#
    ahhhh bulshit ……

  13. Very nice tutorial!
    Happy that someone is still showing interest on Calypso-BTS!
    May suggest to improve this tutorial by using 7 phones in order to have full TS coverage? 🙂

  14. An excellent tutorial, but I have a problem with starting the BTS. A mobile phone can not find a test network. In the settings of the OpenBTS it is clear that
    # OpenBSC# show trx 0 0
    TRX 0 of BTS 0 is on ARFCN 20
    Description: (null)
    RF Nominal Power: 23 dBm, reduced by 20dB, resulting BS power: 3dBm
    NM State: Oper ‘NULL’, Admin ‘Unlocked’, Avail ‘Power off’
    Baseband Transceirver NM State: Oper ‘NULL’, Admin ‘Unlocked 0x0’, Avail ‘Power off’
    ip.access stream ID: 0x00
    Why is the status ‘Power off’? Where can I switch it on?
    What could be the problem?
    Thanks.

    1. In file included from chan_lcr.c:172:0:
      /usr/include/asterisk/version.h:1:2: error: #error “Do not include ‘asterisk/version.h’; use ‘asterisk/ast_version.h’ instead.”
      #error “Do not include ‘asterisk/version.h’; use ‘asterisk/ast_version.h’ instead.”
      ^
      chan_lcr.c: In function ‘chan_lcr_log’:
      chan_lcr.c:254:24: error: dereferencing pointer to incomplete type
      strncpy(ast_text, ast->name, sizeof(ast_text)-1);
      ^
      chan_lcr.c: In function ‘send_message’:
      chan_lcr.c:396:7: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      int rc;
      ^
      chan_lcr.c: In function ‘apply_opt’:
      chan_lcr.c:614:43: error: ‘AST_FORMAT_SLINEAR’ undeclared (first use in this function)
      call->trans=ast_translator_build_path(AST_FORMAT_SLINEAR, (options.law==’a’)?AST_FORMAT_ALAW:AST_FORMAT_ULAW);
      ^
      chan_lcr.c:614:43: note: each undeclared identifier is reported only once for each function it appears in
      chan_lcr.c:614:82: error: ‘AST_FORMAT_ALAW’ undeclared (first use in this function)
      call->trans=ast_translator_build_path(AST_FORMAT_SLINEAR, (options.law==’a’)?AST_FORMAT_ALAW:AST_FORMAT_ULAW);
      ^
      chan_lcr.c:614:98: error: ‘AST_FORMAT_ULAW’ undeclared (first use in this function)
      call->trans=ast_translator_build_path(AST_FORMAT_SLINEAR, (options.law==’a’)?AST_FORMAT_ALAW:AST_FORMAT_ULAW);
      ^
      chan_lcr.c: In function ‘send_setup_to_lcr’:
      chan_lcr.c:699:2: warning: #warning DISABLED DUE TO DOUBLE LOCKING PROBLEM [-Wcpp]
      #warning DISABLED DUE TO DOUBLE LOCKING PROBLEM
      ^
      chan_lcr.c:704:43: error: dereferencing pointer to incomplete type
      newparam.setup.capainfo.bearer_capa = ast->transfercapability;
      ^
      chan_lcr.c: In function ‘lcr_start_pbx’:
      chan_lcr.c:790:19: error: dereferencing pointer to incomplete type
      char *exten = ast->exten;
      ^
      In file included from chan_lcr.c:181:0:
      chan_lcr.c:802:87: error: dereferencing pointer to incomplete type
      CDEBUG(call, ast, “Try to start pbx. (exten=%s context=%s complete=%s)\n”, exten, ast->context, complete?”yes”:”no”);
      ^
      chan_lcr.h:138:110: note: in definition of macro ‘CDEBUG’
      #define CDEBUG(call, ast, arg…) chan_lcr_log(__LOG_NOTICE, __FILE__, __LINE__, __FUNCTION__, call, ast, ##arg)
      ^
      chan_lcr.c:810:39: error: dereferencing pointer to incomplete type
      if (!ast_canmatch_extension(ast, ast->context, exten, 1, call->oad)) {
      ^
      In file included from chan_lcr.c:181:0:
      chan_lcr.c:811:121: error: dereferencing pointer to incomplete type
      CDEBUG(call, ast, “Got ‘sending complete’, but extension ‘%s’ will not match at context ‘%s’ – releasing.\n”, exten, ast->context);
      ^
      chan_lcr.h:138:110: note: in definition of macro ‘CDEBUG’
      #define CDEBUG(call, ast, arg…) chan_lcr_log(__LOG_NOTICE, __FILE__, __LINE__, __FUNCTION__, call, ast, ##arg)
      ^
      chan_lcr.c:820:37: error: dereferencing pointer to incomplete type
      if (!ast_exists_extension(ast, ast->context, exten, 1, call->oad)) {
      ^
      In file included from chan_lcr.c:181:0:
      chan_lcr.c:821:153: error: dereferencing pointer to incomplete type
      CDEBUG(call, ast, “Got ‘sending complete’, but extension ‘%s’ would match at context ‘%s’, if more digits would be dialed – releasing.\n”, exten, ast->context);
      ^
      chan_lcr.h:138:110: note: in definition of macro ‘CDEBUG’
      #define CDEBUG(call, ast, arg…) chan_lcr_log(__LOG_NOTICE, __FILE__, __LINE__, __FUNCTION__, call, ast, ##arg)
      ^
      chan_lcr.c:841:37: error: dereferencing pointer to incomplete type
      if (ast_canmatch_extension(ast, ast->context, exten, 1, call->oad)) {
      ^
      chan_lcr.c:856:35: error: dereferencing pointer to incomplete type
      if (ast_exists_extension(ast, ast->context, exten, 1, call->oad)) {
      ^
      chan_lcr.c:879:11: error: dereferencing pointer to incomplete type
      if (!*ast->exten) {
      ^
      chan_lcr.c:906:5: error: dereferencing pointer to incomplete type
      ast->hangupcause = call->cause;
      ^
      In file included from chan_lcr.c:147:0:
      chan_lcr.c: In function ‘lcr_in_setup’:
      chan_lcr.c:961:75: warning: passing argument 8 of ‘__ast_channel_alloc’ from incompatible pointer type
      ast = ast_channel_alloc(1, AST_STATE_RESERVED, NULL, NULL, “”, NULL, “”, “”, 0, “%s/%d”, lcr_type, ++glob_channel);
      ^
      /usr/include/asterisk/channel.h:1161:2: note: expected ‘const struct ast_assigned_ids *’ but argument is of type ‘char *’
      __ast_channel_alloc(int needqueue, int state, const char *cid_num,
      ^
      chan_lcr.c:961:8: error: incompatible type for argument 10 of ‘__ast_channel_alloc’
      ast = ast_channel_alloc(1, AST_STATE_RESERVED, NULL, NULL, “”, NULL, “”, “”, 0, “%s/%d”, lcr_type, ++glob_channel);
      ^
      /usr/include/asterisk/channel.h:1161:2: note: expected ‘enum ama_flags’ but argument is of type ‘char *’
      __ast_channel_alloc(int needqueue, int state, const char *cid_num,
      ^
      chan_lcr.c:969:18: error: dereferencing pointer to incomplete type
      ast_redir = &ast->redirecting;
      ^
      chan_lcr.c:970:19: error: dereferencing pointer to incomplete type
      ast_caller = &ast->caller;
      ^
      chan_lcr.c:990:5: error: dereferencing pointer to incomplete type
      ast->tech_pvt = call;
      ^
      chan_lcr.c:991:5: error: dereferencing pointer to incomplete type
      ast->tech = &lcr_tech;
      ^
      chan_lcr.c:992:5: error: dereferencing pointer to incomplete type
      ast->fds[0] = call->pipe[0];
      ^
      chan_lcr.c:1002:14: error: dereferencing pointer to incomplete type
      strncpy(ast->exten, param->setup.dialinginfo.id, AST_MAX_EXTENSION-1);
      ^
      chan_lcr.c:1004:14: error: dereferencing pointer to incomplete type
      strncpy(ast->context, param->setup.dialinginfo.context, AST_MAX_CONTEXT-1);
      ^
      chan_lcr.c:1006:14: error: dereferencing pointer to incomplete type
      strncpy(ast->context, param->setup.callerinfo.interface, AST_MAX_CONTEXT-1);
      ^
      chan_lcr.c:1187:5: error: dereferencing pointer to incomplete type
      ast->transfercapability = param->setup.capainfo.bearer_capa;
      ^
      chan_lcr.c:1198:5: error: dereferencing pointer to incomplete type
      ast->nativeformats = (options.law==’a’)?AST_FORMAT_ALAW:AST_FORMAT_ULAW;
      ^
      chan_lcr.c:1198:42: error: ‘AST_FORMAT_ALAW’ undeclared (first use in this function)
      ast->nativeformats = (options.law==’a’)?AST_FORMAT_ALAW:AST_FORMAT_ULAW;
      ^
      chan_lcr.c:1198:58: error: ‘AST_FORMAT_ULAW’ undeclared (first use in this function)
      ast->nativeformats = (options.law==’a’)?AST_FORMAT_ALAW:AST_FORMAT_ULAW;
      ^
      chan_lcr.c:1199:5: error: dereferencing pointer to incomplete type
      ast->readformat = ast->rawreadformat = ast->nativeformats;
      ^
      chan_lcr.c:1199:23: error: dereferencing pointer to incomplete type
      ast->readformat = ast->rawreadformat = ast->nativeformats;
      ^
      chan_lcr.c:1199:44: error: dereferencing pointer to incomplete type
      ast->readformat = ast->rawreadformat = ast->nativeformats;
      ^
      chan_lcr.c:1200:5: error: dereferencing pointer to incomplete type
      ast->writeformat = ast->rawwriteformat = ast->nativeformats;
      ^
      chan_lcr.c:1200:24: error: dereferencing pointer to incomplete type
      ast->writeformat = ast->rawwriteformat = ast->nativeformats;
      ^
      chan_lcr.c:1200:47: error: dereferencing pointer to incomplete type
      ast->writeformat = ast->rawwriteformat = ast->nativeformats;
      ^
      chan_lcr.c:1217:5: error: dereferencing pointer to incomplete type
      ast->priority = 1;
      ^
      chan_lcr.c:1218:5: error: dereferencing pointer to incomplete type
      ast->hangupcause = 0;
      ^
      chan_lcr.c: In function ‘lcr_in_proceeding’:
      chan_lcr.c:1261:8: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      int rc;
      ^
      chan_lcr.c: In function ‘lcr_in_alerting’:
      chan_lcr.c:1283:8: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      int rc;
      ^
      chan_lcr.c: In function ‘lcr_in_connect’:
      chan_lcr.c:1306:8: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      int rc;
      ^
      chan_lcr.c: In function ‘lcr_in_disconnect’:
      chan_lcr.c:1344:6: error: dereferencing pointer to incomplete type
      ast->hangupcause = call->cause;
      ^
      chan_lcr.c:1352:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      int rc;
      ^
      chan_lcr.c: In function ‘lcr_in_release’:
      chan_lcr.c:1383:6: error: dereferencing pointer to incomplete type
      ast->hangupcause = call->cause;
      ^
      chan_lcr.c:1391:9: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      int rc;
      ^
      chan_lcr.c: In function ‘lcr_in_information’:
      chan_lcr.c:1419:14: error: dereferencing pointer to incomplete type
      strncat(ast->exten, param->information.id, AST_MAX_EXTENSION-1);
      ^
      chan_lcr.c:1441:8: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      int rc;
      ^
      chan_lcr.c:1457:10: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      int rc;
      ^
      chan_lcr.c: In function ‘lcr_in_pattern’:
      chan_lcr.c:1519:8: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      int rc;
      ^
      chan_lcr.c: In function ‘lcr_in_dtmf’:
      chan_lcr.c:1550:7: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      int rc;
      ^
      chan_lcr.c: In function ‘release_all_calls’:
      chan_lcr.c:1735:8: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      int rc;
      ^
      chan_lcr.c: In function ‘wake_event’:
      chan_lcr.c:1884:6: warning: variable ‘rc’ set but not used [-Wunused-but-set-variable]
      int rc;
      ^
      chan_lcr.c: At top level:
      chan_lcr.c:2029:51: error: unknown type name ‘format_t’
      struct ast_channel *lcr_request(const char *type, format_t format, const struct ast_channel *requestor, void *data, int *cause)
      ^
      chan_lcr.c: In function ‘lcr_call’:
      chan_lcr.c:2407:12: error: dereferencing pointer to incomplete type
      call = ast->tech_pvt;
      ^
      chan_lcr.c:2435:9: error: dereferencing pointer to incomplete type
      if (ast->transfercapability == INFO_BC_DATAUNRESTRICTED
      ^
      chan_lcr.c:2436:9: error: dereferencing pointer to incomplete type
      || ast->transfercapability == INFO_BC_DATARESTRICTED
      ^
      chan_lcr.c:2437:9: error: dereferencing pointer to incomplete type
      || ast->transfercapability == INFO_BC_VIDEO)
      ^
      chan_lcr.c:2448:9: error: dereferencing pointer to incomplete type
      && ast->transfercapability != INFO_BC_DATAUNRESTRICTED
      ^
      chan_lcr.c:2449:9: error: dereferencing pointer to incomplete type
      && ast->transfercapability != INFO_BC_DATARESTRICTED
      ^
      chan_lcr.c:2450:9: error: dereferencing pointer to incomplete type
      && ast->transfercapability != INFO_BC_VIDEO)
      ^
      chan_lcr.c:2451:6: error: dereferencing pointer to incomplete type
      ast->transfercapability = INFO_BC_DATAUNRESTRICTED;
      ^
      In file included from chan_lcr.c:181:0:
      chan_lcr.c: In function ‘send_digit_to_chan’:
      chan_lcr.c:2509:77: error: dereferencing pointer to incomplete type
      CDEBUG(NULL, ast, “Unable to handle DTMF tone ‘%c’ for ‘%s’\n”, digit, ast->name);
      ^
      chan_lcr.h:138:110: note: in definition of macro ‘CDEBUG’
      #define CDEBUG(call, ast, arg…) chan_lcr_log(__LOG_NOTICE, __FILE__, __LINE__, __FUNCTION__, call, ast, ##arg)
      ^
      chan_lcr.c: In function ‘lcr_digit_begin’:
      chan_lcr.c:2537:12: error: dereferencing pointer to incomplete type
      call = ast->tech_pvt;
      ^
      chan_lcr.c: In function ‘lcr_digit_end’:
      chan_lcr.c:2584:12: error: dereferencing pointer to incomplete type
      call = ast->tech_pvt;
      ^
      chan_lcr.c: In function ‘lcr_answer’:
      chan_lcr.c:2620:12: error: dereferencing pointer to incomplete type
      call = ast->tech_pvt;
      ^
      chan_lcr.c: In function ‘lcr_hangup’:
      chan_lcr.c:2660:12: error: dereferencing pointer to incomplete type
      call = ast->tech_pvt;
      ^
      chan_lcr.c:2679:5: error: dereferencing pointer to incomplete type
      ast->tech_pvt = NULL;
      ^
      chan_lcr.c:2680:5: error: dereferencing pointer to incomplete type
      ast->fds[0] = -1;
      ^
      chan_lcr.c:2689:10: error: dereferencing pointer to incomplete type
      if (ast->hangupcause > 0)
      ^
      chan_lcr.c:2690:26: error: dereferencing pointer to incomplete type
      send_release(call, ast->hangupcause, LOCATION_PRIVATE_LOCAL);
      ^
      chan_lcr.c: In function ‘lcr_write’:
      chan_lcr.c:2732:18: error: ‘struct ast_frame_subclass’ has no member named ‘codec’
      if (!f->subclass.codec)
      ^
      chan_lcr.c:2741:19: error: ‘struct ast_frame_subclass’ has no member named ‘codec’
      if (!(f->subclass.codec & ast->nativeformats)) {
      ^
      chan_lcr.c:2741:31: error: dereferencing pointer to incomplete type
      if (!(f->subclass.codec & ast->nativeformats)) {
      ^
      chan_lcr.c:2765:40: error: ‘struct ast_frame_subclass’ has no member named ‘codec’
      ast_set_write_format(ast, f->subclass.codec);
      ^
      chan_lcr.c:2773:11: error: dereferencing pointer to incomplete type
      f = (ast->writetrans) ? ast_translate(
      ^
      chan_lcr.c:2774:7: error: dereferencing pointer to incomplete type
      ast->writetrans, fr, 0) : fr;
      ^
      chan_lcr.c:2783:12: error: dereferencing pointer to incomplete type
      call = ast->tech_pvt;
      ^
      chan_lcr.c: In function ‘lcr_read’:
      chan_lcr.c:2823:12: error: dereferencing pointer to incomplete type
      call = ast->tech_pvt;
      ^
      chan_lcr.c:2870:24: error: ‘struct ast_frame_subclass’ has no member named ‘codec’
      call->read_fr.subclass.codec = ast->nativeformats;
      ^
      chan_lcr.c:2870:36: error: dereferencing pointer to incomplete type
      call->read_fr.subclass.codec = ast->nativeformats;
      ^
      chan_lcr.c: In function ‘lcr_indicate’:
      chan_lcr.c:2926:12: error: dereferencing pointer to incomplete type
      call = ast->tech_pvt;
      ^
      chan_lcr.c:2951:37: error: dereferencing pointer to incomplete type
      ts = ast_get_indication_tone(ast->zone, “busy”);
      ^
      In file included from chan_lcr.c:181:0:
      chan_lcr.c:2959:97: error: dereferencing pointer to incomplete type
      CDEBUG(call, ast, “Received indicate AST_CONTROL_CONGESTION from Asterisk. (cause %d)\n”, ast->hangupcause);
      ^
      chan_lcr.h:138:110: note: in definition of macro ‘CDEBUG’
      #define CDEBUG(call, ast, arg…) chan_lcr_log(__LOG_NOTICE, __FILE__, __LINE__, __FUNCTION__, call, ast, ##arg)
      ^
      chan_lcr.c:2967:40: error: dereferencing pointer to incomplete type
      newparam.disconnectinfo.cause = ast->hangupcause;
      ^
      chan_lcr.c:2978:37: error: dereferencing pointer to incomplete type
      ts = ast_get_indication_tone(ast->zone, “congestion”);
      ^
      chan_lcr.c:3009:37: error: dereferencing pointer to incomplete type
      ts = ast_get_indication_tone(ast->zone, “ring”);
      ^
      chan_lcr.c:3051:30: error: dereferencing pointer to incomplete type
      ast_moh_start(ast,data,ast->musicclass);
      ^
      chan_lcr.c: In function ‘lcr_fixup’:
      chan_lcr.c:3109:12: error: dereferencing pointer to incomplete type
      call = ast->tech_pvt;
      ^
      chan_lcr.c: In function ‘lcr_send_text’:
      chan_lcr.c:3135:12: error: dereferencing pointer to incomplete type
      call = ast->tech_pvt;
      ^
      chan_lcr.c: In function ‘lcr_bridge’:
      chan_lcr.c:3179:14: error: dereferencing pointer to incomplete type
      call1 = ast1->tech_pvt;
      ^
      chan_lcr.c:3180:14: error: dereferencing pointer to incomplete type
      call2 = ast2->tech_pvt;
      ^
      chan_lcr.c:3292:14: error: dereferencing pointer to incomplete type
      call1 = ast1->tech_pvt;
      ^
      chan_lcr.c:3293:14: error: dereferencing pointer to incomplete type
      call2 = ast2->tech_pvt;
      ^
      chan_lcr.c: At top level:
      chan_lcr.c:3318:18: error: ‘AST_FORMAT_ALAW’ undeclared here (not in a function)
      .capabilities = AST_FORMAT_ALAW,
      ^
      chan_lcr.c:3320:15: error: ‘lcr_request’ undeclared here (not in a function)
      .requester = lcr_request,
      ^
      chan_lcr.c:3331:2: warning: initialization from incompatible pointer type
      .call = lcr_call,
      ^
      chan_lcr.c:3331:2: warning: (near initialization for ‘lcr_tech.call’)
      chan_lcr.c:3332:2: error: unknown field ‘bridge’ specified in initializer
      .bridge = lcr_bridge,
      ^
      chan_lcr.c:3332:2: warning: initialization from incompatible pointer type
      chan_lcr.c:3332:2: warning: (near initialization for ‘lcr_tech.hangup’)
      chan_lcr.c: In function ‘load_module’:
      chan_lcr.c:3520:61: error: ‘AST_FORMAT_ULAW’ undeclared (first use in this function)
      lcr_tech.capabilities = (options.law==’a’)?AST_FORMAT_ALAW:AST_FORMAT_ULAW;
      ^
      Makefile:1308: recipe for target ‘chan_lcr.po’ failed
      make[2]: *** [chan_lcr.po] Error 1
      make[2]: Leaving directory ‘/root/lcr’
      Makefile:878: recipe for target ‘all-recursive’ failed
      make[1]: *** [all-recursive] Error 1
      make[1]: Leaving directory ‘/root/lcr’
      Makefile:575: recipe for target ‘all’ failed
      make: *** [all] Error 2

  15. Ctrl-C remove and put the battery…can you please elaborate a little more, i.e. shall we begin with battery removed; whether the power button needs to be pressed and when etc.

    1. You have to remove the battery to stop rssi app and control c to begin with a new app you have to put the battery and then press the button power. I think also you have to relaunch my script because there was a mistake ( i used gnu-arm-build.3.sh and it dont work with jolly/testing) i updated it just after you have installed it so if you see gnu-arm-build3.sh you have to clone it and relaunch it https://github.com/bbaranoff/osmocopbb-ansible

  16. Help
    Makefile:1308: recipe for target ‘chan_lcr.po’ failed
    make[2]: *** [chan_lcr.po] Error 1
    make[2]: Leaving directory ‘/root/lcr’
    Makefile:878: recipe for target ‘all-recursive’ failed
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory ‘/root/lcr’
    Makefile:575: recipe for target ‘all’ failed
    make: *** [all] Error 2
    [email protected]:~/lcr#

  17. s it possible to use Three phones to support more than 2 timeslots?Do you use another branch? I cannot find tjhat info anywhere in the network-from-scratch page, two phones ,however work ok. And in the help output from transceiver app I find only the -2 option explicitly mentioned.
    However a third socket, osmocom_l2.3 is established after connecting third phone and launching the trx-firmware, but transceiver says:
    invalid option — ‘3’.

  18. I had downloaded the VM from your link the Kali Linux is running ok, but I can’t locate the applications. Were are it?
    Thanks.

      1. What do you mean with updated? I also have the correct vmdk but my desktop is also empty and nothing is installed. I tried it with VirtualBox and VM. Can you help me?

  19. Hi! Please help me, have next error log copmpile:
    [email protected]:~/mISDN# make modules
    make -C standalone INSTALL_MOD_PATH= modules
    make[1]: вход в каталог «/root/mISDN/standalone»
    rm -rf drivers include series .pc
    make btree
    make[2]: вход в каталог «/root/mISDN/standalone»
    mkdir -p drivers/isdn
    mkdir -p drivers/isdn/mISDN
    mkdir -p drivers/isdn/mISDN/octvqe
    mkdir -p drivers/isdn/hardware
    mkdir -p drivers/isdn/hardware/mISDN
    mkdir -p include/
    mkdir -p include/linux
    preparing drivers/isdn/mISDN/dsp_mg2ec_const.h
    preparing drivers/isdn/mISDN/dsp_mec2.h
    preparing drivers/isdn/mISDN/dsp_kb1ec_const.h
    preparing drivers/isdn/mISDN/dsp_pipeline.c
    preparing drivers/isdn/mISDN/l1oip.h
    preparing drivers/isdn/mISDN/oslec_fir.h
    preparing drivers/isdn/mISDN/l1oip_core.c
    preparing drivers/isdn/mISDN/dsp_mg2ec.c
    preparing drivers/isdn/mISDN/timerdev.c
    preparing drivers/isdn/mISDN/l1oip_codec.c
    preparing drivers/isdn/mISDN/oslec_echo.c
    preparing drivers/isdn/mISDN/tei.c
    preparing drivers/isdn/mISDN/dsp_blowfish.c
    preparing drivers/isdn/mISDN/socket.c
    preparing drivers/isdn/mISDN/layer1.h
    preparing drivers/isdn/mISDN/fsm.h
    preparing drivers/isdn/mISDN/dsp_mg2ec.h
    preparing drivers/isdn/mISDN/dsp_octwareec.h
    preparing drivers/isdn/mISDN/dsp_dtmf.c
    preparing drivers/isdn/mISDN/dsp_hwec.h
    preparing drivers/isdn/mISDN/dsp_biquad.h
    preparing drivers/isdn/mISDN/layer1.c
    preparing drivers/isdn/mISDN/dsp_oslec.c
    preparing drivers/isdn/mISDN/octvqe/octvqe_ioctl.h
    preparing drivers/isdn/mISDN/octvqe/octvqe_linux.c
    preparing drivers/isdn/mISDN/octvqe/octvqe_linux.h
    preparing drivers/isdn/mISDN/dsp_oslec.h
    preparing drivers/isdn/mISDN/stack.c
    preparing drivers/isdn/mISDN/dsp_kb1ec.c
    preparing drivers/isdn/mISDN/oslec_echo.h
    preparing drivers/isdn/mISDN/oslec_wrap.c
    preparing drivers/isdn/mISDN/oslec.h
    preparing drivers/isdn/mISDN/layer2.h
    preparing drivers/isdn/mISDN/fsm.c
    preparing drivers/isdn/mISDN/dsp_core.c
    preparing drivers/isdn/mISDN/dsp_tones.c
    preparing drivers/isdn/mISDN/dsp_kb1ec.h
    preparing drivers/isdn/mISDN/dsp_mec2_const.h
    preparing drivers/isdn/mISDN/dsp_octwareec.c
    preparing drivers/isdn/mISDN/clock.c
    preparing drivers/isdn/mISDN/dsp_hwec.c
    preparing drivers/isdn/mISDN/dsp_arith.h
    preparing drivers/isdn/mISDN/dsp_ecdis.h
    preparing drivers/isdn/mISDN/layer2.c
    preparing drivers/isdn/mISDN/dsp_cancel.h
    preparing drivers/isdn/mISDN/dsp_mec2.c
    preparing drivers/isdn/mISDN/dsp_cmx.c
    preparing drivers/isdn/mISDN/core.h
    preparing drivers/isdn/mISDN/core.c
    preparing drivers/isdn/mISDN/dtmf.c
    preparing drivers/isdn/mISDN/dsp_audio.c
    preparing drivers/isdn/mISDN/hwchannel.c
    preparing drivers/isdn/mISDN/dsp.h
    preparing drivers/isdn/mISDN/oslec_bit_operations.h
    preparing drivers/isdn/hardware/mISDN/w6692.c
    preparing drivers/isdn/hardware/mISDN/hfc_multi_8xx.h
    preparing drivers/isdn/hardware/mISDN/hwskel.h
    preparing drivers/isdn/hardware/mISDN/ipac.h
    preparing drivers/isdn/hardware/mISDN/xhfc24sucd.h
    preparing drivers/isdn/hardware/mISDN/mISDNinfineon.c
    preparing drivers/isdn/hardware/mISDN/compat_ids.h
    preparing drivers/isdn/hardware/mISDN/netjet.h
    preparing drivers/isdn/hardware/mISDN/hfcsusb.h
    preparing drivers/isdn/hardware/mISDN/xhfc_pci2pi.c
    preparing drivers/isdn/hardware/mISDN/hfc_pci.h
    preparing drivers/isdn/hardware/mISDN/hwskel.c
    preparing drivers/isdn/hardware/mISDN/hfcmulti.c
    preparing drivers/isdn/hardware/mISDN/hfcsusb.c
    preparing drivers/isdn/hardware/mISDN/hfcpci.c
    preparing drivers/isdn/hardware/mISDN/mISDNipac.c
    preparing drivers/isdn/hardware/mISDN/xhfc_pci2pi.h
    preparing drivers/isdn/hardware/mISDN/l1loop.h
    preparing drivers/isdn/hardware/mISDN/mISDNisar.c
    preparing drivers/isdn/hardware/mISDN/isar.h
    preparing drivers/isdn/hardware/mISDN/xhfc_su.h
    preparing drivers/isdn/hardware/mISDN/l1loop.c
    preparing drivers/isdn/hardware/mISDN/netjet.c
    preparing drivers/isdn/hardware/mISDN/xhfc_su.c
    preparing drivers/isdn/hardware/mISDN/avmfritz.c
    preparing drivers/isdn/hardware/mISDN/speedfax.c
    preparing drivers/isdn/hardware/mISDN/hfc_multi.h
    preparing drivers/isdn/hardware/mISDN/iohelper.h
    preparing drivers/isdn/hardware/mISDN/w6692.h
    preparing include/linux/mISDNif_s.h
    preparing include/linux/mISDNhw_s.h
    preparing include/linux/mISDNdsp_s.h
    preparing drivers/isdn/mISDN/octvqe/Makefile
    preparing drivers/isdn/mISDN/Makefile
    preparing drivers/isdn/hardware/mISDN/Makefile
    make[2]: выход из каталога «/root/mISDN/standalone»
    rm -f patched
    if test -f ../series/series_4.17; then \
    cp ../series/series_4.17 series; \
    else \
    echo “no series for kernel version 4.17”; \
    fi
    no series for kernel version 4.17
    if test -f series -a ! -f patched; then \
    ../scripts/apply_patch_series series; \
    touch patched; \
    else \
    echo “no series found”; \
    echo “no series found” > .patchOK; \
    fi
    no series found
    cat .patchOK
    no series found
    rm -f mISDN.cfg.D
    rm -f mISDN.cfg.M
    enable CONFIG_MISDN
    enable CONFIG_MISDN_DSP
    enable CONFIG_MISDN_L1OIP
    enable CONFIG_MISDN_HFCPCI
    enable CONFIG_MISDN_HFCMULTI
    disable CONFIG_MISDN_HFCMULTI_8xx
    enable CONFIG_MISDN_HFCUSB
    enable CONFIG_MISDN_XHFC
    enable CONFIG_MISDN_AVMFRITZ
    enable CONFIG_MISDN_SPEEDFAX
    enable CONFIG_MISDN_INFINEON
    enable CONFIG_MISDN_W6692
    enable CONFIG_MISDN_NETJET
    enable CONFIG_MISDN_IPAC
    enable CONFIG_MISDN_ISAR
    enable CONFIG_MISDN_L1LOOP
    make modules_
    make[2]: вход в каталог «/root/mISDN/standalone»
    rm -f modules
    export MISDN_INC=/root/mISDN/standalone/include; export MISDN_CFLAGS=”-D_MCONFIG_MISDN -D_MCONFIG_MISDN_DSP -D_MCONFIG_MISDN_L1OIP -D_MCONFIG_MISDN_HFCPCI -D_MCONFIG_MISDN_HFCMULTI -D_MCONFIG_MISDN_HFCUSB -D_MCONFIG_MISDN_XHFC -D_MCONFIG_MISDN_AVMFRITZ -D_MCONFIG_MISDN_SPEEDFAX -D_MCONFIG_MISDN_INFINEON -D_MCONFIG_MISDN_W6692 -D_MCONFIG_MISDN_NETJET -D_MCONFIG_MISDN_IPAC -D_MCONFIG_MISDN_ISAR -D_MCONFIG_MISDN_L1LOOP”; make -C /lib/modules/4.17.0-kali1-amd64/build _MCONFIG_MISDN=m _MCONFIG_MISDN_DSP=m _MCONFIG_MISDN_L1OIP=m _MCONFIG_MISDN_HFCPCI=m _MCONFIG_MISDN_HFCMULTI=m _MCONFIG_MISDN_HFCUSB=m _MCONFIG_MISDN_XHFC=m _MCONFIG_MISDN_AVMFRITZ=m _MCONFIG_MISDN_SPEEDFAX=m _MCONFIG_MISDN_INFINEON=m _MCONFIG_MISDN_W6692=m _MCONFIG_MISDN_NETJET=m _MCONFIG_MISDN_IPAC=m _MCONFIG_MISDN_ISAR=m _MCONFIG_MISDN_L1LOOP=m SUBDIRS=/root/mISDN/standalone/drivers/isdn/mISDN modules
    make[3]: вход в каталог «/usr/src/linux-headers-4.17.0-kali1-amd64»
    CC [M] /root/mISDN/standalone/drivers/isdn/mISDN/octvqe/octvqe_linux.o
    LD [M] /root/mISDN/standalone/drivers/isdn/mISDN/octvqe/octvqe.o
    CC [M] /root/mISDN/standalone/drivers/isdn/mISDN/core.o
    CC [M] /root/mISDN/standalone/drivers/isdn/mISDN/fsm.o
    /root/mISDN/standalone/drivers/isdn/mISDN/fsm.c: In function ‘mISDN_FsmInitTimer’:
    /root/mISDN/standalone/drivers/isdn/mISDN/fsm.c:120:2: error: implicit declaration of function ‘setup_timer’; did you mean ‘del_timer’? [-Werror=implicit-function-declaration]
    setup_timer(&ft->tl, (void *)FsmExpireTimer, (long)ft);
    ^~~~~~~~~~~
    del_timer
    /root/mISDN/standalone/drivers/isdn/mISDN/fsm.c: In function ‘mISDN_FsmAddTimer’:
    /root/mISDN/standalone/drivers/isdn/mISDN/fsm.c:156:2: error: implicit declaration of function ‘init_timer’; did you mean ‘init_timers’? [-Werror=implicit-function-declaration]
    init_timer(&ft->tl);
    ^~~~~~~~~~
    init_timers
    cc1: some warnings being treated as errors
    make[6]: *** [/usr/src/linux-headers-4.17.0-kali1-common/scripts/Makefile.build:318: /root/mISDN/standalone/drivers/isdn/mISDN/fsm.o] Ошибка 1
    make[5]: *** [/usr/src/linux-headers-4.17.0-kali1-common/Makefile:1585: _module_/root/mISDN/standalone/drivers/isdn/mISDN] Ошибка 2
    make[4]: *** [Makefile:146: sub-make] Ошибка 2
    make[3]: *** [Makefile:8: all] Ошибка 2
    make[3]: выход из каталога «/usr/src/linux-headers-4.17.0-kali1-amd64»
    make[2]: *** [Makefile:155: modules_] Ошибка 2
    make[2]: выход из каталога «/root/mISDN/standalone»
    make[1]: *** [Makefile:162: modules] Ошибка 2
    make[1]: выход из каталога «/root/mISDN/standalone»
    make: *** [Makefile:779: modules] Ошибка 2

  20. i have errors on install libosmo-dsp
    /usr/bin/ld: /usr/local/lib/libfftw3f.a(hc2hc-direct.o): relocation R_X86_64_32 against `.text’ can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: final link failed: nonrepresentable section on output
    collect2: error: ld returned 1 exit status
    make[2]: *** [Makefile:409: libosmodsp.la] Ошибка 1
    make[2]: выход из каталога «/root/libosmo-dsp/src»
    make[1]: *** [Makefile:487: all-recursive] Ошибка 1
    make[1]: выход из каталога «/root/libosmo-dsp»
    make: *** [Makefile:373: all] Ошибка 2

  21. Bonjour, est-il possible d’envoyer un message vers une téléphonne et que ce n’est pas un numéro mais un nom qui apparait quand le message est vu par le destinataire! chez nous à Madagascar l’opérateur utilise cette téchnique pour faire du propagande pour l’éléction! est-il possible de faire la même chose avec osmo-bts ?

  22. Hallo Bastien,
    in the VM is a file who says
    first of all.
    Where do I get the username and password maybee from Vodafone in Germany.
    May I have there an Acound?
    and for what…
    internet konekt or telefone calls?
    Must I have a sim card for that?
    I don´t know what I have to put in the sip.conf

  23. your prebuilt vm is not opening
    Failed to open a session for the virtual machine Kali-Linux-2018.1-vbox-amd64.
    The virtual machine ‘Kali-Linux-2018.1-vbox-amd64’ has terminated unexpectedly during startup with exit code 1 (0x1). More details may be available in ‘C:\Users\Talhanamekaka\VirtualBox VMs\Kali-Linux-2018.1-vbox-amd64\Logs\VBoxHardening.log’.
    Result Code: E_FAIL (0x80004005)
    Component: MachineWrap
    Interface: IMachine {5047460a-265d-4538-b23e-ddba5fb84976}

  24. git clone git://git.osmocom.org/osmo-ggsn
    ./configure

    configure: error: Package requirements (libosmoabis >= 0.6.0) were not met:

    No package ‘libosmoabis’ found

    Consider adjusting the PKG_CONFIG_PATH environment variable if you
    installed software in a non-standard prefix.

    Alternatively, you may set the environment variables LIBOSMOABIS_CFLAGS
    and LIBOSMOABIS_LIBS to avoid the need to call pkg-config.
    See the pkg-config man page for more details.

    what solution ??

  25. Hi bastien, i watched your videos about osmocombb-gsm sniff on youtube, and I found it very interesting, but i would like to know if it is obligatory to use two Motorola mobile and also if we must modify the filters
    Thank’s for your answer

    1. For the specific VM, yes you’ll need 2 Motorola.
      To give you some more details, the first instance of a BTS using a motorola was made by using only 1 Motorola. You still can make a BTS with a Motorola by using 1 Motorola. The problem is that the Motorola can only TX or RX and not both at the same time and you can’t change that, because the Motorola acting as the transceiver needs to RX and TX. By design, there are only 8 timeslots. So by using those 8 timeslots, 1 Motorola can only serve some basic BTS functions, like registering slave phones, and sending SMS. There are also some other functions, but I try to explain as simple as I can. Voice is not supported with only 1 Motorola.
      So, by adding a second motorola, the BTS that is using 2 Motorola, is capable to support voice, by using the extra timeslots of the second motorola.
      Adding motorola more motorola in the BTS should be the next logical step, but unfortunately, 2 is the current max and it stands for years now.
      About the Filter Rework, or Filter mod. It is not necessary and you can use 2 stock motorola in this VM. To give some more context. All mobile phones, no matter of manufacturer or year of manufacture have uplink RX filters inside to block the “unwanted” uplink from other mobile phones. This is because in the normal phone usage, a phone does not need to “listen” to what other mobile phones are transmitting to the BTS. So, for blocking these frequencies, the manufacturer puts these RF filters inside the phone. BUT! If you use a Motorola for a BTS, the RX/TX frequencies are reversed in order and the motorola needs to listen to the uplink of the phones that need to camp to your BTS. So, by removing those RF filters, the motorola is capable to listen to all the GSM900/DCS1800 spectrum, including both uplink and downlink.
      By using a factory phone in the BTS, you simply don’t get the max range that the motorola is capable, because there are those RF filters, but it is enough for short range tests, for example around 5-10 meters. A motorola with the Filter Rework is capable to reach around 50 meters to 150 meters or more by using external antennas.
      To conclude. It really depends up to you and the range that you want to achieve if you are going to use a stock/factory motorola or a Filter Modified motorola.
      I am in the hardware part of OsmocomBB and I sell only Filter Modified motorola and other custom hardware for OsmocomBB. If you ever need anything or have any questions, just drop a message at [email protected] I mostly work with telecommunication professionals, but I do like to provide my help to the community.
      Cheers.

  26. When i load up layer1 and try ./mobile -i 127.0.0.1 its says Copyright (C) 2008-2010 …
    Contributions by …

    License GPLv2+: GNU GPL version 2 or later
    This is free software: you are free to change and redistribute it.
    There is NO WARRANTY, to the extent permitted by law.

    Assert failed !check_element_exists(cnode, cmd->string) command.c:767
    backtrace() returned 8 addresses
    /usr/local/lib/libosmocore.so.12(osmo_panic+0xcb) [0x7f08397ff3bb]
    /usr/local/lib/libosmovty.so.4(install_element+0x5e9) [0x7f08395ce399]
    ./mobile(+0x4fa28) [0x55ff87937a28]
    ./mobile(+0x165bf) [0x55ff878fe5bf]
    ./mobile(+0x15955) [0x55ff878fd955]
    /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xe7) [0x7f0838b5eb97]
    ./mobile(+0x15b9a) [0x55ff878fdb9a]
    Aborted (core dumped)

    Supposedly an issue with different versions of libosmocore and osmocombb. Does anybody know the steps to make work?

  27. Hi everyone ,
    I am trying to install it on kali 2018.1 but I have some issues while compiling osmo-sgsn , It says that it needs a dependancy called libosmo-gsup-client but I can’t find that specific package.
    Does anyone can help me please .

Leave a Reply