1 post / 0 new
markjasonanderson
Clarify /sys/snsr?ev=rbt behaviour

Hi,

We have recently upgraded our millis to milli.sfl.prod_sig.01.04.1000.122473 and are attempting to implement the sensor reboot behvaiour noted in the CoAP API documentation.

At boot, we issue a PUT to /sys/snsr?ev=rbt, and according to the documentation "The milli responds by sending a PUT request to /snsr/sys/time to set the time on the sensor."

What we are seeing is that we sometimes get the /sys/time PUT from the milli, however other times we do not get it immediately.

Here is our sensor log where we got the response immediately:

00000015.984 LWM2M [D] sending PUT to /sys/snsr?ev=rbt
00000016.003 LWM2M [I] ssn received  24B NON PUT "/sys/time" (mid:    0, TKN: none)
00000016.007 LWM2M [I] got ID: 0 NON PUT /sys/time 
00000016.000 LWM2M [I] time set to:  20/04/2018 20:56:59 GMT+0

And the log where it takes 46 seconds

00000004.238 LWM2M [D] sending PUT to /sys/snsr?ev=rbt
...
00000050.660 LWM2M [I] ssn received  24B NON PUT "/sys/time" (mid:    0, TKN: none)
00000050.664 LWM2M [I] got ID: 0 NON PUT /sys/time 
00000050.000 LWM2M [I] time set to:  20/04/2018 21:04:02 GMT+0

I'm not 100% certain that what I am seeing is the response to the  /sys/snsr?ev=rbt request, or if what I am seeing is the normal /sys/time that we get when the Milli enters the network. Can you provide an example of the CoAP PUT packet that needs to be sent so I can confirm we have everything correct (content type expected etc.)

I'm interested to understand the behaviour under a few scenarios:

  1. MilliNIC has not entered the Mesh Network or does not yet have time, sensor sends the /sys/snsr?ev=rbt, do I get a response to the request? Ideally we'd get some sort of NACK under that scenario (e.g. return service unavailable).
  2. MilliNIC is connected to the mesh and has time, sensor sends the /sys/snsr?ev=rbt, should I expect the response immediately?
  3. MilliNIC looses connection to the mesh, restarts or otherwise looses time, does it send an unsolicited /sys/time PUT when it gets time?

Cheers,

Mark

Type: 
Public