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.
TinyONE is secured by user / password login. There is no default password and you have to
assign a password the first time you use it. The password requires at least one uppercase
letter, one lowercase letter, one number and symbols. And the total length must be between
8-32. Only a salted hash is stored from this password. This is only the password for the
administration (admin).
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 a BeagleBone Black
with TinyCTS instead of Linux 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
- Mbed TLS a SSL library
- zlib a compression library
- xfile a file system image generator
- xbin a bin file converter
SEGGER Embedded Studio
v5.60 was used as the compiler.
By using many different components from different sources, it was not always easy to bring
everything together. Therefore it might be more helpful if everything comes from one source,
and with professional support available. For this reason, you should perhaps take a look at
the Segger’s products.
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.
HTTPS protocol
With HTTPS the communication is encrypted by using the Trasnport Layer Security (TLS). The TLS functionality
was implemented with the help of Mbed TLS.
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. 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.
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
First time use
As already mentioned, a password must be set when using it for the first time:

(Click inside the picture to expand)
After the initial setup, the login is required, with admin for the user:

(Click inside the picture to expand)
After the login the windows looks like:

(Click inside the picture to expand)
Oh, by the way, if you don't use the TinyONE's website for 3 minutes, you will be
logged out automatically.
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. 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)
Now the login is required, with admin for the user. After the correct login the result will look like:

(Click inside the picture to expand)
This is the jump table into the TinyONE Network. The mDNS/LLMNR feature is also used when clicking on an
IP address.

(Click inside the picture to expand)
But this device must be unlocked with a correct login.

(Click inside the picture to expand)
Here a click on the IP address 192.168.1.200 was executed. Take a look back at the Tiny Network
Explorer. Here the device with the IP address 192.168.1.200 has the MAC address of XX:XX:XX:5B:08:31.
Now take a look at the URL. Here you will find "tiny5B0831.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. "tiny5B0831.local" for the URL
- Direct with the IP address for the URL
Terminal
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.
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.
zlib uncompress
In the moment only a compressed webpage image will be supported. With the help of zlib, the size of
the TinyONE website could be reduced by compression from 142 to 25 KB. The compression is done by xfile.
In the application only uncompress is required. The DEFLATE algorithm required the following resources here:
- ROM: 11 KByte
- RAM: 3 KByte
- Heap: 7 KByte
For a microcontroller with few resources, this may not be the best algorithm, but it is perfect for this
application.
How to build
If the project was opened in SEGGER Embedded Studio, there are different project configurations to
create the firmware. The configuration "RAM 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_v110.bin"
can be used to update the firmware via the website, as described above.
Download
The download files for the BeagleBone Black board and other boards can be found at GitHub:
|