Closed Hung6129 closed 1 year ago
Am i doing wrong some where
Do i have to change something on the native code ? Pls help
In the android app https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library
when i use it to export json file it still keep my device name also in ios app
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 ?
i don't identify it by using device name, i use uuid i just need to show the device name on the json file just like the android app when i export it
bc i will send that json file to the server and they want to know the device name in the list node :(
can you give me some solution to get the device name instead of the default name "My node"
i see that in the DiscoveredDevice models has the name Now how can i add it into the ProvisionedMeshNode Or should i need to add it in provisioning function
Thanks
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 I am new to app development and I want to save the new provisioned device with its original name or provide a name for it. If possible can you help me with this.
Thanks
hello @him1010 Well for now i added that line to set the provisioned nodeName after the provisioning step done It works and show the name of the device instead of My Node @R0m4in-dooz sir, a feature request ??
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 for the suggestion. It worked. @R0m4in-dooz how can I expose the name setter in mesh manager and use it, if you could give an example that would be really helpful.
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 Thank you for the suggestion, you were a great help.
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