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

Problems with Data Relay across BT Mesh network

We are having issues with data not being relayed across the mesh network.


BACKGROUND
Here is some background information on the project.

The device is an industrial IoT sensor that uses Bluetooth Mesh to relay data to a Gateway device. The Gateway writes the data to a time series database for later analysis.

We started by using the mesh sensor example. We then expanded the number of bytes transmitted in the example code. Initially we used 20 bytes, now we use 24.

The sensor node records multiple data points and populates the "p_out" array defined in the Nordic mesh sensor example. The array is automatically formatted as a Bluetooth mesh message by the SDK and is transmitted across the network.

We changed the default TTL in the example code from 15 to 5. The transmit power is set to +8dB.

We have tried two different mesh setups. In one, each sensor node publishes to a single unicast address (the gateway). In the other, each node publishes to a group and the gateway subscribes to that group. Also, we have integrated a closed source data processing library from Bosch Sensortec (BSEC) which processes some sensor data before the messages are sent.

Initially, we were using a Waveshare Development kit for each node, but now we are using our own PCB design that incorporates an Ebyte E73-2G4M08S1C BT module. The gateway device is still a Waveshare development kit board.


PROBLEMS
We are experiencing two different (but we suspect related) issues.

ISSUE #1:
Data is not being relayed reliably. We have seen two different behaviors (one on site at our developer's, one on site here) but have not been able to isolate the cause of the difference.

In case 1, when any node is out of range of the base station, it's data will not be arrive at the gateway. nRFMesh reports that "relay" is enabled. The node will send data without issue when in range of the gateway, but its data does not get relayed if it is within range of another node but out of range of the gateway. The nodes in this mesh are set with retransmit = 3, and the transmit interval for the message broadcast timing is 10s.

In case 2, data sometimes gets relayed, but the behavior is not consistent or reliable.

ISSUE #2 (paired with case 1)
If I attempt to change settings using nRFMesh, I cannot change settings for nodes that are out of range of the device I use for provisioning. I have to physically move closer to the device and connect nRFMesh to that specific device.


We are using the Android version of nRFMesh for provisioning (v3.1.6). 

nRFMesh profiles from the two different mesh networks (our developer and mine) are below.

CASE 1:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://www.bluetooth.com/specifications/assigned-numbers/mesh-profile/cdb-schema.json#",
  "version": "1.0.0",
  "meshUUID": "533EC1F9-015C-404F-8979-F75A04CB7525",
  "meshName": "nRF Mesh Network",
  "timestamp": "2021-06-07T14:48:28-04:00",
  "partial": false,
  "netKeys": [
    {
      "name": "Network Key 1",
      "index": 0,
      "key": "1D302E47F46621ECCDA3E0AB1735E565",
      "phase": 0,
      "minSecurity": "insecure",
      "timestamp": "2021-06-07T12:22:06-04:00"
    }
  ],
  "appKeys": [
    {
      "name": "Application Key 1",
      "index": 0,
      "boundNetKey": 0,
      "key": "61AA9C33FDCD9484EEC87DB0A0311076"
    },
    {
      "name": "Application Key 2",
      "index": 1,
      "boundNetKey": 0,
      "key": "E13FDDB390685F599A27C8991DDC2395"
    },
    {
      "name": "Application Key 3",
      "index": 2,
      "boundNetKey": 0,
      "key": "F1F668DC96E20AC9DAA960B42D31FB37"
    }
  ],
  "provisioners": [
    {
      "provisionerName": "nRF Mesh Provisioner",
      "UUID": "B40CF49B-6333-4FC5-B36F-4889E17E4DC1",
      "allocatedUnicastRange": [
        {
          "lowAddress": "0001",
          "highAddress": "199A"
        }
      ],
      "allocatedGroupRange": [
        {
          "lowAddress": "C000",
          "highAddress": "CC9A"
        }
      ],
      "allocatedSceneRange": [
        {
          "firstScene": "0001",
          "lastScene": "3333"
        }
      ]
    }
  ],
  "nodes": [
    {
      "UUID": "B40CF49B-6333-4FC5-B36F-4889E17E4DC1",
      "name": "nRF Mesh Provisioner",
      "deviceKey": "4A89FD09D846ADEC3065138D786E30D3",
      "unicastAddress": "0001",
      "security": "insecure",
      "configComplete": true,
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 2,
        "relay": 2
      },
      "defaultTTL": 5,
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        },
        {
          "index": 1,
          "updated": false
        },
        {
          "index": 2,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0001",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0001",
              "bind": [],
              "subscribe": []
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "3A7AD8F9-4C5F-45E0-98AC-8580EBF9835C",
      "name": "AC:D8 | Gateway 002",
      "deviceKey": "06C583603DF413580C01D7D0D2628B2D",
      "unicastAddress": "0002",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 40,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0002",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            }
          ]
        },
        {
          "name": "Element: 0x0003",
          "index": 1,
          "location": "0000",
          "models": [
            {
              "modelId": "1102",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "C010",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 0,
                  "resolution": 100
                },
                "retransmit": {
                  "count": 3,
                  "interval": 100
                },
                "credentials": 0
              }
            }
          ]
        },
        {
          "name": "Element: 0x0004",
          "index": 2,
          "location": "0000",
          "models": [
            {
              "modelId": "1102",
              "bind": [],
              "subscribe": []
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "0BE911BD-0CCA-48F5-8AB6-14E66ADA663D",
      "name": "B6:0A | Sensor 005",
      "deviceKey": "A12C0C5F56C74994BC70EABDD1ED56BE",
      "unicastAddress": "0005",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 5,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0005",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "1100",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "0003",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 10,
                  "resolution": 1000
                },
                "retransmit": {
                  "count": 3,
                  "interval": 100
                },
                "credentials": 0
              }
            },
            {
              "modelId": "1101",
              "bind": [
                0
              ],
              "subscribe": [
                "C010"
              ]
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "9CCC2791-5A3B-4455-903C-8B63F9C66906",
      "name": "3C:10 | Sensor 006",
      "deviceKey": "C4896A346D6FBBAFF01E8B61FF5E41BD",
      "unicastAddress": "0006",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 5,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0006",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "1100",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "0003",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 10,
                  "resolution": 1000
                },
                "retransmit": {
                  "count": 3,
                  "interval": 100
                },
                "credentials": 0
              }
            },
            {
              "modelId": "1101",
              "bind": [
                0
              ],
              "subscribe": [
                "C010"
              ]
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "A543C586-0FB0-49A6-ADD6-E3F12067C1FA",
      "name": "D6:ED | Sensor 007",
      "deviceKey": "405D6468086C1D786A8DB2DA5C82AD01",
      "unicastAddress": "0007",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 5,
	  
	  
	  
	  
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0007",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "1100",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "0003",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 10,
                  "resolution": 1000
                },
                "retransmit": {
                  "count": 3,
                  "interval": 100
                },
                "credentials": 0
              }
            },
            {
              "modelId": "1101",
              "bind": [
                0
              ],
              "subscribe": [
                "C010"
              ]
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "2CF17CCA-F8EB-403D-9E8B-B8C1A060AF7A",
      "name": "8B:DE Sensor 008",
      "deviceKey": "DE5400C62131AAB749BB9F48ED1E01C9",
      "unicastAddress": "0008",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 5,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0008",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "1100",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "0003",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 10,
                  "resolution": 1000
                },
                "retransmit": {
                  "count": 3,
                  "interval": 100
                },
                "credentials": 0
              }
            },
            {
              "modelId": "1101",
              "bind": [
                0
              ],
              "subscribe": [
                "C010"
              ]
            }
          ]
        }
      ],
      "excluded": false
    }
  ],
  "groups": [
    {
      "name": "SensorData",
      "address": "C000",
      "parentAddress": "0000"
    },
    {
      "name": "TimeSync",
      "address": "C010",
      "parentAddress": "0000"
    }
  ],
  "scenes": [],
  "networkExclusions": []
}

 

