Revision as of 12:11, 10 November 2021 by Registered User (→‎Friend Node Setup)

1. Low Power Node and Friendship process

A Low Power Node must establish a friendship relationship with another node supporting the Friend feature to reduce its receiver duty cycles and save energy. The Friend node scans, and caches messages targeted to its associated Low Power Node. The procedure involved is called friend establishment.

1.1. Friend Node Setup

Friend feature is supported by the PRF Node example, described in the ST BLE-Mesh Proxy-Relay-Friend example page.

However, some complementary information about the Friend node configurations are available below:

* # of Low Power Nodes that can be associated with a Friend node is defined by FN_NO_OF_LPNS, in mesh_cfg_usr.h:
/* 
*  Number of Low power nodes that can be associated with Friend node
*  varies from 1 to 10
*/
#define FN_NO_OF_LPNS                                                         6U
  • Number of LPN / Friend node associations is limited:
    • 1KB SRAM
    • Radio Time
  • Fixed Friend Node parameters:
    • Friend receive window size: 255 ms
    • Friend subscription list size: 4
    • Friend max. no. of messages: 16

1.2. Low Power Node Setup

Note: A Low Power Node should not support any other feature (proxy, friend, relay).

Low Power Node project cans be found in the STM32CubeWB MCU Package[1] at the following emplacement.

Low Power project directory

Low Power Nodes don’t support debugger and debug traces, see in app_conf.h:

/******************************************************************************
 * Low Power
 ******************************************************************************/
/**
 *  When set to 1, the low power mode is enable
 *  When set to 0, the device stays in RUN mode
 */
#define CFG_LPM_SUPPORTED                                                     1

[]

/**
 * keep debugger enabled while in any low power mode when set to 1
 * should be set to 0 in production
 */
#define CFG_DEBUGGER_SUPPORTED    0

/**
 * When set to 1, the traces are enabled in the BLE services
 */
#define CFG_DEBUG_BLE_TRACE     0

/**
 * Enable or Disable traces in application
 */
#define CFG_DEBUG_APP_TRACE     0

To build and flash LPN project, process on the same way as for Friend project (see ST BLE-Mesh Proxy-Relay-Friend example page). Note that the terminal logs are not available for LPN as mentioned previously. You can add several LPNs to the mesh network, one Friend Node can manage up to 6 LPN.

1.3. Functioning

All the mesh network nodes must subscribe and publish to the default group.

When pressing SW1 button on Friend Node, it publishes LED ON command to the default group. The Friend blue LED immediately turns on, as the Friend Node subscribed to the default group. When the Friend receives poll from a LPN, it forward the LED ON message to the respective LPN.

Friendship functioning description

On the same way, when pressing SW1 button of one of the LPN (e.g LPN1), LPN1 publishes LED ON command to the default group. The LPN1 and Friend Node blue LEDs turns on immediately. When the Friend receives poll from LPN2, it forward the LED ON message to it.

Friendship functioning description 2

2. Energy Consumption Profiles

  • Friend request sent -- No LPN response
Power consumption: Friend request sent -- No LPN response
  • Friend request followed by Friend establishment
Power consumption: Friend request followed by Friend establishment
  • Friend establishment sequence
Power consumption: Friend establishment sequence
  • Friend establishment followed by Friend Poll
Power consumption: Friend establishment followed by Friend Poll
  • Friend Poll retries
Power consumption: Friend Poll retries
  • Friend Poll retries and termination
Power consumption: Friend Poll retries and termination

3. References