This demo application page provides a
description of how to connect two configured boards and communicate over Bluetooth
Low Energy (BLE). The included application registers a custom service on a board
when the stack is initialized.
Device 1 (Server) setup on the demo
application
- To start, one of the devices has
to have the Link Loss Service (LLS), Immediate Alert Szervice (IAS) and Transmit
Power Service (TPS) running on it. It can be started by issuing the RegisterLLS,
RegisterIAS and RegisterTPS commands.
- Next, the device acting as a
Server needs to advertise to other devices. This can be done by issuing the
AdvertiseLE <Enable/Disable> <Address Type> command.
Device 2 (Client) setup on the demo applicationNote: Steps c and d are
optional if you already know the Bluetooth address of the device that you want to
connect to.
- The Client LE device can try to find which LE devices are in the vicinity
issuing the StartScanning command.
- Once you have found the device,
you can stop scanning by issuing the StopScanning.
Initiating connection from device 2
- Once the application on the
Client side knows the Bluetooth address of the device that is advertising, it
can connect to that device by issuing the ConnectLE <Bluetooth Address of
Remote Device> <Remote Address Type> <Own Address Type>
Identify supported services
- After initialization, the Client
needs to find out whether LLS, IAS and TPS services are supported. For this the
DiscoverLLS, DiscoverIAS, DiscoverTPS commands are issued on the Client. After
the service discovery operations are complete, the LLS, IAS and TPS Service
Discovery Summary and list of supported features is shown.
Proximity Notification between Client and Server
- Change the Alert Level from the
Client. To change the Alert Level from Client, the commands SetAlertLevel and
GetAlertLevel are issued to change and view the updated alert level.
- Change Transmtheit power level
(TxPower) from the Client. To change the TxPower Level, the SetTxPowerLevel
command is issued from the Server while to obtain the TxPower Level the
GetTxPowerLevel command is issued from the Client.