u-connectXpress, Bluetooth Low Energy Serial Port Service, protocol spec

Bluetooth Low Energy Serial Port Service

u-connectXpress, Bluetooth Low Energy Serial Port Service ...

UBX-16011192 - R14 C1-Public www.u-blox.com u-connectXpress Bluetooth Low Energy Serial Port Service Protocol specification Abstract This document describes the u-connectXpress Bluetooth Low Energy Serial Port Service, which is

u-connectXpress, Bluetooth Low Energy Serial Port Service, protocol spec

PDF Viewing Options

Not Your Device? Search For Manuals or Datasheets below:


File Info : application/pdf, 15 Pages, 236.63KB

Document DEVICE REPORTu-connectXpress-LowEnergySerialPortService ProtocolSpec UBX-16011192
u-connectXpress
Bluetooth Low Energy Serial Port Service
Protocol specification
Abstract
This document describes the u-connectXpress Bluetooth® Low Energy Serial Port Service, which is a non-standard Bluetooth LE service developed by u-blox to support uses cases previously supported by Serial Port Profile on Bluetooth Classic. The u-connectXpress Bluetooth® Low Energy Serial Port Service specification is open and may be implemented in any Bluetooth Low Energy device to enable generic data transmission. The Serial Port Service is implemented on top of the Generic Attribute Profile (GATT).

UBX-16011192 - R14 C1-Public

www.u-blox.com

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification

Document information

Title

u-connectXpress

Subtitle

Bluetooth Low Energy Serial Port Service

Document type

Protocol specification

Document number

UBX-16011192

Revision and date

R14

29-Nov-2021

Disclosure Restriction C1-Public

This document applies to the following products:

Product series

Software version

ANNA-B1

All

ANNA-B41

All

NINA-B1

All

NINA-B2

All

NINA-B31

All

NINA-B41

All

NINA-W15

All

ODIN-W2

All

u-blox or third parties may hold intellectual property rights in the products, names, logos and designs included in this document. Copying, reproduction, modification or disclosure to third parties of this document or any part thereof is only permitted with the express written permission of u-blox. The information contained herein is provided "as is" and u-blox assumes no liability for its use. No warranty, either express or implied, is given, including but not limited to, with respect to the accuracy, correctness, reliability and fitness for a particular purpose of the information. This document may be revised by u-blox at any time without notice. For the most recent documents, visit www.u-blox.com. Copyright © u-blox AG.

UBX-16011192 - R14 C1-Public

Document information

Page 2 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification
Contents
Document information ............................................................................................................................. 2 Contents ....................................................................................................................................................... 3 1 Overview ................................................................................................................................................ 4 2 GAP connection setup ....................................................................................................................... 6 3 GATT service discovery.....................................................................................................................7 4 Serial port connection ....................................................................................................................... 8
4.1 Serial Port Service ....................................................................................................................................... 8 4.1.1 Serial port FIFO characteristic......................................................................................................... 9 4.1.2 Serial port credits characteristic [Optional] ................................................................................. 9
4.2 Bonding ......................................................................................................................................................... 9 4.3 Sequence diagrams ..................................................................................................................................10
4.3.1 Connection with flow control [Non-bonded] ...............................................................................10 4.3.2 Connection with flow control [Bonded] ........................................................................................11 4.3.3 Connection without flow control [Non-bonded] .........................................................................11 4.3.4 Connection without flow control [Bonded] ..................................................................................12 5 Requirements .................................................................................................................................... 13 5.1 Central .........................................................................................................................................................13 5.2 Peripheral....................................................................................................................................................13 Revision history ....................................................................................................................................... 14 Contact....................................................................................................................................................... 15

UBX-16011192 - R14 C1-Public

Contents

