This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Anroid nRF Mesh Library: One mesh network for multiple phone

  • what I would like to do is having one phone as a mesh network initiator, generating the mesh details and provisioning mesh devices. Then, I upload all these data to the cloud and pull them to a new phone. After that, I used these data to generate the same mesh network, so that both phones can connect to device via the BLE proxy and send command to all mesh devices

  • I have been able to do so for 2 phones, but when I tried on the third phone. I am stuck at the get composition data step ...

  • here is a snap shot of the debug msg

    any helps or any ideas are welcome.

  • I have used thoes information to recreate the mesh network on the other phone: unprovisionedMeshNode.setBluetoothDeviceAddress("D6:91:79:FC:6A:EA");

    unprovisionedMeshNode.setNetworkKey(MeshParserUtils.toByteArray("35DFBF95F8CFF60DCF43DC19311E992E"));

    unprovisionedMeshNode.setKeyIndex(MeshParserUtils.toByteArray("0000"));

    unprovisionedMeshNode.setFlags(MeshParserUtils.toByteArray("0000"));

    unprovisionedMeshNode.setIvIndex(ByteBuffer.allocate(4).putInt(0).array());

    unprovisionedMeshNode.setUnicastAddress(MeshParserUtils.toByteArray("0001")); unprovisionedMeshNode.setTtl(5);

    unprovisionedMeshNode.setConfigurationSrc(getConfiguratorSrc());

    unprovisionedMeshNode.setDeviceKey(MeshParserUtils.toByteArray("9d6dd0e96eb25dc19a40ed9914f8f03f"));

    unprovisionedMeshNode.setNodeName("Ascenx LightSwitch 1");

    ProvisionedMeshNode node = new ProvisionedMeshNode(unprovisionedMeshNode);

    node.setIsProvisioned(true);

    mProvisioningSettings.setNetworkKey("35DFBF95F8CFF60DCF43DC19311E992E");

  • @HaiDang As of now we don't have a mechanism to share the networks across mutiple phones. I totally understand your requirement and this is something should support in the future to share the network across multiple phones. Initializing an unprovisioned node like this will not let you create provisioned nodes since the library saves this locally and loads the provisioned devices. Instead the app/library should provide an api to share mesh networks across apps.

    Also from an API persepective this should not be open (Creating unprovsioned nodes and setting provisioned state) for users, this is something I have to fix in the library so that it won't be misleading. The library itself is not production ready and we continuously try to improve it to bring it to a better state.

    Hope you understand

    Roshan

  • Is this issue solved in latest nRF library?

    I want to achieve the same functionality, I want to share and control same mesh network between multiple android and iOS phones. Is it possible now?

Related