Your content here
Before you begin, you will need a LWM2M device that you wish to test. For the tests to be successful, you will need to identify several resources that can be used to test the encoding and decoding of various data types.
This section assumes you pick the generic Onboard LWM2M device
template, if you pick a device specific template your fields may vary, but it should be intuitive based on the device you are working with.
LWM2M endpoint
: This is the endpoint that your device will send when it registers.LWM2M identity
: This is the DTLS identity used for pre-shared key authentication.LWM2M Pre-shared key
: This is a hex encoded pre-shared key. If your device supports ASCII keys make sure to hexify it before submitting it.LWM2M Service
: This is the instance of the LWM2M server to use, if you followed the steps above then select LWM2M Server
.Now that everything has been imported, you can connect your LWM2M device.
Verify that the client is connected by navigating to Endpoints -> List and checking the status.
There are several sample triggers for testing configurations for different clients that all have the prefix Client Validate. These triggers are configured to test capabilities of different clients and show how to configure different settings.
As an example, see the Client Validate Leshan trigger below:
var readConfig = {
// try reading using the TLV encoding
checkTlv: true,
// try reading with SenML CBOR encoding
checkSenMlCbor: true,
// try reading opaque resources with the Opaque encopding
checkOpaque: true,
// try reading all resources individually
checkResources: true
}
exec.sync('validate-reads',readConfig,30)
var obsConfig = {
// try observations using the TLV encoding
checkTlv: true,
// try observations using the SenML CBOR encoding
checkSenMlCbor: true,
// instance to observe for testing
testInstance: "3/0",
// resource to observe for testing
testResource:"3/0/13"
}
exec.sync('validate-observations',obsConfig,30)
var writeConfig = {
// resource to write for testing strings
stringResource:"3/0/15",
// resource to write for testing integers
integerResource:"1/0/1",
// resource to write for testing booleans
booleanResource:"1/0/6",
// resource to write for testing opaque
opaqueResource:"3442/0/150",
// test TLV encoding for writes
checkTlv: true,
// test SenML CBOR encoding for writes
checkSenMlCbor: true,
// test Text encoding for writes
checkText:true
}
exec.sync('validate-writes',writeConfig,30)
Client Validate Leshan
trigger.Client Validate <name of your device
.save
to save your trigger.Start
to start the trigger.Next you need to run the test suite against your device, ensure it is still connected before proceeding. When ready, click the rabbit
icon to run the test trigger you just created.
Reports
.View Report Details
button on the report to view the detailed results.