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"
      ]
    }
  ]
}

Parents
  • Hi Nicholas, 

    I would suggest to test the setup with an unmodified nRF Mesh example. Please make sure MESH_FEATURE_RELAY_ENABLED set to 1 in the nrf_mesh_config_core.h 
    I don't think the custom hardware board would cause the issue. 
    I would suggest to put a breakpoint or logging inside network_packet_in() on the relay node to check if it receive the packet and relay it or not. 
    If you look into the code of the function you can find the should_relay check and when the packet is relayed using packet_relay()

    I assume the "base station" and the "gateway" are the same ? And it's a nRF52 board, not a phone ? I noticed that you used the PyACI to provision the nodes. Could you try again using a phone as the provisioner ? 


    Issue 2: If the device you want to configure in the range of the proxy device you connected to , can you do configuration ? I would assume if issue #1 is fixed, issue #2 should be fixed as well. 

  • Thanks for your reply.

    I looked at the code, and I see:

    /** Relay feature */
    #ifndef MESH_FEATURE_RELAY_ENABLED
    #define MESH_FEATURE_RELAY_ENABLED (1)
    #endif

    So that appears to be set correctly.

    We will go back to the original mesh example and try the logging you suggested. 

     

    "I assume the "base station" and the "gateway" are the same ? And it's a nRF52 board, not a phone ? I noticed that you used the PyACI to provision the nodes. Could you try again using a phone as the provisioner ? "

    Case 1 was definitely provisioned using nRFMesh on Android.  I'll double check about Case 2.

     

    Base station and gateway are the same. It's a Waveshare nRF52840 dev board, not a phone.

     

    "Issue 2: If the device you want to configure in the range of the proxy device you connected to , can you do configuration ? I would assume if issue #1 is fixed, issue #2 should be fixed as well. "

    Yes. Once I am in range, configuration works fine. And I agree, if we fix issue , I think issue 2 will be fixed too.

    I'll report back soon.

  • I have a number of updates.

    First, some answers to outstanding questions.

    1. Can we run the code on Nordic DKs?
    The DKs just arrived, but I have not tested this yet (you'll see why in the details below).

    2. Is MESH_FEATURE_RELAY_ENABLED set to 1 in the nrf_mesh_config_core.h?
    Yes.

    3. I assume the "base station" and the "gateway" are the same ?
    Yes. Correct.

    4. It's a nRF52 board, not a phone ?
    Yes.

    5. I noticed that you used the PyACI to provision the nodes. Could you try again using a phone as the provisioner?
    This is incorrect. Both Case 1 and Case 2 were provisioned with the Android app.

    6. Issue 2: If the device you want to configure in the range of the proxy device you connected to , can you do configuration ?
    Yes.


    UPDATES

    We went back to the sensor mesh example. We also implemented relay logging as you suggested.

    We can confirm that relay is working with the original mesh example.

    However, we did learn a few things.
    (a) The reliable range of the PCB antenna is very low.
    (b) One of our PCBs had some kind of hardware error. It can transmit messages, but will not relay messages. If it is placed at the "end" of the network, it works fine. If it is placed in the middle of the network, it will fail. This seems to be unique to this particular PCB.
    (c) The latest iteration of our PCB does not have any issues.
    (d) We have successfully demonstrated data relay with a message payload of up to 20 bytes. Testing is ongoing (aiming for 24 bytes total).

    Also, we found several issues/potential bugs.

    Our setup is as follows. We have one client node and multiple server nodes. The servers publish to the client's unicast address. We've physically placed the server nodes in different orders to test relaying in different ways.

    1. The provisioning app seems to mis-report certain settings. It is unclear whether it is overwriting settings, or just reporting incorrectly. Examples include:

    (a) Node Configuration > Elements > Sensor Server > Set Publication > Time To Live
    Regardless of what we set this to during provisioning, it will show up as being set to a value of "1" when we next open up the nRFMesh app. 

    (b) Node Configuration > Elements > Sensor Server > Set Publication > Time To Live
    Checking "use default ttl value" does not seem to work. We see the same issue as above, but relaying also does not seem to work.

    (c) Node Configuration > Elements > Sensor Server > Set Publication > Publish Retransmission
    We have been setting this to "Disabled" to reduce the number of repeated messages during debugging. However, when we next open up the nRFMesh app, the app always shows the value as being set to "1".

    Here's a video that shows those settings.

     

    2. I have resorted to clearing data and cache for the app (in Android settings) before provisioning a new mesh. Otherwise, things do not seem to work correctly when provisioning a new mesh.

     

    3. We have had very mixed results using Publish to Group instead of Publish to Unicast address. Still testing that.

     

    CURRENT CONCLUSIONS

    We have some suspicions as to where the problems lie. I'd welcome your input.

    1. Is it likely that sending a 24 byte message is causing some kind of memory issue? We are getting ready to test 24 bytes but have not done so yet.

    2. One of the sensor ICs we are using has a proprietary code library that manages sleep/wake cycles and calibration for that IC. We suspect there may be a conflict there. Are there any known issues with nRF Mesh and delay or sleep functions?

     

    All feedback welcome. I'll post more information as we have it.

  • Hi Nicholas, 

    1. When sending more than 11 bytes payload, the payload will be segmented into multiple packets and it will take longer time to transmit and relaying (more traffic as well). But I don't see a huge difference between 20 bytes vs 24 bytes. 

    2. I'm not sure how you do sleeping/wake up ? Do you put the chip into deep sleep (System OFF) mode ? When in deepsleep it won't be able to scan, so it will affect the mesh performance. Especially if it's a relay node.

    The hardware board should be tuned properly to achieve best RF performance. I would suggest to try testing on our DK board to get a bench mark about the RF performance. 

    Regarding the Android app, our Android developers unfortunately are all on vacation at this moment. (it's summer in Norway) but please try to test again with an example in the SDK to see if you get the same issue. 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. 

Reply
  • Hi Nicholas, 

    1. When sending more than 11 bytes payload, the payload will be segmented into multiple packets and it will take longer time to transmit and relaying (more traffic as well). But I don't see a huge difference between 20 bytes vs 24 bytes. 

    2. I'm not sure how you do sleeping/wake up ? Do you put the chip into deep sleep (System OFF) mode ? When in deepsleep it won't be able to scan, so it will affect the mesh performance. Especially if it's a relay node.

    The hardware board should be tuned properly to achieve best RF performance. I would suggest to try testing on our DK board to get a bench mark about the RF performance. 

    Regarding the Android app, our Android developers unfortunately are all on vacation at this moment. (it's summer in Norway) but please try to test again with an example in the SDK to see if you get the same issue. 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. 

Children
  • 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