CASE 2:

{
  "$schema": "http://json-schema.org/draft-04/schema#",
  "id": "http://www.bluetooth.com/specifications/assigned-numbers/mesh-profile/cdb-schema.json#",
  "version": "1.0.0",
  "meshUUID": "983CE91B-414E-4D96-BDB1-5969DB5C03B3",
  "meshName": "nRF Mesh Network",
  "timestamp": "2021-06-28T16:06:57+05:00",
  "partial": false,
  "netKeys": [
    {
      "name": "Network Key 1",
      "index": 0,
      "key": "40CBF89E2BFE863A5E4658645751B734",
      "phase": 0,
      "minSecurity": "insecure",
      "timestamp": "2021-02-13T17:23:41+05:00"
    }
  ],
  "appKeys": [
    {
      "name": "Application Key 1",
      "index": 0,
      "boundNetKey": 0,
      "key": "D2FD66073905935CC0976D10FEF0A2E0"
    },
    {
      "name": "Application Key 2",
      "index": 1,
      "boundNetKey": 0,
      "key": "6DEFA24ACC8E8AC35DBDC5EE7F645883"
    },
    {
      "name": "Application Key 3",
      "index": 2,
      "boundNetKey": 0,
      "key": "BCD694C61CD3E63FC3C7D62D352B9E2C"
    }
  ],
  "provisioners": [
    {
      "provisionerName": "nRF Mesh Provisioner",
      "UUID": "9C81581D-6AC0-4266-8796-DDEC3B4A7F3E",
      "allocatedUnicastRange": [
        {
          "lowAddress": "0001",
          "highAddress": "199A"
        }
      ],
      "allocatedGroupRange": [
        {
          "lowAddress": "C000",
          "highAddress": "CC9A"
        }
      ],
      "allocatedSceneRange": [
        {
          "firstScene": "0001",
          "lastScene": "3333"
        }
      ]
    }
  ],
  "nodes": [
    {
      "UUID": "9C81581D-6AC0-4266-8796-DDEC3B4A7F3E",
      "name": "nRF Mesh Provisioner",
      "deviceKey": "A58EB545939B465CE570D1C715D4D7D8",
      "unicastAddress": "0001",
      "security": "insecure",
      "configComplete": true,
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 2,
        "relay": 2
      },
      "defaultTTL": 5,
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        },
        {
          "index": 1,
          "updated": false
        },
        {
          "index": 2,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0001",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0001",
              "bind": [],
              "subscribe": []
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "B67735AF-7EA4-4195-B93E-AA5BE5247957",
      "name": "nRF5x Mesh Sensor Client",
      "deviceKey": "2F356FF1C12C4CCA95EF74ADDA57CC7D",
      "unicastAddress": "0002",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 40,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0002",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            }
          ]
        },
        {
          "name": "Element: 0x0003",
          "index": 1,
          "location": "0000",
          "models": [
            {
              "modelId": "1102",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "C001",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 0,
                  "resolution": 100
                },
                "retransmit": {
                  "count": 1,
                  "interval": 100
                },
                "credentials": 0
              }
            }
          ]
        },
        {
          "name": "Element: 0x0004",
          "index": 2,
          "location": "0000",
          "models": [
            {
              "modelId": "1102",
              "bind": [],
              "subscribe": []
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "AFDF401E-2C98-4D22-8A7E-D10619E0B50C",
      "name": "nRF5x Mesh Sensor Setup Serve",
      "deviceKey": "6EF5BA2EA63B3AE407A55DA38F3E5884",
      "unicastAddress": "0005",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 15,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0005",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "1100",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "0003",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 10,
                  "resolution": 100
                },
                "retransmit": {
                  "count": 1,
                  "interval": 100
                },
                "credentials": 0
              }
            },
            {
              "modelId": "1101",
              "bind": [
                0
              ],
              "subscribe": [
                "C001"
              ]
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "240113A6-84C5-491E-AFCF-911C921BB4A0",
      "name": "nRF5x Mesh Sensor Setup Serve",
      "deviceKey": "3B55DAC7DF919F76635D9B1DD2DE6054",
      "unicastAddress": "0006",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 15,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0006",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "1100",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "0003",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 10,
                  "resolution": 100
                },
                "retransmit": {
                  "count": 1,
                  "interval": 100
                },
                "credentials": 0
              }
            },
            {
              "modelId": "1101",
              "bind": [
                0
              ],
              "subscribe": [
                "C001"
              ]
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "5423B734-E079-4C50-B0D9-E2D8BC25FA9C",
      "name": "nRF5x Mesh Sensor Setup Serve",
      "deviceKey": "A8CB21F75A106C8125A26A627B2D57E6",
      "unicastAddress": "0008",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 15,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0008",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "1100",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "0003",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 10,
                  "resolution": 100
                },
                "retransmit": {
                  "count": 1,
                  "interval": 100
                },
                "credentials": 0
              }
            },
            {
              "modelId": "1101",
              "bind": [
                0
              ],
              "subscribe": [
                "C001"
              ]
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "0F2EAF58-0D3F-439F-BB24-D199F320A8BE",
      "name": "nRF5x Mesh Sensor Setup Serve",
      "deviceKey": "A6E2F8DA93A0B71B3BC50C0D4232312B",
      "unicastAddress": "0009",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 15,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0009",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "1100",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "0003",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 10,
                  "resolution": 100
                },
                "retransmit": {
                  "count": 1,
                  "interval": 100
                },
                "credentials": 0
              }
            },
            {
              "modelId": "1101",
              "bind": [
                0
              ],
              "subscribe": [
                "C001"
              ]
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "6AE9E107-AB74-4C0C-9090-1C098A7BAC6D",
      "name": "nRF5x Mesh Sensor Setup Serve",
      "deviceKey": "31EA919725010E32C54AD56B54CF9C54",
      "unicastAddress": "000A",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 15,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x000A",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "1100",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "0003",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 10,
                  "resolution": 100
                },
                "retransmit": {
                  "count": 1,
                  "interval": 100
                },
                "credentials": 0
              }
            },
            {
              "modelId": "1101",
              "bind": [
                0
              ],
              "subscribe": [
                "C001"
              ]
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "EC4F77A6-A75E-4E40-A64B-C4EB910BBACF",
      "name": "nRF5x Mesh Sensor Setup Serve",
      "deviceKey": "7EA652E11DE18449EE61B1A99F2EF32A",
      "unicastAddress": "001E",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 5,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x001E",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "1100",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "0003",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 13,
                  "resolution": 100
                },
                "retransmit": {
                  "count": 1,
                  "interval": 100
                },
                "credentials": 0
              }
            },
            {
              "modelId": "1101",
              "bind": [
                0
              ],
              "subscribe": [
                "C001"
              ]
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "5284ACAD-A212-4C5E-B341-01A76F39037D",
      "name": "nRF5x Mesh Sensor Setup Serve",
      "deviceKey": "807FC23F8565C2D3E2F3D70BD37D5ECE",
      "unicastAddress": "001F",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 5,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x001F",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "1100",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "0003",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 10,
                  "resolution": 100
                },
                "retransmit": {
                  "count": 1,
                  "interval": 100
                },
                "credentials": 0
              }
            },
            {
              "modelId": "1101",
              "bind": [],
              "subscribe": []
            }
          ]
        }
      ],
      "excluded": false
    },
    {
      "UUID": "C0C0936A-EAFA-4D0E-89D8-069687B6658C",
      "name": "nRF5x Mesh Sensor Setup Serve",
      "deviceKey": "C179365D1CD8648DA938258EAC2CDB61",
      "unicastAddress": "0020",
      "security": "insecure",
      "configComplete": false,
      "cid": "0059",
      "pid": "0000",
      "vid": "0000",
      "crpl": "0028",
      "features": {
        "friend": 2,
        "lowPower": 2,
        "proxy": 1,
        "relay": 1
      },
      "defaultTTL": 5,
      "networkTransmit": {
        "count": 2,
        "interval": 20
      },
      "netKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "appKeys": [
        {
          "index": 0,
          "updated": false
        }
      ],
      "elements": [
        {
          "name": "Element: 0x0020",
          "index": 0,
          "location": "0000",
          "models": [
            {
              "modelId": "0000",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "0002",
              "bind": [],
              "subscribe": []
            },
            {
              "modelId": "1100",
              "bind": [
                0
              ],
              "subscribe": [],
              "publish": {
                "address": "0003",
                "index": 0,
                "ttl": 1,
                "period": {
                  "numberOfSteps": 10,
                  "resolution": 100
                },
                "retransmit": {
                  "count": 1,
                  "interval": 100
                },
                "credentials": 0
              }
            },
            {
              "modelId": "1101",
              "bind": [],
              "subscribe": []
            }
          ]
        }
      ],
      "excluded": false
    }
  ],
  "groups": [
    {
      "name": "Time",
      "address": "C001",
      "parentAddress": "0000"
    }
  ],
  "scenes": [],
  "networkExclusions": [
    {
      "ivIndex": 0,
      "addresses": [
        "0007",
        "000B",
        "000C",
        "000D",
        "000E",
        "000F",
        "0010",
        "0011",
        "0012",
        "0013",
        "0014",
        "0015",
        "0016",
        "0017",
        "0018",
        "0019",
        "001A",
        "001B",
        "001C",
        "001D",
        "001F"
      ]
    }
  ]
}

  • A quick update. We've made some progress and found some other issues.

    1. We were able to get the original sensor example running with 24 bytes of data.
    2. We were also able to get our code running with 24 bytes of data (with some caveats, see below).
    3. Data is now being relayed, but I am still occasionally having issues with timeouts on nodes that are not directly connected to the gateway.

    Here's what we have learned:

    1. For best results when provisioning a new mesh, we seem to need to delete the cache and data stored in the android app. To be clear, I mean that we do this from Android Settings, not just "reset mesh" from within nRFMesh. I can't 100% verify this, but we have had far fewer issues since we started doing this.
    2. The "use default TTL" setting in Sensor Server > Set Publication > Time to Live makes the mesh behave inconsistently. Setting a manual value of 5 works better, even when 5 is the specified default TTL value in the code.
    3. As noted previously, the app either does not store the TTL value correctly, or does not read it correctly. However, this issue seems greatly reduced if we follow the delete cache/data step.
    4. Overall, mesh does not seem to work well with BLE Modules that have internal antennas. Even when there is more than enough signal strength for the data to arrive at the gateway, relaying data from other nodes will still fail. We've tested this at multiple power levels and consistently see the same behavior. We have not had this issue with modules using external antennas
    5. We found that an earlier iteration of our PCB also had trouble relaying data, but it is unclear why. We are now using the newer revision PCB, which has two variants (internal and external antennas). As noted above, the external antenna variant relays without issues.

    I'm now running 15 nodes, of which 3-5 are relaying data. Hopefully it will remain stable.

    > I don't think the app would store all the configuration of all models in a database.
    > So you may need to read it or check the actual value in the nRF52 to see if the correct
    > setting has been sent to the node or not.

    I'm not aware of any way to force a read of the TTL setting from within the app. There is a GET TTL function that will read and return the default value, but no equivalent function to force a read for the current TTL set within a specific element. Let me know if I missed something.

    Last, but not least, I should have clarified that we are not currently putting the mesh or BLE module to sleep. That step has not yet been implemented.

  • Hi Nicholas,

    I will check with the app team on the TTL setting. But with TTL set to 5 manually ( I assume you hardcoded it in the firmware ? ) and with nodes with external antenna, you don't have any issue, correct? 
    I would suggest to test using a nRF52 DK for comparison. 

    When design a mesh network, you should have some redundancy, this means for each node there should be at least 2 relay nodes that cover the area.  

    We would need some statistic on the failure rate of your test to determine if it's expected behavior or not. And they should be performed on a tuned radio board e.g nRF 52 DK and in a quiet RF environment.  

Related