Changes

Created page with "A <b>software development kit</b> (<b>SDK</b>) is a set of software development tools that provides the possibility to create applications for a certain software package, soft..."
A <b>software development kit</b> (<b>SDK</b>) 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.

__TOC__
==Introduction==

This article contains instructions on how to utilize Teltonika SDK packages for RUT2xx, RUT850 and RUT9xx routers. The resources used in the provided examples are:

<ul>
<li>A [[RUT955]] router</li>
<li>[http://releases.ubuntu.com/ Ubuntu 16.04 OS]</li>
<li>SDK version RUT9XX_R_00.06.00.4</li>
</ul>

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|Prerequisites]]" and "[[#Compiling_a_standard_firmware|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 <b>about two hours</b> to complete. On later attempts the duration is considerably lower.

==Prerequisites==

You will need:

<ul>
<li>A PC, laptop or virtual machine running Linux OS (preferably Ubuntu distro)</li>
<li>A router from the RUT2xx, RUT9xx series or RUT850</li>
<li>An SDK intended for your router, which can be downloaded here: <b>[[Software Development Kit]]</b></li>
</ul>

==Compiling a standard firmware==

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

sudo apt-get update
sudo apt-get install -y build-essential curl devscripts gawk gcc-multilib gengetopt gettext git groff file flex libncurses5-dev libssl-dev python2.7 subversion unzip vim-common zlib1g-dev wget

Create a new folder (for this example I'll be using a directory called <i>RUT9XX_R_GPL_00.06.02</i> found at <i>~/Desktop/</i>) 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/RUT9XX_R_GPL_00.XX.YY.tar -C RUT9XX_R_GPL

<b>Note</b>: 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 (<i>cd ~/Desktop/RUT9XX_R_GPL_00.06.02/</i>) or open the directory, right click any white space and click <i>Open in Terminal</i>:

[[File:Networking_rutxxx_sdk_instructions_2.jpg|border|class=tlt-border|1100x1100px]]

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

[[File:Networking_rutxxx_sdk_instructions_1.gif]]

<b>Note</b>: the first time you compile a firmware file it may take up to <b>two hours</b> before it is complete. Don't close the Terminal window up until then. Once it is finished, you will find the firmware in the <i>./bin/ar71xx/tltFws/</i> directory. It should contain two files; the one with <b>WEBUI</b> in its name (for example, <i>RUT9XX_R_GPL_00.06.00.4_000_<b>WEBUI</b>.bin</i>) 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 <b>/RUT9XX_R_GPL_00.06.00.4/package/</b>. 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 <b>UCI system</b> (RutOS configuration file system) in order to successfully navigate through the files:

<ul>
<li>[[UCI_command_usage#Configuration_hierarchy|Click here]] for information on the configuration hierarchy</li>
<li>[[UCI_command_usage#Configuration_files|Click here]] to find what configs are related to which services</li>
</ul>
----
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, [[RUT955_VRRP|VRRP]] settings can be changed in the /RUT9XX_R_GPL_00.06.00.4/package/<b>vrrpd/files/</b> directory. However, if you open the aforementioned directory, you will find that it contains four files:

[[File:Networking_rutxxx_sdk_instructions_3.png|border|class=tlt-border]]

As you can see from the image above, only one of the files holds the VRRP configuration, while other files contain scripts related to the service. This will be different for each case. For example, among L2TP files, which can be found in /RUT9XX_R_GPL_00.06.00.4/package/xl2tpd/files, you will find even more items, including different config files which serve a different purpose:

[[File:Networking_rutxxx_sdk_instructions_4.png|border|class=tlt-border|1100x1100px]]

==Removing services from the firmware==

==Adding additional packages==

==Firmware branding==

If you wish to put a brand on your firmware, you can edit the <b>config.h</b> file. The file is located in the <i>./RUT9XX_R_00.06.00.4/brand/</i> directory and can be opened with a text editor application.

To brand the firmware, simply open the <i>config.h</i> and change any brands as you see fit:

<span style="color: #178A5A;">char</span> *strings[]={ <span style="color: #FF30FB;">""</span>, <span style="color: #FF30FB;">"Teltonika"</span>, <span style="color: #FF30FB;">"www.teltonika.lt"</span>, <span style="color: #FF30FB;">"<nowiki>http://www.teltonika.lt/</nowiki>"</span>, <span style="color: #0014F9;">//0,1,2,3 - default, company name, company web, company web link</span>
<span style="color: #FF30FB;">"RUT9XX"</span>, <span style="color: #FF30FB;">"RUT900 3G"</span>, <span style="color: #FF30FB;">"RUT905 3G"</span>, <span style="color: #FF30FB;">"RUT950 LTE"</span>, <span style="color: #FF30FB;">"RUT955 LTE"</span>, <span style="color: #FF30FB;">"RUT951 LTE"</span>, <span style="color: #FF30FB;">"RUT956 LTE"</span>, <span style="color: #0014F9;">//4-10</span>
<span style="color: #FF30FB;">"Teltonika RUT9XX"</span>, <span style="color: #FF30FB;">"Teltonika RUT900 3G"</span>, <span style="color: #FF30FB;">"Teltonika RUT905 3G"</span>, <span style="color: #FF30FB;">"Teltonika RUT950 LTE"</span>, <span style="color: #FF30FB;">"Teltonika RUT955 LTE"</span>, <span style="color: #0014F9;">//11-15</span>
<span style="color: #FF30FB;">"Teltonika RUT951 LTE"</span>, <span style="color: #FF30FB;">"Teltonika RUT956 LTE"</span>, <span style="color: #FF30FB;">"Teltonika RUT750"</span>, <span style="color: #FF30FB;">"Teltonika RUT755"</span>, <span style="color: #FF30FB;">"Teltonika solutions"</span>, <span style="color: #0014F9;">//16-20</span>
<span style="color: #FF30FB;">"Teltonika_Router"</span>, <span style="color: #FF30FB;">""</span>, <span style="color: #FF30FB;">"Teltonika"</span>, <span style="color: #FF30FB;">""</span>, <span style="color: #FF30FB;">""</span>, <span style="color: #FF30FB;">""</span>, <span style="color: #0014F9;">//21-26 - ssid, hostname, Wifi page text, routername (get from flash if empty), 950 product code (get from flash if empty) , 955 code</span>
<span style="color: #FF30FB;">"<nowiki>https://wiki.teltonika-networks.com/index.php?title=Network_products</nowiki>"</span>, <span style="color: #FF30FB;">"Wiki Teltonika"</span>, <span style="color: #0014F9;">// 27-28 Footer link to Wiki</span>
<span style="color: #FF30FB;">"<nowiki>https://wiki.teltonika-networks.com/index.php?title=RMS</nowiki>"</span>, <span style="color: #FF30FB;">"Teltonika Wiki information"</span> <span style="color: #0014F9;">//29-30 - RMS table link to RMS Wiki page</span>
};

The strings highlighted in <span style="color: #FF30FB;"><b>pink</b></span> are the different brand names that can found in the WebUI of the router. Highlighted in <span style="color: #0014F9;"><b>blue</b></span> are descriptions on where these names may be encountered.

Take note the firmware is intended for use not on a single router but on an entire series of routers (RUT9xx in the case of this example). That is why you see many different router names (RUT900, RUT905, RUT950, etc.) If you're planning on using your firmware on only one router (only RUT955, for example), you can just change the names that are relevant to you.

The empty quotation marks (<span style="color: #FF30FB;">""</span>) indicate that the value is omitted and should be obtained from the router's flash memory. This may be important to remember because if you leave the quotations marks empty, your branding may be left incomplete. For example, if you do not indicate the <span style="color: #0014F9;">hostname</span> value (fifth row, second element; left empty by default), it will be taken from the router's flash memory and will probably not coincide with the rest of your branding.

Once you are done with editing, save the changes made to the file and compile a firmware to test whether your branding was successful.
0

edits