Closed davideicardi closed 5 years ago
Hi David,
the state machine is an example for how the transitions on a device might look like. You might have a more complex state machine on your device. There is no requirement for the server to follow the state machine. However, for some deployments developers may care about reporting information about the state the device is currently in. There are three different ways to get the information in v1.1:
Observe is a fine approach and the server will learn about the state changes when notifications are sent reliably.
Thanks for the clarification @hannestschofenig .
OMA-TS-LightweightM2M-V1_0_2-20180209-A
E.6 LwM2M Object: Firmware Update
Based on my understanding a server that want to push a firmware update needs to get the update state (
/5/0/3
) and the update result (/5/0/5
) from the device to correctly implement a state machine like the one in the specification. But for me it is not clear how the server is supposed to get these values. I think that the server has 2 options:What is the recommended way?
Using the observe is probably easier but based on my understanding (RFC 7641 "The protocol follows a best-effort approach for sending new representations to clients and provides eventual consistency between the state observed by each client and the actual resource state at the server." ) changes are not guaranteed to be notified and so my concern is that some changes are lost and the server can be stuck in some state. Maybe the server should implement some sort of "timeout and retry" logic?