Low Power Led Demo App for CYBT-213043-MESH

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
LUAB_4724786
Level 4
Level 4
25 replies posted 10 likes received 10 replies posted

Hi there,

I am testing the sample code LPN on sample from Low Power Led Demo App for CYBT-213043-MESH and after reading a bit on the source and readme, I think I need some informations to get better understanding about Low Power Node, see below :

  1. In order to test LPN functionality, it seems the code by default set as non LPN, so ... I need to define and set the value of "LOW_POWER_NODE and LOW_POWER_NODE == 1"? must be both right ?
  2. "After successful provisioning, the low_power_led lpn node will choose one lighting node as its friend automatically" ... how this mechanism of "choose" works ? based on RSSI or nearest Friend Node ?
  3. And ... only one friend node ? what happen if that choosen friend node is replace ? will do the switch automatically ?
  4. "For low_power_led nodes, it can't receive on/off command directly, it will get command from friend node, So it needs to create friendship before sleep" ... what happen if no Friend node available before sleeping ? is the LPN will keep on searching until it create friendship ? if it is ... is it affecting battery ?
  5. Is it possible as well if I modify "mesh_vendor_specific_app" to be LPN and use it to send message ? any problem in the future that might happen since LPN only "talk" to its friend and one friend only ?

Thanks and Best Regards,

LUTHFI AD

1 Solution
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

1. You can enable it in the makefile of your application.

# value of the LOW_POWER_NODE defines mode. It can be normal node (0), or low power node (1)

LOW_POWER_NODE ?= 1

2. When a low power node is added to a mesh network it broadcasts a request for a friend. Each friend in range that can handle a new low power node replies and the low power node selects the best friend based on how many messages the friend can store; the RSSI and the timing accuracy.

3. The spec says,

A Friend node may be friends with multiple Low Power nodes. A Low Power node can only be friends with a single Friend node.

If no response has been received to multiple Friend Poll messages before the PollTimeout timer expires, the friendship is terminated. The Low Power node may repeat the Low Power establishment operation.

4. No. The app goes to sleep after a certain period of time. When a friend node is ready in it's direct range, we may have to wake up the device using GPIO wake up source (restart).

5. Low power node should follow it's characteristics as defined in the Bluetooth mesh spec. If you think your application is suitable to work as a low power node, you can definitely configure in that way. Vendor specific app is used to create any user defined model in mesh.

Friend and Low Power Nodes are used to optimize power consumption for constrained devices.  (Eg. Thermometer which periodically gets room temperature and publish it),

Some useful links to get more in for about mesh spec and implementation.

AppNote: https://www.cypress.com/file/473921/download

Lab Manual: GitHub - cypresssemiconductorco/CypressAcademy_WBT101_Files: Files for WICED Bluetooth 101 class

SIG Spec: https://www.bluetooth.com/specifications/mesh-specifications/

Thanks,

-Dheeraj

View solution in original post

13 Replies
DheerajPK_41
Moderator
Moderator
Moderator
750 replies posted 500 likes received 500 replies posted

Hi,

1. You can enable it in the makefile of your application.

# value of the LOW_POWER_NODE defines mode. It can be normal node (0), or low power node (1)

LOW_POWER_NODE ?= 1

2. When a low power node is added to a mesh network it broadcasts a request for a friend. Each friend in range that can handle a new low power node replies and the low power node selects the best friend based on how many messages the friend can store; the RSSI and the timing accuracy.

3. The spec says,

A Friend node may be friends with multiple Low Power nodes. A Low Power node can only be friends with a single Friend node.

If no response has been received to multiple Friend Poll messages before the PollTimeout timer expires, the friendship is terminated. The Low Power node may repeat the Low Power establishment operation.

4. No. The app goes to sleep after a certain period of time. When a friend node is ready in it's direct range, we may have to wake up the device using GPIO wake up source (restart).

5. Low power node should follow it's characteristics as defined in the Bluetooth mesh spec. If you think your application is suitable to work as a low power node, you can definitely configure in that way. Vendor specific app is used to create any user defined model in mesh.

Friend and Low Power Nodes are used to optimize power consumption for constrained devices.  (Eg. Thermometer which periodically gets room temperature and publish it),

