Dear OpenBSC team,
I am Ahnaf Tahmid Chowdhury, currently building Osmocom graphical user interface. I have created a subscriber page where one can add/remove/update subscriber. The repo is available at:
https://github.com/ahnaf-tahmid-chowdhury/osmo-gui
Please let me know your thoughts about the application.
Thank you
Hi Ahnaf,
On Tue, Aug 30, 2022 at 11:55:42PM +0600, Ahnaf Tahmid wrote:
I am Ahnaf Tahmid Chowdhury, currently building Osmocom graphical user interface. I have created a subscriber page where one can add/remove/update subscriber. The repo is available at:
Thanks for your contribution and for sharing your project.
Unfortunately it uses the VTY, which is primarily intended for human interaction, as we can not make guarantees that printed output of the VTY will remain stable.
On the other hand, the CTRL interface of the various Osmocom CNI programs is an interface intended for programmatic use by external software. I'm not sure if all of the information you're interested in reading or all of the commands you need are available via CTRL, but I think it would be a good idea to investigate and let us know, maybe we can add any missing bits to CTRL.
A python module implementing the CTRL protocol can be found in 'class Ctrl' of https://gitea.osmocom.org/cellular-infrastructure/osmo-python-tests/src/bran...
Regards, Harald
Thank you for your response. According to your suggestions I searched for the CTRL interface, but I didn't get any documentation for this. I don't know how to use this. Is there any example available for interacting OsmoHLR with this? If you can show me how to get and update any subscriber data using CTRL interface, it may easy for me to understand. Or can let me know how the vty or ctrl is interacting with OsmoHLR databases thus I can directly interact with those databases?
On Wed, 31 Aug 2022, 16:20 Harald Welte, laforge@osmocom.org wrote:
Hi Ahnaf,
On Tue, Aug 30, 2022 at 11:55:42PM +0600, Ahnaf Tahmid wrote:
I am Ahnaf Tahmid Chowdhury, currently building Osmocom graphical user interface. I have created a subscriber page where one can
add/remove/update
subscriber. The repo is available at:
Thanks for your contribution and for sharing your project.
Unfortunately it uses the VTY, which is primarily intended for human interaction, as we can not make guarantees that printed output of the VTY will remain stable.
On the other hand, the CTRL interface of the various Osmocom CNI programs is an interface intended for programmatic use by external software. I'm not sure if all of the information you're interested in reading or all of the commands you need are available via CTRL, but I think it would be a good idea to investigate and let us know, maybe we can add any missing bits to CTRL.
A python module implementing the CTRL protocol can be found in 'class Ctrl' of
https://gitea.osmocom.org/cellular-infrastructure/osmo-python-tests/src/bran...
Regards, Harald --
- Harald Welte laforge@osmocom.org
============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6)
Hi Ahnaf,
How to use the CTRL interface: The syntax of CTRL commands is explained in the user manuals for each application. For example, see https://ftp.osmocom.org/docs/latest/osmohlr-usermanual.pdf chapter "Control interface" for CTRL commands supported by osmo-hlr, and chapter "Osmocom Control Interface" for a general definition. Interaction works pretty much identical to VTY, just use a different port: https://osmocom.org/projects/cellular-infrastructure/wiki/Port_Numbers See "Control interface" entries to find out the proper ports. A python implementation and cmdline tool is osmo_interact_ctrl.py in https://gitea.osmocom.org/cellular-infrastructure/osmo-python-tests/src/bran... (shares a lot of code with osmo_interact_vty.py)
Project naming: May I ask, generally: if you write "Osmocom GUI", I'd expect that it configures / interacts with a complete network. Does it only interact with osmo-hlr? Then maybe you could call it "OsmoHLR GUI"?
HLR db: The SQL database schema is pretty much guaranteed to change with newer versions of OsmoHLR. The schema is pretty self-explanatory, just run 'sqlite3 ./hlr.db .dump' You may require to stop the osmo-hlr process to access the hlr.db. So you should not act directly on the OsmoHLR database, when it can be avoided. That said, when dealing with huge volumes of subscribers, interacting with the sqlite3 db can be the only practical option. Using SQL to query a complete subscriber database can be a very good idea for a GUI application, because SQL is a generic tool for this task and (can be) very efficient. When using SQL to *manipulate* the HLR database, you should really know what you are doing -- rather use CTRL or VTY for that.
CTRL vs VTY: I hope I am not infringing here, but, my *personal* *opinion* is that often, interacting via VTY is a pretty ok alternative to using CTRL. Many VTY commands are as stable as the CTRL interface; for example, I do not expect the VTY commands that manipulate a subscriber in OsmoHLR to change in a non-compatible way. Our own test suite does a lot of VTY interaction. Very often, the alternatives are: implementing new CTRL commands in C vs. just "for now" using the VTY that is already implemented, and usually "more alive". The downsides to using the VTY: - you don't get a clear "OK" / "ERROR" response from the VTY. - the osmocom project does NOT guarantee that the output the VTY produces remains the same over time. If you parse VTY output, you may very well need to adjust your program over time / keep track of what version you are compatible with. These are serious drawbacks.
So, choose wisely :)
~N
On Thu, Sep 01, 2022 at 01:14:53AM +0600, Ahnaf Tahmid wrote:
Thank you for your response. According to your suggestions I searched for the CTRL interface, but I didn't get any documentation for this.
See Sections 10 + 11 of the osmo-hlr user manual at https://ftp.osmocom.org/docs/latest/osmohlr-usermanual.pdf
Thank you for providing me all of this information. As you have mentioned the output the VTY produces, may get changed the same over time where CTRL interface may stable always. Then it will be a wise decision to continue the GUI application by interacting CTRL. But which one will be more efficient? I mean which one will take the minimum CPU load?
Project naming: Yes, for now I have implemented the OsmoHLR only thus, it can only interact with osmo-hlr. In future works, the rest of all the applications like OsmoMSC, OsmoBsc, OsmoBTC etc will be implemented in this application. Again, a dashboard will also be developed which will provide all the necessary information. In short, the basement is developed.
On Thu, 1 Sept 2022 at 12:30, Harald Welte laforge@gnumonks.org wrote:
On Thu, Sep 01, 2022 at 01:14:53AM +0600, Ahnaf Tahmid wrote:
Thank you for your response. According to your suggestions I searched for the CTRL interface, but I didn't get any documentation for this.
See Sections 10 + 11 of the osmo-hlr user manual at https://ftp.osmocom.org/docs/latest/osmohlr-usermanual.pdf
--
- Harald Welte laforge@gnumonks.org
============================================================================ "Privacy in residential applications is a desirable marketing option." (ETSI EN 300 175-7 Ch. A6)
Hi Ahnaf,
On Fri, Sep 02, 2022 at 03:26:46PM +0600, Ahnaf Tahmid wrote:
But which one will be more efficient? I mean which one will take the minimum CPU load?
for sure CTRL is lower effort, as it involves much less string-formatting and format-parsing.
Yes, for now I have implemented the OsmoHLR only thus, it can only interact with osmo-hlr. In future works, the rest of all the applications like OsmoMSC, OsmoBsc, OsmoBTC etc will be implemented in this application. Again, a dashboard will also be developed which will provide all the necessary information. In short, the basement is developed.
Please note that osmocom is larger than just the GSM/3GPP network elements. There are projects implementing TETRA, SDR stuff, OP25, etc.
We have grouped all the 3GPP network-side projects in "cellular infrastructure" or "cellular network infrastructure" (CNI). So maybe Osmo-CNI-GUI might be technically more correct and less generic. But of course it's a bit difficult to write/speak/...