Contains setup instructions for the project LoRaWAN-Enabled Travel Solutions for IIT Roorkee
The project is divided into 3 code repositories containing the Frotend, Backend and Mobile App.
Follow these steps on a server of your choice to run the setup:
- Install nvm and use Node version 18.
- Install pm2.
- Install mongodb and run it on default port.
git clone git@github.com:meetcshah19/erick-frontend.git
git clone git@github.com:meetcshah19/erick-backend.git
- Build the erick-frontend React project using
npm install && npm run build
. - Install dependencies for erick-backend using
npm install
. - Copy the contents of build directory from erick-frontend to erick-backend/public.
- Go to erick-backend and run
pm2 start
. - Open port 4000 on your server and ensure it has a public IP.
This should get the admin dashboard and backend up and running on http://IP:4000/.
Now let us configure The Things Network settings using the following steps:
- Sign up and Create a new application on The Things Network console.
- Create a new end device. Select Brand : Heltec automation. Select device : HTCC-AB02(Class A OTAA). Select region : IN_865_867.
- Set unique Join EUI.
- Generate DevEUI and APP key and register end device.
- Now go to Integrations/Webhooks and create a new one. Use base url :
http://IP:4000/save_erick_data
and check all events. - Create the webhook.
- Go to Payload formatters and add an uplink payload formatter as given in payload_formatter.js.
This completes the TTN setup.
Lets upload code to the IoT device now using the followng steps:
- Download Arduino IDE.
- Follow setup instructions here to setup LoRaWAN parameters and the IoT board parameters.
- Set DevEUI, AppEUI and AppKey.
- Upload GPS_LoRa.ino to device to get an active tracker.
Now lets build the app.
- Clone
git clone git@github.com:meetcshah19/erick-app.git
. - Run
npm install
. - Use
npm run dev
and the Expo Go app to test. - Follow Build Instructions to build the app.
This completes the whole setup for the LoRaWAN based tracking system.