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

Mesh Long Range mode relaying

Hi, I am using mesh sdk 3.20 and nrf52840. 

I am using 3 nodes for testing. One generic on off client and two generic on off servers. 

I believe that I have managed to get the devices into long range mode by changing the scanner and default broadcast, got this from another post.

Now I have performed the following test:

1. Server at the furthest distance away, making sure that the client cannot toggle the light

2. Added another server in the middle, hoping that the message would be relayed and turn on the light

I know that I can just turn down the Tx power for testing. Now it seems like the message is not being relayed. 

1. Are messages being relayed in long range mode?

2. How can I confirm that a message was relayed?

3. Is there any additional configuration required for relaying messages? I have set the retransmit count of the server in the middle to 3,by using the Nordic mesh app and the configuration server.

Also, I know that long range mode cannot be certified, don't care about that for now. 

Thanks in advance

Regards

Chris

Parents
  • Well, I can't tell what your application is doing, but if they are transmitting on Long Range (LR), and you receive the message, it means that the radio is listening in LR as well. Since there is only one radio, and you are able to pick up the message even if it is relayed, it means that it is also picked up and relayed on LR. The reasoning behind this is that Bluetooth Mesh uses the radio ~100% of the time, so it is not possible to switch between LR and 1MBPS, like you can in BLE, where you only use the radio in short bursts.

    So:

    1: Yes.

    2: You can e.g. check the TTL (time to live) on the received message. This is a counter that is decremented by one in each relay. If you set the default TTL in main.c by using access_default_ttl_set(5); (not necessarily 5, but whatever value you want, just so you know what it is). Then, on the receiving node, you can add this line in mesh_msg_handle() in access.c:

    __LOG(LOG_SRC_ACCESS, LOG_LEVEL_INFO, "TTL: %d\n", p_evt->ttl);

    remember to add the LOG_SRC_ACCESS in __LOG_INIT() in main.c:

    __LOG_INIT(LOG_SRC_APP | LOG_SRC_ACCESS | LOG_SRC_FRIEND, LOG_LEVEL_DBG1, LOG_CALLBACK_DEFAULT);

    And you should be able to see the TTL in the log for the receiver. If it is 5 (the same as you set on the transmitter), it means that the message is received directly, but if it is 4, it means that it is relayed once, and not a direct message from the source.

    3: You can change the default number of repeated relays and the number of original message repeats in nrf_mesh_config_core.h. Search for 

    CORE_TX_REPEAT_ORIGINATOR_DEFAULT

    and 

    CORE_TX_REPEAT_RELAY_DEFAULT.

    Best regards,

    Edvin

Reply
  • Well, I can't tell what your application is doing, but if they are transmitting on Long Range (LR), and you receive the message, it means that the radio is listening in LR as well. Since there is only one radio, and you are able to pick up the message even if it is relayed, it means that it is also picked up and relayed on LR. The reasoning behind this is that Bluetooth Mesh uses the radio ~100% of the time, so it is not possible to switch between LR and 1MBPS, like you can in BLE, where you only use the radio in short bursts.

    So:

    1: Yes.

    2: You can e.g. check the TTL (time to live) on the received message. This is a counter that is decremented by one in each relay. If you set the default TTL in main.c by using access_default_ttl_set(5); (not necessarily 5, but whatever value you want, just so you know what it is). Then, on the receiving node, you can add this line in mesh_msg_handle() in access.c:

    __LOG(LOG_SRC_ACCESS, LOG_LEVEL_INFO, "TTL: %d\n", p_evt->ttl);

    remember to add the LOG_SRC_ACCESS in __LOG_INIT() in main.c:

    __LOG_INIT(LOG_SRC_APP | LOG_SRC_ACCESS | LOG_SRC_FRIEND, LOG_LEVEL_DBG1, LOG_CALLBACK_DEFAULT);

    And you should be able to see the TTL in the log for the receiver. If it is 5 (the same as you set on the transmitter), it means that the message is received directly, but if it is 4, it means that it is relayed once, and not a direct message from the source.

    3: You can change the default number of repeated relays and the number of original message repeats in nrf_mesh_config_core.h. Search for 

    CORE_TX_REPEAT_ORIGINATOR_DEFAULT

    and 

    CORE_TX_REPEAT_RELAY_DEFAULT.

    Best regards,

    Edvin

Children
Related