TinyONE
Introduction
Building Blocks
Bootloader
Tiny Network Explorer (TNE)
mDNS / LLMNR
Quickstart
Quickstart ECC
Statistic
DHCP Server
SNTP Server
Update
How to build
Download
 

Introduction

TinyONE is the implementation of a project which is based on several building blocks. The result is a DHCP and SNTP server which can be used for testing other projects. For example, in an enterprise environment it is difficult to quickly change the DHCP or SNTP server if these functions are to be tested in your own project. For this reason the project TinyONE was created.

As in my other Tiny projects, Tiny does not mean small here, only the functionality that was currently needed was implemented. And ONE stands for the first project I have created here, which connects all the building blocks together in a meaningful way.

The project is no longer in a Proof of Concept status, but it is not yet fully developed also. As already mentioned, this is the first version, and there are still some areas of work to be done.

Btw, for the hardware the Embedded Artists iMX RT1062 Developer's Kit was used.

Building Blocks

The software use the following components:

  • TinyCTS/AL a Cooperative Task Scheduler
  • FatFs a generic FAT Filesystem Module
  • lwIP a Lightweight TCP/IP stack
  • MicroHTTP a web server library
  • xfile a file system image generator
  • xbin a bin file converter

Segger Embedded Studio v4.52c was used as the compiler.

Bootloader

This bootloader here is a very simple version which copies a file "firmware.bin" from the SD card to the SDRAM and starts it. For integrity, the firmware header and the CRC are checked first. With the help of xbin, the "firmware.bin" file was prepared before and the header and CRC was added. The bootloader can be programmed e.g. with a J-Link Ultra+.

Tiny Network Explorer (TNE)

Tiny Network Explorer (TNE) is based on the earlier version of NUTSetup. TNE sends a UDP broadcast to a specific port. TinyONE listens on this specific port and responds with its configuration settings. Some additional information like system name and version is also sent. With TNE the user can change the settings and sends them back to TinyONE. Here the new settings are saved and the device restarts. This procedure also works if an incorrect IP address or netmask was set. TNE finds only devices in the same subnet.

After starting the Tiny Network Explorer, all available TinyONE Server will be detected automatically. Assuming there are 3 TinyONE Server in the connected subnet of the PC and the Tiny Network Explorer will be started, the window will look like:

Remember, this will work even if the devices are configured with the wrong address and/or netmask, or with duplicated addresses. A double click on the MAC-Address will open the configuration window:

Here the options like DHCP, IP-Address, Netmask, Gateway and Location can be configured. But this can also be a security risk. Therefore this functionality can also be deactivated:

The remote setup option can be deactivated in the nework configuration dialog:

Here the option "Enable TNE Setup" was not activated

mDNS / LLMNR

Multicast DNS (mDNS) provides the ability to perform DNS-like operations on the local link in the absence of any conventional Unicast DNS server (Source: RFC6762).

The goal of Link-Local Multicast Name Resolution (LLMNR) is to enable name resolution in scenarios in which conventional DNS name resolution is not possible (Source: RFC4795).

With the mDNS / LLMNR service it allows hosts to perform name resolution for hosts on the same local link. It is possible to address the host with e.g. "tiny.local".

This means in our case that by typing "tiny.local" in the browser you will forwarded to the website of a TinyONE Server if it is configured correctly in the network.

(Click inside the picture to expand)

The mDNS/LLMNR feature is also used in the Tiny Network Explorer when double clicking on an IP address:

(Click inside the picture to expand)

Here a double click on the IP address 192.168.1.202 was executed. Take a look back at the Tiny Network Explorer. Here the device with the IP address 192.168.1.202 has the MAC address of XX:XX:XX:41:58:85. Now take a look at the URL. Here you will find "tiny415885.local".

This means that you can reach a TinyONE Server with different ways:

  • "tiny.local" for the URL
  • "tiny.local" for the URL and than the link in the overview
  • Double click on the IP address in the Tiny Network Explorer
  • Direct with last 3 bytes of the MAC address, e.g. "tiny415885.local" for the URL
  • Direct with the IP address for the URL

Quickstart

The quickstart ZIP file contains the bootloader and the SD card content. For a quick start flash the bootloader, and copy the content of the sdcard folder to an empty FAT formatted, SD card. In case of the network settings, DHCP is enabled and the default IP address is 192.168.1.200. For the terminal J22 can be used. At start the application will output some information over the UART (115200, 8, N, 1):

One of the most useful features is the task info:

But it is possible to check the runtime stack:

And the functionality to check the memory:

Another useful feature is the network info:

Here, DHCP was disabled, and the default IP address of 192.168.1.200 is used.

Quickstart ECC

Compared to the previous quick start, the system here uses the HTTPS protocol instead of HTTP. In case of HTTPS is the communication encrypted by using the Trasnport Layer Security (TLS). The TLS functionality was implemented with the help of mbedTLS.

In addition there is now the directory "certs" on the SD card. The following files must be copied into this directory later:

  • device.crt
  • device.key
  • intermed.crt

Without these files, only HTTP is supported and the system behaves like the normal "Quickstart". The information how the files can be created are available here.

Note: This is not a secure system with regard to "CyberSecurity" because the "device.key" is freely accessible here. The example is only intended to demonstrate the function of TLS.

Statistic

The same functionality as before are also available under "Maintenance / Statistics". The values are updated every 5 seconds. For example, the Task Info looks like this:

Infos for Runtime Stack and Memory are available too.

DHCP Server

The DHCP Server can be configured and enabled by "Maintenance / DHCP Server":

The DHCP Server overview with a connected DHCP client looks like:

(Click inside the picture to expand)

Btw, the DHCP Server can not be enabled if the TinyONE Server has enabled his own DHCP client.

SNTP Server

The SNTP Server can be controlled by "Maintenance / Time":

The SNTP Server overview looks like:

(Click inside the picture to expand)

Update

The update functionality is available under "Maintenance / Update". Here it is possible to update the webpage and firmware. The firmware update looks like:

There is the possibility to choose one of two buffers for the update. One of the two can be activated later. The same functionality as here for the firmware is also available for the webpage.

How to build

If the project was opened in Segger Embedded Studio, there are different project configurations to create the firmware. The configuration "SDRAM Boot Release" must be used for later use with the bootloader.

After a successful build, the firmware must still be converted with the batch file "_create_fw.bat". This batch file can be find in the project folder:

The result of the conversion is stored in the "build" directory. The file "tinyone_fw_v100.bin" can be used to update the firmware via the website, as described above.

Download

tinyone-ea1062-qs_20200808 Quickstart (469 KB)

tinyone-ea1062-qs-ecc-20200808 Quickstart ECC (690 KB, GitHub)

tinyone-ea1062-fw_20200808 Firmware (5.72 MB)

tinyone-web_20200808 Webpage (89 KB)

ea1062-boot-sd_20200718 SD-Card Bootloader (3.73 MB)

tnexpl-source_20200718 TNE source for Microsoft Visual C++ 6.0 (23 KB)

tnexpl-win_20200718 TNE application (20 KB) md5sum zip file: 81C8BB2E8C344E9A1E8AE7FCBAFB522F