OneM2M divides device management into two different methods.
1- Device management over the service layer
2- Device management using external management technologies
I want to understand how to do a firmware update by using each of the methods. However I only find very basic examples like getting a memory resource object as an example for device management. But what is a use case for using <mgmtCmd> and <execInstance>. Is there any concrete example which you can share?
I understand that a Node is the actual hardware device and Management Objects are resources that represens the management functions and entities. But I dont understand the correlation between <mgmtCmd> and <mgmtObj>'s.
Lets assume I have a device (AE & Node). It has a firmware information that I keep as a <mgmtObj> on the Node itself. It has also <mgmtCmd> that updates the firmware. (I assume that MgmtCmd is created by the AE. I am also not sure who should create the <mgmtCmd>? The related AE I guess.)
How should I run the <mgmtCmd> by choosing each methods that I describe above? Should I use an external management service like TR-069 or OMA-DM or LWM2M DM ? Or is the device management over the oneM2M service layer enough to do that ?
What OneM2M says that an <execInstance> resource is an instance of <mgmtCmd>. If I update <gmtCmd>'s execEnable attribute then related to that <mgmtCmd> should create an <execInstance> as a child resource. Then operation should be followed on that <execInstance. I have also some confusion for that part. What is the meaning of updating <mgmtCmd>'s <execInstance> attribute ? How I am supposed to do that ? If I update it once, how do I update same attribute with the same value if I run same command multiple times.
As you see, I am really confused a lot. Can you explain briefly and give an obvious example how to do device management (ex. Firmware Update) on OneM2M ?
I agree, the management abstraction part of oneM2M can be hard to understand. I guess the most important points can be seen in TS-0001's figure "6.2.4.1.1-1: Device Management Architecture" and the accompanying text in that chapter:
For the second part (how does an AE execute a management command): as stated before, the <node> resource and all available management capabilities (as <mgmtObj> specialisations) are created during the on-boarding phase of the device discovery phase by the managing AE.
To trigger a management command (e.g. initiating a firmware update) the following applies:
Why is this so complicated? Remote management is not an immediate process. The device might be busy or even switched off, the operation might take some time etc. In order to move the (perhaps time and resource consuming) responsibility and work from the CSE to the AE, the <execInstance> resource helps to decouple this process from the actual management part of the CSE. One can see a lot of procedural status information, capabilities and constraints in the <execInstance> resource. Another advantage is that multiple AE's can access the same <mgmtCmd> in a managed and controlled way.
I hope this answers your questions.