Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix LwM2M spelling #835

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 16 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,15 @@ The different settings can be configured with CMake cache variables (e.g. `cmake

Wakaama supports multiple modes. At least one mode needs to be defined with CMake cache variables.

- WAKAAMA_MODE_SERVER to enable LWM2M Server interfaces.
- WAKAAMA_MODE_BOOTSTRAP_SERVER to enable LWM2M Bootstrap Server interfaces.
- WAKAAMA_MODE_CLIENT to enable LWM2M Client interfaces.
- WAKAAMA_MODE_SERVER to enable LwM2M Server interfaces.
- WAKAAMA_MODE_BOOTSTRAP_SERVER to enable LwM2M Bootstrap Server interfaces.
- WAKAAMA_MODE_CLIENT to enable LwM2M Client interfaces.

#### Client Settings

Wakaama supports additional client related options. These are only available if the client mode is enabled.

- WAKAAMA_CLIENT_INITIATED_BOOTSTRAP to enable LWM2M Bootstrap support in a LWM2M Client.
- WAKAAMA_CLIENT_INITIATED_BOOTSTRAP to enable LwM2M Bootstrap support in a LWM2M Client.
- WAKAAMA_CLIENT_LWM2M_V_1_0: Restrict the client code to use LwM2M version 1.0

Please note: LwM2M version 1.0 is only supported by clients, while servers are backward compatible.
Expand All @@ -72,10 +72,10 @@ Please note: LwM2M version 1.0 is only supported by clients, while servers are b

The following data formats are configurable for Wakaama:

- WAKAAMA_DATA_TLV to enable TLV payload support (implicit except for LWM2M 1.1 clients)
- WAKAAMA_DATA_TLV to enable TLV payload support (implicit except for LwM2M 1.1 clients)
- WAKAAMA_DATA_JSON to enable JSON payload support (implicit when defining LWM2M_SERVER_MODE)
- WAKAAMA_DATA_SENML_JSON to enable SenML JSON payload support (implicit for LWM2M 1.1 or greater when defining LWM2M_SERVER_MODE or LWM2M_BOOTSTRAP_SERVER_MODE)
- WAKAAMA_DATA_SENML_CBOR to enable SenML CBOR payload support (implicit for LWM2M 1.1 or greater when defining LWM2M_SERVER_MODE or LWM2M_BOOTSTRAP_SERVER_MODE)
- WAKAAMA_DATA_SENML_JSON to enable SenML JSON payload support (implicit for LwM2M 1.1 or greater when defining LWM2M_SERVER_MODE or LWM2M_BOOTSTRAP_SERVER_MODE)
- WAKAAMA_DATA_SENML_CBOR to enable SenML CBOR payload support (implicit for LwM2M 1.1 or greater when defining LWM2M_SERVER_MODE or LWM2M_BOOTSTRAP_SERVER_MODE)
- WAKAAMA_DATA_SENML_CBOR_FLOAT16_SUPPORT to enable 16-bit floating point encoding support in CBOR.
- WAKAAMA_DATA_OLD_CONTENT_FORMAT to support the deprecated content format values for TLV and JSON.

Expand Down Expand Up @@ -192,7 +192,7 @@ interface. Type 'help' for a list of supported commands.
Options are:
```
Usage: lwm2mserver [OPTION]
Launch a LWM2M server on localhost.
Launch a LwM2M server on localhost.

Options:
-4 Use IPv4 connection. Default: IPv6 connection
Expand All @@ -208,12 +208,12 @@ Options:

Next to lwm2mclient there are also examples with DTLS enabled and with raw block1 transfer enabled.

The lwm2mclient features nine LWM2M objects:
The lwm2mclient features nine LwM2M objects:
- Security Object (id: 0)
- Server Object (id: 1)
- Access Control Object (id: 2) as a skeleton
- Device Object (id: 3) containing hard-coded values from the Example LWM2M
Client of Appendix E of the LWM2M Technical Specification.
Client of Appendix E of the LwM2M Technical Specification.
- Connectivity Monitoring Object (id: 4) as a skeleton
- Firmware Update Object (id: 5) as a skeleton.
- Location Object (id: 6) as a skeleton.
Expand All @@ -231,19 +231,19 @@ The lwm2mclient features nine LWM2M objects:
exec | 2 | E | No | Yes | | |
dec | 3 | R/W | No | Yes | Float | |

The lwm2mclient opens UDP port 56830 and tries to register to a LWM2M Server at
The lwm2mclient opens UDP port 56830 and tries to register to a LwM2M Server at
127.0.0.1:5683. It features a basic command line interface. Type 'help' for a
list of supported commands.

Options are:
```
Usage: lwm2mclient [OPTION]
Launch a LWM2M client.
Launch a LwM2M client.
Options:
-n NAME Set the endpoint name of the Client. Default: testlwm2mclient
-l PORT Set the local UDP port of the Client. Default: 56830
-h HOST Set the hostname of the LWM2M Server to connect to. Default: localhost
-p PORT Set the port of the LWM2M Server to connect to. Default: 5683
-h HOST Set the hostname of the LwM2M Server to connect to. Default: localhost
-p PORT Set the port of the LwM2M Server to connect to. Default: 5683
-4 Use IPv4 connection. Default: IPv6 connection
-t TIME Set the lifetime of the Client. Default: 300
-b Bootstrap requested.
Expand Down Expand Up @@ -272,15 +272,15 @@ LWM2M objects:
- Security Object (id: 0)
- Server Object (id: 1)
- Device Object (id: 3) containing hard-coded values from the Example LWM2M
Client of Appendix E of the LWM2M Technical Specification.
Client of Appendix E of the LwM2M Technical Specification.
- Test Object (id: 31024) from the lwm2mclient as described above.

The lightclient does not feature any command-line interface.

Options are:
```
Usage: lwm2mclient [OPTION]
Launch a LWM2M client.
Launch a LwM2M client.
Options:
-n NAME Set the endpoint name of the Client. Default: testlightclient
-l PORT Set the local UDP port of the Client. Default: 56830
Expand Down
6 changes: 3 additions & 3 deletions core/bootstrap.c
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ static uint8_t prv_handleBootstrapDiscover(lwm2m_context_t * contextP,

length = 0;
#if !defined(LWM2M_VERSION_1_0)
// LWM2M 1.1.1 adds "</>;" at the beginning
// LwM2M 1.1.1 adds "</>;" at the beginning
length += 4;
#endif
length += QUERY_VERSION_LEN + LWM2M_VERSION_LEN;
Expand Down Expand Up @@ -302,7 +302,7 @@ static uint8_t prv_handleBootstrapDiscover(lwm2m_context_t * contextP,
if (*bufferP == NULL) return COAP_500_INTERNAL_SERVER_ERROR;

#if !defined(LWM2M_VERSION_1_0)
// LWM2M 1.1.1 adds "</>;" at the beginning
// LwM2M 1.1.1 adds "</>;" at the beginning
if (length - (*lengthP) < 4) goto error;
(*bufferP)[(*lengthP)++] = REG_URI_START;
(*bufferP)[(*lengthP)++] = REG_PATH_SEPARATOR;
Expand Down Expand Up @@ -614,7 +614,7 @@ uint8_t bootstrap_handleFinish(lwm2m_context_t * context,
/*
* Reset the bootstrap servers statuses
*
* TODO: handle LWM2M Servers the client is registered to ?
* TODO: handle LwM2M Servers the client is registered to ?
*
*/
void bootstrap_start(lwm2m_context_t * contextP)
Expand Down
4 changes: 2 additions & 2 deletions core/objects.c
Original file line number Diff line number Diff line change
Expand Up @@ -1033,7 +1033,7 @@ int object_getServers(lwm2m_context_t * contextP, bool checkOnly)
lwm2m_object_t * objectP;
lwm2m_object_t * securityObjP = NULL;
lwm2m_object_t * serverObjP = NULL;
lwm2m_list_t * securityInstP; // instanceID of the server in the LWM2M Security Object
lwm2m_list_t *securityInstP; // instanceID of the server in the LwM2M Security Object

LOG_DBG("Entering");

Expand Down Expand Up @@ -1134,7 +1134,7 @@ int object_getServers(lwm2m_context_t * contextP, bool checkOnly)
}
else
{
lwm2m_list_t * serverInstP; // instanceID of the server in the LWM2M Server Object
lwm2m_list_t *serverInstP; // instanceID of the server in the LwM2M Server Object

lwm2m_data_free(size, dataP);
size = 1;
Expand Down
4 changes: 2 additions & 2 deletions core/registration.c
Original file line number Diff line number Diff line change
Expand Up @@ -1294,7 +1294,7 @@ static int prv_getParameters(multi_option_t * query,
if (*versionP == VERSION_1_0 &&
(*bindingP & (BINDING_T|BINDING_N)) != 0)
{
/* These bindings aren't valid in LWM2M 1.0 */
/* These bindings aren't valid in LwM2M 1.0 */
goto error;
}

Expand Down Expand Up @@ -1579,7 +1579,7 @@ static int prv_getId(uint8_t * data,

if (limit2 > limit - 2) return 0;

// Note that the LWM2M 1.1.1 spec limits the major and
// Note that the LwM2M 1.1.1 spec limits the major and
// minor to 1 digit. This allow for values up to 255 in
// case it is expanded in the future or some client
// incorrectly exceeds 1 digit.
Expand Down
2 changes: 1 addition & 1 deletion data/cbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ static_assert(sizeof(double) == sizeof(uint64_t), "sizeof(double) != sizeof(uint
#endif

#ifdef LWM2M_VERSION_1_0
#error CBOR not supported with LWM2M 1.0
#error CBOR not supported with LwM2M 1.0
#endif

#define CBOR_UNSIGNED_INTEGER 0
Expand Down
2 changes: 1 addition & 1 deletion data/json.c
Original file line number Diff line number Diff line change
Expand Up @@ -652,7 +652,7 @@ int json_parse(lwm2m_uri_t * uriP,
else
{
/* Base name may have a trailing "/" on a multiple instance
* resource. This isn't valid for a URI string in LWM2M 1.0.
* resource. This isn't valid for a URI string in LwM2M 1.0.
* Strip off any trailing "/" to avoid an error. */
if (buffer[bnStart + bnLen - 1] == '/') bnLen -= 1;
res = lwm2m_stringToUri((char *)buffer + bnStart, bnLen, &baseURI);
Expand Down
2 changes: 1 addition & 1 deletion data/senml_cbor.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
#ifdef LWM2M_SUPPORT_SENML_CBOR

#ifdef LWM2M_VERSION_1_0
#error SenML CBOR not supported with LWM2M 1.0
#error SenML CBOR not supported with LwM2M 1.0
#endif

#define PRV_CBOR_BUFFER_SIZE 1024
Expand Down
2 changes: 1 addition & 1 deletion data/senml_json.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
#ifdef LWM2M_SUPPORT_SENML_JSON

#ifdef LWM2M_VERSION_1_0
#error SenML JSON not supported with LWM2M 1.0
#error SenML JSON not supported with LwM2M 1.0
#endif

#define PRV_JSON_BUFFER_SIZE 1024
Expand Down
2 changes: 1 addition & 1 deletion doc/wakaama_features.rst
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ This table shows the LwM2M features that are supported by Wakaama.
Overview of LwM2M feature as specified by the OMA:

+----------------------------+----------------------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
| Feature Type | Feature | LWM2M versions in which feature introduced/improved |
| Feature Type | Feature | LwM2M versions in which feature introduced/improved |
+----------------------------+----------------------------------------+-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------+
| | | 1.0 | 1.1 | 1.2 | 1.2.1 |
+============================+========================================+=====================================================+=============================================================================================================+================================================================================================+=================================================================================================+
Expand Down
14 changes: 7 additions & 7 deletions examples/bootstrap_server/README
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Options:
-4 Use IPv4 connection. Default: IPv6 connection
-S BYTES CoAP block size. Options: 16, 32, 64, 128, 256, 512, 1024. Default: 1024

When it receives a Bootstrap Request from a LWM2M Client, it sends commands as
When it receives a Bootstrap Request from a LwM2M Client, it sends commands as
described in the Bootstrap Information file.
This file is a custom .INI file:

Expand All @@ -16,10 +16,10 @@ Spaces at the end of lines are ignored.

Supported sections are [Server] and [Endpoint].

[Server] describes a LWM2M Server account. Keys are:
- id: the short ID of the LWM2M Server. Also used as the instance ID
[Server] describes a LwM2M Server account. Keys are:
- id: the short ID of the LwM2M Server. Also used as the instance ID
to avoid collisions. (MANDATORY)
- uri: the URI of the LWM2M Server (MANDATORY)
- uri: the URI of the LwM2M Server (MANDATORY)
- bootstrap: supported values are YES or NO. Determines if this
server is a Bootstrap Server. (Optional, default is no)
- lifetime: registration lifetime. (optional)
Expand All @@ -40,12 +40,12 @@ Operations are sent in the same order as they appear in this file.

Supported keys for this section are:
- Name: Endpoint Name of the Client (Optional)
- Delete: Value must be a valid LWM2M URI. / is allowed. Send a Delete
- Delete: Value must be a valid LwM2M URI. / is allowed. Send a Delete
operation on the URI.
- Server: [Value] is a Server ID matching a Server section. Send one
or two Write operations containing the LWM2M Server
or two Write operations containing the LwM2M Server
informations (one operation only for Bootstrap Servers as they
do not have a matching LWM2M Server Object instance.)
do not have a matching LwM2M Server Object instance.)

All keywords (section names, key names, "yes", "no", "NoSec", "PSK",
"RPK", "Certificate") are case-insensitive.
Expand Down
2 changes: 1 addition & 1 deletion examples/bootstrap_server/bootstrap_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ static int prv_add_server(bs_info_t * infoP,
serverP->securityData = lwm2m_data_new(serverP->securitySize);
if (serverP->securityData == NULL) goto error;

// LWM2M Server URI
// LwM2M Server URI
serverP->securityData[0].id = LWM2M_SECURITY_URI_ID;
lwm2m_data_encode_string(dataP->uri, serverP->securityData);

Expand Down
6 changes: 3 additions & 3 deletions examples/bootstrap_server/bootstrap_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ void handle_sigint(int signum)

void print_usage(const char *filename, const char *port) {
fprintf(stdout, "Usage: bootstap_server [OPTION]\r\n");
fprintf(stderr, "Launch a LWM2M Bootstrap Server.\r\n\n");
fprintf(stderr, "Launch a LwM2M Bootstrap Server.\r\n\n");
fprintf(stdout, "Options:\r\n");
fprintf(stdout, " -f FILE\tSpecify BootStrap Information file. Default: ./%s\r\n", filename);
fprintf(stdout, " -l PORT\tSet the local UDP port of the Bootstrap Server. Default: %s\r\n", port);
Expand Down Expand Up @@ -526,7 +526,7 @@ static void prv_bootstrap_client(lwm2m_context_t *lwm2mH,
*port = 0;
port++;

fprintf(stderr, "Trying to connect to LWM2M CLient at %s:%s\r\n", host, port);
fprintf(stderr, "Trying to connect to LwM2M CLient at %s:%s\r\n", host, port);
newConnP = lwm2m_connection_create(dataP->connList, dataP->sock, host, port, dataP->addressFamily);
if (newConnP == NULL) {
fprintf(stderr, "Connection creation failed.\r\n");
Expand All @@ -535,7 +535,7 @@ static void prv_bootstrap_client(lwm2m_context_t *lwm2mH,
dataP->connList = newConnP;

// simulate a client bootstrap request.
// Only LWM2M 1.0 clients support this method of bootstrap. For them, TLV
// Only LwM2M 1.0 clients support this method of bootstrap. For them, TLV
// support is mandatory.
if (COAP_204_CHANGED == prv_bootstrap_callback(lwm2mH, newConnP, COAP_NO_ERROR, NULL, name, LWM2M_CONTENT_TLV, NULL, 0, user_data))
{
Expand Down
26 changes: 13 additions & 13 deletions examples/bootstrap_server/bootstrap_server.ini
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
###########################################################################
#
# Describes the Bootstrap operations to perform to various LWM2M Clients.
# Describes the Bootstrap operations to perform to various LwM2M Clients.
#
# Commented lines starts either with a # or a ;
# Spaces before [ and key names are ignored. Spaces around = are ignored.
# Spaces at the end of lines are ignored.
#
# Supported sections are [Server] and [Endpoint].
#
# [Server] describes a LWM2M Server account. Keys are:
# - id: the short ID of the LWM2M Server. Also used as the instance ID
# [Server] describes a LwM2M Server account. Keys are:
# - id: the short ID of the LwM2M Server. Also used as the instance ID
# to avoid collisions. (MANDATORY)
# - uri: the URI of the LWM2M Server (MANDATORY)
# - uri: the URI of the LwM2M Server (MANDATORY)
# - bootstrap: supported values are YES or NO. Determines if this
# server is a Bootstrap Server. (Optional, default is no)
# - lifetime: registration lifetime. (optional)
Expand All @@ -32,26 +32,26 @@
#
# Supported keys for this section are:
# - Name: Endpoint Name of the Client (Optional)
# - Delete: Value must be a valid LWM2M URI. / is allowed. Send a Delete
# - Delete: Value must be a valid LwM2M URI. / is allowed. Send a Delete
# operation on the URI.
# - Server: [Value] is a Server ID matching a Server section. Send one
# or two Write operations containing the LWM2M Server
# or two Write operations containing the LwM2M Server
# informations (one operation only for Bootstrap Servers as they
# do not have a matching LWM2M Server Object instance.)
# - Discover: Value must be a valid LWM2M URI. / is allowed. Send a
# do not have a matching LwM2M Server Object instance.)
# - Discover: Value must be a valid LwM2M URI. / is allowed. Send a
# Bootstrap-Discover operation on the URI. (Optional)
# - Read: Value must be a valid LWM2M URI. / is allowed. Send a Bootstrap-
# - Read: Value must be a valid LwM2M URI. / is allowed. Send a Bootstrap-
# Read operation on the URI. A discover must preceed a read to
# determine the client version. Only LWM2M 1.1 or later clients will
# be sent a read. (Optional, LWM2M 1.1 or later only)
# determine the client version. Only LwM2M 1.1 or later clients will
# be sent a read. (Optional, LwM2M 1.1 or later only)
#
# All keywords (section names, key names, "yes", "no", "NoSec", "PSK",
# "RPK", "Certificate") are case-insensitive.
#



# Information on a LWM2M server running on localhost
# Information on a LwM2M server running on localhost
# typically the wakaama test server
[Server]
id=1
Expand All @@ -69,7 +69,7 @@ bootstrap=no
lifetime=300
security=NoSec

# Information on a LWM2M server running on localhost
# Information on a LwM2M server running on localhost
# using Pre-Shared Key security
[Server]
id=3
Expand Down
Loading
Loading