BT LE Overview
BLE does not use the "Classic" pairing system. It was designed for phones to be able to discover nearby services and interact with them with minimal user interaction. Instead, BLE ONLY initiates pairing (encrypted link initiation) if the phone attempts to access (read / write) an encrypted characteristic value.
The demo application demonstrates both of these features. It has 2 Services (Example Service and Example Service 2). A phone app will be able to discover these services and connect to them. Once connected you can then read / write the characteristic values. If the characteristic value is Encrypted, then you will receive a pairing notification and popup.
BLE is used much more often for phone apps and wearable devices because of its ability to discover, read / write without pairing while letting the application decide if it should be encrypted. Devices such as heart rate monitors, smart watches, outdoor advertising beacons, etc all use this model.
Testing BT LE Demo
The Ahsoka.CS.BLE example provides a complete starting point to connect and pass data between devices. The demo requires a connected device to initiate two way data transfers. Use a test tool similar to BLE Hero available for iPhones and iPads. In this example we will read a characteristic, write to it, then read it back.
- Generate then install the Ahsoka.CS.BLE demo on the display (make sure DeviceServices is selected in the Services tab).
- Start the BLE Hero or any other BLE test application. The steps will be similar as shown below.
- Connect to the display and start a communication channel (GATT). The very first time connecting, a pop-up will appear on the display requesting access.
- Select the Characteristic 2 service then Descriptor 2.
- Descriptor 2 is visualized on the display UI as Example 1 String Value.
- Select Read to read in descriptor 2 then write out a new message to the display. Once the display has been updated read the value back.
- The new message value will be shown on the display Example 1 String Value.
Comments
0 comments
Please sign in to leave a comment.