Some useful links to get more in for about mesh spec and implementation.

AppNote: https://www.cypress.com/file/473921/download

Lab Manual: GitHub - cypresssemiconductorco/CypressAcademy_WBT101_Files: Files for WICED Bluetooth 101 class

SIG Spec: https://www.bluetooth.com/specifications/mesh-specifications/

Thanks,

-Dheeraj

Hi Dheeraj,

1. When you say "make file of your application" (for low power led context) is low_power_led.c right ?

2. 3. 4. Understood ! Thaaaaaanks !

5. Noted on the info about low power node characteristic. Dheraaj, basically we want to have solution to get "treat" a node as a device that have characteristic Low Power and able to send message via mesh network (friend network). This device will get some counter number and send it to the mesh network. Since there is no this kind of profile define on SIG for the implementation, I came out with the question.

So, the pointers are ...

  • Make use the sample of mesh_vendor_specific_app.
  • Try to change it (or add?) WICED_BT_MESH_CORE_FEATURE_BIT_LOW_POWER.
  • Adjust the rest of setting based on sample of Low Power Node as well.

feasible ?

Hi,

1. No. There should be a fine name "makefile" in every application folder.

For example: makefile of low_power_led app: Click Here https://github.com/cypresssemiconductorco/mtb-examples-CYBT-213043-MESH-btsdk-mesh-demo/blob/master/...

5. You can definitely make custom mesh model. Vendor specific app will be helpful for it to get started. You can configure it as a low power node. But, Low power node will not be listening to the mesh network continuously. It establishes a friendship with the Friend node and goes to the sleep state. Once the relationship is established, the friend node will receive and store messages for any low power nodes that it is associated with.The low power node will periodically ask the friend node for any messages that the friend has stored for it.

Please think about, whether the "low power node" concept of mesh is useful in your final product or not.

Exactly, You can start your development on top of vendor_specific app.

Thanks,

-Dheeraj

Hi Dheeraj,

Thaaanks ! yes ... I want it to be "low power node" because it is running on battery ... unless, I can do deep sleep (that is comparable/decent enough compare with low power node power consumption) without changing into low power node, that would be awesome and fast to develop ! ... deep sleep ... wake up ... sleep again ... is there such a think in here ?

Best Regards,

LUTHFI AD

Hi,

There are various low power modes supported by Cypress chips. You can refer below document.

https://www.cypress.com/documentation/application-notes/an225270-cyw208xx-ble-low-power-guidelines

In BLE mesh, the LPN application can register a callback function "wiced_bt_mesh_app_lpn_sleep_t" in wiced_bt_mesh_app_func_table_t  to receive the notification when sleep mode can be entered. The stack will call this function when it is safe to enter a low power mode. The stack provides the length of time in milliseconds that it does not require any processing, so the application can decide if it wants to go to sleep, and what sleep mode is appropriate.

You can refer mesh demo low_power_led which demonstrates the implementation of low power node in mesh.

Thanks,

-Dheeraj

0 Likes

Hi Dheeraj,

Thank you very much for this information, I really appreciate it, it help me a lot faster and I can get the idea from those functions. By the way, do you have any story or some reference information on how long can it works if utilise its Low Power Mode for CYBT-213043-02 EZ-BT Module from other customer if it is being use with Coin Cell Battery ?

The reason for the questions is we want to use it with battery power, any good story about this will be helpful for us for deciding in the future on what kind of battery that we should, either about capacity, charge-able, etc.

Best Regards,

LUTHFI AD

Hi,

The CYBT-213043-Mesh kit when powered with CR2032 coin cell, last around 8-9 hours reliably during our internal testing when there is only Green LED On/Off activity present. This time can vary based on the application nature and peripheral usage. 

Please note, there are current leakage detected in the mesh kit from the module to USB2 Serial Bridge. Please check the below post.

How to Use Battery Power Supply for CYBT-213043-MESH Kit - KBA228152

Thanks,

-Dheeraj

Dear Dheeraj,

Thanks a lot, I really appreciate it, its a very good link ! by the way, I still need something to be check with you, see below.