Page 3 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification
1 Overview
Bluetooth® Basic Rate/Enhanced Data Rate (BR/EDR) supports the Serial Port Profile (SPP) that emulates a serial port over air. As Bluetooth Low Energy (LE) does not support this profile there is no standardized way of transferring generic data over the air using this technology. This specification describes the u-connectXpress Low Energy Serial Port Service, which is a nonstandard Bluetooth LE service developed by u-blox to support uses cases previously supported by the Serial Port Profile in Bluetooth Classic. The specification is open and may be implemented in any Bluetooth Low Energy device to enable generic data transmission to and from a u-blox modules running u-connectXpress software.
 If u-connectXpress software is running on both your central and peripheral device there is no need
for you to go into the details of this specification since the Serial Port Service is implemented in the u-connectXpress software.
Serial Port Service is implemented on top of the Generic Attribute Profile (GATT). It contains the following characteristics:
· FIFO for reading and writing data · Credits to simulate the Bluetooth BR/EDR credit-based flow control To connect, the central/client side sets up the ACL (Asynchronous Connection-Less) link and enables indications for both the FIFO and credits characteristics. The server side sends the number of credits to the client using the credit indication, and the client writes the number of credits to the server. The credits correspond to the number of packets the remote side may write before receiving new credits. Received credits are added to the remaining ones (if any). Once connected and credits have been received, data transmission may start. The client writes to the FIFO and the server sends indications or notifications with the FIFO data. Connections without credits are also supported. Connections without credits are faster to establish and ideal for scenarios where a small amount of data shall be transferred.
 This mode does not support flow control and the receiver side has no mean to stop the data flow.
This means the data may get lost if the receiver side cannot handle all the received data.

UBX-16011192 - R14 C1-Public

Overview

Page 4 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification
Figure 1: SPS connection setup

UBX-16011192 - R14 C1-Public

Overview

Page 5 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification
2 GAP connection setup
In most cases, the GAP connection is set up when the peripheral makes a standard advertisement and the central detects the advertisement and identifies the peripheral as the device it wants to connect to. Typically, the central is a smart phone making a scan, and when it finds the correct remote device, it sets up the connection.

Figure 2: GAP connection setup
However, in some cases, it may be preferred that the peripheral knows to what central it wants to have a connection. In that case, the peripheral makes a directed advertisement and when the central detects the advertisement, directed to itself, it must set up the connection.

Figure 3: Directed GAP connection setup
If possible, it may be a good idea that the remaining connection setup is done with a short connection interval. There are a few packets that must be transmitted for a complete serial port connection setup and a shorter connection interval decreases the total connect time. Once complete, the connection interval can be changed to a more appropriate one.

UBX-16011192 - R14 C1-Public

GAP connection setup

Page 6 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification
3 GATT service discovery
Before a central makes a connection setup, it must find all relevant attribute handles. This can be done in several ways and there is no preferred way to do so as long as all the required handles are obtained. Caching is recommended to keep the total connection setup time as low as possible for future connections.

UBX-16011192 - R14 C1-Public

GATT service discovery

Page 7 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification
4 Serial port connection
The peripheral contains a Serial Port Service with FIFO and credits characteristics.
The FIFO characteristics are used for writing data from the central to the peripheral and to "notify/indicate" data from the peripheral to the central.
The credit characteristics simulate the Bluetooth BR/EDR credit-based flow control. It is allowed only to transmit the number of packets over air that matches the received number of credits. Received credits are added to the remaining ones. The receiving side must always keep available buffers that matches with the number of outgoing credits. The benefit of the credit-based flow control is that no data will be lost.
The credits characteristic is optional and an implementation may choose not to support it. This means Serial Port connection without the use of credits can be established. At connection establishment, the client may also choose not to use the credits even though it is supported by the server.
A connection that uses credits is hereafter referred to as a credit-based connection or connection with flow control.
A connection that does not use credits is hereafter referred to as a connection without credits or without flow control.
A connection without flow control is faster to set up and is ideal for transfers of smaller amount of data. Especially in scenarios, where cached attribute handles and client configuration state can be used, application data can be transferred immediately after the ACL link has been established without doing any service search or writing client configuration characteristics.
There is a well-defined serial port connection setup. It involves enabling notification and indications, and exchanging credits.
To avoid an undefined state, the transitions between credit-based connection and connection without credits cannot be swapped during an ongoing ACL connection.
4.1 Serial Port Service

