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

Mesh using nRF52840 Development board

Hi,

I am using nrf 52840 development board for developing mesh. I am using segger IDE in my windows 7 desktop for code flash to the board.

The SDK I am using is nRF5_SDK_15.2.0 and for Mesh am using SDK for mesh v3.1.0.

In the mesh example, I see a light_switch example wherein there is a Server and a Client program which is used to communicate with one server board and one client board.

I want to control the LED of the board using the Generic onoff which is available in the app (after provisioning -> configure -> elements -> Generic On Off Server -> Generic On Off Controls) for Server code, which I am able to do.

My doubt is, If I download Server code to two boards and try to control it with mobile mesh app, will the two servers act as a mesh network, wherein if one server is not in range with my phone and I want to turn on and turn off the LED of the server which is not in range with my phone via the server which is in range with my phone ?

Thanks & Regards,

Vibhu.

  • Hello,

    Yes. The packet that is sent by the app is a mesh packet to the on_off_model. Since the servers by default are relay nodes, they will retransmit this packet. I have tested a bit, and I am able to toggle all the servers at once using the phone, but it happens from time to time that only one of the lights toggle. This was when I tested with two servers. When I tested with 3, it was less frequent. Adding more nodes also makes the network have more retransmissions, and less chance of packet loss. Alternatively, a workaround could be to send the toggle command from the phone more than once, but that would require you to change the source code for the app.

    Best regards,

    Edvin

  •   Thank You. That was so precise.

    And,

    In the light_switch server code, If I put any printf statements, it is not getting displayed on the teraterm app if I connect to that CDC - UART (COM) port. 

    Any idea on what I should do in order to get the prints ?

    Basically I need to see it in UART.

    Best Regards,

    Vibhu

  • Hello,

    The printf function is not set up in this example. Do you need it to be UART? The logging module in this example is set to RTT Backend, and you can see the logging in Segger Embedded Studio while debugging, or in J-LINK RTT Viewer if you do not debug. This should work out of the box with the DK.

    Do you still need UART? It is possible, but it is a bit more work. In the "normal" (not Mesh) SDK, the log backend is usually chosen in sdk_config.h. Look at e.g. the ble_app_uart example. 

    This example will print everything from NRF_LOG_INFO("text here"); on the UART.

    Alternatively, the ble_app_uart example uses printf("text here"); to print on UART.

    Note that this would require changes in the logging module in the Mesh SDK. If you actually just want to debug and see log output, I really recommend you to use the RTT Backend.

    Best regards,

    Edvin

  • For your information:
    Since you have verified the answer on this post, I will no longer get notifications when there is an update in this ticket, and since the new question is a bit outside the original topic, please create a new ticket if you have more questions. I just discovered this update incidentally.

    Best regards,

    Edvin

  • Hi

    I have created a new ticket for the UART part but I am not getting proper response, I am in bit of a hurry and so could you please help me with mesh and UART, it will be great !

    https://devzone.nordicsemi.com/f/nordic-q-a/43922/nrf-mesh-and-uart

    The above is the link for the new ticket.

    Thanks & Regards,

    Vibhu.

Related