Project

General

Profile

Actions

MS-side GPRS implementation

Project description

An open source GPRS implementation for OsmocomBB. Can demonstrate GRPS attach, PDP
context establishment and the exchange of uplink and downlink user IP data with a GPRS network.

A sample pcap containing the related messages can be found here: gprs_attach.pcapng.gz
The sequence diagrams of all primitives required between layers can be found at 3GPP TS 24.007 Annex C "GPRS-Services sequence diagram".

Project architecture

Here we have the overall project architecture and the state of implementation.

I created a draft layer diagram using https://draw.io, see the attachments.
The "ardc_darc_gprs_arch.drawio" can be uploaded and edited there.
Suggestions/corrections are welcome (FIXME section below).

Lower layer details

  • the setup consists of a few threads
    • a lower rx-thread that keeps the time by handling SCH bursts and ensures ts alignment
    • the upper rx thread that also is the select "main loop" that demods the bursts and handles the communication with upper layers
    • ctrl if thread that asynchronously handles ctrl commands which can't be submitted from libusb threads in the bladerf case
    • a tx thread that modulates and submits the bursts
    • in case of uhd a few more threads, 9 in total.
  • current target is a raspi 4 running at max cpu freq without any power save, with isolated core 1+2 (0+3 work as usual), other threads are distributed across non isolated cores.
    • arbitrary choice, rpi4 usb is known good, cpu is sufficient
    • yes, this can run as is on any system with 4 cores without configuring anything, it will just not work reliably.
  • latency excluding usb is > 1 ts, since the sdr buffer is 1ts < size <2 ts so the average case is 1-2ts latency including demodulation until data hypothetically reaches the l1 socket to upper layer apps, decoding is basically free.
    • usb3 packet size is 1024 -> min blade usb transfer is 1020 samples
    • uhd transfer size has to aligned to 8 and 24 bytes but not a multiple of 1024.. so it can be tuned, but not to gsm burst sizes.
Files (12)
ardc_darc_gprs_arch.v1.drawio ardc_darc_gprs_arch.v1.drawio 3.07 KB fixeria, 11/18/2022 06:32 PM
ardc_darc_gprs_arch.v1.svg View ardc_darc_gprs_arch.v1.svg 51.3 KB fixeria, 11/18/2022 06:32 PM
ardc_darc_gprs_arch.v1.png View ardc_darc_gprs_arch.v1.png 85.4 KB fixeria, 11/18/2022 06:32 PM
ardc_darc_gprs_arch.v2.png View ardc_darc_gprs_arch.v2.png 60.4 KB Hoernchen, 11/18/2022 07:47 PM
ardc_darc_gprs_arch.v2.drawio ardc_darc_gprs_arch.v2.drawio 3.1 KB Hoernchen, 11/18/2022 07:47 PM
ardc_darc_gprs_arch.v3.drawio ardc_darc_gprs_arch.v3.drawio 3.08 KB fixeria, 12/26/2022 04:08 PM
ardc_darc_gprs_arch.v3.png View ardc_darc_gprs_arch.v3.png 79.9 KB fixeria, 12/26/2022 04:08 PM
ardc_darc_gprs_arch.v4.drawio ardc_darc_gprs_arch.v4.drawio 25.8 KB pespin, 03/30/2023 12:27 PM
ardc_darc_gprs_arch.v4.png View ardc_darc_gprs_arch.v4.png 124 KB pespin, 03/30/2023 12:28 PM
ardc_darc_gprs_arch.v5.drawio ardc_darc_gprs_arch.v5.drawio 28.5 KB pespin, 04/24/2023 10:44 AM
ardc_darc_gprs_arch.v5.png View ardc_darc_gprs_arch.v5.png 88.6 KB pespin, 04/24/2023 10:44 AM
gprs_attach.pcapng.gz gprs_attach.pcapng.gz 25.7 KB pespin, 05/22/2023 09:24 AM

Updated by pespin 11 months ago · 11 revisions

Add picture from clipboard (Maximum size: 48.8 MB)