Figure 4: Characteristics of Serial Port Service
UUID: 0x2456e1b926e28f83e744f34f01e9d701 This Serial Port Service holds the following two characteristics:
· One serial support for sending and receiving data (FIFO) on, and · Another for sending and receiving credits

UBX-16011192 - R14 C1-Public

Serial port connection

Page 8 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification
4.1.1 Serial port FIFO characteristic
The FIFO characteristic contains two attributes ­ value and client configuration.
4.1.1.1 Value
UUID: 0x2456e1b926e28f83e744f34f01e9d703 Type: uint8 array (20 bytes = min MTU - opcode_size - handle_size) Properties: Indication/notification/write/write no response The FIFO characteristic represents the data to be sent to the external interface, for example, UART. All data that is received on this characteristic should be placed in an internal FIFO or directly put on the external interface. When data is received on the external interface, the data should be put in the internal FIFO.
4.1.1.2 Client configuration
Properties: write The client configuration must be enabled for either notifications or indications before receiving the data. The client configuration should be stored for bonded devices.
4.1.2 Serial port credits characteristic [Optional]
The credits characteristic contains two attributes ­ value and client configuration.
4.1.2.1 Value
UUID: 0x2456e1b926e28f83e744f34f01e9d704 Type: int8 (one byte) Properties: Indication/notification/write/write no response The credits characteristic is optional. The credits characteristic is used to send and receive credits. For a credit-based connection, credits must have been received before sending data on the FIFO. Both client (via writing) and server (via indication/notifications) must send it. A connection with flow control is established by the central sending credits to the peripheral. The peripheral accepts the connection by sending credits to the central. It may reject the connection by responding with credits data with value -1 (0xFF) to the central. A connection with flow control is disconnected by writing credits data with value -1 (0xFF). The disconnect is not confirmed. For a connection without flow control, the credits characteristic is not used.
4.1.2.2 Client configuration
Properties: write The client configuration must be enabled for either notifications or indications before receiving the credits. The client configuration should be stored for bonded devices.
4.2 Bonding
For bonded devices, the state of the client configuration characteristic shall be stored. This means that the procedure to set up a connection is little different for bonded and non-bonded devices. If a device is bonded, then the client configuration characteristics do not have to be written before transferring credits or data.

UBX-16011192 - R14 C1-Public

Serial port connection

Page 9 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification
4.3 Sequence diagrams
4.3.1 Connection with flow control [Non-bonded]

Figure 5: Connection with flow control (non-bonded)
 The "notify credits value" should not be sent before setting or enabling FIFO client configuration.

UBX-16011192 - R14 C1-Public

Serial port connection

Page 10 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification
4.3.2 Connection with flow control [Bonded]
Figure 6: Connection with flow control (bonded)
4.3.3 Connection without flow control [Non-bonded]

Figure 7: Connection without flow control (non-bonded)

UBX-16011192 - R14 C1-Public

Serial port connection

Page 11 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification
4.3.4 Connection without flow control [Bonded]
Figure 8: Connection without flow control (bonded)
Since the state of the credits client configuration is stored on the peripheral and central, both the devices are aware of when the credit-based flow control is being used. When no credits are used, the entire ACL link must be teared down to disconnect the SPS link. To avoid an undefined state, the transitions between credit-based connection and connection without credits cannot be swapped during an ongoing ACL connection.

UBX-16011192 - R14 C1-Public

Serial port connection

Page 12 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification

5 Requirements
M = Mandatory O = Optional

C1 = Either notification, indications or both shall be supported

