Home srsRan 4G Setup
Post
Cancel

srsRan 4G Setup

Hardware

Software

  • Ubuntu 22.04
  • VMware Workstation

Install Ubuntu in VMware

change usb setting USB Compatibility to USB 3.1

Update/Match IMSI with MCC/MNC

pushing mcc mnc and changing the imsi to match the first five digit of sim card need to match mcc mnc . for us its 001 01 (test network)

Example Config

1
./pySim-prog.py -p 0 -t sysmoISIM-SJA2 -a 89907613 -x 001 -y 01 -i 001010000052250 -s 8988211000002592504 -o F6CA46797341FC2B2FCA22CF0C165D4B -k 9BA13241D5D4A8B2466BA4EF19A1B971 

Install BladeRF

Dependencies

Programs will silently fail if you don’t have these dependencies

1
2
3
# deps for common
sudo apt install libusb-1.0.0-dev libusb-1.0.0 build-essential cmake

https://github.com/Nuand/bladeRF/tree/master/host

Testing if bladeRf Works

In terminal, type

1
bladeRf-cli -p

Should look similar to below

Fetch the lastest FPGA image

get the fpga here

I have the BladeRF A4 so I will install it using A4 but replace command below with your own FPGA

1
2
3
wget https://www.nuand.com/fpga/hostedxA4-latest.rbf # make sure you use your fpga version

bladeRF-cli -L ./hostedxA4-latest.rbf

Fetch the lastest firmware image

get the firmware here

1
2
wget https://www.nuand.com/fx3/bladeRF_fw_latest.img
bladeRF-cli  -f ./bladeRF_fw_latest.img

Then power cycle the SDR to load the firmware

Check if everything is loaded

1
bladeRF-cli -e info -e version

Installing srsRan

We need to compile srsRan from source. Follow this documentation

https://docs.srsran.com/projects/4g/en/latest/general/source/1_installation.html

Updating Config

Update user_db.csv

Update user_db.csv with your sim card imsi and ki like example https://github.com/srsran/srsRAN_4G/blob/master/srsepc/user_db.csv.example

Running

Folow this. TLDR you have to https://docs.srsran.com/projects/4g/en/latest/usermanuals/source/1_setup.html

Diagnostic

To check your mobile card setting on andriod you can dial *#*#4636#*#*

Can’t find Mobile Network?

On your enb.conf for me it was /root/.config/srsran/enb.conf look for dl_earfcn under [rf]. Change values to 800, 1800, 2600 One of those and see if apn will show up. Samsung Basebands are usually very annoying when it comes to these.

For Pixel 7 it was 2600

This post is licensed under CC BY 4.0 by the author.

Loadable Kernel Modules

CVE-2019-2215 Bad Binder Writeup