Sensor Data from BGM220P Not Received on nRF5340DK in Bluetooth Mesh Network

I am working on creating a Bluetooth Mesh network using the BGM220P as a sensor node. My goal is to send sensor data (e.g., temperature) from the BGM220P and have it received by a client node (nRF5340 DK) via Bluetooth Mesh.

Successfully provisioned both devices using the nRF Mesh app. I uploaded the sensor server example code to the BGM220P and the sensor client example code to the nRF5340 DK. While the BGM220P can respond to GET commands and I receive the correct temperature data from it in the nRF Mesh app.I have set up the BGM220P to publish sensor data to a Bluetooth Mesh group.

Verified that the sensor server code on the BGM220P is correctly configured to send the data, but the data is not making it to the group.Are there specific changes or configurations needed in the nrf5340dk to ensure that the data is received by the client node (e.g., nRF5340 DK)?

Any assistance on what might be missing or incorrect in my setup would be greatly appreciated!

Parents
  • Hi Priya_m,

    The nRF5340 DK application should comply to the Bluetooth Mesh spec, so you only need to provision it, assign the necessary keys, and have it subscribed to the group address.

    Have you set the device to subscribe to the group address?

    If you configure the publication to send directly to the nRF5340 DK unicast address, does it work?

    Hieu

Reply
  • Hi Priya_m,

    The nRF5340 DK application should comply to the Bluetooth Mesh spec, so you only need to provision it, assign the necessary keys, and have it subscribed to the group address.

    Have you set the device to subscribe to the group address?

    If you configure the publication to send directly to the nRF5340 DK unicast address, does it work?

    Hieu

Children
  • Hi Hieu,

    Thank you for your response.|
    Group Address Configuration:
    I created a group with the address 0xC000 and configured the BGM220P node to publish to this address. On the nRF5340 DK, I subscribed to this group address using the nRF Mesh app.
    Unicast Address Test:
    I attempted to send data to the unicast address of the nRF5340 DK, but in the nRF Mesh app, there doesn’t seem to be an option to subscribe to a unicast address. The subscription option only allows selecting a group address.
    Debugging with nRF Logger:
    I am monitoring the nRF5340 DK using the nRF Logger to check if any messages are received, but currently, I don’t see any data coming through.

  • Hi Priya_m,

    Priya_m said:
    I attempted to send data to the unicast address of the nRF5340 DK, but in the nRF Mesh app, there doesn’t seem to be an option to subscribe to a unicast address. The subscription option only allows selecting a group address.

    Subscribing is only necessary for group address. When you publish to a unicast address, the receiver should receive it.

    Have you been successful with any other combinations of devices? Do you have another nRF device that you can setup as a Sensor Server to test?

    Also, what is your publication configuration? Are you able to verify in any way that the server is sending data? Logging, or air sniffer, for example?

    The packet is encrypted, so you will not get the detailed data from the sniffer, but a periodic packet with a relatively same RSSI will be expected if the server is working.

  • I only have one nRF board. In the nRF Mesh app, I provisioned the BGM220P node, bound the app key, and set the publication to the group address 0xC000.

    Debugging Steps and Observations

    1. Verification of Data Sending:

      • I debugged the code in Simplicity Studio for the BGM220P. During debugging, I observed that the code enters the sensor_server_publish() function.

      • Inside this function, the temperature value is fetched, and the data is published to the nodes using the following implementation:

        static void sensor_server_publish(void)
        {
            uint8_t sensor_data[SENSOR_DATA_BUF_LEN];
            uint8_t len = 0;
        
        #ifdef SL_CATALOG_BTMESH_SENSOR_PEOPLE_COUNT_PRESENT
            count16_t people_count = sl_btmesh_get_people_count();
            sl_btmesh_sensor_server_on_people_count_measurement(people_count);
            len += mesh_sensor_data_to_buf(PEOPLE_COUNT,
                                           &sensor_data[len],
                                           (uint8_t*)&people_count);
        #endif // SL_CATALOG_BTMESH_SENSOR_PEOPLE_COUNT_PRESENT
        
        #if defined(SL_CATALOG_SENSOR_LIGHT_PRESENT)           \
            || defined(SL_CATALOG_SENSOR_LIGHT_LUX_MOCK_PRESENT) \
            || defined(SL_CATALOG_SENSOR_LUX_PRESENT)
            illuminance_t light = get_light();
            len += mesh_sensor_data_to_buf(PRESENT_AMBIENT_LIGHT_LEVEL,
                                           &sensor_data[len],
                                           (uint8_t*)&light);
        #endif // SL_CATALOG_SENSOR_LIGHT_PRESENT || SL_CATALOG_SENSOR_LUX_PRESENT
        
        #if defined(SL_CATALOG_SENSOR_RHT_PRESENT)                                \
            && ((defined(SL_BOARD_ENABLE_SENSOR_RHT) && SL_BOARD_ENABLE_SENSOR_RHT) \
            || SENSOR_TEMPERATURE_MOCK_PRESENT)
            temperature_8_t temperature = get_temperature();
            len += mesh_sensor_data_to_buf(PRESENT_AMBIENT_TEMPERATURE,
                                           &sensor_data[len],
                                           (uint8_t*) &temperature);
        #endif // SL_CATALOG_SENSOR_RHT_PRESENT
        
            if (len > 0) {
                sl_status_t sc = sl_btmesh_sensor_server_send_status(PUBLISH_TO_ALL_NODES,
                                                                     BTMESH_SENSOR_SERVER_MAIN,
                                                                     IGNORED,
                                                                     NO_FLAGS,
                                                                     len,
                                                                     sensor_data);
                log_btmesh_status_f(sc, SENSOR_SERVER_SEND_FAILED_TEXT, "status");
            }
        }
        
    2. nRF Logger Observations:

      Whenever I press GET in the sensor server node (BGM220P) using the nRF Mesh app, I see the following messages in the nRF Logger under the Mesh Sensor Observer:
      Data written to 00002add-0000-1000-8000-00805f9b34fb
      
      Notification received from 00002ade-0000-1000-8000-00805f9b34fb, value: (0x) 00-5D-DB-AB-BB-97-EF-E4-C9-87- E2-CA-B9-52-5F-66-5F-33-6A-46-E3-35-B5
      
      Data written to 00002add-0000-1000-8000-00805f9b34fb
      
      Notification received from 00002ade-0000-1000-8000-00805f9b34fb, value: (0x) 00-5D-26-9F-C1-7C-66-48-73-C2-C 0-5E-AA-16-91-41-BB-97-E2-DB-1C-83-A2
      

      Data written to 00002add-0000-1000-8000-00805f9b34fb Notification received from 00002ade-0000-1000-8000-00805f9b34fb, value: (0x) 00-5D-DB-AB-BB-97-EF-E4-C9-87- E2-CA-B9-52-5F-66-5F-33-6A-46-E3-35-B5 Data written to 00002add-0000-1000-8000-00805f9b34fb Notification received from 00002ade-0000-1000-8000-00805f9b34fb, value: (0x) 00-5D
  • Priya_m said:
    Inside this function, the temperature value is fetched, and the data is published to the nodes using the following implementation:

    This doesn't necessarily mean that the message is sent successfully. There are a lot of layers in mesh, and it can still fail in a later layer.

    That being said, if you are running an unmodified sample from Silicon Labs, I think we can reasonably assume it works.

    What about publishing to unicast address? Does it work?

    Can you also share the configurations you have done one the nRF Mesh app?

Related