Accelerate3g5 -- unicornteam » History » Revision 23
Revision 22 (Alin, 08/08/2017 03:37 AM) → Revision 23/24 (laforge, 11/07/2023 03:49 PM)
h1. Accelerate3g5 -- Unicorn Team Journal 2017/03/15 -- Received the package of nano3G. !C7aK_6IVAAALB5Z.jpg! 2017/04/10 h2. Building from source * PC:Ubuntu16.04 * HardWare:ip.access nano3G * SoftWare:Osmocom !C7aK_5_U0AAN1Co.jpg! h3. 1.1 Install cross-compilation environment <pre> sudo apt-get update sudo apt-get install libtool shtool autoconf git-core pkg-config make gcc build-essential libgmp3-dev libmpfr-dev libx11-6 libx11-dev texinfo flex bison libncurses5 libncurses5-dbg libusb-0.1-4 libpcsclite1 libccid pcscd libncurses5-dev libncursesw5 libncursesw5-dbg libncursesw5-dev zlibc zlib1g-dev libmpfr4 libmpc-dev libpcsclite-dev sudo ldconfig mkdir osm cd osm mkdir build install src wget http://bb.osmocom.org/trac/raw-attachment/wiki/GnuArmToolchain/gnu-arm-build.3.sh cd src wget http://ftp.gnu.org/gnu/gcc/gcc-4.8.2/gcc-4.8.2.tar.bz2 wget http://ftp.gnu.org/gnu/binutils/binutils-2.21.1a.tar.bz2 wget ftp://sources.redhat.com/pub/newlib/newlib-1.19.0.tar.gz cd .. chmod +x gnu-arm-build.3.sh sudo bash gnu-arm-build.3.sh </pre> h3. 1.2 Add Cross compiler environment <pre> cd install/bin pwd vi ~/./.bashrc export PATH=$PATH:/home/$username(change this to your name)/osm/install/bin #save and quit cd ../../ source ~/.bashrc </pre> h3. 0x02 build CalypsoBTS h3. 2.1 Build libosmo-dsp <pre> git clone https://gitea.osmocom.org/sdr/libosmo-dsp git://git.osmocom.org/libosmo-dsp.git cd libosmo-dsp/ autoreconf -i ./configure make sudo make install cd .. </pre> h3. 2.2 Build osmocom-bb <pre> git clone https://gitea.osmocom.org/phone-side/osmocom-bb git://git.osmocom.org/osmocom-bb.git trx cd trx/ git checkout jolly/testing cd src/ # It needs TX support # Just uncomment 'CFLAGS += -DCONFIG_TX_ENABLE' in target/firmware/Makefile # And make with transceiver support make HOST_layer23_CONFARGS=--enable-transceiver </pre> h3. 2.3 Install dependency package <pre> sudo apt-get install sqlite3 libdbi-dev libdbd-sqlite3 libsctp-dev </pre> h3. 2.4 Build Ortp <pre> wget http://download.savannah.gnu.org/releases/linphone/ortp/sources/ortp-0.22.0.tar.gz tar -xvf ortp-0.22.0.tar.gz cd ortp-0.22.0/ ./configure make sudo make install sudo ldconfig cd .. </pre> h3. 2.5 Build libosmo-abis <pre> git clone https://gitea.osmocom.org/osmocom/libosmo-abis git://git.osmocom.org/libosmo-abis.git cd libosmo-abis autoreconf -i ./configure make sudo make install sudo ldconfig cd .. </pre> h3. 2.6 Build libosmo-netif <pre> git clone https://gitea.osmocom.org/osmocom/libosmo-netif git://git.osmocom.org/libosmo-netif.git cd libosmo-netif/ autoreconf -i ./configure make sudo make install sudo ldconfig cd .. </pre> h3. 2.7 Build openbsc install PCAP library frist <pre> apt-cache search PCAP sudo pat-get install libpcap-dev libpcap0.8 libpcap0.8-dbg libpcap0.8-dev sudo ldconfig git clone https://gitea.osmocom.org/cellular-infrastructure/openbsc git://git.osmocom.org/openbsc.git cd openbsc/openbsc/ autoreconf -i ./configure make sudo make install cd ../.. </pre> h3. 2.8 Build osmo-bts <pre> git clone https://gitea.osmocom.org/cellular-infrastructure/osmo-bts git://git.osmocom.org/osmo-bts.git cd osmo-bts autoreconf -i ./configure --enable-trx make sudo make install cd .. </pre> h3. 2.9 Create configuration folder for OpenBSC <pre> # Create the configuration folder if it isn't exist yet mkdir ~/.osmocom cd ~/.osmocom touch ~/.osmocom/open-bsc.cfg touch ~/.osmocom/osmo-bts.cfg </pre> h3. 0x03 Build Cellular Infrastructure h3. 3.1 Clone <pre> git clone https://git.osmocom.org/osmocom/libosmocore git://git.osmocom.org/libosmocore git clone https://git.osmocom.org/osmocom/libosmo-abis git://git.osmocom.org/libosmo-abis git clone https://git.osmocom.org/osmocom/openbsc git://git.osmocom.org/openbsc git clone https://git.osmocom.org/osmocom/libosmo-netif git://git.osmocom.org/libosmo-netif git clone https://git.osmocom.org/osmocom/libosmo-sccp git://git.osmocom.org/libosmo-sccp git clone https://git.osmocom.org/cellular-infrastructure/libsmpp34 git://git.osmocom.org/libsmpp34 git clone https://git.osmocom.org/cellular-infrastructure/openggsn git://git.osmocom.org/openggsn </pre> h3. 3.2 Download and run build script <pre> wget https://osmocom.org/attachments/download/2438/build_2G.sh chmod 777 build_2G.sh sudo bash build_2G.sh </pre> h3. Run BTS Terminal 1: <pre> osmo-nitb -c ~/.osmocom/open-bsc.cfg -l ~/.osmocom/hlr.sqlite3 -P -C --debug=DRLL:DCC:DMM:DRR:DRSL:DNM </pre> Terminal 2: <pre> telnet localhost 4242 </pre> !2017-04.png! <pre> OpenBSC> show version OpenBSC 0.15.0.726-ca27 (OpenBSC). Copyright (C) 2008-2016 Harald Welte, Holger Freyther Contributions by Daniel Willmann, Jan Lübbe, Stefan Schmidt Dieter Spaar, Andreas Eversberg, Sylvain Munaut, Neels Hofmeyr License AGPLv3+: GNU AGPL version 3 or later <http://gnu.org/licenses/agpl-3.0.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. </pre> 2017/04/11 h2. Configuring the ip.access nano3G !network.jpg! h3. PC IP:192.168.31.147 (With WiFi) h3. Route IP:192.168.31.1 h3. 3G Access Point IP:unkonw <pre> cd openbsc/openbsc/src/ipaccess #or cd openbsc/openbsc/build-2G/src/ipaccess sudo ./abisip-find </pre> !ipfind.png! <pre> telnet 3G Access Point's IP 8090 </pre> !telnet.png! <pre> ssh -oKexAlgorithms=+diffie-hellman-group1-sha1 root@192.168.31.136 password:newsys </pre> !Snip20170411_2.png! <pre> init3@0xroot:~/osm/openbsc/openbsc/src/ipaccess$ ./ipaccess-config --help ipaccess-config (C) 2009-2010 by Harald Welte and others This is FREE SOFTWARE with ABSOLUTELY NO WARRANTY Usage: ipaccess-config IP_OF_BTS Commands for writing to the BTS: -u --unit-id UNIT_ID Set the Unit ID of the BTS -o --oml-ip IP Set primary OML IP (IP of your BSC) -i --ip-address IP/MASK Set static IP address + netmask of BTS -g --ip-gateway IP Set static IP gateway of BTS -r --restart Restart the BTS (after other operations) -n --nvram-flags FLAGS/MASK Set NVRAM attributes -S --nvattr-set FLAG Set one additional NVRAM attribute -U --nvattr-unset FLAG Set one additional NVRAM attribute -l --listen TESTNR Perform specified test number -L --Listen TEST_NAME Perform specified test -s --stream-id ID Set the IPA Stream Identifier for OML -d --software FIRMWARE Download firmware into BTS Miscellaneous commands: -h --help this text -H --HELP Print parameter details. -f --firmware FIRMWARE Provide firmware information -w --write-firmware This will dump the firmware parts to the filesystem. Use with -f. -p --loop Loop the tests executed with the --listen command. </pre> <pre> init3@0xroot:~/osm/openbsc/openbsc/src/ipaccess$ ./ipaccess-proxy --help Usage: ipaccess-proxy [options] ipaccess-proxy is a proxy BTS. -h --help. This help text. -l --listen IP. The ip to listen to. -b --bsc IP. The BSC IP address. -g --gprs IP. Take GPRS NS from that IP. -s --disable-color. Disable the color inside the logging message. -e --log-level number. Set the global loglevel. -T --timestamp. Prefix every log message with a timestamp. -V --version. Print the version of OpenBSC. </pre> h2. Femto Config 2017/06/06: phone call work fine. SMS work fine. Internet Date not work -.-! 2017/06/20: Internet Date work fine :) !20170606270232.png! h2. Clone and Build from script <pre> wget https://osmocom.org/attachments/download/2726/3G-config-example.tar tar zxvf 3G-config-example.tar cd 3G-config-example/build ./clone_and_build_osmocom_3g.sh sudo apt-get install rxvt-unicode </pre> add subscribers with auth keys in the HLR database: https://osmocom.org/projects/cellular-infrastructure/wiki/Getting_Started_with_3G https://osmocom.org/projects/cellular-infrastructure/wiki/Configuring_the_ipaccess_nano3G !IMG_3088.PNG! h2. Demo 2017/07/06: !20170606241837.png! [[https://youtu.be/PFH_-vID3AA]]