nRF5 SDK for Mesh v4.1.0
Light switch client details and Mesh APIs

The light switch client implements a Generic OnOff client. Together with light switch server and mesh provisioner, it is part of the light switch example network demonstration, in which it has a provisionee role.

The light switch client has four buttons to control the state of LED 1 on servers. It instantiates two instances of Generic OnOff Client model. It can either be provisioned and configured by the provisioner device or by a GATT-based provisioner. The provisioner configures this client model instances to communicate with servers.


Source code

You can find the source code of the light switch client in the following folder: <InstallFolder>/examples/light_switch/client

To run the light switch client example, see Light switch example.


Use of Mesh APIs

The client uses the following set of APIs:

The client application is implemented in a similar way as that of the server (see examples/light_switch/client/src/main.c). Additionally, it has the following functionalities:

The following figure shows the calling sequence of key mesh stack APIs used by the light switch client.

light_switch_client_interface.svg
Light switch client setup

Documentation feedback | Developer Zone | Subscribe | Updated