Central OTC

Browse source code on GitHub

Overview

Similar to the Central sample, except that this application specifically looks for the OTS (Object Transfer) GATT Service. And this sample is to select object sequentially, to read metadata, to write data, to read data, and to calculate checksum of selected objects.

Requirements

  • A board with Bluetooth LE support and 4 buttons.

Building and Running

Build and flash the sample as follows, replacing <board> with your target board:

west build -b <board> samples/bluetooth/central_otc
west flash

After flashing, the sample scans for a peripheral advertising the Object Transfer Service (OTS) and connects to it. Use the Peripheral Object Transfer Service (OTS) sample on a second board as the peripheral. Once connected, use the four buttons to interact with objects:

  • Button 1 (SW0): selects the first available object on the first press, advances to the next object on subsequent presses

  • Button 2 (SW1): reads object metadata

  • Button 3 (SW2): writes object data

  • Button 4 (SW3): reads object data

See also

Bluetooth APIs