Tracking targets in the neighborhood with and without the internet! Cheap, and Easy!
LoRa (from “long range”) is a proprietary low-power wide-area network modulation technique.
In this project we will be using a mix of items to accomplish the goal at hand. That in no way means its the best way. In this case its more ease of setup, and use for the project at hand.
Using Meshtastic, we can keep an eye on where our trackers are, and even send messages to them. Keep in mind that Meshtastic is usually used by an android phone as a means of communication when there is no internet or phone network. The LoRa device with Meshtastic communicates via Bluetooth with the android device. This allows for texting over LoRa via the application.
However, if the device has a GPS on it, it will also relay that information. Since these devices are ESP32 based they can go into a ‘deep sleep’ when not in use. This makes them very power friendly, and many of them run for days on a small battery.
In this example I am going to use the 2 different devices, one that I added a GPS added to manually.
Heltec Wifi LoRa v2 + BN-880 GPS
I added this GPS I had laying around to this radio. It was ridiculously easy. Just hooked up power, and pin 36/37. TX to RX and RX to TX.
It took about 10 minutes with decent soldering skills. Or bad skills like mine.
I was expecting some work in the Meshtastic code, but it works out of the box, plug n play. This is a widely used GPS module.
This device has a GPS, and battery mount on the back for an 18650 battery.
If you need to install Meshtastic on a device you might have laying around its not hard at all.
Once installed, and setup on a device (usually Android) it can start to send and receive on a mesh network.
They defaults will put them all on the same channel. In order to change the settings I used Meshtastic-python
Using meshtastic CLI in Linux allows you to update the settings on the device much more easily. Using this you can set the name, wifi, channel, and a lot of other features you dont see in the GUI.
Tracking a target
Once you have paired a device to your phone/device via Bluetooth, Meshtastic will then start receiving signal on the LoRa board and relaying it to your phone. This will include the GPS coordinates of the device. Now you have a start. I personally use 3 devices, although 2 will work.
Now that you have one device reporting in, you simply need to ensure any new devices you have are setup the same. If so, they will start talking to the device you just setup. This is how a mesh network works; and is also the reason I recommend 3 devices.
So why 3? I have the device I use with my phone for ease of use; and I have another I use as a tracker. Well, what I didn’t mention is one device doesn’t have GPS. So with the meshtastic CLI you can put a permanent GPS on it since its stationary. Then there is a store,and forward plugin that helps with messaging on the network. I enable all those; and set it to never sleep. This makes a router of sorts, and a receiver for LoRa that is always awake. I use this device as a receiver, and put it up high for good signal.
There you have it, the devices will show up on the map in Meshtastic, using that in combination with the GPS location.
Tracking data live from the cloud and Use Cases