-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set device name to node name in json file #253
Comments
Am i doing wrong some where |
Hi @Hung6129, Nothing wrong here, we just don't expose the api and we don't use device name when creating node object ! This looks like a feature request 👍 |
hope this feature will appear soon |
Yes, just a reminder : you shouldn't rely on device name to identify it. So I hope this is not a blocker for you ? |
Hello @Hung6129, If you want to try and implement it, I think it's more on the native code that you have to change something. The provisioning process may look complex, so you better begin by just exposing Node.setName from Nordic API |
Hello Thanks |
hello @him1010 |
Hello ! Ah yes this line is ok ✅ Feel free to open a PR 👍 It could be great to also expose the name setter in mesh mngr in case you want to change it later (user customization for instance) |
Hello @Hung6129 Thanks |
Hello @him1010, Actually I found that it is already exposed, see models file for mesh nodes, there is ProvisionedMeshNodes which defines an async setter : https://github.com/OZEO-DOOZ/nrf_mesh_plugin/blob/master/lib/src/models/mesh_node/provisioned_mesh_node.dart |
So to do it after provisioning you can write : // with an instance that implements IMeshNetwork
IMeshNetwork _meshNetwork;
// and target node´s unicast
int unicast;
final node = await _meshNetwork.getNode(unicast);
// /!\ the operation will be asynchronous, wait for onNetworkUpdated callback
node.nodeName = 'my awesome mesh node'; |
Hi @R0m4in-dooz |
This issue seems resolved. If you think it's not the case, feel free to re-open it 😊 |
When i provisioned a node then i export json file
In the node list the node name is default "My node " like is always
So i want to set the node name in the json file according to the device name that i provisioning
from this
to this
thanks
The text was updated successfully, but these errors were encountered: