Python Websocket example
Amarisoft ''ltewww'' package come with a Javascript/NodeJS sample program to use directly the Websocket API, called ''ws.js''. Other Amarisoft tools also use Javascript internally.
Amarisoft provide only official support for the tools present in its packages.
However, Websocket can also be used with Python thanks to the ''websockets'' python package.Amarisoft does not offer dedicated support for it but you can find below an example :
Prerequisite
Make sure you have Python3 and pip installed with version 3.7 at least.
Install the package
Package documentation can be found here : [[https://websockets.readthedocs.io/en/stable/intro.html]]
Sample code
The following sample code will take one command line argument to adjust the gain of a cell,provided that a ''lteeenb'' program is running on the ''localhost'' and listening on port 9001.
ws_script.py:
Run
It is run simply with :
The output on command line should be