Attention is currently required from: Timur Davydov, laforge, neels.
pespin has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email )
Change subject: Add Emscripten build support and JS callback logging backend
......................................................................
Patch Set 8:
(2 comments)
File src/core/logging_emscripten.c:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/7358986e_c7fa421d?… :
PS7, Line 24: /*! \addtogroup logging
> Thanks for the suggestion, agreed. […]
Please make sure you rebase your work on top of current master, I did some changes to configure.ac and they got merged today in master and you'll probably need to adapt your new patch version.
File src/core/netdev.c:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/c3ce9e9b_c68d33bc?… :
PS5, Line 67: #if (!EMBEDDED) && !defined(__EMSCRIPTEN__)
> To clarify: the first problem is actually a conditional compilation within the source code itself. […]
Great, please submit a separate patch with those changes (since they are actually independent from emscripten).
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
Gerrit-Change-Number: 41813
Gerrit-PatchSet: 8
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Comment-Date: Mon, 19 Jan 2026 14:39:43 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: Timur Davydov <dtv.comp(a)gmail.com>
Attention is currently required from: dexter, laforge, phcoder.
Hello Jenkins Builder, dexter, laforge,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/pysim/+/41786?usp=email
to look at the new patch set (#15).
The following approvals got outdated and were removed:
Code-Review+1 by laforge, Code-Review+2 by dexter, Verified+1 by Jenkins Builder
The change is no longer submittable: Code-Review and Verified are unsatisfied now.
Change subject: Print SMSC in pySim-read.py
......................................................................
Print SMSC in pySim-read.py
Change-Id: I17067b68086316d51fd71ba77049874605594e3f
---
M pySim-read.py
M tests/pySim-prog_test/Fairwaves-SIM.ok
M tests/pySim-prog_test/Wavemobile-SIM.ok
M tests/pySim-prog_test/fakemagicsim.ok
M tests/pySim-prog_test/sysmoISIM-SJA2.ok
M tests/pySim-prog_test/sysmoISIM-SJA5.ok
M tests/pySim-prog_test/sysmoUSIM-SJS1.ok
M tests/pySim-prog_test/sysmosim-gr1.ok
8 files changed, 17 insertions(+), 0 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/pysim refs/changes/86/41786/15
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41786?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I17067b68086316d51fd71ba77049874605594e3f
Gerrit-Change-Number: 41786
Gerrit-PatchSet: 15
Gerrit-Owner: phcoder <phcoder(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: phcoder <phcoder(a)gmail.com>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: dexter <pmaier(a)sysmocom.de>
Attention is currently required from: laforge, neels, pespin.
Timur Davydov has posted comments on this change by Timur Davydov. ( https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email )
Change subject: Add Emscripten build support and JS callback logging backend
......................................................................
Patch Set 8:
(8 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/5d2b7efb_e11fd840?… :
PS5, Line 7: Add Emscripten build support and JS callback logging backend
> Also, please explain whether you envision to be sending more patches related to this topic (which ne […]
Thank you for asking for additional context.
The main goal is to enable partial execution of Osmocom components in isolated environments, specifically in WebAssembly runtimes, where direct access to hardware and traditional operating system facilities is not available.
One of the intended use cases is running a GSM 2G base station where access to the radio part (SDR) is provided through a web environment (via WebUSB), while the remaining parts of the Osmocom stack and the core network components continue to run on a conventional backend server. In practice, the web environment would run highly stripped-down versions of `osmo-bts` + `osmo-trx` as static WASM libraries, which in turn depend on libraries such as `libosmocore`, `libosmo-netif`, and `libosmo-abis`.
One practical advantage of this approach is that no deployment is required on the radio side: no local installation, configuration, or privileged access is needed on the host system. This allows a radio endpoint to be started with minimal setup, while all stateful and operational complexity remains centralized on the backend.
In this model, multiple such radio endpoints can connect to the same backend core network, effectively forming a single logical network. From the perspective of the core network, these endpoints behave like remotely located base station instances, allowing subscribers registered in the same backend to communicate with each other (including voice calls and SMS), regardless of the physical location of the individual radio endpoints.
Regarding future work: yes, I plan to introduce additional changes in this area gradually and on a per-component basis, following the same approach where all modifications remain isolated, optional, and inactive for native builds. Each change will be proposed independently.
It is expected that this effort may eventually involve the following Osmocom projects: `libosmocore`, `libosmo-netif`, `libosmo-abis`, `osmo-bts`, and `osmo-trx`. Since `libosmocore` is a foundational dependency for these projects, some minor changes there may be required as part of this work.
One of the key limitations of web environments is the lack of native support for TCP and UDP sockets. Under this approach, transport mechanisms that normally rely on TCP/UDP are adapted to use WebSocket when running in a browser. On the backend side, a gateway is planned to translate between WebSocket connections and traditional TCP/UDP sockets, allowing existing backend components such as `osmo-stp`, `osmo-hlr`, `osmo-mgw`, and `osmo-bsc` to operate unchanged.
File src/core/Makefile.am:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/76614827_6d90b154?… :
PS7, Line 49: logging_emscripten.c \
> You need to add it conditionally based on the autoconf variable.
Thanks for the suggestion, agreed.
I will make the file conditionally compiled based on the `HAVE_EMSCRIPTEN` autoconf variable
File src/core/logging_emscripten.c:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/b59b3fb4_ffdf2942?… :
PS7, Line 24: /*! \addtogroup logging
> This file should actually not even compiled in whenever not building for EMSCRIPTEN. […]
Thanks for the suggestion, agreed.
I will make the file conditionally compiled based on the `HAVE_EMSCRIPTEN` autoconf variable and drop the `#if defined(__EMSCRIPTEN__)` guard from the source.
File src/core/netdev.c:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/72bc8a49_8f6d1a4a?… :
PS5, Line 67: #if (!EMBEDDED) && !defined(__EMSCRIPTEN__)
> Do you mind sharing why can't you compile netdev. […]
To clarify: the first problem is actually a conditional compilation within the source code itself.
netdev.c and netns.h contain checks like `#if defined(__linux__)`. But I fixed the build issue by adding some conditional compilations and `USE_NETNS` define in configure.ac.
File src/core/socket.c:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/5d221532_bbbc103f?… :
PS5, Line 2050: #ifdef HAVE_LIBSCTP
> Submit a new separate patch with proper description of the problem and the fix.
Thanks for pointing this out.
For now, please ignore those changes — I will remove them from this patch. I plan to prepare separate, dedicated patches addressing these issues in libosmocore and libosmo-netif, as the problem with the HAVE_LIBSCTP guards appears in both libraries.
Those follow-up patches will focus solely on fixing the guards properly and can be reviewed independently.
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/ae81cab9_46c318b7?… :
PS5, Line 1928: #ifdef HAVE_LIBSCTP
> > However, libosmo-netif uses some of them without the same HAVE_LIBSCTP guards […]
Thanks for pointing this out.
For now, please ignore those changes — I will remove them from this patch. I plan to prepare separate, dedicated patches addressing these issues in libosmocore and libosmo-netif, as the problem with the HAVE_LIBSCTP guards appears in both libraries.
Those follow-up patches will focus solely on fixing the guards properly and can be reviewed independently.
File src/core/socket.c:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/a4e710f1_e6a25a3b?… :
PS7, Line 1698: #if defined(__linux__) || defined(__EMSCRIPTEN__)
> this is becoming more complex, we should ideally have a configure. […]
Agreed. I’ve added a configure-time compile test in configure.ac to detect `struct in6_addr::s6_addr32` and `define HAVE_IN6_ADDR_S6_ADDR32`, and updated the code to use this define.
File src/vty/Makefile.am:
https://gerrit.osmocom.org/c/libosmocore/+/41813/comment/c085c08c_5ce146f9?… :
PS5, Line 36: libosmovty_la_SOURCES += telnet_interface_dummy.c
> > In Emscripten there are no sockets so telnet_interface.c fails to compile. […]
You are right, the issue turned out to be more specific than initially assumed.
When I started working on this patch, I did encounter compilation issues related to telnet_interface.c, but unfortunately I can no longer reliably recall the exact cause of those initial failures.
After re-testing, telnet_interface.c currently builds fine with Emscripten. Despite the fact that the telnet interface is not needed in a web environment, I have therefore removed telnet_interface_dummy.c and reverted the related changes in src/vty/Makefile.am to keep this patch minimal and focused.
I agree that we should only introduce changes once the exact culprit is clearly identified. Any further adjustments related to telnet_interface.c can be handled separately if a concrete issue can be reproduced.
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
Gerrit-Change-Number: 41813
Gerrit-PatchSet: 8
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 Jan 2026 13:48:32 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Comment-In-Reply-To: Timur Davydov <dtv.comp(a)gmail.com>
Attention is currently required from: Timur Davydov, laforge, neels.
Hello Jenkins Builder, fixeria, neels, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email
to look at the new patch set (#8).
The following approvals got outdated and were removed:
Verified+1 by Jenkins Builder
Change subject: Add Emscripten build support and JS callback logging backend
......................................................................
Add Emscripten build support and JS callback logging backend
This change enables building libosmocore for sandboxed, non-POSIX
environments, specifically WebAssembly targets produced via the
Emscripten toolchain.
The broader motivation is to allow partial execution of selected
Osmocom components in isolated runtime environments where direct access
to hardware and traditional operating system facilities (filesystem,
sockets, privileged execution) is not available.
One intended use case is running a GSM 2G base station where the
radio-facing components are executed inside a web environment, while
the remaining Osmocom stack and core network components continue to run
unchanged on a conventional backend server. In this model, highly
stripped-down variants of osmo-bts and osmo-trx are built as static
WebAssembly libraries and executed in the browser, while depending on
core libraries such as libosmocore, libosmo-netif, and libosmo-abis.
A practical advantage of this approach is that no deployment or
privileged setup is required on the radio endpoint side. A user can
instantiate a radio endpoint with minimal configuration, while all
stateful logic and operational complexity remains centralized on the
backend. Multiple such radio endpoints may connect to the same backend
core network, effectively forming a single logical network from the
core network perspective, independent of the physical location of the
radio endpoints.
Existing libosmocore build logic and platform assumptions rely on the
availability of POSIX APIs and OS services which are not present in
WebAssembly runtimes. This currently prevents libosmocore from being
built for such targets without targeted, build-time adjustments. This
patch introduces the minimal set of changes required to enable such
builds, without affecting native platforms.
As part of this groundwork, a minimal callback-based logging hook is
introduced. When building for Emscripten, this hook allows forwarding
log messages to an external environment via a user-provided JavaScript
callback. This enables integration with browser-side logging or UI
infrastructure without introducing new logging backends or runtime
dependencies. For all other build targets, the hook resolves to a no-op
implementation and does not alter existing logging behavior.
No runtime behavior, protocol semantics, or network interactions are
changed by this patch. All modifications are strictly limited to
build-time and platform-specific code paths and are only active when
targeting Emscripten. Native builds and existing deployment scenarios
remain unaffected.
This patch is intended as groundwork. Follow-up changes, proposed
separately and incrementally, may extend similar support to other
Osmocom components such as libosmo-netif, libosmo-abis, osmo-bts, and
osmo-trx, while keeping all such changes optional and isolated from
native builds.
Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
---
M configure.ac
M include/osmocom/core/logging.h
M include/osmocom/core/netns.h
M src/core/Makefile.am
M src/core/libosmocore.map
A src/core/logging_emscripten.c
M src/core/netdev.c
M src/core/osmo_io_internal.h
M src/core/socket.c
M src/core/stats_tcp.c
M src/core/tun.c
M src/vty/logging_vty.c
12 files changed, 221 insertions(+), 19 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/13/41813/8
--
To view, visit https://gerrit.osmocom.org/c/libosmocore/+/41813?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Change-Id: Ia8d5f4bb6570b5e055826f3a051e5e5896866e31
Gerrit-Change-Number: 41813
Gerrit-PatchSet: 8
Gerrit-Owner: Timur Davydov <dtv.comp(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-CC: laforge <laforge(a)osmocom.org>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Attention: laforge <laforge(a)osmocom.org>
Gerrit-Attention: Timur Davydov <dtv.comp(a)gmail.com>
pespin has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41807?usp=email )
Change subject: {bs,ms}_power_control: Move params inside lchan_power_ctrl_state
......................................................................
Patch Set 5:
(1 comment)
Patchset:
PS4:
> Well, I was in process of writing my response after I got your ping today, but now am late to the pa […]
I actually waited for your feedback fist time before merging it as you initially requested. Then you asked some questions in your feedback, and then
I left one entire week with no further feedback after I exposed the rationale, plus at least 2 people seemed fine with it. I wouldn't call that rush.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41807?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I0e2a6c2c33e0ac9a0bc1734d83eaeafc27f2f4df
Gerrit-Change-Number: 41807
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 Jan 2026 13:36:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: fixeria <vyanitskiy(a)sysmocom.de>
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: pespin.
fixeria has posted comments on this change by pespin. ( https://gerrit.osmocom.org/c/osmo-bts/+/41807?usp=email )
Change subject: {bs,ms}_power_control: Move params inside lchan_power_ctrl_state
......................................................................
Patch Set 5:
(1 comment)
Patchset:
PS4:
> ping
Well, I was in process of writing my response after I got your ping today, but now am late to the party. It's not a super urgent patch fixing a build failure or anything like that, yet it got merged with an unresolved thread / ongoing discussion. And this is despite I kindly asked not to rush with merging this patch. And no, I am not saying it should be reverted, just expressing my frustration.
--
To view, visit https://gerrit.osmocom.org/c/osmo-bts/+/41807?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: osmo-bts
Gerrit-Branch: master
Gerrit-Change-Id: I0e2a6c2c33e0ac9a0bc1734d83eaeafc27f2f4df
Gerrit-Change-Number: 41807
Gerrit-PatchSet: 5
Gerrit-Owner: pespin <pespin(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-Reviewer: osmith <osmith(a)sysmocom.de>
Gerrit-Reviewer: pespin <pespin(a)sysmocom.de>
Gerrit-Attention: pespin <pespin(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 Jan 2026 13:10:10 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: pespin <pespin(a)sysmocom.de>
Attention is currently required from: phcoder.
fixeria has posted comments on this change by phcoder. ( https://gerrit.osmocom.org/c/pysim/+/41786?usp=email )
Change subject: Print SMSC in pySim-read.py
......................................................................
Patch Set 14:
(1 comment)
File pySim-read.py:
https://gerrit.osmocom.org/c/pysim/+/41786/comment/ddc12aea_0d8520b7?usp=em… :
PS14, Line 148: smsc_a.get('ton_npi', None).get
`smsc_a.get()` may return `None`, resulting in an exception:
```
AttributeError: 'NoneType' object has no attribute 'get'
```
Same applies to `smsc_n.get()` above: `smsc_n` can be `None`,
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/41786?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I17067b68086316d51fd71ba77049874605594e3f
Gerrit-Change-Number: 41786
Gerrit-PatchSet: 14
Gerrit-Owner: phcoder <phcoder(a)gmail.com>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: dexter <pmaier(a)sysmocom.de>
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: fixeria <vyanitskiy(a)sysmocom.de>
Gerrit-Attention: phcoder <phcoder(a)gmail.com>
Gerrit-Comment-Date: Mon, 19 Jan 2026 12:55:45 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Attention is currently required from: neels.
dexter has posted comments on this change by neels. ( https://gerrit.osmocom.org/c/pysim/+/39747?usp=email )
Change subject: personalization: refactor SdKey
......................................................................
Patch Set 13:
(1 comment)
File pySim/esim/saip/personalization.py:
https://gerrit.osmocom.org/c/pysim/+/39747/comment/cb05b4d2_246c128c?usp=em… :
PS3, Line 296: def _apply_sd(cls, pe: ProfileElement, value):
> Done
I think this was where I took the idea from: https://www.geeksforgeeks.org/python/private-methods-in-python/
I didn't know that double underscore method/function names were explicitly reserved for python internal stuff, but given that most of the python internals start with a double underscore you may have a point.
In any case, don't let me block you with this. Just wanted to share a thought.
--
To view, visit https://gerrit.osmocom.org/c/pysim/+/39747?usp=email
To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: pysim
Gerrit-Branch: master
Gerrit-Change-Id: I427ea851bfa28b2b045e70a19a9e35d361f0d393
Gerrit-Change-Number: 39747
Gerrit-PatchSet: 13
Gerrit-Owner: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Reviewer: Jenkins Builder
Gerrit-Reviewer: laforge <laforge(a)osmocom.org>
Gerrit-CC: dexter <pmaier(a)sysmocom.de>
Gerrit-Attention: neels <nhofmeyr(a)sysmocom.de>
Gerrit-Comment-Date: Mon, 19 Jan 2026 12:54:39 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: neels <nhofmeyr(a)sysmocom.de>
Comment-In-Reply-To: dexter <pmaier(a)sysmocom.de>