-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSoftware Stack.tex
More file actions
179 lines (99 loc) · 6.1 KB
/
Software Stack.tex
File metadata and controls
179 lines (99 loc) · 6.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
\usepackage{listings}
\usepackage{color}
\usepackage{tabular}
\definecolor{dkgreen}{rgb}{0,0.6,0}
\definecolor{gray}{rgb}{0.5,0.5,0.5}
\definecolor{mauve}{rgb}{0.58,0,0.82}
\lstset{frame=tb,
language=Java,
aboveskip=3mm,
belowskip=3mm,
showstringspaces=false,
columns=flexible,
basicstyle={\small\ttfamily},
numbers=none,
numberstyle=\tiny\color{gray},
keywordstyle=\color{blue},
commentstyle=\color{dkgreen},
stringstyle=\color{mauve},
breaklines=true,
breakatwhitespace=true,
tabsize=3
language=[AlLaTeX]TeX, % Set your language (you can change the language for each code-block optionally)
moretexcs={lstset,color,colorlet, cellcolor, newcolumntype, columncolor, rowcolor, multirow, xspace, LaTeX, TeX}
}
\section{Software Stack}
The design goals of the software stack are:
\begin{itemize}
\item Open source
\item Active community support
\item Cross-platform
\end{itemize}
\subsection{Platform}
\subsubsection{Operating System}
Official \href{https://www.olimex.com/wiki/A20-OLinuXino-LIME#How_to_generate_boot-able_SD-card_Debian_Linux_image_for_A20-OLinuXino-LIME.3F}{Olimex LIME} Debian based on Linux kernel 3.4.90+ downloaded as a SD-card image file. Custom Linux systems may also be built following tutorials on the download page.
\subsubsection{Interpreter}
Package: \href{https://www.python.org/downloads/release/python-279/}{Python 2.7}
Python is a simple, cross-platform, object-oriented programming language that is widely used across the open-source community.
\subsubsection{SPI, I2C, GPIO}
Package: \href{https://pypi.python.org/pypi/pyA20Lime}{pyA20Lime}
SPI/I2C/GPIO is used to communicate with the power management IC. GPIO is used to control and monitor the Telit GE910-GNSS. GPIO is used to control the system, network, location and fault LEDs.
\subsection{Location}
\subsubsection{GPS utilities}
Package: \href{https://github.com/Knio/pynmea2}{pynmea2}
The SSM's location will be determined using the on-board \href{http://egnos-portal.gsa.europa.eu/discover-egnos/about-egnos/what-gnss}{GNSS} block inside the Telit GE910-GNSS module. pynmea2 is used to parse \href{http://www.nmea.org/content/nmea_standards/nmea_0183_v_410.asp}{NMEA0183} formatted strings strings into Python objects so they can be integrated as MQTT updates. See the Appendix for the parsed data format and structure.
\subsection{Remote telemetry}
\subsubsection{MQTT}
\href{http://mqtt.org/}{MQTT} is a connectivity protocol for Machine to Machine communication. It is a lightweight publish/subscribe based messaging transport protocol. It is used for connections with remote locations over unreliable networks and where data cost is at a premium. It is based on an efficient broker based distribution system to easily allow information flow between one or many receivers.
Package: \href{https://eclipse.org/paho/clients/python/}{paho}\\
The Paho project is an open-source client implementations of MQTT and MQTT-SN messaging protocols. It is implemented in python using the paho python client.
\subsection{GSM/GPRS Dialer}
Package: ppp with wvdial\\
See Appendix B for wvdial configuration file.
The Telit xE910-GNSS module used on the SSM has a USB interface set to show 3 virtual USB devices ( PORTCFG=8 ). These devices are enumerated as follows by the operating system on the SSM.
\begin{table}[htpb]
\centering
\caption{Telit xE-910-GNSS USB port configuration}
\begin{tabular}{ccc}
\textbf{Port} & \textbf{Description} & \textbf{Service} \\
\hline
/dev/ttyACM0 & modem AT command interface 0 & GPRS link data connection port\\
\hline
/dev/ttyACM1 & modem AT command interface 1 & module configuration interface\\
\hline
/dev/ttyACM2 & GNSS NMEA serial & GPS output for location information\\
\hline
\end{tabular}
\end{table}
\subsubsection{Sub-process interface}
Package: \href{https://docs.python.org/2/library/subprocess.html}{subprocess}\\
\subsection{SDR}
\subsubsection{SDR hardware interface}
Package: \href{http://sdr.osmocom.org/trac/wiki/rtl-sdr}{rtl-sdr}
A \href{http://sdr.osmocom.org/trac/wiki/rtl-sdr#Buildingthesoftware}{community built} software defined radio interface is used to capture I/Q sampled radio data from a \href{http://www.rtl-sdr.com/buy-rtl-sdr-dvb-t-dongles/}{ USB DVB-T TV tuner device} with a Realtek RTL2832U chipset. \href{http://kmkeen.com/rtl-power/}{RTL-power} is used to capture, process and combine spectrum power plots that exceed the instantaneous bandwidth of the tuner module.
\subsubsection{rtlsdr wrapper}
Package: \href{https://github.com/roger-/pyrtlsdr}{pyrtlsdr}\\
The software defined radio utilities used are based on the rtlsdr drivers by Antti Palosaari, Osmocom and Eric Fry. rtl-sdr is developed by Steve Markgraf, Dimitri Stolnikov, and Hoernchen, with contributions by Kyle Keen, Christian Vogel and Harald Welte.
For a basic network scan the rtl\_power command line utility by Steve Markgraf can be used. The following command will scan from 470 - 790 MHz with a FFT bin size of 10 kHz and an integration interval of 10 seconds at a tuner gain of ~50 dB and exit after 50s and will crop the outer 20\% of the sampling bandwidth where there is a lower signal quality. It will save the data in “data.csv” in the current directory.
\begin{lstlisting}
sudo rtl_power -f 470M:790M:0.01M -i 10s -g 50 -e 50s -c 20\% data.csv
\end{lstlisting}
A description of the rtl\_power parameters may be found in the appendices.
All functions in librtlsdr are accessible via a Pythonic interface from pyrtlsdr.
the following python code snippet is an example of accessing the rtl-sdr utilities in python :
\begin{lstlisting}
from rtlsdr import RtlSdr
sdr = RtlSdr()
# configure device
sdr.sample_rate = 2.048e6 # Hz
sdr.center_freq = 70e6 # Hz
sdr.freq_correction = 60 # PPM
sdr.gain = 'auto'
print(sdr.read_samples(512))
\end{lstlisting}
\subsubsection{n-dimensional arrays}
Package: NumPy
\subsubsection{Database}
Package: SQLite
\subsubsection{SQLite interface}
Package: sqlite3