Skip to content

Commit

Permalink
latest
Browse files Browse the repository at this point in the history
  • Loading branch information
Petre Rodan committed Sep 10, 2015
1 parent 4a902c8 commit 69eb77f
Show file tree
Hide file tree
Showing 8 changed files with 3,913 additions and 1,902 deletions.
62 changes: 0 additions & 62 deletions README
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

gps tracker with a gprs connection for reporting and command input.

UNDER DEVELOPMENT, FAR FROM BEING READY

source: https://github.com/rodan/tracy
author: Petre Rodan <petre.rodan@simplex.ro>
license: GNU GPLv3
Expand All @@ -17,63 +15,3 @@ Features:

prototype pictures available here: http://goo.gl/BzzAdJ

how to install a local SIM card

these are step-by-step instructions for a 'Cartela Vodafone' from the Romanian telephony provider:
- buy a SIM card
- write down the associated phone number, or even better enter it into your phone's phonebook - don't forget to also add the country prefix so you can contact the tracker while abroad. it's "+4" prefixed to the number in Romania.
- place the new SIM card inside a phone
- if it has no initial credit, fill it with at least 5EUR
- make sure no PIN is set on the SIM itself
- disable any 'best value plan' the provider might have selected - this is easiest to do from the 'MYVodafone' entry from within the vodafone.ro website. This SIM will mostly be used to connect to the internet, and it will send a minimal number of SMS messages during the setup process. the only extra options that are needed are '100MB internet for 1 Month - 2EUR'. you can optionaly activate roaming.
- disable 'VOX voicemail' by calling ##002#
- place the SIMs back into their proper locations: the newly purchased one in the tracker and your old one into the phone.
- while inserting the SIM into the tracker write down the last 4 digits that you see written on the SIM900 IC that is adiacent to the SIM holder.
- send a SMS from the phone to the tracker that contains:

code 1234

'1234' will need to be replaced by those digits you wrote down during the previous step

- power on the tracker and wait. it only connects to the gsm network every 10 minutes by default and it has a 1 minute interval in which it's actively listening to incoming SMS messages. once the code is received and acknowledged you will get a 'code ok' reply on the phone. from this moment on you can send commands to the tracker.

valid commands:

code STRING
authenticate a phone to the tracker. use last 4 digits of the SIM900 IMEI as the STRING.

gprs
show APN, USER, PASSWORD that are currently used in order to authenticate for a gprs session

setup
show a hex value containing current switches

fix
try to send back a GPS fix as a SMS reply

apn STRING
default: live.vodafone.com
set the gprs apn value - max 20 char long
in case STRING is missing, an empty apn is used

user STRING
default: live
set the gprs user - max 20 char long
in case STRING is missing, an empty username is used

pass STRING
default: vodafone
set the gprs pass - max 20 char long
in case STRING is missing, an empty password is used

srv STRING
default: www.simplex.ro
what server to contact in order to send the tracking data

port STRING
default: 80
TCP port used during connection to the server

err
shows a hex value in case there were any errors logged in the device. this value gets reset when all power is lost or when an 'err' command is replied to. only used for debug.

11 changes: 3 additions & 8 deletions doc/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,12 @@ check:

$(PROJ).pdf: $(SRCS)
@pdflatex $(SRCS)
@./makeglossaries $(PROJ)
@perl ~/texmf/scripts/makeglossaries $(PROJ)
@pdflatex $(SRCS)
@pdflatex $(SRCS)
#@echo -e "\n>> Building $@ as target $(TARGET)"
#@$(CC) $(CFLAGS) $(LDFLAGS) $(INCLUDES) -o $@ $+ && size $@
#@#@python tools/msp430-ram-usage $@

clean: $(SUBDIRS)
#@for subdir in $(SUBDIRS); do \
# echo "Cleaning $$subdir .."; rm -f $$subdir/*.o; \
#done
@rm -f $(PROJ).{aux,log,out,pdf,toc} *.log
@rm -f $(PROJ).{aux,log,out,pdf,toc,glg,glo,gls,ist,xdy} *.log

