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

nRF5 SDK for Mesh / nRF52840 DK

Hello everyone,

I have following problem. I am trying to build a mesh network with the nRF52840 DK and the nRF52840 Dongle.

I am using the "nRF5 SDK for Mesh" (V4.2.0) with the "nRF5 SDK (V17.0.2)" and I am trying to make the lpn example of the "nRF5 SDK for Mesh" work.

I am able to compile the example but when it comes to linking then i get following errors:

build/lpn_nrf52840_xxAA_s140_7.0.1_Debug/obj/ses_startup_nrf_common.o: in function `afterInitialize':
undefined reference to `__RAM1_segment_end__'

I have already tried to change the settings of the Memory Segments and to add a Memory Map without any success. (These were succesful solutions for other users here)

Could you please tell me how I can get rid of these errors and how to make the example to work?

Thanks already.
Kind regards!

Parents
  • Hi

    Thank you! I am now able to run the examples in nRF5 for Mesh.

    But to be honest it's not really clear for me how to set up a mesh network.
    My network should consists of several sensor modules. All these sensor modules should transmit a temperature, a humidity
    and a weight value (and more data). Furthermore the sensor modules should be configured as low power nodes and woken up once a day by the RTC and should then transmit the data to the server.

    I am not sure where and how to begin. I have looked at the sensor and the light switch examples. I think it's necessary to create a own client which can transmit these data (temp, humidity and weight). Am I right or is there a easier way?

    Is there any tutorial how to customize a mesh network maybe?

    Thanks already.
    Kinds regards!

  • Hi,

    krajiiva said:
    it's not really clear for me how to set up a mesh network.

    In order to set up a mesh network you need to provision all the nodes to the network, and then you must configure the nodes, for instance you must configure the sensor server model to publish to a group address, and the sensor client model to subscribe (listen to) the same address. You can do this with either a static provisioner using the provisioner example, or you can use the nRF Mesh mobile app. Both ways of doing this is described in the documentation of the different examples.

    Do you need two-way communication with the sensors? Because if not, you could use regular BLE beacons for the sensors, and instead have a few mesh nodes with constant power that listens after the beacons and send data through the mesh network. Then you could build it around the EnOcean switch translator client example. However, if you need two-way communication, all the nodes has to be mesh nodes. They can be configures as low power nodes as you wish to do.

    krajiiva said:
    Is there any tutorial how to customize a mesh network maybe?

    The only tutorial we have available for this is the guide on how to use the nRF Mesh mobile app. If you use that you will be able to get a sense of how things work. You can try to take a look at the light switch example and test it using the app, to get a better understanding of how provisioning and configuring is done.

    Best regards,

    Marte

  • Hi,

    The communication has to be bidirectional.

    I decided to extend the sensor model example of the SDK of "nRF5 for Mesh".
    At the moment I am able to send data from the sensor module (I configured it as sensor server) to the client.I think this makes the most sense, or am I wrong ?

    The only "problem" is that the sensor client has to send a GET-message (I trigger this by pressing a button), before the sensor module can send the data. I would like to send the data from the sensor module direct to the sensor client without waiting for the GET-message of the client.

    How can i implement this? I have seen, that there is a function called "sensor_status_publish()". Can I use this function to send my data from the sensor module to the client? In which callback at the sensor_client function is this message processed and will this message be acknowledged by the sensor client?

    Thanks already!
    Kinds regards!

  • Hi,

    In the documentation for the sensor example you will find a part about testing the example. Step 1 and 2 there will tell you how to do periodic publication, so that you don't have to send a GET-message.

    You should be able to use sensor_status_publish() if you want to send something besides what's configured in periodic publishing. For the client side you'd have to look at the callback functions, such as app_sensor_client_status_cb(), which can be found in main.c. However, much of the implementation is in the sensor_client.c file, such as static const access_opcode_handler_t m_opcode_handlers[] where you can find the different handlers and which handlers are called where (this can be found on line 227 in Mesh SDK v4.2.0).

    There are different callback functions that are called depending on the opcode, and the opcodes are defined in the spec of the given model. Therefore, if you want to send data that isn't sensor data the way it's specified in the specification of the sensor model, you should create a custom model instead.

    Best regards,

    Marte

  • Hi

    Currently I can send data with "sensor_status_publish()". Thanks Marte!

    One thing that still bothers me is that it is not a reliable message (no ACK). But I will take care of it at a later time. Currently I have merged the USB CDC example with the Mesh Sensor Client. This also works on the nRF52840 DK. Now I tried to flash it to the nRF Dongle 52840. To compile the code for the dongle I changed the macro from "BOARD_PCA10056" to "BOARD_PCA10059".

    The problem now is that the dongle is not visible on the nRF Mesh App. When I click on "ADD Node" the dongle is not listed. But when I click on "Connect" the dongle is visible. When I then select the dongle, the provisioning process is not completed. Can you help me there?

    When I flash the code from the Mesh Sensor Server to the dongle, I don't have this problem. So I can successfully perform the provisioning process.


    Please find my project in the attachment.

    Thank you in advance.

    Kind regards

    Sensormodul_PA2020.zip

  • Hi

    Currently I can send data with "sensor_status_publish()". Thanks Marte!

    One thing that still bothers me is that it is not a reliable message (no ACK). But I will take care of it at a later time. Currently I have merged the USB CDC example with the Mesh Sensor Client. This also works on the nRF52840 DK. Now I tried to flash it to the nRF Dongle 52840. To compile the code for the dongle I changed the macro from "BOARD_PCA10056" to "BOARD_PCA10059".

    The problem now is that the dongle is not visible on the nRF Mesh App. When I click on "ADD Node" the dongle is not listed. But when I click on "Connect" the dongle is visible. When I then select the dongle, the provisioning process is not completed. Can you help me there?

    When I flash the code from the Mesh Sensor Server to the dongle, I don't have this problem. So I can successfully perform the provisioning process.


    Please find my project in the attachment.

    Thank you in advance.

    Kind regards

    7827.Sensormodul_PA2020.zip

Reply
  • Hi

    Currently I can send data with "sensor_status_publish()". Thanks Marte!

    One thing that still bothers me is that it is not a reliable message (no ACK). But I will take care of it at a later time. Currently I have merged the USB CDC example with the Mesh Sensor Client. This also works on the nRF52840 DK. Now I tried to flash it to the nRF Dongle 52840. To compile the code for the dongle I changed the macro from "BOARD_PCA10056" to "BOARD_PCA10059".

    The problem now is that the dongle is not visible on the nRF Mesh App. When I click on "ADD Node" the dongle is not listed. But when I click on "Connect" the dongle is visible. When I then select the dongle, the provisioning process is not completed. Can you help me there?

    When I flash the code from the Mesh Sensor Server to the dongle, I don't have this problem. So I can successfully perform the provisioning process.


    Please find my project in the attachment.

    Thank you in advance.

    Kind regards

    7827.Sensormodul_PA2020.zip

Children
Related