KBA228152

  1. This "treatment" only for Mesh Kit right ?
  2. The steps ... Cut-Off PUART, Cut-Off HCI-UART and short battery pin ... right ?
  3. Its my first time seeing Device Configurator application, so ... it is the app is configuring electrical/digital characteristic right and ... after what is the output of the application ? and how to use that output to make sure we did it correctly ... and should the kit connected ?
  4. if we cut-off the HCI-UART and PUART, how we program the kit ? sorry a bit green question in here, a bit confuse with the steps.
  5. Lastly ... if we want to go back to "early state" (before doing KBA228152) ... we just need to reverse the steps ?

CYBT-213043-02 EZ-BT MODULE

  1. If we use this module (not kit mesh) and we use usb-to-serial cable to program it, is there a need to follow KBA228152 (especially the Device Configurator) ?
  2. And ... about the power to be calculated, we just need to use information based on this spec right ?

    Screen Shot 2020-08-06 at 15.06.50.png

  3. TX or RX consumption ... its switching normally right ? anyway ... its almost the same ammount .. can I just use the 5.9 mA to calculate the power consumption and its duty cycle when on .... right ?

Best Regards,

LUTHFI AD

I also playing a bit with Low Power Led sample behavior and I just want to make sure my understanding is correct, below additional questions :

1. The area that I marked as red, its consider "Active Session" right ?

2. I calculate ... its around 12 seconds that active session is running, is the power consumption is similar around 5.9 mA during this session ? or the polling is actually more low power ?

3. Is this polling (12 secs) controlled by the firmware ? coz ... it seems to me it is becoming 12 second duty cycle ... isnt ?

Screen Shot 2020-08-07 at 17.11.00.png

4. Based on the log above, the sleep timeout is around 17800 ms, but I cannot find the value of that timer in the code, see below :

Screen Shot 2020-08-07 at 17.14.04.png

Best Regards,

LUTHFI AD

Hi,

KBA228152

1) Yes. The KBA KBA228152 is only for the meshkit.

2) Yes. The steps are correct. Please follow the KBA.

In short, Hard cutoff HCI_UART through SW4 and cutoff PUART through FW, it will prevent current leakage.

3) Device configuration is used to enable and configure device peripherals, such as clocks, pins, etc.

Please refer the user manual of Device Configurator from the Modustoolbox Install directory.

(Eg. .\ModusToolbox\tools_2.1\device-configurator\docs\device-configurator.pdf)

4) You should program the kit first. "Put all pins of SW4 to OFF position (see Figure 1) after programming the firmware."

5) Yes. You can enable the PUART from firmware, switch ON SW4 and short the J5 jumper pins to appropriately.

CYBT-213043-02 EZ-BT MODULE

1) No need. Current leakage is detected only in the Meshkit. Module should work fine.

2) Yes. Please refer module datasheet and chip (20819) datasheet to know more details.

https://www.cypress.com/documentation/datasheets/cybt-213043-02-ez-bt-module

https://www.cypress.com/documentation/datasheets/cyw20819-ultra-low-power-blebredr-bluetooth-50-soc

3) I didn't get the question clearly. But hope the datasheet will help you.

The measured current is at continuous Rx or Tx.

Thanks,

-Dheeraj

0 Likes

Thanks Dheeraj !

Its clear for the instruction.

By the way can you help me the answer for the behavior of Low Power Node above ? trying to implement the sleep and comparing the behavior of LPN, Thanks.

Best Regards,

LUTHFI AD

Hi,

The marked area seems to be the time in which the LPN pings the friend for the cached message. After receiving the chached messaged, LPN goes to sleep for the defined period of time. Then again wakes up after the timeout for receiving the message.

The default poll timeout for low_power_led application is set to 20000ms in the wiced_bt_mesh_core_config_t in the application. You can modify it based on the requirement.

.poll_timeout          = 200      // Poll timeout in 100ms units to be requested by the Low Power node.

Thanks,

-Dheeraj

0 Likes

Dear Dheeraj,

Big thanks ! I will try to play with the value of Poll Time and check back again, once again thanks !

Best Regards,

LUTHFI AD