Skip to content

Application to manage supply-chain and track cargos location using LoRaWAN.

License

Notifications You must be signed in to change notification settings

gdeggau/logistical_management_and_monitoring_with_LoRa

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation


LoRa

This is my undergraduate final project of bachelor degree on Computer Science at Fundação Universidade Regional de Blumenau (FURB).
It is a system to manage the logistic/supply-chain and track delivery transport, using a WiFi LoRa 32 to get vehicles geolocation and send via LoRaWAN to KORE network server which will forward the payloads to that application.

Programming language most used JavaScript Objetivo: estudo

Article   |    Resources   |    Prerequisites   |    Setup   |    Running   |    Techs   |    License

Web Application

Device

Article

Resources

The application has more functionalities like login, create products, users, devices and other ones, but the main are listed below:

  • User's addresses CRUD, getting automatically coordinates when adding a new one
  • Users do orders
  • Create cargos
  • Generate cargo pack list (PDF)
  • Send vehicle geolocation throw LoRaWAN network
  • Scan order's barcode
  • Track cargos

Prerequisites

Below are listed softwares that you must install to run the application:

To show map at frontend and geocoding user addresses it is used Mapbox API, so you must create an account and an access token at Mapbox.

LoRaWAN network server used is from KORE Wireless company. To user their services, you must contact them and choose/contract a plan that makes more sense for your application. Here, it was used the biggest one, G plan.

To build the device, components below are necessary:

  • WiFi LoRa 32 (V2)
  • GPS GY-NEO6MV2
  • Protoboard 400 pins
  • 4 jumpers male to male
  • Portable charger (or other thing to power device)

Setup

Arduino IDE

  • As said before, the device used was WiFi LoRa 32, for that you will need setup your Arduino IDE following the Helctec DOCS instructions
  • Install TinyGPS++
  • Get Heltec ChipID and license for you device following the instructions
  • With ChipID, you must "tranform" it to a DevEUI, changing from 6 bytes to 8 bytes
    • e.g.: if your ChipID is: 123456781122, your DevEUI will be: 0x12, 0x34, 0x56, 0xFF, 0xFF, 0x78, 0x11, 0x22
  • Open device/lorawan_example.ino file and set values to variables DevEUI, AppEui and AppKey (the last two you can get in KORE)

LoRaWAN network server (KORE)

With access to KORE, you need to create an "organização", a "aplicação" and two HTTP "encaminhamentos" (endpoints which KORE will send the payloads):

  • URL: https://deggautcc.loca.lt/cargos/geolocation (select UPLINK, LORA and RADIO)
    • This endpoint will save vehicle geolocation in PostgreSQL
  • URL: https://deggautcc.loca.lt/lora (select all options except DUPLICATE)
    • This endpoint will save all messages in mongoDB, to have a messages history/logs
  • Create a device (Device EUI you must set with values that you get previously)
    • Set config as OTAA, contador as 2, NS security and class A

Backend and frontend

  • Duplicate .env.example file and rename to .env in backend and frontend folders
  • Set API_KEY_MAPBOX with access token that you got in Mapbox
  • Create a database in PostgreSQL and set connections data in backend/.env
  • Create a database in mongoDB with tcc name
  • Create an account/project in Sentry and set SENTRY_DSN property in backend/.env (it is not necessary, used to errors monitoring)

Running

Backend

# Repository clone
$ git clone https://github.com/gdeggau/logistical_management_and_monitoring_with_LoRa.git

# Acccess backend folder
$ cd logistical_management_and_monitoring_with_LoRa/backend/

# Dependence install
$ yarn

# Run
$ yarn dev

# Open a new terminal (script responsable to set API public)
$ yarn tunnel

Frontend

# Acccess frontend folder
$ cd logistical_management_and_monitoring_with_LoRa/frontend/

# Dependence install
$ yarn

# Run
$ yarn start

Device

  • Compile and upload the lorawan_example.ino file to the device

Techs

Backend Frontend Device
Node.js React JS ESP32 LoRaWAN Heltec
Express Styled Components TinyGPS++
Sequelize Reactstrap
Localtunnel (dev) Redux & Redux-Saga
Mapbox React-map-gl
PostgresSQL Reactotron (dev)
mongoDB Formik
JWT cep-promise
Sentry react-table

License

MIT

About

Application to manage supply-chain and track cargos location using LoRaWAN.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages