Step‐by‐step instructions - Udj13/AGLoRa GitHub Wiki
Required parts
1. Arduino
Arduino Nano or Arduino UNO. Arduino must have a chip AVR ATMEGA328P, not ATmega168.
2. LoRa
LoRa Module (EBYTE E220-900T22D (868 MHz), E433T30D (433 MHz)). SPI modules like RA-02 are not supported yet.
3. GPS
GPS Module (Generic), with UART serial, for example u-blox
How to setup u-blox
You can connect most generic GPS UART modules without additional configuration. Just set the module speed in the sketch settings (read section "Setup and uploading Sketch").
If you would to use u-blox read: setup u-blox
4. Bluetooth
AT-09 (HM-10) Bluetooth Low Energy (BLE) Module. Сheck that it supports BLE as this is the most common problem. This module is optional, only if you need to connect the tracker to your phone.
Device assembly
Сonnecting the LoRa module
Arduino Pins LoRa Pins
Pin 2 ——> TX
Pin 3 ——> RX
Pin 4 ——> M0
Pin 5 ——> M1
Pin 6 ——> AX
5V ——> VCC
GND ——> GND
Connecting the GPS module
Arduino Pins GPS Pins
Pin 7 ——> TX
Pin 8 ——> RX
5V ——> VCC
GND ——> GND
Connecting the BLE module (optional)
Arduino Pins Bluetooth Pins
RX (Pin 0) ——> TX
TX (Pin 1) ——> RX
5V ——> VCC
GND ——> GND
Power
The most common and easiest way is by using its onboard USB connector.
Other ways: Powering Alternatives for Arduino Boards
Setup and uploading Sketch
1. Setup Arduino IDE
Download and run Arduino IDE: https://www.arduino.cc/en/software
2. Sketch
Copy and past sketch AGLoRa-tracker.ino
3. Install libraries
Open "Library manager" in Arduino IDE. Find and install libraries:
- TinyGPSPlus by Mikal Hart
- EByte LoRaE220 Series by Renzo Mischianti
4. Board setup
Disconnect BLE module if it connected. Plugin your arduino board to PC, select "board" and "processor" in Arduino IDE
Disconnecting BLE is very important, because BLE is connected to the RX and TX pins that are used for board programming.
If you are familiar with PlatformIO I highly recommend using it and the full project https://github.com/Udj13/AGLoRa-full! This way you will have the latest version of the code!
5. Set tracker's name
Set tracker's name in section "NAME" before uploading sketch.
const char NAME[NAME_LENGTH] = "Rick";
Note that value “NAME LENGTH” must be same for all your devices.
6. Upload sketch
Upload the sketch by clicking on the "Upload" button
7. Connect BLE
Disconnect board from PC and connect BLE module.
Hardware tests
Instead of the main sketch, you can Upload test ones for check connection.
https://github.com/Udj13/AGLoRa/wiki/Hardware-tests
App
1. Install app
AGLoRa client is an open source app - https://github.com/Udj13/AGLoRa-client-flutter
Android: download and install last version from releases
iOs: install from AppStore
2. Enable trackers
Turn on at least two AGLoRa devices (the one you use must have a BLE module)
3. Start mobile app
Start app than find and connect to your AGLoRa device
4. Receiving data
When the first data from other trackers received you'll see it.
Desktop tests
BLE to COM convertor for tests - https://github.com/magdel/ble2com
Aglora Emulator - https://github.com/magdel/agloraemulator