An embedded system is some combination of computer hardware and software, either fixed in capability or programmable, that is specifically designed for a particular function \cite{ganssle2008embedded}. Industrial machines, automobiles, medical equipment, cameras, household appliances, airplanes, vending machines and toys (as well as the more obvious cellular phone and PDA) are among the myriad possible hosts of an embedded system. Embedded systems that are programmable are provided with programming interfaces, and embedded systems programming is a specialized occupation.
An embedded system is some combination of computer \gls{hw} and \gls{sw}, either fixed in capability or programmable, that is specifically designed for a particular function \cite{ganssle2008embedded}. Industrial machines, automobiles, medical equipment, cameras, household appliances, airplanes, vending machines and toys (as well as the more obvious cellular phone and \gls{pda}) are among the myriad possible hosts of an embedded system. Embedded systems that are programmable are provided with programming interfaces, and embedded systems programming is a specialized occupation.
\subsection{Processing units}
The term embedded system is quite broad, so there is no surprise that the spectrum of used processing units is also wide. Since the general purpose microprocessors require external components, namely memories and peripherals, they tend to consume extra power and a board space. Since the design limitations of an embedded systems are most of the time low physical size, low power consumption and/or long uptime and ruggedness (more components mean more parts could fail), microprocessors are seldom used. However, most of the commonly used architectures and word lengths are covered. Due to aforementioned reasons, microcontrollers are favored over microprocessors.
\subsection{System-on-chip}
Today's state of chip integration allows production costs of a complex system on chip devices to be relatively low, thus making very SoCs attractive choice for embedded systems. Soc could be described as an integrated circuit (IC) that integrates all components of a computer or other electronic system into a single chip. It may contain digital, analog, mixed-signal, and often radio-frequency functions - all on a single chip substrate \cite{flynn2011computer}. SoCs are very common in the mobile electronics market because of their low power consumption.
Today's state of chip integration allows production costs of a complex system on chip devices to be relatively low, thus making \gls{soc} attractive choice for embedded systems. \glspl{soc} could be described as an \gls{ic} that integrates all components of a computer or other electronic system into a single chip. It may contain digital, analog, mixed-signal, and often radio-frequency functions - all on a single chip substrate \cite{flynn2011computer}. \glspl{soc} are very common in the mobile electronics market because of their low power consumption.
%\begin{minipage}{\textwidth}
A typical SoC consists of (specific block diagram can be seen on \ref{f:ar_block}):
A typical \gls{soc} consists of (specific block diagram can be seen on \ref{f:ar_block}):
\begin{itemize}
\item a microcontroller, microprocessor or digital signal processor (DSP) core(s)
\item memory blocks including a selection of ROM, RAM, EEPROM and Flash
\item a microcontroller, microprocessor or \gls{dsp} core(s)
\item memory blocks including a selection of \gls{rom}, \gls{ram}, \gls{eeprom} and Flash
\item timing sources including oscillators and phase-locked loops
\item peripherals including counter-timers, real-time timers and power-on reset generators
\item external interfaces, including industry standards such as USB, FireWire, Ethernet, USART, SPI
\item analog interfaces including ADCs and DACs
\item external interfaces, including industry standards such as \gls{usb}, FireWire, Ethernet, \gls{uart}, \gls{spi}
\item analog interfaces including \glspl{adc} and \glspl{dac}
\item voltage regulators and power management circuits
\item a bus connecting these blocks
\end{itemize}
%\end{minipage}
SoCs can be implemented as an application-specific integrated circuit (ASIC) or using a field-programmable gate array (FPGA).
\glspl{soc} can be implemented as an \gls{asic} or using a \gls{fpga}.
\subsection{Operating systems}
An operating system is a computer program that supports a computer's basic functions, and provides services to other programs (or applications) that run on the computer. The applications provide the functionality that the user of the computer wants or needs. The services provided by the operating system make writing the applications faster, simpler, and more maintainable.
An \gls{os} is a computer program that supports a computer's basic functions, and provides services to other programs (or applications) that run on the computer. The applications provide the functionality that the user of the computer wants or needs. The services provided by the operating system make writing the applications faster, simpler, and more maintainable.
Over time, a lot of embedded operating systems suited for embedded systems were developed. An \textit{embedded operating system} is a type of operating system that is embedded and specifically configured for a certain hardware configuration. Hardware that uses embedded operating systems is designed to be lightweight and compact, forsaking many other functions found in non-embedded (i.e. desktop) computer systems in exchange for efficiency at resource usage \cite{holt2014embedded}. This means that they are made to do specific tasks and do them efficiently.
Over time, a lot of \textit{embedded}\glspl{os} suited for embedded systems were developed. An embedded \gls{os} is a type of \gls{os} that is embedded and specifically configured for a certain \gls{hw} configuration. \Gls{hw} that uses embedded \gls{os} is designed to be lightweight and compact, forsaking many other functions found in non-embedded (i.e. desktop) computer systems in exchange for efficiency at resource usage \cite{holt2014embedded}. This means that they are made to do specific tasks and do them efficiently.
\begin{figure}[ht!]
\centering
@ -50,10 +50,10 @@ Over time, a lot of embedded operating systems suited for embedded systems were
\subsection{Real-time operating systems}
A real time operating system is just a special purpose operating system. The \textit{real time} part of the name does not mean that the system responds quickly, it just means that there are rigid time requirements that must be met. If these time requirements are not met, the results can become inaccurate or unreliable\cite{jean2002microc}. Embedded systems frequently posses the real time requirement.
A \gls{rtos} is just a special purpose \gls{os}. The \textit{real time} part of the name does not mean that the system responds quickly, it just means that there are rigid time requirements that must be met. If these time requirements are not met, the results can become inaccurate or unreliable\cite{jean2002microc}. Embedded systems frequently posses the real time requirement.
%\begin{minipage}{\textwidth}
There are two kinds of RTOS:
There are two kinds of \gls{rtos}:
\begin{description}
\item[Hard Real Time]- system delays are known or at least bounded. Said to be operating correctly if the system can return results within any time constraints.
\item[Soft Real Time]- critical tasks get priority over other tasks and will retain priority until the task is completed. This is another way of saying that real time tasks cannot be kept waiting indefinitely. Soft real time makes it easier to mix the system with other systems.
@ -67,7 +67,7 @@ With the availability of consumer embedded devices, communities of users and dev
\subsection{Kernel}
The \textit{kernel} is the essential center of a computer operating system, the core that provides basic services for all other parts of the operating system\cite{bovet2005understanding}. It has complete control over what happens in the system. A kernel can be contrasted with a \textit{shell}, the outermost part of an operating system that interacts with user commands. Kernel and shell are terms used more frequently in Unix or Unix-like operating systems than in IBM mainframe or Microsoft Windows systems.
The \textit{kernel} is the essential center of a computer \gls{os}, the core that provides basic services for all other parts of the \gls{os}\cite{bovet2005understanding}. It has complete control over what happens in the system. A kernel can be contrasted with a \textit{shell}, the outermost part of an \gls{os} that interacts with user commands. Kernel and shell are terms used more frequently in Unix or Unix-like operating systems than in IBM mainframe or Microsoft Windows systems.
\begin{figure}[ht!]
\centering
@ -78,9 +78,9 @@ The \textit{kernel} is the essential center of a computer operating system, the
The simplified view on the Linux system structure can be seen on \ref{f:linuxbl}. It does not include device drivers, compilers, deamon, utilities, commands, library files and such, but should be enough for a demonstration.
\subsection{OpenWRT}
OpenWrt is an operating system (in particular, an embedded operating system) based on the Linux kernel, primarily used on embedded devices to route network traffic. The main components are the Linux kernel, util-linux, uClibc and BusyBox. All components have been optimized for size, to be small enough for fitting into the limited storage and memory available in home routers.
OpenWrt is an \gls{os} (in particular, an embedded \gls{os}) based on the Linux kernel, primarily used on embedded devices to route network traffic. The main components are the Linux kernel, util-linux, uClibc and BusyBox. All components have been optimized for size, to be small enough for fitting into the limited storage and memory available in home routers.
OpenWrt is configured using a command-line interface (ash shell), or a web interface (LuCI). There are about 3500 optional software packages available for installation via the opkg package management system.
OpenWrt is configured using a command-line interface (ash shell), or a web interface (LuCI). There are about 3500 optional \gls{sw} packages available for installation via the opkg package management system.
@ -89,7 +89,7 @@ OpenWrt is configured using a command-line interface (ash shell), or a web inter
\newpage
\section{GL.inet board}
GL.inet Smart Router is a remake of a common TP-Link router TL-WR703N. The board changes include, but are not limited to, increased RAM and Flash memory, custom firmware and what is the most important - 5 usable GPIO pins exposed to the 2cm pin header for utility. Whole thesis is revolving around taking advantage of this fact. Basic information about the router are shown in Table \ref{t:charact}.
GL.inet Smart Router is a remake of a common TP-Link router TL-WR703N. The board changes include, but are not limited to, increased \gls{ram} and Flash memory, custom firmware and what is the most important - 5 usable \gls{gpio} pins exposed to the 2cm pin header for utility. Whole thesis is revolving around taking advantage of this fact. The \gls{cpu} frequency is 400 \gls{mhz} and it is suited for running Linux distributions for embedded devices, preferably OpenWrt or DD-Wrt. The board provides \gls{lan} and \gls{wan} connection, as well as other interfaces defined in \gls{ieee}. The information about the board are summed up in the table \ref{t:charact}.
\begin{table}[h]
\caption{The basic characteristics of the GL.inet board}\label{t:charact}
@ -99,59 +99,63 @@ GL.inet Smart Router is a remake of a common TP-Link router TL-WR703N. The board
The Atheros AR9331 is a highly integrated and cost effective IEEE 802.11n 1x1 2.4 GHz Systemon-a-Chip (SoC) for wireless local area network (WLAN) AP and router platforms. The block diagram of the chip can be seen on Figure \ref{f:ar_block}. The main processor frequency is 400 MHz and it is suited for running Linux distributions for embedded devices, preferably OpenWrt or DD-Wrt.
Features of this SoC are following:
The Atheros AR9331 is a highly integrated and cost effective \gls{ieee} 802.11n 1x1 2.4 G\gls{hz}\gls{soc} for \gls{wlan}\gls{ap} and router platforms. The block diagram of the chip can be seen on figure \ref{f:ar_block}. Features of this \gls{soc} are following:
\begin{itemize}
\item Complete IEEE 802.11n 1x1 AP or router in a single chip
\itemMIPS 24K processor operating at up to 400 MHz
\item External 16-bit DDR1, DDR2, or SDRAM memory interface
\itemSPI NOR Flash memory support
\item No external EEPROM needed
\item 4 LAN ports and 1 WAN port IEEE 802.3 Fast Ethernet switch with auto-crossover, auto polarity, and auto-negotiation in PHYs
\item Fully integrated RF front-end including PA and LNA
\item Optional external LNA/PA
\item Complete \gls{ieee} 802.11n 1x1 \gls{ap} or router in a single chip
\item\gls{mips} 24K processor operating at up to 400 \gls{mhz}
\item External 16-bit \gls{ddram} or \gls{sdr} memory interface
\item\gls{spi} NOR Flash memory support
\item No external \gls{eeprom} needed
\item 4 \gls{lan} ports and 1 \gls{wan} port \gls{ieee}802.3 Fast Ethernet switch with auto-crossover, auto polarity
\item Fully integrated \gls{rf} front-end including \gls{pa} and \gls{lna}
\caption{The block diagram of the Atheros AR9331 SoC used as a main processing unit on GL.inet board}\label{f:ar_block}
\caption{The block diagram of the Atheros AR9331 \gls{soc} used as a main processing unit on GL.inet board}\label{f:ar_block}
\end{figure}
\subsection{From TL-WR703N to GL.inet}
TP-Link TL-WR703N router is a popular choice among hacker community because of it's cheap price tag compared to processing power and usage of a full-grown Linux distribution. People have figured out how to upgrade RAM / Flash memories or to make use of not used GPIO / UART ports for their own needs. These solutions however were mostly crude and expensive to replicate. The GL.inet team saw an opportunity to grasp this public knowledge and rolled out their own improved board clone to the marked.
TP-Link TL-WR703N router is a popular choice among hacker community because of it's cheap price tag compared to processing power and usage of a full-grown Linux distribution. People have figured out how to upgrade \gls{ram} / Flash memories or to make use of not used \gls{gpio} / UART ports for their own needs. These solutions however were mostly crude and expensive to replicate. The GL.inet team saw an opportunity to grasp this public knowledge and rolled out their own improved board clone to the marked.
Whole printed circuit board of TL-WR703N was remade by the GL.inet team to expose the unused GPIO ports on the SoC, utilize two Ethernet port instead of one and utilize the USB 2.0 port. Memory chips were replaced by their higher capacity alternatives.
Whole printed circuit board of TL-WR703N was remade by the GL.inet team to expose the unused \gls{gpio} ports on the \gls{soc}, utilize two Ethernet port instead of one and utilize the \gls{usb} 2.0 port. Memory chips were replaced by their higher capacity alternatives.