An SMS-SQL based On-board system to manage and query a database

Technological advances of recent years have facilitated the use of embedded systems. They are part of our everyday life. Thanks to them, electronic devices are increasingly present in our lives in many forms: Mobile phones, music players and managers have become the essential of modern life. Access to information anywhere at any time is increasingly a daily challenge of embedded system technology. Following an innovative idea, this paper describes an embedded system that can query any database through SMS commands to extend the consultation of data to mobile networks early generations. Based on a UNIX embedded system, the result of this work can serve as a standard consultation of databases through SQL-SMS Gateway which converts an SMS command in an SQL query. This system will open the database to the consultation via mobile without having to expose them to risks of online publication. While in the first part of this article we will discuss the state of the art of multi-agent systems and input systems onboard, the second part presents the architecture of our target system. In the third part we describe in detail the realized prototype. This article ends with a conclusion and an outlook.


INTRODUCTION
Most of applications management, research and data consultation are using databases.However, it is not always easy to undertake a remote research because of the difficulty of generalizing access to all networks, by opening Internet risk which often requires huge amount of security investment or sometimes by the complexity of the publishing solutions implementation.Whether you're not connected to internet or do not have security platforms for publishing your databases, we propose through this paper an innovative solution based on a Unix embedded system providing a searchable database only via SMS.
This system opens the way for the standardization of a new exchange protocol which we call SMS-SQL that will find any database through an SMS command.In the first part of this article we will discuss the state of the art about embedded systems and multi agent systems used for our system modeling.In the second part we will present the architecture of the targeted system.The third part is devoted to the description of prototype as part of our research.This article ends with a conclusion and perspectives.

A. Multi-Agent System and Types of Agents
A multi-agent system (MAS) is a system composed of multiple interacting intelligent agents within an environment.Multi-agent systems can be used to solve problems that are difficult or impossible for an individual agent or a monolithic system to solve.Intelligence may include some methodic, functional, procedural or algorithmic search, find and processing approach.
Multi-agent systems consist of agents and their environment.Typically multi-agent systems research refers to software agents.However, the agents in a multi-agent system could equally well be robots, humans or human teams.A multiagent system may contain combined human-agent teams.

Agents can be divided into different types:
Very simple like: passive agents or agent without goals (like obstacle, apple or key in any simple simulation); Active agents with simple goals (like birds in flocking, or wolf-sheep in prey-predator model) Or very complex agents (like cognitive agent, which has a lot of complex calculations).

B. Characteristics of Agents
The agents in a multi-agent system have several important characteristics: Autonomy: the agents are at least partially autonomous Local views: no agent has a full global view of the system, or the system is too complex for an agent to make practical use of such knowledge Decentralization: there is no designated controlling agent (or the system is effectively reduced to a monolithic system).

C. Embedded systems
Embedded systems are devices or software and hardware components are intimately linked.The interest to embedded systems is increasingly evolving through the routine means of communication (Smartphone, switchboards etc...) and the ongoing need for facilitation of life through technology (MP3 players, storage data).In industry, embedded systems are often an indispensable choice for reasons of criticality of the features offered and the security risks (ABS brakes, alarm system and detection, aviation, etc ...).
For specific jobs, embedded systems bring several advantages to traditional systems by contribution based on normal computers.The main constraints to meet embedded systems are: -The stability system: an embedded system is often dedicated to a specific operation, malfunctions must be mastered.
-Mastery of the security, integrity and access: with a minimum of features and services enabled, an embedded system is designed to be safer.-Cost of production: a computer system can be produced through industrial processes that greatly limit the cost of production.
-Low power consumption: Unlike a conventional computer, an embedded system has the minimum resources tailored.Energy consumption is adjusted and optimized.-Reactivated: the response time required in an embedded system often require real-time systems.
-Autonomy: embedded systems must operate without human intervention to perform automatic spots.
The operating system component is an essential building block in the design of any embedded system.Thanks to their major assets in terms of reliability, security, stability and effective resource management, it is not surprising to find unix and linux systems in most embedded systems.The Linux and Unix systems support multiple hardware platforms: ARM, X86, MIPS, and POWER PC.Hence the birth of several distributions for embedded systems.As examples, we find: Lineo Embedix, MontaVista, uCLinux and LEM.

III. DESCRIPTION OF THE TARGET SYSTEM
Our target system is designed to address the need to query a database via SMS queries.With a standard GSM, a user can formulate a specific syntax as a query and send SMS to a Gateway (SMS-Sql).The latter charge is to extract the query and translate it into SQL query which is sent to a database server.The answer to the user query will also be sent back by SMS.The target system has the following features: -Conversion of a text message to a SQL query -Supports almost any database through the use of the correct driver -Quick Setup "plug and play" on the network -User authentication and numbers that sending SMS messages to maintain data security.

