SILICON LABS Lab 4 – Understand FLiRS Devices User Guide
- June 6, 2024
- SILICON LABS
Table of Contents
Lab 4: Understand FLiRS Devices
This hands-on exercise will demonstrate what a Z-Wave FLiRS device is. The
exercise will use the Doorlock sample application that ships as part of the
Z-Wave Embedded SDK
This exercise is part of the series “Z-Wave 1-Day Course”.
-
Include using SmartStart
-
Decrypt Z-Wave RF Frames using the Sniffer
-
3A: Compile Switch On/Off and Enable Debug
3B: Modify Switch On/Off -
Understand FLiRS devices
KEY FEATURES
- Understand key features of a FLiRS device.
- Use the Energy Profiler to capture the power consumption.
Introduction
In this exercise we will explore a Z-Wave FLiRS device, and learn the benefits of a “listening sleeping device”; a battery-powered device that must be communicated with at any time with short latency.
Hardware Requirements
- 1 WSTK Main Development Board
- 1 Z-Wave Radio Development Board: ZGM130S SiP Module
- 1 UZB Controller
- 1 USB Zniffer
Software Requirements
- Simplicity Studio v4
- Z-Wave 7 SDK
- Z-Wave PC Controller
- Z-Wave Zniffer
Prerequisites
Previous Hands-On exercises have covered how to use the PC Controller and Zniffer application to build a Z-Wave network and capture the RF communication for development purposes. This exercise assumes you are familiar with these tools. Previous Hands-On exercises has also covered how to use the sample applications that ships with the Z-Wave SDK. This exercise assumes you are familiar with using and compiling one of the sample applications.
Compile the Doorlock Sample Application
In this section we will be compiling the Doorlock Sample Application. The steps required are the same, as for Switch On/Off, which we covered in exercise “3A: Compile Switch OnOff and enable-debug”. In the following, the steps are summarized, but you should refer to exercise 3A if you want instructions in how to enable and use the serial debugger.
Open Sample Project
- Connect your Z-Wave hardware to the USB port of the computer and it should show up in the “Debug Adapters” section in Simplicity Studio.
- Click once on the “J-Link Silicon Labs” which instructs to the studio the show relevant information about Z-Wave 700.
- Under “Software Example” click on the DoorLock sample application.
Set the frequency
The sample app will not compile just yet. You need to set the frequency that matches the region you intend to use the Z-Wave Product in.
- In the main source file “DoorLockKeyPad.c”, locate the variable APP_FREQ:
Refer to Table 1 for a complete list of supported frequencies by the SDK.
Hint Navigate to Silicon Labs website, to see which countries have been
approved for the Z-Wave RF.
Table 1: Overview of possible frequencies
Frequency Region | Variable to use |
---|---|
Europe | REGION_EU |
United States of America | REGION_US |
Australia/New Zealand | REGION_ANZ |
Hong Kong | REGION_HK |
Malaysia | REGION_MY |
India | REGION_IN |
Israel | REGION_IL |
Russia | REGION_RU |
China | REGION_CN |
Japan | REGION_JP |
Korea | REGION_KR |
In this guide we will be using the European frequency, thus we enter “REGION_EU”.
Compile the Doorlock Sample Application
You have now configured the Z-Wave sample application, and you are ready to compile.
- Click on the “Build” button to start building the project.
- When the build finishes after a short while, a new folder named “Binaries” is shown in the Project Explorer. Expand the folder and right-click on the *.hex file to select “Flash to Device..”.
- Select the connected hardware in the pop-up window. The “Flash Programmer” is now prefilled with all needed data, and you are ready to click on “Program”.
- Click “Program”.
After a short while, the programming finishes, and your end device is now flashed with a Z-Wave sample application.
Include and run the Doorlock Sample Application
In this section, we will be including the Doorlock Sample Application into the
Z-Wave Network. In the previous exercise “2A Decrypt Z-Wave RF Frames using
the Zniffer”, we already added the DSK into the provisioning list of the PC
Controller.
Hint: The internal file system is not erased between reprogramming. This
allows a node to stay in a network and keep the same network keys when you
reprogram it. If you need to change (e.g., the frequency at which the module
operates or the DSK) you need to “Erase” the chip before the new frequency
will be written to the internal NVM. This means the DSK will still be valid
despite we just programmed our device with a completely different sample
application.
If you are using a new device or if you haven’t previously added the DSK to
the PC Controller, refer to exercise “2A Decrypt Z-Wave RF Frames using the
Zniffer” for instructions in how to readout the DSK from a device and add it
to the PC Controller.
Remove/Include the Old Device from/to the PC Controller
Since the DSK is the same, the PC Controller thinks that device is already included, though as a Switch On/Off. We need to remove the association to the Switch On/Off sample application to this DSK.
- In the PC Controller, click on “Remove”
- On the device, click on “BTN1” to set the device in learn mode.
- The device should now be removed from the PC Controller.
When the old association is removed, the PC Controller will automatically include the DoorLock sample application thanks to SmartStart. When successfully, the PC Controller should look like Figure 5.
Test the functionality
In this section, we will briefly test the functionality of the DoorLock Sample
application.
Hint The functionalities of all sample applications are described in the
document “INS14278 How to Use Certified Apps” found in the documentation
section of Simplicity Studio. Test the Lock and Unlock functionality. In the
following steps, we will be unlocking the door:
- In the PC Controller, double click on “62 DOOR_LOCK” under secure Command Classes in the lower-left corner.
- This opens the “Command Classes” view in the PC Controller and selects the Door Lock Command class.
- Set the Command to “0x01 DOOR_LOCK_OPERATION_SET”
- Set the “Target Value” to “00-DOOR_UNSECURED”
- Click “Send”.
Verify that LED3 is now ON. Next, we will lock the door, and LED3 should turn OFF:
- Set the “Target Value” to “FF-DOOR_SECURED”
- Click “Send”.
The Wake-Up Beam for a FLiRS Device
If a Z-Wave controller or another node in the network needs to communicate
with a battery-powered device such as a door lock, the controller sends a
special beam signal. The purpose of this beam is to wake up the FLiRS device.
The FLiRS device alternates between sleep mode and a partially awake mode in
which it is listening for this beam signal at the rate ranging from once per
second to four times per second (this is the designer’s choice). When the
FLiRS device receives this beam, it immediately fully wakes up and then
communicates with the controller or other Z-Wave device utilizing standard
Z-Wave protocol commands. If the device does not hear a Beam it goes back to
full sleep for another period until it partially awakes again and listens for
a Beam. It is this partially awake mode combined with the special Beam that
provides for battery lives on par with fully sleeping devices while providing
communications latencies of around one second.
Hint For a more in-depth description of Z-Wave FLiRS devices refer to the
white paper “Z-Wave FLiRS: Enabling Wireless Smart Door Locks and Thermostat”
The WakeUp Beam can be seen in the Z-Wave Zniffer. This section will not cover
how to capture a Zniffer trace refer to exercise “2A Decrypt Z-Wave RF
Frames using the Zniffer” for instructions on how to use the Zniffer. The beam
cannot be seen in the Zniffer if the trace is filtered on HomeID.
-
Click on Drop Filter in the Zniffer to make sure the trace is not filtered on HomeID.
In Figure 7 a trace is shown for a wake-up sequence: -
The controller sends 3 requests to the FLiRS device, to ensure the device cannot be reached without beaming, which is a heavy load in the Z-Wave network.
-
Since the device did not respond to the direct response, a WakeUp beam is initiated.
-
When the Beam ends, the controller sends the command again, and the device acknowledges the message.
Power Consumption of DoorLock
In this section, we will be using the Energy Profiler in Simplicity Studio to monitor the energy consumption of the DoorLock FLiRS device.
- In Simplicity Studio, open the “Energy Profiler” by clicking on the “Open Perspective” button
- In the “Energy Monitor” click on “Quick Access” and click on “Start Energy Capture”.
- Select your device in the pop-up window and click OK.
The Energy Profiler now starts to capture and display the energy consumption, see Figure 8. Notice how the energy consumption raises every section when the device must wake up to listen for a Beam. Also notice the fast wake-up and fall-to-sleep times, resulting in a very low average power consumption.
Let’s try to wake up the device.
- In the PC Controller, send a command to the device (refer to section “3.2 Test the functionality” for instructions)
- Notice the current consumption when the device wakes up to communicate with the controller. Refer to Figure 9.
This concludes the tutorial on how to use a FLiRS device.
silabs.com | Building a more connected world.