function can be managed by a micro application server. By using this approach, it is possible to create micro cells of internet where things can exchange data ...
Embedded Micro Application Server in Intel MiniITX DN2800MT for Interaction with the ARM Cortex-M3 Edielson Prevato Frigieri, Paulo Sérgio de Carvalho, Frederico Martins Pedroso Junior, Natanael Gonçalves Afonso Instituto Nacional de Telecomunicações - Inatel Santa Rita do Sapucaí, Minas Gerais, Brazil
Abstract— The paper presents a proposal of a real-time operating system for the objects, known as “things”, that are part in the Future Internet architecture. This operating system transforms the things in dynamic objects, where the main function can be managed by a micro application server. By using this approach, it is possible to create micro cells of internet where things can exchange data and execute services like sensing, monitoring, collecting data and others important functionalities, changing their functions according to the environment necessities. Keywords—internet of things; real-time operating system; embedded system;
I.
INTRODUCTION
The possibility of connecting all “things”, through the Internet, has been the focus of recent researches. Internet of Things (IoT) is a new project started with the electronic product code (EPC), developed by Auto-ID Center of MIT, whose main objective was to create a comprehensive system of goods registration [1]. The main idea refers to a type of network for connecting any kind of object with the Internet for conducting information exchange and communication with the goal of achieving services like monitoring, tracing, positioning and smart recognitions [2]. With the arrival of IoT, some authors are proposing new models of business scenarios like information service providers, products as a service (PaaS), end-user involvement, right-time business analysis and decision making, and others [3]. These new market scenarios, supported by the information exchange, bring up concerns about security and privacy [4]. If this new technology doesn’t guarantee the safety of private information, users will be averse to adopt it to their environment and life [5].
integrated circuit (IC) that integrates all components of a computer system into a single chip. There are recent woks proposing new architectures [9], protocols and ways of implementing the future Internet [10] [11]. Following these tendencies, this work presents a new approach through a micro application server, based on an embedded RTOS, which allows small objects not only to connect with Internet but to change its functionality in real time. So, these “things” may change their applicability accordingly to the environment or necessity in a flexible way, through a central application manager that is a high end architecture responsible for coordinating and centralize the data collection of many objects. This paper presents in the Section II an illustration about the IoT architecture considered as reference for the system development. Section III presents a concept of an object based on an embedded RTOS for small processor architectures, which can perform application and functionality update, exemplified by an ARM Cortex-M3. The main characteristics of the micro application server, based on the Intel Mini-ITX DN2800MT, are given on Section IV. The results obtained with this work are showed in Section V and finally, the Section VI draws the conclusions. II.
THE IOT ARCHITECTURE
The architecture model used as reference for this work is known as NovaGenesis [12], represented in Fig. 1.
But, for all these ideas, the object, called “thing”, is the central player in that new technology and will be responsible for performing the applications and functionalities [6]. As the they must be small to allow any kind of object to connect with the network [7], the system architecture should be light and flexible [8]. One solution that fits these requirements is the system on a chip (SoC) technology, which is an Fig. 1. NewGenesis protocol architecture [12].
It is a set of distributed systems where any information processing is seen as a service, even networking functionalities. In this model, for meeting semantic goals, regulations and policies, the services must organize themselves using names and contracts. NovaGenesis objective is to create a clean slate architecture for new information exchanging and processing class. It can be seen as a Future Internet initiative and adopts the Internet of Information and Services (IoIS) paradigm, where information-centric and service-centric approaches are combined to integrate information treatment, storage, and exchanging. The NovaGenesis concept was used for this work but the protocols proposed by this new approach will be tested in future works. Initially, the idea is to create objects that are flexible considering their objectives in the network. So, for this project, it is considered that each cell in the network is composed by a micro application server, used for controlling the “things” that are connected on it, managing their services and working as a central database. Around each server there are many objects, characterized as “things”, performing their own functionalities: sensing, billing, data collection, and others. What is important to highlight is that these functionalities can be changed depending on the application server demand or even if some object has the intelligence for detecting new needs for the environment. An illustration about the network distribution is presented in Fig. 2.
LPC1769 from NXP, which is based on ARM Cortex-M3 architecture operating at 120MHz with 512Kb of flash memory and 64kB of data memory. Some application examples were created for exemplifying some functionalities and how to perform online application updates. These application accesses hardware devices like temperature sensor, accelerometer and light sensor, which are part of the LPCXpresso Base Board, supplied by Embedded Artists. The RTOS was developed for running based on a cooperative scheduler [13] and to have some features that makes it the key to this new Internet. These features will be explored in the next sub-sections. A. Cooperative scheduler The heart of the system is the scheduler that uses a cooperative algorithm. It allows tasks be created and deleted at any time even if the system is running. The tasks are executed sequentially based on the order and priority defined in the moment of its creation. There is context switch just between tasks of different priority. Otherwise, each task can execute until completion without interruption from other tasks. The scheduler operation is illustrated in Fig. 3.
Preemption HIGH
Micro Application Server
Priority
Execution Slot
LOW
Task 1
Task 4
Conclusion of all tasks with highier priority
Task 5
T2
T2
Task 3
Task 1
T4
T2
Time
Fig. 3. Time cicle example for the RTOS scheduler
Objects “Things”
Fig. 2. IoT architecture model ilustration.
For a better understanding how this IoT architecture works, it is necessary to understand how each element was implemented and know their features. So, the next sections present the embedded RTOS that represents the objects architecture and the micro application server functionality. III.
OBJECT ARCHITECTURE
The object architecture is the base system for the “things” in this new approach. It is an embedded RTOS, created to be easily ported and used in any SoC device that allows micro application servers manage the objects functionality. For testing and simulating a SoC device, it was used the processor
The RTOS version used for this work allows the creation of time slots with four different priority levels. For guaranteeing the real time response of the system, the tasks must be implemented as state machines, which avoid any delay, interruption or even a system break. The highest priority time slots should be created to be as fast as possible for not compromising the system response. B. Internet connection The connection to the Internet is realized through a TCP/IP stack that can be mounted over an Ethernet or Wi-Fi interface. For this project was considered the standard OSI layers instead of using any new proposed protocol for the Internet of Things, like NovaGenesis protocol, considering that the main objective is to transform the objects in dynamic "things". But the TCP/IP stack was created in modules that facilitate the port, of any layer, for a new protocol in future versions. In the application layer there are web and telnet servers which are used by the micro application server for object configuration and data access. The features of application update and new functionalities installation will be discussed in the next sub-section.
C. Command Line Interface The RTOS is composed of a command line interface (CLI) running over the telnet server that allows users to access, with different security levels, system information like memory usage, connected users, available commands, and others. It is also possible to send commands to the system for executing some available functionality. New commands and new functionalities can be added when a new application is installed in the system providing new options to the users. This CLI is used by the micro application server for sending commands to the object, as will be detailed in section IV.
FLASH Sector 0 Sector 1 Sector 2 Sector 3 Sector 4 Sector 5 Sector 6 Sector 7 Sector 8 Sector 9 Sector 10 Sector 11
D. Application Update Capability The application update capability is the main feature designed for this solution. It allows downloading a new application for a microcontroller, in running time, and installing new functionalities even if it makes hardware access. What turns it possible is the way how the RTOS was architected. For understanding how it works, it is important to start in the microcontroller flash memory.
Sector 12
The LPC1769, used in this work, has a total of 512kB of flash memory that is divided in the follow sectors, illustrated in Fig. 4. The first sixteen sectors have a size of 4kB. From sector 16 to 29, the size of each sector alternates between 32kB and 8kB, respectively. The RTOS uses the first 17 sectors that represent a total of 128kB. The last two sectors are used for saving the configuration data and the remaining sectors are available for installing new applications. So, each sector from 17 to 27 can be used for installing new functionalities to the RTOS and they can be chosen in any sequence. The final flash division can be seen in Fig. 5.
Sector 29
For loading a new functionality, first it is necessary to compile the new application shifted to the flash sector where it will be installed. For example, if the application will be installed on sector 19, it must be compiled for having the first address at 0x00028000. This configuration can be done in the application memory properties. The BSS required by the application is shown in the compilation results. Afterward it is necessary to inform the RTOS that a new application is going to be installed, sending the sector and the required BSS size, using a POST command over a HTTP connection. After the configuration has been accepted, the application binary file is sent. More details about the configuration will be discussed in the section IV.
Sector 13 Sector 14
Sector 15 Sector 16 Sector 17 Sector 18 Sector 19
...
0x00000000 0x00001000 0x00002000 0x00003000 0x00004000
0x00005000 0x00006000
0x00007000 0x00008000 0x00009000 0x0000A000 0x0000B000 0x0000C000 0x0000D000 0x0000E000 0x0000F000 0x00010000 0x00018000 0x00020000 0x00028000 0x00078000
Fig. 4. LPC1769 flash memory sectors FLASH RTOS
128k
Applications
320k
Configuration Data
64k
Fig. 5. Flash memory sectors division
New applications received over HTTP are written in the flash memory by In-Application Programming (IAP) routines, which do internal flash memory access. As soon as it is installed, the RTOS executes a system call in the application address referenced by the sector address configured in compilation time, where the main function is located. Inside the main function must be an entry point, as presented in Fig. 6.
int main(void) { //Make sure the entry point is not "optimized away" from compiler int bla = entryPoint; while(1) { //Should never reach this point } return 0 ; } Fig. 6. Main function for application
The entry point is the function address used by application for registering in the RTOS, getting access to the main system functions necessaries for operation like timer, scheduler, memory manager, command line interface, network, file system, and others. At this point, the application must register itself in the RTOS, configuring new functionalities and informing the system the new commands available. The gate that makes this exchange possible is a common layer in the RTOS architecture called IUnknown. The system architecture is shown in Fig. 7.
Software
APP1
APP2
APP3
RTOS
shifted to the desired flash sector. Afterward, the application server opens a new window where it is necessary to inform the BSS size, required by the new application, and to select its binary file, as shown in Fig. 9. Pressing the “Upload” button, the application server sends the configuration to the object and, if accepted, sends the binary file. If the application has been installed successfully, the RTOS call its entry point, performing the registration discussed before. The application installation can be verified by micro application server, sending a new GET command. The result can be seen in Fig. 10. Now, the application can access the object hardware, allowing the application server to request any data reading through a telnet connection. The micro application server can manage many objects at the same time, changing their functionalities according to the necessities or changes in the environment. For simulating a real problem, it was created two applications, one for reading the environment temperature and other for the light. The results obtained will be presented in the next section.
APPn
IUnknown
Fig. 8. Micro application server: sector screen
Drivers
Hardware Fig. 7. RTOS architecture
The next step is to present how the micro application server uses these features for uploading new applications and reading data from an object. IV.
MICRO APPLICATION SERVER
The Micro Application Server (MAS) was developed using Java, based on the Intel Mini-ITX DN2800MT platform over Ubuntu 12.04 Linux version. The MAS accesses the object configuration sending a GET command through a HTTP connection. As result information is obtained about the sectors that are still available and the remaining flash memory for this object, as illustrated in Fig. 8. For installing a new application, it is necessary to choose the right sector where the application will be uploaded. It was discussed in Application Update Capability sub-section but it is relevant to remind that the application must be compiled and
Fig. 9. Micro application server: application parameters screen
Fig. 12. Light functionality removed.
VI. Fig. 10. Micro application server: two applications installed.
V.
RESULTS
Some fruit plantations, like strawberries, require special care regarding climate. The amount of light and temperature in the plantation is critical. In such cases IoT can be very useful. It is possible to have one object at each strawberry plant, sending the local temperature and the light incidence for checking whether the values are according to the required level. So, to exemplify this scenario, two applications were created, one for temperature sensor and another for light sensor The installation of temperature sensor application to the objects was simulated, getting the temperature values through the internet. After some time, a new application, in the case, the light sensor, was installed and the light values were read. These values can be accessed through the micro application server and can be used for controlling the environment temperature or the light incidence over the plantation, creating an intelligent and self-controlled strawberry plantation. One example is shown in Fig. 11. Other possibility is to delete an application from the object, removing functionalities that are not anymore necessaries. This can help to create memory space for new desired functionalities. This feature is important for really small objects where the processors can’t have enough memory space for both flash and RAM. A remove example can be seen in Fig. 12.
This work proposes a new architecture for small SoC devices that can transform objects in dynamically configurable hardware devices, controlled by a micro application server. This is an important feature since the IoT predicts that everything will be connected to the internet, even the smallest objects. If the objects are already installed everywhere, you need to update or even change your application in an easy and flexible way. The system proposed in this paper fulfills to these requirements to become an option for Internet of Things architectures. The object architecture and the micro application server are designed to run over any IoT architecture or protocol. For future works, the new protocol proposed by NovaGenesis will be tested, where the objects will be connected to a micro application server and, according to the environment necessities, install new functionalities for working as services. REFERENCES [1]
Wikimedia Foundation Inc., “Internet of Things,” Wikipedia: The Free Encyclopedia, 2013. [Online]. Available: http://en.wikipedia.org/wiki/Internet_of_things.
[2]
Y. Yu, J. Wang, and G. Zhou, “The exploration in the education of professionals in applied Internet of Things Engineering,” in 4th International Conference on Distance Learning and Education (ICDLE), 2010, pp. 74–77.
[3]
E. Bucherer and D. Uckelmann, “Business Models for the Internet of Things,” in in Architecting the Internet of Things, D. Uckelmann, M. Harrison, and F. Michahelles, Eds. Springer Berlin Heidelberg, 2011, pp. 253–277.
[4]
B. Krishnamachari and A. Dunkels, “Whither Sensor Networks ? Towards the Internet of Things,” Communication, 2011.
[5]
C. P. Mayer, “Security and Privacy Challenges in the Internet of Things,” Challenges, vol. 17, 2009.
[6]
Y. H. Y. Huang and G. L. G. Li, “Descriptive models for Internet of Things,” in International Conference on Intelligent Control and Information Processing (ICICIP), 2010, pp. 483–486.
[7]
I. F. Akyildiz and J. M. Jornet, “The Internet of nano-things,” IEEE Wirel. Commun., vol. 17, no. 6, 2010.
Despite being this a simple example, the idea is to emphasize how the object can be flexible in the proposed IoT, changing the applicability depending on the environment necessities.
Fig. 11. Temperature and light reading
CONCLUSION
[8]
J. Ruiz-de-Garibay, T. Campo, M. Alvarez, and A. Ayerbe, “Flexible and agile architecture for Internet of Things gadgets,” 2011 IEEE Int. Conf. RFID-Technologies Appl., pp. 50–55, 2011.
[11]
M. Gigli, “Internet of Things: Services and Applications Categorization,” Advances in Internet of Things, vol. 01, no. 02. pp. 27–31, 2011.
[9]
H. Ning and L. Hong, “Cyber-Physical-Social Based Security Architecture for Future Internet of Things,” Adv. Internet Things, vol. 02, no. 01, pp. 1–7, 2012.
[12]
A. M. Alberti, “NovaGenesis,” 2012. [Online]. Available: www.inatel.br/novagenesis. [Accessed: 28-Oct-2013].
[13] [10]
A. M. Alberti, “Internet of Things : Perspectives , Challenges and Opportunities Dhananjay Singh Future Internet Ingredients,” in International Workshop on Telecommunications - IWT, 2013.
M. Nahas, “Implementation of highly-predictable time- triggered cooperative scheduler using simple super loop architecture,” Int. J. Electr. Comput. Sci., vol. 11, pp. 33–38, 2011.