Skip to content

Instantly share code, notes, and snippets.

View mrlnc's full-sized avatar

Merlin Chlosta mrlnc

View GitHub Profile
@mrlnc
mrlnc / iOS_CellBroadcast.md
Created May 24, 2022 09:48
iOS Emergency Configs

This file contains all Cell Broadcast configs from the iOS IPCC Carrier Bundles.

NOTE: not all configurations are in use - some are outdated. if you're interested in current versions, check the BundleMappings in the IPCC index XML.

Config file: data/031-16743-20150119-BAC78E82-A18F-11E4-BAAE-77D114E258F2_vtr_cl_iPhone.ipcc-dir/Payload/vtr_cl.bundle/carrier.plist
{
  "AlertConfigurations": {
@mrlnc
mrlnc / ipcc.md
Created April 25, 2022 11:03
iOS IPCC Carrier Configs

Inspect iOS Carrier Profiles (IPCC)

Carrier Profiles configure your smartphone for mobile networks. I'm not sure if Carrier Profiles are just a legacy or are actually required nowadays, since all configuration should be done through the mobile network itself.

You'll find things in there like:

  • enable VoLTE for specific carriers
  • disable some bands (makes sense if your carrier isn't transmitting there)

Download the list of all IPCCs:

@mrlnc
mrlnc / srsran_debug.md
Created November 4, 2021 10:11
srsRAN Debug vscode
  • srsRAN requires to run with sudo for accessing USRP software radios.
  • vscode runs as unprivileged user.
  • attaching a debugger (running unprivileged) to srsRAN (privileged) won't work.

See here: microsoft/vscode-remote-release#2053 (comment)

Create a file /usr/share/polkit-1/actions/com.ubuntu.pkexec.gdb.policy and add:

<?xml version="1.0" encoding="UTF-8"?>
@mrlnc
mrlnc / silent_ping_sms.md
Last active October 28, 2021 12:06
Building "Silent Ping SMS" Android App

Building the app "Silent Ping SMS".

Install JDK and gradle.

apt install gradle openjdk-8-jdk 

The README says: ./gradle clean installDebug, which fails:

@mrlnc
mrlnc / pysim-suci.md
Last active November 7, 2023 12:55
pysim-suci.md
@mrlnc
mrlnc / free5gc-run-tests-extern-5gc.md
Last active March 13, 2021 18:25
free5gc-run-tests-extern-5gc.md

You can use Free5GC's set of testcases (free5gc/test/registration_test.go) to test other core networks, too.

1.) change IPs in registration_test.go to point to your 5GC instance.

const ranN2Ipv4Addr string = "127.0.0.1"
const amfN2Ipv4Addr string = "127.0.0.1"

2.) run tests with the noinit parameter -- this will inhibit initialization of a local free5gc instance

@mrlnc
mrlnc / adb-5gnr-status.md
Created March 4, 2021 12:49
adb: get 5G-NR connection status

I need to use ADB and check if the phone is currently on 5GNR or not. gsm.network.type doesn't indicate if 5G-NSA bearers are active. No matter if LTE, LTE+ or 5G indicators are shown, the network type remains the same:

OnePlus8:/ # getprop gsm.network.type                                                                                     
LTE,Unknown

Workaround:

logcat /data/com.android.providers.telephony/databases/telephony.db | grep -i update5GIcon
@mrlnc
mrlnc / free5gc-vscode-debug.md
Created February 27, 2021 16:14
Debugging free5gc

Free5GC has many components and I'm not very familiar with Golang, so this is a quick reminder for myself how debugging works with Go.

I'm using vscode with the (golang.Go plugin)[https://marketplace.visualstudio.com/items?itemName=golang.Go]

  1. Start all Free5GC components with ./run.sh
  2. Kill the component you'd like to debug, like killall amf

The main issue is that the Go module doesn't work well with submodules as of now, so you cannot start debugging from the free5gc folder.

@mrlnc
mrlnc / libqmi-git.md
Last active March 16, 2022 15:48
Building qmicli and libqmi from source
Error in user YAML: (<unknown>): mapping values are not allowed in this context at line 1 column 49
---

:stop_sign: these notes are outdated. :stop_sign:

build tools were changed for `libqmi > 1.30`
check out the official docs: https://modemmanager.org/docs/libqmi/building/

---

qmicli (building on libqmi) as shipped with Ubuntu 20.04 can’t interface with 5G chipsets as the 5G-NR-related symbols are missing. Support begins with 1.26.4 in Ubuntu 20.10, but I think it doesn’t hurt to have the lastest release — new features are being added quite fast.