A. Multi-agent systems based modeling
To better understand the details of how the target system, we modeled the interactions between different components using multi-agent systems: www.ijacsa.thesai.orgThe SQL-SMS Gateway is an embedded system where the OS is based on a UNIX kernel with device drivers and LAN modems.In the upper layers there are libraries for access to the GSM device for sending and receiving SMS queries.There are also drivers for querying various databases to consult.
This modular architecture provides better stability of the embedded system enjoying the benefits of the UNIX kernel and cascade functioning to isolate each layer separately to ensure safe operation of the system.In case of problems on a layer, it can be reloaded or reset without impacting the layers above or below.
The UNIX kernel is the most important component of the system.Its purpose is to control the material in a logical manner and provides services to low-level users to high level.It basically manages the control of network devices and memory to avoid system crashes and maximize resources.To avoid unexpected malfunctions of the system, applications do not access directly to GSM pilots.To do so, they must tease out specific libraries (libraries GSM).This will save us breakdowns due to unexpected or random workings of the system.

C. Scheme of procedures systems execution
The execution of tasks systems is depicted by the figure 6.Through a trigger, the system periodically consults the GSM interface to retrieve messages that will be inserted into a file called "receiving queue".SMS queries are translated into a SQL Query and sent to the server database.Answers to communicate to senders are stored in a queue called "sending queue." This mode of operation can offer three major advantages to embedded system: -Optimization of energy: indeed, if we maintain an ongoing connection to the GSM modem, you may lose energy in the initial connection to the cellular network.
-The use of queues helps maintain data integrity and retake the treatment in case of system malfunction.-It is possible to implement prioritization in servicing the request based on the running time of each request at the level of criticality of the application.www.ijacsa.thesai.org

D. SMS-SQL Translation
The user sends SMS containing arguments to be used for authentication, identification of the target server and the formalization of the SQL query.A SMS request has the following syntax: USER_ID: Server_name: keyword: Field: Table_name: Database_name The field extraction is expressed by the separator ':'.This syntax requires that the ID is rather short and that keywords do not contain special characters.

E. Security measures
An embedded system is intended to perform secure spots.It is therefore necessary to implement safety rules to avoid major risks.Indeed, such a system is exposed to the following threats: -Using a false identity to reveal confidential information (ID-spoofing) -Attempts to access by brute force The following diagram depicts the security mechanisms implemented to mitigate these threats.

A. Operating system²
As noted in our target system architecture, the different layers of the system must be autonomous.This is a fundamental criterion for the choice of operating system.Our benchmark of Unix core revealed the stable and robust feature of the system.Indeed, NETBSD fits the following advantages over other OS: -Portability to most hardware architectures -Accuracy and quality codes -Policy rise version very strict and demanding in terms of security and stability -The kernel functions are highly optimized and therefore allow for better utilization and energy consumption.

GSM Modem:
We used a USB external modem GSM.In an industrial system, the majority of devices are typically integrated into the same card.

B. Case of shipment
We opted for a box Soekris NET 5501 which features the majority of interfaces and slots necessary.Its main features are: Industrial embedded system industry can be significantly optimized until NANO size.Its size will rely primarily on the amount of requests to be processed and the nature of databases to query.

C. Development libraries:
To benefit from greater flexibility on the system we chose to use PERL to Unix native langage.This choice also offers several advantages: -Rapid development of various systems common tasks -Drivers database available for any DBMS (MYSQL, SQL SERVER ORACLE, etc. ...).
-GSM librairies book flexible and efficient.-Better debugging system.In diagnosing system problems, it is critical to know at what level is the error.This will develop a circumvention procedure to make the system more reliable.Despite the advent of new communication protocols 3G, SMS remains a reliable protocol and accessible to a wider population.That's where the interest to extend its use to other areas.In this paper we designed an innovative embedded system for translating an SMS query to SQL one.Thanks to the prototype, our idea seems to offer more opportunities in the future.Indeed, this concept opens the way towards a standardization of a new protocol that allows making available a database research via SMS.The proposed embedded system can be appropriately used in several areas where industrial databases are often hindered by the complexity of the architecture.

Figure 4 .
Figure 4. Diagram of System modeling B. Target System Architecture:The SQL-SMS Gateway is an embedded system where the OS is based on a UNIX kernel with device drivers and LAN modems.In the upper layers there are libraries for access to the GSM device for sending and receiving SMS queries.There are also drivers for querying various databases to consult.

Figure 5 .
Figure 5. Diagram of System components

Figure 6 .
Figure 6.Diagram of Procedures executions

Figure 7 .
Figure 7. Diagram of the SMS-SQL Translator

Figure 8 .
Figure 8. Diagram of security mechanism

-
433 to 500 Mhz AMD Geode LX single chip processor with CS5536 companion chip -512 Mbyte DDR-SDRAM soldered on board -4 Mbit BIOS/BOOT Flash -Compact FLASH Type I/II socket -USB 2.0 interface, one internal, one external port -10/100 Mbit Auto MDIX Ethernet ports, RJ-45, protected to 700W/40A Surge -Power using external power supply is 6-25V DC, max 20 Watt, protected with TVS