This presents one possible solution to the project description described in the previous topic. The code for this project can be found in the GitHub repository for this course, found in l8/l8_sol
of whichever version directory you are using.
In this project, CoAP/DTLS is used as a transport layer to carry the GPS coordinates to a CoAP server.
The data sent to the server is shown in the table below:
Data | Permitted CoAP methods (nRF91 Series device) | Permitted CoAP methods (client) | Comments |
Latitude, longitude | POST | GET | Latitude and longitude in degrees |
Accuracy | POST | GET | Position accuracy (2D 1-sigma) in meters. |
Last seen time | POST | GET | Date and time of last satellite fix (in UTC time) |
Sample data:
The nRF91 Series device acts as a CoAP client that sends POST requests with GPS data at regular intervals to a CoAP server. A user can use any web browser on any device to access the data. Alternatively, a CoAP client running on a PC, smartphone, or tablet can send a GET request for the data posted by the nRF91 Series SiP.
By default, the project uses the public CoAP sandbox server californium.eclipseprojects.io, which is the same one used on the exercises in Lesson 5. However, the project works on any other CoAP server of your choosing as long as you update its address and PSK information in the application configuration file through Kconfig.
Your device will create its own resource on the CoAP server. The name of the resource created by your board is set by the Kconfig CONFIG_COAP_DEVICE_NAME
. Set your own device name in Kconfig
or prj.conf
and make sure that your device name starts with cali
. as this is a requirement from the CoAP sandbox server californium.eclipseprojects.io (for example the device name: cali.Ali.nrf9160
)
The application starts by activating the GNSS receiver and searching for GPS satellites in the sky. As we covered in Lesson 6, your board needs to have visible access to the sky in order to get a fix. Once a GPS fix is obtained (enough satellites were found to generate valid GPS coordinates), the LTE modem is activated and data is sent over CoAP to the CoAP server. After that, the LTE modem is deactivated and the device goes to sleep for the interval set by CONFIG_TRACKER_PERIODIC_INTERVAL
(default to 120 seconds). Once that interval time has passed, the cycle will repeat itself as shown in this flowchart:
Since we are manually switching the LTE modem on and off, this provided solution is an implementation that works regardless of whether your SIM card and/or network provider supports power-saving techniques (PSM and eDRX).
Pressing button 1 on your device will show you the status of the tracker device through the LEDs. Pressing button 1 twice switches off the LEDs to save power.
The table below shows what the different LEDs on the device indicate:
Status | nRF960 DK | Thingy:91 |
No LTE (error) | LED1 | Red LED |
Searching for GPS signal | LED2 | Green LED |
GPS fix found | LED3 | Blue LED |
Your development kit will create its own resource on the CoAP server. The name of this resource is set by the Kconfig CONFIG_COAP_DEVICE_NAME
. Again, make sure that your device name starts with cali
. as this is a requirement from the CoAP server.
We also have an open-source web app to parse the coordinates sent over CoAP and visualize it live on a map.
Go to this website: https://developer.nordicsemi.com/.pc-tools/nrf91-simple-tracker/ and enter the full URL (coap://
or coaps://
) of your nRF91 simple tracker CoAP resource. Then click Connect and you will see your location visualized on the map. Please note that it is case sensitive, so make sure to match whatever you set CONFIG_COAP_DEVICE_NAME
to.
The web app is configured to draw the last 10 coordinates received (20 minutes time window assuming a CONFIG_TRACKER_PERIODIC_INTERVAL
= 120
), and the old ones will automatically be removed from the map.
Clicking on a pin will give you details of the coordinates with the time when it was captured and converted from UTC format to your browser time zone.
The web app expects valid data to be available on the resource. If there are none, the web app will throw an error message and ask you to reconnect.
You can use a browser on any device to obtain the GPS data, by using a CoAP crawler hosted by coap.me, found at this address: https://coap.me/crawl/coap://californium.eclipseprojects.io.
Scroll down to locate your own device name, in our case cali.Ali.nRF9160
, with the /echo/
prefix. Then click on this link to access the data.
There are other options to receive the raw data as well. If you are using a PC, you can download the desktop program cf-browser (you need Java Runtime Environment installed on your machine), like we did when testing Lesson 5 Exercise 1 and 2. Then connect to the CoAP server californium.eclipseprojects.io and locate your resource name as shown in the illustration below:
Another option is to use the chrome extension Copper for Chrome (Cu4Cr) CoAP. Then connect to the CoAP server californium.eclipseprojects.io and locate your resource name as shown in the illustration below:
If you are using an Android device, there are several CoAP clients that you can download from the Play Store, for example CoAP Client. There are also CoAP iOS apps available in the App Store.
This presents one possible solution to the project description described in the previous topic. The code for this project can be found in the GitHub repository for this course, found in l8/l8_sol
of whichever version directory you are using.
In this project, CoAP/DTLS is used as a transport layer to carry the GPS coordinates to a CoAP server.
The data sent to the server is shown in the table below:
Data | Permitted CoAP methods (nRF91 Series device) | Permitted CoAP methods (client) | Comments |
Latitude, longitude | POST | GET | Latitude and longitude in degrees |
Accuracy | POST | GET | Position accuracy (2D 1-sigma) in meters. |
Last seen time | POST | GET | Date and time of last satellite fix (in UTC time) |
Sample data:
The nRF91 Series device acts as a CoAP client that sends POST requests with GPS data at regular intervals to a CoAP server. A user can use any web browser on any device to access the data. Alternatively, a CoAP client running on a PC, smartphone, or tablet can send a GET request for the data posted by the nRF91 Series SiP.
By default, the project uses the public CoAP sandbox server californium.eclipseprojects.io, which is the same one used on the exercises in Lesson 5. However, the project works on any other CoAP server of your choosing as long as you update its address and PSK information in the application configuration file through Kconfig.
Your device will create its own resource on the CoAP server. The name of the resource created by your board is set by the Kconfig CONFIG_COAP_DEVICE_NAME
. Set your own device name in Kconfig
or prj.conf
and make sure that your device name starts with cali
. as this is a requirement from the CoAP sandbox server californium.eclipseprojects.io (for example the device name: cali.Ali.nrf9160
)
The application starts by activating the GNSS receiver and searching for GPS satellites in the sky. As we covered in Lesson 6, your board needs to have visible access to the sky in order to get a fix. Once a GPS fix is obtained (enough satellites were found to generate valid GPS coordinates), the LTE modem is activated and data is sent over CoAP to the CoAP server. After that, the LTE modem is deactivated and the device goes to sleep for the interval set by CONFIG_TRACKER_PERIODIC_INTERVAL
(default to 120 seconds). Once that interval time has passed, the cycle will repeat itself as shown in this flowchart:
Since we are manually switching the LTE modem on and off, this provided solution is an implementation that works regardless of whether your SIM card and/or network provider supports power-saving techniques (PSM and eDRX).
Pressing button 1 on your device will show you the status of the tracker device through the LEDs. Pressing button 1 twice switches off the LEDs to save power.
The table below shows what the different LEDs on the device indicate:
Status | nRF960 DK | Thingy:91 |
No LTE (error) | LED1 | Red LED |
Searching for GPS signal | LED2 | Green LED |
GPS fix found | LED3 | Blue LED |
Your development kit will create its own resource on the CoAP server. The name of this resource is set by the Kconfig CONFIG_COAP_DEVICE_NAME
. Again, make sure that your device name starts with cali
. as this is a requirement from the CoAP server.
We also have an open-source web app to parse the coordinates sent over CoAP and visualize it live on a map.
Go to this website: https://developer.nordicsemi.com/.pc-tools/nrf91-simple-tracker/ and enter the full URL (coap://
or coaps://
) of your nRF91 simple tracker CoAP resource. Then click Connect and you will see your location visualized on the map. Please note that it is case sensitive, so make sure to match whatever you set CONFIG_COAP_DEVICE_NAME
to.
The web app is configured to draw the last 10 coordinates received (20 minutes time window assuming a CONFIG_TRACKER_PERIODIC_INTERVAL
= 120
), and the old ones will automatically be removed from the map.
Clicking on a pin will give you details of the coordinates with the time when it was captured and converted from UTC format to your browser time zone.
The web app expects valid data to be available on the resource. If there are none, the web app will throw an error message and ask you to reconnect.
You can use a browser on any device to obtain the GPS data, by using a CoAP crawler hosted by coap.me, found at this address: https://coap.me/crawl/coap://californium.eclipseprojects.io.
Scroll down to locate your own device name, in our case cali.Ali.nRF9160
, with the /echo/
prefix. Then click on this link to access the data.
There are other options to receive the raw data as well. If you are using a PC, you can download the desktop program cf-browser (you need Java Runtime Environment installed on your machine), like we did when testing Lesson 5 Exercise 1 and 2. Then connect to the CoAP server californium.eclipseprojects.io and locate your resource name as shown in the illustration below:
Another option is to use the chrome extension Copper for Chrome (Cu4Cr) CoAP. Then connect to the CoAP server californium.eclipseprojects.io and locate your resource name as shown in the illustration below:
If you are using an Android device, there are several CoAP clients that you can download from the Play Store, for example CoAP Client. There are also CoAP iOS apps available in the App Store.
This presents one possible solution to the project description described in the previous topic. The code for this project can be found in the GitHub repository for this course, found in l8/l8_sol
of whichever version directory you are using.
In this project, CoAP/DTLS is used as a transport layer to carry the GPS coordinates to a CoAP server.
The data sent to the server is shown in the table below:
Data | Permitted CoAP methods (nRF91 Series device) | Permitted CoAP methods (client) | Comments |
Latitude, longitude | POST | GET | Latitude and longitude in degrees |
Accuracy | POST | GET | Position accuracy (2D 1-sigma) in meters. |
Last seen time | POST | GET | Date and time of last satellite fix (in UTC time) |
Sample data:
The nRF91 Series device acts as a CoAP client that sends POST requests with GPS data at regular intervals to a CoAP server. A user can use any web browser on any device to access the data. Alternatively, a CoAP client running on a PC, smartphone, or tablet can send a GET request for the data posted by the nRF91 Series SiP.
By default, the project uses the public CoAP sandbox server californium.eclipseprojects.io, which is the same one used on the exercises in Lesson 5. However, the project works on any other CoAP server of your choosing as long as you update its address and PSK information in the application configuration file through Kconfig.
Your device will create its own resource on the CoAP server. The name of the resource created by your board is set by the Kconfig CONFIG_COAP_DEVICE_NAME
. Set your own device name in Kconfig
or prj.conf
and make sure that your device name starts with cali
. as this is a requirement from the CoAP sandbox server californium.eclipseprojects.io (for example the device name: cali.Ali.nrf9160
)
The application starts by activating the GNSS receiver and searching for GPS satellites in the sky. As we covered in Lesson 6, your board needs to have visible access to the sky in order to get a fix. Once a GPS fix is obtained (enough satellites were found to generate valid GPS coordinates), the LTE modem is activated and data is sent over CoAP to the CoAP server. After that, the LTE modem is deactivated and the device goes to sleep for the interval set by CONFIG_TRACKER_PERIODIC_INTERVAL
(default to 120 seconds). Once that interval time has passed, the cycle will repeat itself as shown in this flowchart:
Since we are manually switching the LTE modem on and off, this provided solution is an implementation that works regardless of whether your SIM card and/or network provider supports power-saving techniques (PSM and eDRX).
Pressing button 1 on your device will show you the status of the tracker device through the LEDs. Pressing button 1 twice switches off the LEDs to save power.
The table below shows what the different LEDs on the device indicate:
Status | nRF960 DK | Thingy:91 |
No LTE (error) | LED1 | Red LED |
Searching for GPS signal | LED2 | Green LED |
GPS fix found | LED3 | Blue LED |
Your development kit will create its own resource on the CoAP server. The name of this resource is set by the Kconfig CONFIG_COAP_DEVICE_NAME
. Again, make sure that your device name starts with cali
. as this is a requirement from the CoAP server.
We also have an open-source web app to parse the coordinates sent over CoAP and visualize it live on a map.
Go to this website: https://developer.nordicsemi.com/.pc-tools/nrf91-simple-tracker/ and enter the full URL (coap://
or coaps://
) of your nRF91 simple tracker CoAP resource. Then click Connect and you will see your location visualized on the map. Please note that it is case sensitive, so make sure to match whatever you set CONFIG_COAP_DEVICE_NAME
to.
The web app is configured to draw the last 10 coordinates received (20 minutes time window assuming a CONFIG_TRACKER_PERIODIC_INTERVAL
= 120
), and the old ones will automatically be removed from the map.
Clicking on a pin will give you details of the coordinates with the time when it was captured and converted from UTC format to your browser time zone.
The web app expects valid data to be available on the resource. If there are none, the web app will throw an error message and ask you to reconnect.
You can use a browser on any device to obtain the GPS data, by using a CoAP crawler hosted by coap.me, found at this address: https://coap.me/crawl/coap://californium.eclipseprojects.io.
Scroll down to locate your own device name, in our case cali.Ali.nRF9160
, with the /echo/
prefix. Then click on this link to access the data.
There are other options to receive the raw data as well. If you are using a PC, you can download the desktop program cf-browser (you need Java Runtime Environment installed on your machine), like we did when testing Lesson 5 Exercise 1 and 2. Then connect to the CoAP server californium.eclipseprojects.io and locate your resource name as shown in the illustration below:
Another option is to use the chrome extension Copper for Chrome (Cu4Cr) CoAP. Then connect to the CoAP server californium.eclipseprojects.io and locate your resource name as shown in the illustration below:
If you are using an Android device, there are several CoAP clients that you can download from the Play Store, for example CoAP Client. There are also CoAP iOS apps available in the App Store.