The LMS Tools are a collection of Python scripts useful when working with LMS. I suggest using Python 3 but Python 2 should work as well for most scripts.
sudo apt-get update
sudo apt-get install python3 python3-lxml python3-numpy python3-matplotlib
git clone https://github.com/lms-org/lms_tools.git
cd lms_tools
sudo ./setup.py install
lms-validate.py <directory/file>- Validate an XML or LCONF file or all such files in a given directory.lms-flags.py <directory/file>- List all referenced flags in all given XML files.lms-profiler.py <file>- Analyze a profiling file generated by LMS.lms-create-mod.py <module_name>- Generate a skeleton for a module in the current working directory.lms-create-lib.py <lib_name>- Generate a skeleton for a library in the current working directory.lms-create-service.py <service_name>- Generate a skeleton for a service in the current working directory.report-device-ip.py <url>- Gather all IPv4 addresses on local network interfaces and send them via HTTP POST.lms-deploy <source_dir> <deploy_target>- Compile the given config repository locally for ARM and deploy it via rsync on a remote computer.
Install requirements:
sudo apt-get install python3 python3-pip
sudo python3 -m pip install requests netifaces
Append the following line to /etc/crontab. Insert your own user name, the path
to the python client script and the full URL to the php backend script.
*/3 * * * * my_user_name /path/to/script/report-device-ip.py http://example.com/device-ip-backend.php
Move device-ip-backend.php to /var/www/html or a similar place to make
it available on your web server. The script will persist data in a data.txt
file in the same directory. Make sure PHP has write permissions in its parent
directory.
You need to install gcc and g++ for ARM HardFloat. On Ubuntu this is done via
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf