How to build a Mobile Internet-connected Location tracker

By: Omar Metwally, MD

Principal Investigator

omar@analog.earth

 
 
IMG_4195.jpg

Educational Objectives

  • Network internet of things (IoT) projects with a mobile internet connection

  • Build a location tracker

  • Apply this knowledge to power a bike share project

 

Components

  • Raspberry Pi 3 (RPI)

  • Micro-SD card

  • 3G-compatible SIM card

  • GPRS/GSM 3G HAT

  • GPS antenna

  • Power source or battery

  • Micro-USB cables (2)

  • Monitor with HDMI connection and HDMI cable

  • Keyboard and mouse

 

Part 1: ASsemble Hardware

sdcard.jpg

1.1

Install Raspbian (or other Linux-based OS) on a micro-SD card and insert into Raspberry Pi (RPI)

1.2

Insert an activated 3G-compatible SIM card (e.g. AT&T*) into the 3G HAT’s SIM card slot.

*Carrier compatibility with GMS modems varies. Check with your supplier before purchasing a modem and SIM card.

IMG_4189.jpg

1.3

Insert the 3G hat over the RPI’s pins.

Connect the HAT to the RPI with a micro-USB to USB cable.

1.4

Connect the GPS antenna via USB.

Connect the RPI to a power source.

Connect the RPI to a monitor.

IMG_4194.jpg

1.5

Press and hold the HAT power button (arrow) until 3 LED lights turn on.

IMG_4195.jpg
 

Part 2: Configure Software

 

2.1

CLONE THE FLEET FOX GITHUB REPOSITORY

mkdir /home/pi/Desktop/fleetfox
cd /home/pi/Desktop/fleetfox
git init
git remote add origin https://github.com/AnalogLabs/fleetfox
git pull origin master

2.2

Note the GSM modem’s device name and device id

sudo lsusb

Note the GSM modem’s USB interface number

sudo dmesg | grep tty
 
sudo apt-get install ppp

2.3B

Grant sakis3g, umtskeeper, and umtskeeperscript permission to execute

chmod +x umtskeeper sakis3g umtskeeperscript

2.4

Test run Sakis3G using the cellular carrier’s APN settings and USB interface (part 2.2)

sudo ./sakis3g
 

2.5

Update the contents of umtskeeperscript with the settings from 2.2.

vim /home/pi/Desktop/fleetfox/umtskeeperscript

To start on system boot, copy superscript to home directory and edit .bashrc

mv /home/pi/Desktop/fleetfox/superscript /home/pi
vim .bashrc

Add this line to the bottom of .bashrc

./superscript
 

Test and REpeat

Debugging is a valuable opportunity to learn.

If you get stuck:

 
 

Part 3: Apply your knowledge

 
 

Fleet Fox is a peer-to-peer bike share program in East Bay, California.

Using your newly acquired skills, you can outfit your bike with a homemade GPS tracker and share it with others in your community.