Difference between revisions of "Template:Networking rutos software development kit software development kit instructions"

From Teltonika Networks Wiki
Line 24: Line 24:
 
<ul>
 
<ul>
 
     <li>A PC, laptop or virtual machine running Linux OS (We recommend using Ubuntu 16.04 LTS)</li>
 
     <li>A PC, laptop or virtual machine running Linux OS (We recommend using Ubuntu 16.04 LTS)</li>
     <li>A RUTx series router RUTx08, RUTx09, RUTx10 or RUTx11</li>
+
     <li>A RUTX series router RUTX08, RUTX09, RUTX10 or RUTX11</li>
 
     <li>An SDK intended for your router, which can be downloaded here: <b>[[Software Development Kit]]</b></li>
 
     <li>An SDK intended for your router, which can be downloaded here: <b>[[Software Development Kit]]</b></li>
 
</ul>
 
</ul>

Revision as of 11:24, 6 April 2020

Main Page > FAQ > Other Topics > Template:Networking rutos software development kit software development kit instructions

A software development kit (SDK) is a set of software development tools that provides the possibility to create applications for a certain software package, software framework, computer system or similar development platform.

Introduction

This article contains instructions on how to utilize Teltonika SDK packages for RUTx series routers. The resources used in the provided examples are:

However, the examples apply to other routers, SDK versions and operating systems. In most cases the difference will only be that of a visual nature.

Most examples provided in this page are independent from each other. But it is highly recommended to acquaint yourself with the basics by reading the "Prerequisites" and "Compiling a standard firmware" sections first as they contain information that will be necessary in order to understand some aspects of the other examples.

It should also be noted early that the first time you compile a firmware it may take about two hours to complete. On later attempts the duration is considerably lower.

Prerequisites

You will need:

  • A PC, laptop or virtual machine running Linux OS (We recommend using Ubuntu 16.04 LTS)
  • A RUTX series router RUTX08, RUTX09, RUTX10 or RUTX11
  • An SDK intended for your router, which can be downloaded here: Software Development Kit

Compiling a standard firmware

First, you must install the packages required for the SDK to work. Open the Terminal application (Ctrl + ALT + T) and execute the following commands:

sudo apt update
sudo apt install -y binutils binutils-gold build-essential bzip2 curl device-tree-compiler devscripts file flex fuse g++ gawk gcc gcc-multilib gengetopt gettext git groff libc6-dev libncurses5-dev libpcre3-dev libssl-dev libxml-parser-perl make ocaml ocaml-findlib ocaml-nox patch pkg-config python2.7 python-dev python-yaml sharutils subversion u-boot-tools unzip vim-common wget zlib1g-dev

Create a new folder (for this example I'll be using a directory called RUTX_R_GPL found at ~/Desktop/) and extract the SDK archive inside it. You can achieve this with drag and drop or by executing this command via Terminal:

tar -xf ~/Downloads/RUTX_R_GPL_00.XX.YY.Y.tar.gz -C ~/Desktop/RUTX_R_GPL

Note: don't forget to replace the file name and path in accordance with your own circumstances

Open a Terminal inside the SDK directory. You can either change the directory in your current terminal (cd ~/Desktop/RUTX_R_GPL/openwrt-gpl-ipq40xx.Linux-x86_64) or open the directory, right click any white space and click Open in Terminal:

Networking rutx sdk instructions 2.png

Once you open the Terminal you can compile a standard firmware by executing the make command. If all is in order, the output should look something like this:

Networking rutx sdk instructions 1.gif

Note: the first time you compile a firmware file it may take up to two hours before it is complete. Don't close the Terminal window up until then. Once it is finished, you will find the firmware in the ./bin/targets/ipq40xx/generic directory. It should contain a file openwrt-ipq40xx-qcom-ipq4018-rutx-squashfs-apps.bin, it can be used to upgrade your router's firmware via its web interface.

Changing default settings

To create a firmware with different default settings, you must change the default in the config files, which are contained in /openwrt-gpl-ipq40xx.Linux-x86_64/package/. However, there is no unifying system regarding where one should look for config files related to specific services. Therefore, it is very important to acquaint yourself with the UCI system (RutOS configuration file system) in order to successfully navigate through the files:

  • Click here for information on the configuration hierarchy
  • Click here to find what configs are related to which services

In many cases you will find that service names as they are displayed in the router's WebUI are similar to the names of the programs responsible for these services. For instance, Firewall settings can be changed in the /openwrt-gpl-ipq40xx.Linux-x86_64/package/network/config/firewall/files directory. However, if you open the aforementioned directory, you will find that it contains four files:

Networking rutx sdk instructions 3.png

As you can see from the image above, only one of the files holds the Firewall configuration, while other files contain scripts related to the service. This will be different for each case. For example, among Mobile Utilities files, which can be found in /openwrt-gpl-ipq40xx.Linux-x86_64/package/mobutils/src/, you will find even more items, including different config files which serve a different purpose:

Networking rutx sdk instructions 4.png