lte_lpp: telcom-parser: genreate ASN.1 & rust bindings - #1142
Open
philgebhardt wants to merge 1 commit into
Open
philgebhardt wants to merge 1 commit into
philgebhardt wants to merge 1 commit into
Conversation
This was referenced Sep 5, 2026
Open
All of the code within this commit was generated from official 3GPP `TS 37.355` spec material, using tooling from the [hampi][4] project. The following are the steps taken to generate both the ASN.1 and rust bindings. **Generating ASN.1** This ASN.1 is the output of hampi parsing over the 3GPP `TS 37.355` spec (version 19.3.0, `37355-j30.docx`) found on the [3GPP Portal][1]. This was generated using [my fork][2] of [hampi's parser example][3]. The purpose of this fork is to separate LPP-PDU-Definitions.asn from LPP-Broadcast-Definitions.asn. Only the former are needed for the LPP message parsing needed for the LPP analyzer. The out-of-the-box example in the official hampi repo combines these asn definitions into a single file. ```sh python3 /git/hampi/parse-spec/extract-definitions/examples/specs/parse_spec.py 37355-j30.docx -d telcom-parser/specs ``` **Generating Rust Bindings** Generating these bindings from the above ASN.1 output requires a version of hampi with the fix for ystero-dev/hampi#143. At the time of this writing that fix is merged to hampi's `master` branch, but not yet released to the `cargo install` distribution. It can be run directly from hampi source with the following. ```shell cargo run --bin rs-asn1c -- --codec uper --module /git/rayhunter/1072/lte-lpp-definitions/telcom-parser/src/lte_lpp.rs -- /git/rayhunter/1072/lte-lpp-definitions/telcom-parser/specs/LPP-PDU-Definitions.asn ``` See: EFForg#1072 [1]: https://portal.3gpp.org/desktopmodules/Specifications/SpecificationDetails.aspx?specificationId=3710 [2]: ystero-dev/hampi@e76c479 [3]: https://github.com/philgebhardt/hampi/blob/e1a46c6ee7eba754352395b01d95a33ff38c2006/examples/specs/parse_spec.py [4]: https://github.com/ystero-dev/hampi
philgebhardt
force-pushed
the
1072/lte-lpp-definitions
branch
from
September 24, 2026 04:53
57e82b5 to
78f0c45
Compare
philgebhardt
marked this pull request as ready for review
September 24, 2026 05:02
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is a prerequisite PR for #1072, providing the LPP rust bindings
needed for the analyzer.
All of the code within this commit was generated from official 3GPP
TS 37.355spec material, using tooling from the hampi project.The following are the steps taken to generate both the ASN.1 and rust
bindings.
Generating ASN.1
This ASN.1 is the output of hampi parsing over the 3GPP
TS 37.355spec(version 19.3.0,
37355-j30.docx) found on the 3GPP Portal.This was generated using my fork of hampi's parser example. The
purpose of this fork is to separate
LPP-PDU-Definitions.asnfromLPP-Broadcast-Definitions.asn. Only the former are needed for the LPPmessage parsing that poweres the LPP analyzer. The out-of-the-box example
in the official hampi repo combines these asn definitions into a single
file.
Generating Rust Bindings
Generating these bindings from the above ASN.1 output requires a version
of hampi with the fix for ystero-dev/hampi#143.
At the time of this writing that fix is merged to hampi's
masterbranch,but not yet released to the
cargo installdistribution. It can berun directly from hampi source with the following.
See: #1072
Pull Request Checklist
cargo fmt.You must check one of: