Skip to content

NordicPlayground/nrf91-simple-tracker-coap

Repository files navigation

Introduction

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

Features

  • 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.

Requirements

Any of the following development hardware:

Image of nRF9160 DK

Nordic nRF9160 DK Cellular IoT prototyping kit. Buy here

Image of Thingy:91

Nordic Thingy:91 Cellular IoT prototyping kit. Buy here

How to use

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:

  1. Go to the web application or run the app locally
  2. Copy the CoAP device URI as set in the firmware into this app settings page
  3. Click connect
  4. The application should now display live CoAP data from your nRF91 Series device

How to run locally

If you don't want to make use of the publicly hosted application you can run this application locally.

Note: Node.js is needed.

  1. Clone the code from this repo
  $ git clone https://github.com/NordicPlayground/nrf91-simple-tracker-coap.git
  1. Go to the application folder
  $ cd nrf91-simple-tracker-coap
  1. Run npm install
  $ npm i
  1. 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
  1. View in your web browser using http://127.0.0.1:6600.

Limitations

  1. The app has only been tested on Chrome browsers in Windows and Android devices
  2. No authentication has been implemented to access the CoAP Server hence the CoAP server needs to be publicly available and with no authentication

Third-party licenses

A note on support

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.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published