Skip to content

Commit

Permalink
Update to version 0.4.
Browse files Browse the repository at this point in the history
Signed-off-by: Achim Kraus <[email protected]>
  • Loading branch information
boaks committed Aug 1, 2022
1 parent 9215ba4 commit 553425f
Show file tree
Hide file tree
Showing 7 changed files with 30,334 additions and 29,920 deletions.
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

# Zephyr - Coaps Demo Client with Eclipse/TinyDtls

## Reliable - Efficient - Encrypted

Version 0.4 - August 2022

This [zephyr](https://www.zephyrproject.org/) client demonstrates to use coaps ([CoAP](https://tools.ietf.org/html/rfc7252) over [DTLS 1.2](https://tools.ietf.org/html/rfc6347)) with the [Eclipse/TinyDtls Library](https://github.com/eclipse/tinydtls). In combination with [Eclipse/Californium](https://github.com/eclipse/californium) as Cloud-Server, it enables a device to use [DTLS 1.2 Connection ID](https://tools.ietf.org/html/rfc9146), which obsolete the commonly used frequently DTLS handshakes and eliminates that expensive overhead.
Reducing the messages exchange mostly down to two ip-messages (one request, one response), it enables your device for

Expand All @@ -15,7 +19,7 @@ In combination, CoAP / DTLS CID and LTE-M/NB-IoT, enables to build mobile applic
- zero-install and
- high cost-efficiency.

The demo client itself is in early development stage. In "good weather", the `Thingy:91` flies from battery for 4 weeks. In "storm" it may require the be switched off and on again. That should be rare exceptions. With version 0.2 the main cause of longer periods of lost connectivity to the mobile network is fixed.
The demo client itself is in early development stage. In "good weather", the `Thingy:91` flies from battery for 4 weeks. In "storm" it may require the be switched off and on again. That should be rare exceptions.

The demo client is intended as groundwork for your own ideas. "Out-of-the-box" this application is only useful to easily check, if mobile IoT works at the locations and environment you want to use it. To build products and applications on this protocol stack requires to implement a production client and to adapt the coap-server for your function. The demo targets therefore people, which are already common with [zephyr](https://www.zephyrproject.org/), or, even better, common with the development for the [Thingy:91](https://www.nordicsemi.com/Products/Development-hardware/Nordic-Thingy-91) itself.
Without that knowledge it will be hard an time consuming to make benefit out of this demo.
Expand Down Expand Up @@ -146,13 +150,15 @@ The demo client exchanges encrypted messages with the coap-server. These message
Demo message:

```
15641 s, Thingy:91 v0.2, 0*43, 1*0, 2*0, 3*0, failures 0
4160 mV 95% charging (V)
RSSI: 255,255
Network: CAT-M1
124 s, Thingy:91 v0.4, 0*3, 1*0, 2*0, 3*0, failures 0
4156 mV 94% battery
RSSI q,p: 17,30
Network: CAT-M1 5,26201(*)
PSM: TAU 3600 [s], Act 16 [s], Delays 0, Released: 11189 ms
Stat: 1,1,280,159
```

It starts with the up-time in seconds in the first line, followed by the label "Thingy:91" and a sent statistic. "`0*43`" := 43 exchanges without retransmission, "`1*0`" := no (0) exchanges with 1 retransmission. The current exchange is not included in this statistic. The second line contains the battery status and the third the receiving signal strength. The next line contains the network mode (CAT-M1 or NB-IoT).
It starts with the up-time in seconds in the first line, followed by the label "Thingy:91" and a sent statistic. "`0*43`" := 43 exchanges without retransmission, "`1*0`" := no (0) exchanges with 1 retransmission. The current exchange is not included in this statistic. The second line contains the battery status and the third the receiving signal strength. The next line contains the network mode (CAT-M1 or NB-IoT) and the provider. Followed by a line with the PSM setup and finally a transmission statistic (kB transmitted, kB received, max. packet size, avg. packet size).

The demo uses the "echo" resource of the plugtest-server, therefore the response contains just the same message.

Expand Down
20 changes: 19 additions & 1 deletion docu/CONFIGURATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,20 @@

# Configuration

The demo client comes with some configuration values, which are setup using:

```
west build -b thingy91_nrf9160_ns -t menuconfig
```

for the console variant, and

```
west build -b thingy91_nrf9160_ns -t guiconfig
```

for the GUI variant.

## Basic

- **COAP_SERVER_HOSTNAME**, hostname of the coap/dtls 1.2 cid server. Default is the Californium's sandbox at `californium.eclipseprojects.io`.
Expand All @@ -18,6 +32,8 @@

- **COAP_SEND_INTERVAL**, coap send interval in seconds. Used, if messages are send frequently. Default 0s, disabled.

- **COAP_WAKEUP_SEND_INTERVAL**, coap wakeup send interval in seconds. Used, if messages are send piggybacked with PSM wakeups. Default 0s, disabled.

## Extensions

### GPS/GNSS (experimental)
Expand All @@ -28,6 +44,8 @@

- **LOCATION_ENABLE_TRIGGER_MESSAGE**, send a message, when a position is reported by GPS/GNSS. The not continues mode is still experimental. It the most cases, it stops working after something as 30 minutes and requires also 30 minutes to wokr again. So it still requires a lot of work. Default disabled.

**NOTE:** Using GPS/GNSS without assistance data requires to place the `Thingy:91` with free sight to the sky to start. Once the first statelites are detected and the UTC time is available, the `Thingy:91` is able to optimize the GNSS receiving and continues to work also with less signals. The very best results are achieved, when the GPS/GNSS is mostly on. That requires unfortunately 50mA and so works only for about 20h without charging.

### Sensors

- **ADP536X_POWER_MANAGEMENT**, enable Thingy's battery power management. Reports battery status (e.g. charging) and level (e.g. 70%). Default enabled.
Expand All @@ -49,4 +67,4 @@ and then enable
`Extra Functions > BME680 BSEC`.
instead.

**NOTE:** the BME680 is mounted inside the Thingy:91 and is therefore only weakly coupled to the environment. On battery charging, the temperature gets up to 30°. If you want more realisitc values, please remove the board from the case.
**NOTE:** the BME680 is mounted inside the Thingy:91 and is therefore only weakly coupled with the environment. On battery charging, the temperature gets up to 30°. If you want more realistic values, please remove the board from the case.
4 changes: 3 additions & 1 deletion docu/ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,9 @@
| ------------ | ------- | ----------- |
| 01-June-2022 | v0.1 | Initial version.<br/>Known issues:<br/>Does not reconnect after network lost.<br/>Does not start proper without network |
| 26-June-2022 | v0.2 | Test experience.<br/>Both network issues are solved. |
| 31-July-2022 | v0.3 | Enable sensors.<br/> Includes support for Bosch Sensortec library for BME680 |
| 01-August-2022 | v0.4 | Enable sensors.<br/> Includes support for Bosch Sensortec library for BME680 |

(The 0.3 has been skip in order to not mix up to different build alreay used the 0.3.)

## Future

Expand Down
2 changes: 1 addition & 1 deletion prebuild/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

# Zephyr - Coaps Demo Client with Eclipse/TinyDtls

## Prebuild binaries
## Prebuild binaries v0.4

This folder contains 3 prebuild binaries intended to be used to get a first impression of CoAP / DTLS 1.2 CID.
To gather more experience, please build and modify this example on your own.
Expand Down
Loading

0 comments on commit 553425f

Please sign in to comment.