doc:
rm -rf doc/*
Expand Down
97 changes: 51 additions & 46 deletions doc/tracy_manual.tex
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@

\documentclass[a4paper,twoside]{refart}

\hfuzz=10pt

\usepackage{longtable}
\usepackage{graphicx}
\usepackage[bitheight=6ex]{bytefield}
\usepackage{gensymb}
\usepackage[stable]{footmisc}
\usepackage{multirow}
\usepackage{hyperref}
\usepackage[toc]{glossaries}

\makeglossaries
Expand Down Expand Up @@ -136,13 +137,14 @@
\begin{tabular}{ c p{8cm} }

\raisebox{-\totalheight}{\includegraphics[width=77mm, height=71mm]{img/izometric}} &
\textbf{Description:} This module can be used to track goods wherever gsm signal is present. It is optimized for very low power consumption and has configurable timings which would make it fit to any use scenario.
\textbf{Description:} This module can be used to track goods wherever gsm signal is present. It is optimized for very low power consumption and has configurable timings which would make it fit to any use case scenario.

\textbf{Main features:} both hardware and software are open-source, an f-ram chip for input data buffering, resilient software architecture, all gps/gsm operations controlled by timer interrupts which allows control of both subsystems in the same time, great flexibility given by configuration variables

\textbf{Size:} 50mm x 38mm x 9mm
\textbf{Size:} 50mm x 38mm x 9mm

\textbf{Voltage input:} 3.7V battery and optional 5V DC for charging
\textbf{Voltage input:} 3.7V battery and optional 5V DC for charging

\textbf{License:} both hardware and software are under GPL OpenSource license
\end{tabular}
\end{fulltable}

Expand Down Expand Up @@ -182,21 +184,21 @@ \subsubsection{SIM cards and initial setup}

\begin{itemize}
\item buy a SIM card. any SIM card will do: prepay-ed, subscription (but do keep in mind that no voice transmission will ever be used on this SIM tho), machine to machine (also known as \gls{m2m}). mini SIM form factor cards are needed.
\item obtain the associated phone number and enter it into your phone's address-book - don't forget to also add the country prefix so you can contact the tracker while abroad. it's "+4" prefixed to the number in Romania.
\item place the newly purchased SIM card into an actual phone
\item obtain the associated phone number and enter it into your phone's address-book - don't forget to also add the country prefix so you can contact the tracker while abroad.
\item place the newly purchased SIM card into a mobile phone
\item if it has no initial credit, fill it with at least 5EUR
\item make sure no PIN is set on the SIM itself
\item disable any 'best value plan' the provider might have selected - this SIM will mostly be used to connect to the internet, and it will send a minimal number of SMS messages during the setup process. the only extra options that are needed are the cheapest internet plan available ('100MB internet for 1 Month - 2EUR' for vodafone). also activate data roaming.
\item disable 'VOX voicemail' by calling \#\#002\#
\item place the SIMs back into their proper locations: the newly purchased one in the tracker and your old one into the phone.
\item while inserting the SIM into the tracker write down the last 4 IMEI digits that you see written on the SIM900 IC that is adjacent to the SIM holder.
\item while inserting the SIM into the tracker write down the 15 IMEI digits that you see written on the SIM900 IC that is adjacent to the SIM holder.
\item send a SMS from the phone to the tracker that contains:

\begin{lstlisting}
code 5551
\end{lstlisting}

'5551' will need to be replaced by those digits you wrote down during the previous step
'5551' will need to be replaced by the last 4 digits you wrote down during the previous step

\item power on the tracker and wait. it only connects to the gsm network every 15 minutes by default and it has a 1 minute interval in which it's actively listening to incoming SMS messages. once the code is received and acknowledged you will get a 'code ok' reply on the phone. from this moment on you can send commands to the tracker.
\end{itemize}
Expand Down Expand Up @@ -811,6 +813,44 @@ \subsubsection{List of timing variables}
\newpage
\subsection{Hardware}

\subsubsection{Absolute maximum ratings}

\begin{tabular}{ |c|c|l|c|c|c| }
\hline
\multicolumn{3}{|c|}{} & \multicolumn{2}{|c|}{value} & unit \\ \cline{4-6}
\multicolumn{3}{|c|}{} & min & max & \\ \hline
\multicolumn{1}{|c|}{\multirow{2}{*}{$V_{I}$}} & \multicolumn{1}{|c|}{\multirow{2}{*}{input voltage}} & IN (with respect to VSS) & -0.3 & 28 & V \\ \cline{3-6}
& & VBAT (with respect to VSS) & -0.3 & 5 & V \\ \hline
$V_{IO}$ & \multicolumn{2}{|l|}{IO voltage thru the debug connector} & -0.3 & 3.1 & V \\ \hline
$T_{stg}$ & \multicolumn{2}{|l|}{storage temperature} & -65 & 150 & \degree C \\ \hline
$T_{op}$ & \multicolumn{2}{|l|}{operating temperature} & 0 & 125 & \degree C \\ \hline
\end{tabular}

Stresses above those listed in absolute maximum ratings may cause permanent damage to the device. This is a stress rating only, functional operation of the device at these or any other conditions above those indicated in the operational section of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.

\subsubsection{Electrical characteristics}

\begin{tabular}{ |c|l|c|c|c|c| }
\hline
\multicolumn{2}{|c|}{} & \multicolumn{3}{|c|}{value} & unit \\ \cline{3-6}
\multicolumn{2}{|c|}{} & min & typ & max & \\ \hline
$V_{I}$ & input voltage range & 4.35 & 5 & 6.4 & V \\ \hline
$I_{I}$ & input current & X & X & 1.5 & A \\ \hline
$V_{BAT}$ & battery voltage range & 3.5 & & 4.1 & V \\ \hline
$I_{BAT}$ & battery current on sim900 poweron & & & 3200 & mA \\ \hline
$I_{BAT}$ & battery current while sim900 tx & & & 1600 & mA \\ \hline
$I_{BAT}$ & battery current while gps on & & 25 & 45 & mA \\ \hline
$I_{BAT}$ & battery current while sleeping & 70 & & 75 & $\mu$A \\ \hline
$I_{CHG}$ & battery charging current \footnotemark & & 0.3 & & A \\ \hline
$V_{IO}$ & IO voltage thru the debug connector & 0 & & 2.8 & V \\ \hline
\end{tabular}

\footnotetext{The charging current is configurable by changing the value of R11. See the module schematic and the bq24072 datasheet for details}



\subsubsection{Components}

\begin{fulltable}
\begin{tabular}{ c c }
\raisebox{-\totalheight}{\includegraphics[width=80mm, height=65mm]{img/hw_front}} &
Expand Down Expand Up @@ -869,44 +909,10 @@ \subsection{Hardware}
\end{itemize}

\marginlabel{\numcircledtikz{8} 2.8V rail}
the only power rail that remains on. it can be used to power low voltage sensors/accelerometers/etc via the programming connector.

\subsubsection{Absolute maximum ratings}

\begin{tabular}{ |c|c|l|c|c|c| }
\hline
\multicolumn{3}{|c|}{} & \multicolumn{2}{|c|}{value} & unit \\ \cline{4-6}
\multicolumn{3}{|c|}{} & min & max & \\ \hline
\multicolumn{1}{|c|}{\multirow{2}{*}{$V_{I}$}} & \multicolumn{1}{|c|}{\multirow{2}{*}{input voltage}} & IN (with respect to VSS) & -0.3 & 28 & V \\ \cline{3-6}
& & VBAT (with respect to VSS) & -0.3 & 5 & V \\ \hline
$V_{IO}$ & \multicolumn{2}{|l|}{IO voltage thru the debug connector} & -0.3 & 3.1 & V \\ \hline
$T_{stg}$ & \multicolumn{2}{|l|}{storage temperature} & -65 & 150 & \degree C \\ \hline
$T_{op}$ & \multicolumn{2}{|l|}{operating temperature} & 0 & 125 & \degree C \\ \hline
\end{tabular}

Stresses above those listed in absolute maximum ratings may cause permanent damage to the device. This is a stress rating only, functional operation of the device at these or any other conditions above those indicated in the operational section of this specification is not implied. Exposure to absolute maximum rating conditions for extended periods may affect device reliability.

\subsubsection{Electrical characteristics}

\begin{tabular}{ |c|l|c|c|c|c| }
\hline
\multicolumn{2}{|c|}{} & \multicolumn{3}{|c|}{value} & unit \\ \cline{3-6}
\multicolumn{2}{|c|}{} & min & typ & max & \\ \hline
$V_{I}$ & input voltage range & 4.35 & 5 & 6.4 & V \\ \hline
$I_{I}$ & input current & X & X & 1.5 & A \\ \hline
$V_{BAT}$ & battery voltage range & 3.5 & & 4.1 & V \\ \hline
$I_{BAT}$ & battery current on sim900 poweron & & & 3200 & mA \\ \hline
$I_{BAT}$ & battery current while sim900 tx & & & 1600 & mA \\ \hline
$I_{BAT}$ & battery current while gps on & & 25 & 45 & mA \\ \hline
$I_{BAT}$ & battery current while sleeping & 70 & & 75 & $\mu$A \\ \hline
$I_{CHG}$ & battery charging current \footnotemark & & 0.3 & & A \\ \hline
$V_{IO}$ & IO voltage thru the debug connector & 0 & & 2.8 & V \\ \hline
\end{tabular}

\footnotetext{The charging current is configurable by changing the value of R11. See the module schematic and the bq24072 datasheet for details}
the only power rail that remains on during microcontroller standby intervals. it can be used to power low voltage sensors/accelerometers/etc via the programming connector.

\newpage
\section{Connectors}
\subsubsection{Connectors}

\begin{fulltable}
\centering
Expand Down Expand Up @@ -1018,7 +1024,6 @@ \section{Connectors}

\newpage


%\glsaddall
\printglossaries
%\printglossary[type=acronymdesc,style=altlist]
Expand Down
2 changes: 2 additions & 0 deletions firmware/proj.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,11 @@
#define GPS_IRQ_ENABLE UCA0IE |= UCRXIE
#define GPS_IRQ_DISABLE UCA0IE &= ~UCRXIE

// charging is enabled when CE is low
#define CHARGE_ENABLE P6OUT &= ~BIT1
#define CHARGE_DISABLE P6OUT |= BIT1

// read CHG - 0 if charging
#define CHARGING_STOPPED P1IN & BIT1

#define I2C_MASTER_DIR P4DIR
Expand Down
Loading

0 comments on commit 69eb77f

Please sign in to comment.