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

LPN without friend node

Hi,

We have one client/provisioner and multiple servers/provisionees (light switch style) in our mesh network.

Now we plan to have a LPN-sensor node (server as above) in that network without using friend-nodes.

The sensor should wake up once every minute, send a message to the client, stay up for 5 sec. and then sleep again.

1. What changes to the server would be necessary to achieve that?

2. Is it possible to use LPN without friend-nodes?

regards

Gerry

  • The sensor should wake up once every minute, send a message to the client, stay up for 5 sec. and then sleep again.

    Hello, as far as I know, the client is the one to send messages to the server.

    What you want to do is achievable by setting the timeout of the messages from the client to the server less thant the timeout for sleep. I think it can't be deep sleep, because it needs an external interrupt to wake-up, so there may be a limitation there.

    1. You'd have to define a timer in the node (I'm pretty sure it has to be a client node, but I might be wrong) to make it "sleep" when it expires by using a callback. Check out the files simple_hal.c and .h, they have an example of a timer to control the blink of the lights in the light switch example. Consider that "sd_app_event_wait function will put the device to System On low power node" by default. Although more power modes are described here, I'd use SYSTEM_ON because of the use of a timer as wake up.

    2. About this question, I'm checking out on this paper Bluetooth Mesh Energy Consumption: A Model, where they created a LPN model without a friend node.

  • Hi, thanks for your answer. I think I have to clarify my quesion a bit

    I would like to use the sd_app_event_wait() function to bring the device into System_On low power mode. In my case, the radio (RX and TX) should be turned off to not get Mesh-events during sleep and only RTC0 should be running.

    Could you please give me some lines of code, how this can be achieved?

    Best regards

    Gerry

  • That function (void)sd_app_evt_wait(); is already in a for(;;) inside the main in the examples. I'm also looking for things to disable the radio and enable it later easily... So far what I do is to reduce the power the radio uses with this function: sd_ble_gap_tx_power_set(BLE_GAP_TX_POWER_ROLE_ADV, BLE_CONN_HANDLE_INVALID, -48); when processing the packages and then increase it to communicate to other devices.

    In my case, deep sleep (sd_power_system_off) can be used because it has to wake up by user input (a button).

  • I'm testing with scanner_radio_start(), scanner_radio_stop() and nrf_mesh_enable(), nrf_mesh_disable().

    The current comes down to some uA but it doesn't really work. (provisioning works fine, communication doesn't)

  • Can you start radio for communication and disable it again later? By using a timer I think you can, after provisioning, stop the radio until it's needed again (the 5 seconds), all that in the one minute cycle you need.

Related