5.1 Central

Feature FIFO characteristic write

Support M

FIFO characteristic write no response

M

Credits characteristic write

M

Credits characteristic write no response M

5.2 Peripheral

Feature FIFO characteristic indication

Support C1

FIFO characteristic notification

C1

Credits characteristic indication

C1

Credits characteristic notification

C1

UBX-16011192 - R14 C1-Public

Requirements

Page 13 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification

Revision history

Revision R01 R02
R03
R04 R05 R06 R07 R08 R09 R10 R11 R12
R13 R14

Date 7-Jul-2016 19-Jan-2017

Name
pber mtho, mlju, kgom

30-Mar-2017 kgom

16-May-2017 3-Jul-2017 28-Nov-2017 27-Mar-2018 17-Apr-2018 12-Sep-2018 13-Feb-2019 28-Jun-2019 04-Feb-2021

kgom kgom hwin kgom kgom kgom kgom kgom flun, mhan

18-Feb-2021 29-Nov-2021

mhan hisa

Comments
Initial release. Minor change in section 4. On page 2, replaced Document status with Disclosure restriction and included type numbers for the new software versions of NINA-B1 and ODIN-W2. On page 2, replaced type numbers and firmware version with All to denote support for all type numbers and firmware versions of NINA-B1 and ODINW2. Minor updates. Replaced firmware with software. Minor changes in section 4 and 4.3.4. Included support for ANNA-B112. Included support for NINA-B2. Included support for NINA-B31. Included support for NINA-B316. Included support for NINA-W15. Included support for NINA-W156, NINA-B41 and ODIN-W263. Renamed document and simplified applicable products table on page 2. Minor change in section 1. Removed NINA-W13 from applicable products table on page 2. Included support for ANNA-B412

UBX-16011192 - R14 C1-Public

Revision history

Page 14 of 15

u-connectXpress Bluetooth Low Energy Serial Port Service - Protocol specification

Contact

For complete contact information, visit us at www.u-blox.com.
u-blox Offices

North, Central and South America
u-blox America, Inc. Phone: +1 703 483 3180 E-mail: [email protected]
Regional Office West Coast: Phone: +1 408 573 3640 E-mail: [email protected]
Technical Support: Phone: +1 703 483 3185 E-mail: [email protected]

Headquarters Europe, Middle East, Africa
u-blox AG
Phone: +41 44 722 74 44 E-mail: [email protected] Support: [email protected]

Asia, Australia, Pacific
u-blox Singapore Pte. Ltd. Phone: +65 6734 3811 E-mail: [email protected] Support: [email protected]
Regional Office Australia: Phone: +61 3 9566 7255 E-mail: [email protected] Support: [email protected]
Regional Office China (Beijing): Phone: +86 10 68 133 545 E-mail: [email protected] Support: [email protected]
Regional Office China (Chongqing): Phone: +86 23 6815 1588 E-mail: [email protected] Support: [email protected]
Regional Office China (Shanghai): Phone: +86 21 6090 4832 E-mail: [email protected] Support: [email protected]
Regional Office China (Shenzhen): Phone: +86 755 8627 1083 E-mail: [email protected] Support: [email protected]
Regional Office India: Phone: +91 80 405 092 00 E-mail: [email protected] Support: [email protected]
Regional Office Japan (Osaka): Phone: +81 6 6941 3660 E-mail: [email protected] Support: [email protected]
Regional Office Japan (Tokyo): Phone: +81 3 5775 3850 E-mail: [email protected] Support: [email protected]
Regional Office Korea: Phone: +82 2 542 0861 E-mail: [email protected] Support: [email protected]
Regional Office Taiwan: Phone: +886 2 2657 1090 E-mail: [email protected] Support: [email protected]

UBX-16011192 - R14 C1-Public

Contact

Page 15 of 15



References

Microsoft Word for Microsoft 365

Search Any Device: