P1sec / pycrate

A Python library to ease the development of encoders and decoders for various protocols and file formats; contains ASN.1 and CSN.1 compilers.
GNU Lesser General Public License v2.1
380 stars 130 forks source link

Question: conversion of 3GPP doc files to .asn #230

Closed frankist closed 1 year ago

frankist commented 1 year ago

Hi everyone,

There used to be extract.py scripts in the pycrate_asn1dir/ NR folders that were used to convert the 3GPP .doc files into .asn files. However, these scripts have been removed in the latest pycrate releases. Is there a reason why?

I would like to compile the latest 3GPP NR TS rel17 docs, but without the extract.py script, I am not sure how to do it.

Thanks for the help. Very helpful project!

p1-bmu commented 1 year ago

Hello, I removed those script as I don't want to maintain them (sorry for this). You can download an older release of the project (e.g. 0.5.2) in order to retrieve them, or just git checkout to the tag.

p1-bmu commented 1 year ago

By the way, I'll update all the 3GPP RAN specs to Rel.17 soon.

frankist commented 1 year ago

I see. So, I guess it is a matter of time until the 0.5.2 scripts become outdated. In case, anyone else knows another project that has a similar .doc -> .asn conversion functionality, feel free to share it here.

Thanks for the help.

p1-bmu commented 1 year ago

I just tagged a new 0.6.0 release after updating 4G and 5G RAN ASN.1 specs to Rel.17.

Regarding 3GPP specs conversion, you can download zip files from the 3GPP server, then script libreoffice in headless mode for .doc / .docx conversion to text (beware of non-ascii UTF-8 characters being sometimes present), and finally manage ASN.1 definitions extraction. There is also the https://getsi.org/ web page, which enables to download 3GPP specs in PDF format from the ETSI server, which you can then convert with pdftotext.

frankist commented 1 year ago

Thanks very much for the release update and providing the steps for asn extraction. Hopefully, this will be of help to others as well.