This repository contains source code for the nRF91 Simple Tracker application which is part of the Nordic Developer Academy Cellular IoT Fundamentals Course. The main purpose of the application is to demonstrate how to pull data from the nRF91 Series device using CoAP
- Connect to any nRF91 Series Device GPS Data from a COAP server
- Read and display GPS position on a map
The relevant code for connecting to the COAP API is available in routes/coapData.js
. The code for parsing data is also available in routes/coapData.js
.
Any of the following development hardware:
Nordic nRF9160 DK Cellular IoT prototyping kit. Buy here
Nordic Thingy:91 Cellular IoT prototyping kit. Buy here
In order to use this web application you must first set up your nRF91 Series device to advertise its GPS data on some publicly accessible CoAP Server. Refer to the Cellular IoT Fundamentals Nordic Developer Academy Course
If the GPS data is available on a CoAP server, you can:
- Go to the web application or run the app locally
- Copy the CoAP device URI as set in the firmware into this app settings page
- Click connect
- The application should now display live CoAP data from your nRF91 Series device
If you don't want to make use of the publicly hosted application you can run this application locally.
Note: Node.js is needed.
- Clone the code from this repo
$ git clone https://github.com/NordicPlayground/nrf91-simple-tracker-coap.git
- Go to the application folder
$ cd nrf91-simple-tracker-coap
- Run npm install
$ npm i
- Run Local server
$ npm run server
Result
$ [nodemon] 2.0.20
$ [nodemon] to restart at any time, enter `rs`
$ [nodemon] watching path(s): *.*
$ [nodemon] watching extensions: js,mjs,json
$ [nodemon] starting `node index.js`
$ Listening on Port: 6600
- View in your web browser using http://127.0.0.1:6600.
- The app has only been tested on Chrome browsers in Windows and Android devices
- No authentication has been implemented to access the CoAP Server hence the CoAP server needs to be publicly available and with no authentication
- Leaflet - BSD 2-Clause "Simplified" License
- jQuery - MIT License
- Bootstrap - MIT License
- Express - MIT License
- COAP - MIT License
This application is one of several applications that has been built by developers at Nordic Semiconductor as a demo of some particular feature or use case. It has not necessarily been thoroughly tested, so there might be unknown issues. It is hence provided as-is, without any warranty. However, in the hope that it still may be useful also for others than the ones we initially wrote it for, we've chosen to distribute it here on GitHub. Please post any questions about this project on DevZone.