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

Questions about how to operate a mesh network using an app and multiple phones?


Dear BLE mesh Experts,

We want to provision and operate a mesh network using an app that is running on various phones. The idea is to use a single phone during installation/provisioning. Once everything is set up, there will be multiple phones used at the same time to operate the mesh.

While playing around with a few nRF52840 dongles and the Nordic nRF Mesh app, I've noticed that the mesh is only accessible on the phone that provisioned it. A second phone was unable to see the mesh. What data needs to be copied from the provisioning phone over to another phone to enable the second phone to see and operate the mesh? Is it sufficient to just copy the Public, App and Net Keys? Is there anything else that needs to be shared between the phones?
How about the device keys? Do they also need to be shared between all phones? If the device keys aren't shared, would it still be possible for phone B to unprovision a node that was provisioned by phone A?

About proxy nodes:
We want the whole BT Mesh network and all its nodes to be invisible to any passerbys. There are no plans to ever enable any proxy nodes because they would reveal the mesh/nodes. There are also no plans to allow communication with the mesh through BT GATT. Considering this, it should be safe to remove the proxy model from the firmware. Do you have any objections? Are there any common use cases that depend on the availability of the proxy model?

About Android/iOS:
Is it possible to connect to two (or more) BT Meshes at the same time using Nordics IOS/Android-nRF-Mesh-Library? In other words: Would it technically be feasible to split one huge mesh network into various smaller meshes and connect to all of them at the same time? (assuming they are all in range.)



This whole BT Mesh topic is very new to me, so your advice is very much appreciated.
Thank you,
Michael.

  • Hi,

    You should copy all 4 keys mentioned. In regards to the device key, it is used when configuring a device with new encryption keys (network or application keys) or addresses, in addition to setting other device-specific parameters. I think you should be able to unprovision a node without a the device key. The nRF Mesh app has a feature that lets you export and import a JSON file, which includes all the provision data. So exporting the provisioning data from your provisioning phone and import it on another phone will let the other phone “see” the mesh network.

    You need the proxy feature to be able to configure the nodes in the network. I think the common use-case is to enable phones to be able to communicate(configure nodes and send messages) with the mesh network through a proxy-link, since the phone(as of now) can’t be provisioned into the mesh network as a mesh node.

    About Android/iOS:
    Is it possible to connect to two (or more) BT Meshes at the same time using Nordics IOS/Android-nRF-Mesh-Library? In other words: Would it technically be feasible to split one huge mesh network into various smaller meshes and connect to all of them at the same time? (assuming they are all in range.)

    I need to check with our developers.

    Also, have look at our documentation for Mesh for more information.

  • Hi,

    Thank you for the quick reply.

    One of our core requirements is that the mesh and all its nodes must be invisible to any unauthorized bypassers. Ideally even while an authorized user is connected by phone. Do you have any ideas how this could be implemented? As soon as we enable a proxy node, it will be visible to BT scanners. How would you avoid this?

    But let's assume we temporarily enable a single proxy node just to be able to connect. If the phone moves out of the proxy nodes range, the connection will be lost. How can we avoid losing the connection? Would it be technically feasible to en-/disable proxy nodes on demand and automatically disconnect from- and connect to proxy nodes based on the signal strength?
    The logic would be something like this:

    1. The app on the phone advertises itself through BLE.
    2. The mesh sees the phone and enables the proxy model on the node that's closest to the smartphone (based on the signal strength).
    3. The app sees the new proxy node, closes its current connection and reconnects to the new proxy node.

    Do you think this would work reliably on Android and iOS?

    Thanks for your help,
    Michael.

  • Response from our developer:

    About Android/iOS:
    Is it possible to connect to two (or more) BT Meshes at the same time using Nordics IOS/Android-nRF-Mesh-Library? In other words: Would it technically be feasible to split one huge mesh network into various smaller meshes and connect to all of them at the same time? (assuming they are all in range.)

    Yes, it’s possible. A phone can connect up to around 6+/-2 devices simultaneously.

    If the 2+ networks are to be completely separated, the user needs to create 2 instances of NeshManagerAPI (on Android):
    https://github.com/NordicSemiconductor/Android-nRF-Mesh-Library#sample

    Or 2 instances of MeshNetworkManager on iOS:

    https://github.com/NordicSemiconductor/IOS-nRF-Mesh-Library/blob/master/Documentation/GETTING_STARTED.md

    For each network there can be a number of “bearer” open, so you can be connected to many proxy devices at the same time.

    BlueMike said:

    One of our core requirements is that the mesh and all its nodes must be invisible to any unauthorized bypassers. Ideally even while an authorized user is connected by phone. Do you have any ideas how this could be implemented? As soon as we enable a proxy node, it will be visible to BT scanners. How would you avoid this?

    But let's assume we temporarily enable a single proxy node just to be able to connect. If the phone moves out of the proxy nodes range, the connection will be lost. How can we avoid losing the connection? Would it be technically feasible to en-/disable proxy nodes on demand and automatically disconnect from- and connect to proxy nodes based on the signal strength?
    The logic would be something like this:

    1. The app on the phone advertises itself through BLE.
    2. The mesh sees the phone and enables the proxy model on the node that's closest to the smartphone (based on the signal strength).
    3. The app sees the new proxy node, closes its current connection and reconnects to the new proxy node.

    Do you think this would work reliably on Android and iOS?

    The proxy node, even if the proxy feature is disabled, is still advertising, just like any other node in the mesh network, so it’s not really possible to make nodes invisible. Everyone in range will see some mesh network, they won’t be able to make use of this information or decode any of the packets.

    The proxy advertising as proxy has additional Service Data with Mesh Proxy UUID and some data in it, that’s the only difference.

    Returning to the question. It is feasible with some “buts”:

    * On iOS an app may advertise any data only when in foreground (open and visible to the user). In the background, only a small bitmask of Service UUID is advertised, called Overflow Service UUID. Any other data are removed in that state.

    * On Android advertising is supported on most phones running Android 5+. Some old ones that were updated to Android 5 do not support advertising.

    * Scanning on peripherals is battery-consuming, so the proxy nodes would have to be connected to the line.

    * Relying on RSSI to determine distance is veeeeeery inaccurate. It’s enough to hold a phone in a different direction, in a pocket, etc., and results may be very different. The only reliable data is “in range/out of range”.

  • Thank you very much for the detailed explanations! This helps a lot! Just one last question:

    The proxy node, even if the proxy feature is disabled, is still advertising,

    Makes sense, although, some BLE devices (beacons) run up to two years on a tiny battery. Do you have any ideas how they manage this?

  • Hi,

    Sorry for the late reply.

    I assume that the beacons you are talking about are probably "regular" beacons without mesh? 

    In the case of mesh(from our infocenter):

    Using Bluetooth Mesh causes higher power consumption than traditional Bluetooth low energy applications. This is mainly due to the need for keeping the radio running constantly. Therefore, unlike Bluetooth low energy advertisers, active mesh devices cannot be run off coin-cell batteries for extended periods of time.

Related