nRF5 SDK v15.0.0
Experimental: Object Transfer Service Server Application
This example requires one of the following SoftDevices: S132, S140

Important: Before you run this example, make sure to program the SoftDevice.

The Object Transfer Service (OTS) server application is a peripheral role example that implements an Object Transfer Service server. For more information about the Object Transfer service implementation, see Experimental: Object Transfer Service Server.

When the application device connects to a peer, they establish L2CAP channel reserved for OTS. The OTS client will request to write an object. The request is done by writing to the Object Action Control Point (0x2AC5) over GATT. If the write is accepted by the server, the data will be transfered over the L2CAP channel established earlier. An event is triggered on the server-side application when the write is complete.

Note
This application is not power optimized!

Setup

You can find the source code and the project file of the example in the following folder: <InstallFolder>\examples\ble_peripheral\experimental\ble_app_ots

Button assignments: BSP BLE Button Assignments

Testing

Two boards are needed to perform this test:

Start a terminal emulator like PuTTY and connect to the used COM port with the following UART settings:

  1. Compile and program the application on the Server board. Observe that the BSP_INDICATE_ADVERTISING state is indicated.
  2. Verify that the second device is set up as the Client board. Observe that the BSP_INDICATE_CONNECTED state is indicated. The connection will also be confirmed on UART.
  3. Verify that the features of the server are printed on UART of the client application. (Similar to the example UART output).
  4. Observe in the UART output that the L2CAP channel has been established.
  5. Press Button 1 on the Client to transfer an object. On the server application side UART, verify that the object is printed. (01 02 03 04 ... 61 62 63)
  6. Press Button 2 on the Client to read the object that was transferred in the previous step. On the client application side UART, verify that the object is printed. (01 02 03 04 ... 61 62 63)

Documentation feedback | Developer Zone | Subscribe | Updated