examples/wakaama: Improve README

This commit is contained in:
Leandro Lanzieri 2020-04-07 16:11:44 +02:00
parent e5729ae527
commit ca17f0a6dd
No known key found for this signature in database
GPG Key ID: 39607DE6080007A3

View File

@ -30,6 +30,14 @@ INFO LeshanServer - LWM2M server started at coap://0.0.0.0/0.0.0.0:5683 coaps://
INFO LeshanServerDemo - Web server started at http://0.0.0.0:8080/. INFO LeshanServerDemo - Web server started at http://0.0.0.0:8080/.
``` ```
Additionally, you can specify a binding address for the Leshan server, using
the `-lh` option. For instance, if you are connecting from a node via a Border
Router, you might want to specify:
```shell
java -jar ./leshan-server-demo.jar -lh fd00:dead:beef::1
```
#### Bootstrap server #### Bootstrap server
LwM2M provides a bootstrapping mechanism to provide the clients with information LwM2M provides a bootstrapping mechanism to provide the clients with information
to register to one or more servers. To test this mechanism both the previous server and a bootstrap server should be running. Eclipse Leshan also provides a bootstrap server demo. to register to one or more servers. To test this mechanism both the previous server and a bootstrap server should be running. Eclipse Leshan also provides a bootstrap server demo.
@ -63,9 +71,9 @@ To set up the configuration of the node and the server:
listening. For now only `No security` mode can be used. listening. For now only `No security` mode can be used.
### Running the client ### Running the client
The address set in `lwm2m.h` as `CONFIG_LWM2M_SERVER_URI` should be reachable The address set as `CONFIG_LWM2M_SERVER_URI` (in `lwm2m.h` or via `menuconfig`)
from the node, e.g. either running on native with a tap interface or as a mote should be reachable from the node, e.g. either running on native with a tap
connected to a interface or as a mote connected to a
[border router](https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_border_router). [border router](https://github.com/RIOT-OS/RIOT/tree/master/examples/gnrc_border_router).
Also, if a bootstrap server is being used the macro `CONFIG_LWM2M_BOOTSTRAP` should be Also, if a bootstrap server is being used the macro `CONFIG_LWM2M_BOOTSTRAP` should be
@ -74,15 +82,24 @@ defined as 1.
The server URI for the example is being defined using the variable `SERVER_URI` The server URI for the example is being defined using the variable `SERVER_URI`
in the Makefile, and can be changed when compiling. in the Makefile, and can be changed when compiling.
#### Compile and run #### Configure, compile and run
The Wakaama package can be configured via Kconfig. Its options are placed
under `Packages > Configure Wakaama LwM2M`. To access the configuration
interface you can run:
```
make menuconfig
```
For debugging purposes there are two types of messages that can be enabled: For debugging purposes there are two types of messages that can be enabled:
- The lwm2m client adaptation debug can be enabled by setting `ENABLE_DEBUG` in - The lwm2m client adaptation debug can be enabled by setting `ENABLE_DEBUG` in
`lwm2m_client.c` and `lwm2m_client_connection.c` to 1 `lwm2m_client.c` and `lwm2m_client_connection.c` to 1
- The wakaama internal logging can be enabled by adding `CONFIG_LWM2M_WITH_LOGS` to the - The wakaama internal logging can be enabled by setting
CFLAGS (`CFLAGS += -DCONFIG_LWM2M_WITH_LOGS`) `CONFIG_LWM2M_WITH_LOGS`, either on `menuconfig` or by adding it to CFLAGS
(`CFLAGS += -DCONFIG_LWM2M_WITH_LOGS`).
For memory allocation the TLSF package is being used, with a private heap. If For memory allocation the TLSF package is being used, with a private heap. If
memory usage has to be tweaked the heap size can be modified via the macro memory usage has to be tweaked the heap size can be modified via the option
`CONFIG_LWM2M_TLSF_BUFFER`. `CONFIG_LWM2M_TLSF_BUFFER`.
To compile run: To compile run: