Devkit Mxchip: IoT Plug And Play component name #341
Replies: 11 comments 2 replies
-
Hi @RaysApps, Writeable properties within components hasn't been tested in this sample, let me take a look and see if I can see what is going on. |
Beta Was this translation helpful? Give feedback.
-
Nothing immediate jumps out, did you modify the same to use components with the DTDL model? Is there something you can share? The current sample only contains writable property within the base DTDL component which in this case is why the component is always empty. |
Beta Was this translation helpful? Give feedback.
-
Hi @RaysApps, I found the problem, there needs to be a call after the hub is initialized to register the components so that they can be received correctly. This requires some restructuring of the code because at the moment the individual boards dont have access to configuration of the hub after its created so I will likely add a post connect callback so the devkits can add the required configuration. |
Beta Was this translation helpful? Give feedback.
-
Fixing in #341 |
Beta Was this translation helpful? Give feedback.
-
Hi, I have merged up the change. There is a new function call: You will need to call this in nxclient, somewhere around this line: This allows the parser to recognise the components when parsing the json and correctly call the callback. |
Beta Was this translation helpful? Give feedback.
-
Let me know if you have any more questions or issues. This is still a relatively new and untested codebase and parsing components in json on an embedded device is more complex than I wish it was. |
Beta Was this translation helpful? Give feedback.
-
Hi @ryanwinter // Desired properties Best Regards, |
Beta Was this translation helpful? Give feedback.
-
Hey, I see the issue, let me investigate to understand if this is a problem with the sample, or with the SDK itself. It looks like the SDK isnt behaving how I expect. Ryan |
Beta Was this translation helpful? Give feedback.
-
Hi @RaysApps, I have isolated the problem which is a bug in the SDK itself. I am raising the issue with the team to roll out a fix. In the mean time, if you want to make the change in your local code, you need to modify this line: To be the following: Notice the pointer deference for the component_name_pptr variable. Thanks for helping isolate this issue! Ryan |
Beta Was this translation helpful? Give feedback.
-
I have submitted a PR to the netxduo repository: https://github.com/azure-rtos/netxduo/pull/111/files |
Beta Was this translation helpful? Give feedback.
-
Hi @ryanwinter , |
Beta Was this translation helpful? Give feedback.
-
The "component_name" and "component_name_len" argument values defined in the 'writable_property_received_cb' and 'property_received_cb' methods are always null. Also I noticed that the 'property_name' argument value contains the name of the component instead of the property. Could someone please look into this issue and advise?
Beta Was this translation helpful? Give feedback.
All reactions