The demo application provides a
description on how to use the demo application to connect two configured boards and
communicate over bluetoothLE. 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 Immediate Alert service running on it. It can be started by running
RegisterIAS.
- Next, the device acting as a
Server needs to advertise to other devices. This can be done by running
AdvertiseLE 1.
Device 2 (Client) setup on the demo applicationNote: Steps 1 and 2 below 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 command:
StartScanning.
- Once you have found the device,
you can stop scanning by issuing the command: 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 issuing the command: ConnectLE <Bluetooth
Address> 0 0
Note: 0 is used
for both parameters since both devices use Public addresses, if using Random
addresses use 1 for the address type parameters.
Identify supported services
- After initialization, the Client
needs to find out whether LLS, IAS and TPS services are supported. For this the
commands, DiscoverLLS, DiscoverIAS, DiscoverTPS are run on the Client. After the
service discovery operation is complete, the LLS, IAS and TPS Service Discovery
Summary and list of supported features are shown.
Configuring Alert Level
- The Client can configure the
alert level which will get notified on the Server.