The light switch client implements a Generic OnOff client. Together with light switch server and Bluetooth 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.
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.
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 Bluetooth mesh stack APIs used by the light switch client.