u-blox Low Energy Serial Port Service

Similar documents
u-blox Extended Data Mode

ODIN-W2 series. Bluetooth and Wi-Fi Coexistence. Application Note

u-blox GNSS Sensor Device Driver v2.33

u-blox VCP Device Driver v3.10

u-blox GNSS Sensor Device Driver v2.40

Blueprint B204. NINA-B1 USB dongle. Application Note

s-center Evaluation Software for short range modules User Guide Abstract

EVK-W262U. Evaluation kit for ODIN-W2 series. User Guide. Abstract

Windows Drivers. u-blox GNSS drivers for Microsoft Windows systems. Application Note

GNSS evaluation software for Windows

EVK-NINA-W13. Evaluation Kit for NINA-W13 modules. User Guide. Abstract

NINA-W13 series. Stand-alone Wi-Fi modules. Getting Started. Abstract

NINA-B2. Stand-alone Bluetooth dual-mode module. Getting Started

u-center v19.01 GNSS evaluation software for Windows Release Note

EVK-NINA-B2. Evaluation Kit for NINA-B2 modules. User Guide

u-center v19.02 GNSS evaluation software for Windows Release Note

Blueprint B203. Mini PCI Express card for JODY-W1. Application Note. Abstract

NINA-B31 series. Stand-alone Bluetooth 5 low energy modules. Getting Started

EVK-NINA-W10. Evaluation Kit for NINA-W10 modules. User Guide. Abstract

ODIN-W2 series. Stand-alone multiradio modules with Wi-Fi & Bluetooth. Getting Started. Abstract

EVK-N2. SARA-N2 series Cellular Evaluation Kits. User Guide. Abstract

EVK-ODIN-W2. Evaluation Kit for ODIN-W2 Arm Mbed. User Guide. Abstract

Evaluation kits for JODY-W1 host-based multiradio modules

GNSS evaluation software for Windows

u-connectscript with NINA-B3 series

Application Note. Power Management Considerations with u-blox 5 designs. Application note. your position is our focus

EVK-R4. SARA-R4 series Cellular Evaluation Kits. User Guide. Abstract

u-center v8.16 Public release notes

C099-F9P. Application Board (Rev. B) User Guide. Abstract

C099-F9P. Application Board (Rev. B) User Guide. Abstract

Application Note. your position is our focus. Topic: Migration from ANTARIS 4 to u-blox5 modules. Author: SV Date: 18/04/08

Android GNSS driver v3.10

SARA-U2 series EVK. Cellular evaluation kit. User Guide. Abstract

EVK-R2. TOBY-R2 and LARA-R2 series Cellular Evaluation Kits. User Guide. Abstract

MPCI-L100. LTE Mini PCIe module. Data Sheet. Abstract

ENVIRONMENTAL SENSING PROFILE

u-center v8.21 Public release notes

EVK-G31, EVK-G35. SARA-G310, SARA-G350 GSM/GPRS Cellular evaluation kit. User Guide. Abstract

u-center v8.23 Release notes

Terminal I/O Profile Client Implementation Guide

SARA-N2. Power-optimized NB-IoT (LTE Cat NB1) modules. Data Sheet. Abstract

Terminal I/O Profile. Client Implementation Guide. Release r02

u-center v8.24 Release notes

Link-OS Environment Bluetooth Low Energy AppNote October 4, 2014

Tap BLE API Documentation

PCI-5S and PCM-5S u-blox 5 GPS Modules

EVK-U20, EVK-U23. LISA-U200, LISA-U230 HSPA+/UMTS/EGPRS/GSM Cellular evaluation kit. User Guide. Abstract

u-center v8.26 Release notes

nrf Connect Bluetooth low energy

S1V3G340 External SPI-Flash Select Guide

RUNNING SPEED AND CADENCE SERVICE

u-center v8.28 Release notes

AN2261 APPLICATION NOTE

Reconnection Configuration Service

u-center v8.29 Release notes

14th Edition. Global Macrocell Radio Transceiver (TRx) Unit Market Analysis and Forecast, April 2018

EVK-ELLA-W1. Evaluation kit for ELLA-W1 host-based multiradio modules with Wi-Fi and Bluetooth. User Guide

INTERNAL USE ONLY (Set it to white if you do not need it)

MD-N32 Serial to Ethernet Gateway Installation and Operating Guide

PM Sync User Manual 31 July 2012

Installation guide. Océ Touchstone Extensions for Windows

BLE Command Line Interface Document

BLUETOOTH SMART READY SOFTWARE

IATF Stakeholder Conference

KST3300 Firmware Specification

INTERNAL USE ONLY (Set it to white if you do not need it)

BlueCore. Operation of Bluetooth v2.1 Devices. Application Note. Issue 7

QPP Proprietary Profile Guide

UM0792 User manual. Demonstration firmware for the DMX-512 communication protocol transmitter based on the STM32F103Zx.

Installation guide. Océ Touchstone Extensions for Mac OS X

Inside Bluetooth Low Energy

S1C17 Family Port Nested Interrupt Application Notes

u-center v18.05 Release note

S1C17 Family EEPROM Emulation Library Manual

Hardware Decisions for Embedded Systems Design in Asia/Pacific

GE A Acoustic Belt Tension Tester. User s Operation Manual

MPC5200(b) ATA MDMA, UDMA Functionality BestComm Setup Recommendations

SimpleLink Bluetooth Low Energy CC2640 Wireless MCU. Simple Network Processor API Guide For BLE-Stack Version: 2.1.0

Partner Guidelines to sign Agreement. May, 2017

Computer

S1V30080 Series I2C Interface Sample Program Specifications

AN4113 Application note

PLX35-NB2 RELEASE NOTES. Network Bridge Stand Alone Gateway. July 20, 2018

Bourns Slide Potentiometers. Short Form Brochure

ScholarOne Manuscripts. Reviewer User Guide

AN2672 Application note

GNU17V3 Setup Guide. Rev.2.0

Release Notes for the BayStack 10 Power Supply Unit

10th Edition. Global Base Station Market Analysis and Forecast, March 2014

Power Analyzer Firmware Update Utility Version Software Release Notes

U85026A Detector 40 to 60 GHz

S1C17 Family Application Library S1C17 Series Steps Calculation Library

S1C17 Family Application Note S1C17 Series Boot Loader Sample Software

User guide - VIM plus AOG & RG - V1. New VIM plus AOG & RG. User guide

STEVAL-SPBT4ATV3. USB dongle for the Bluetooth class 1 SPBT2632C1A.AT2 module. Features. Description

Supplier Responding to New Products RFP Event

Quick Installation Guide Hitachi Travelstar 5K1000

S1C31 Family PA File Creation Tool Manual

Nokia Intellisync Mobile Suite Client Guide. S60 Platform, 3rd Edition

Programming Note. Agilent Technologies Quick Reference Guide For the 8757D/E Scalar Network Analyzer

Transcription:

u-blox Low Energy Serial Port Service Protocol Specification Abstract This document describes the u-blox Low Energy Serial Port Service, which is a non-standard profile developed for the u-blox serial port adapter concept. The 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). www.u-blox.com

Document Information Title u-blox Low Energy Serial Port Service Subtitle Document type Protocol Specification Document number UBX- 16011192 Revision, date R06 28-Nov-2017 Disclosure restriction This document applies to the following products: Product name Type number Software versions PCN reference NINA-B111 All All N/A NINA-B112 All All N/A ODIN-W260 All All N/A ODIN-W262 All All N/A u-blox reserves all rights to this document and the information contained herein. Products, names, logos and designs described herein may in whole or in part be subject to intellectual property rights. Reproduction, use, modification or disclosure to third parties of this document or any part thereof without the express permission of u-blox is strictly prohibited. The information contained herein is provided as is and u-blox assumes no liability for the use of the information. No warranty, either express or implied, is given, including but not limited, 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. For most recent documents, please visit www.u-blox.com. Copyright 2017, u-blox AG u-blox is a registered trademark of u-blox Holding AG in the EU and other countries. Page 2 of 14

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

1 Overview In Bluetooth Basic Rate/Enhanced Data Rate (BR/EDR), there is a serial port profile (SPP) that emulates a serial port over air. For Bluetooth Low Energy, there is no such profile and thereby no standardized way of transferring generic data over the air. This specification describes the u-blox Low Energy Serial Port Service, which is a non-standard profile developed for the u-blox serial port adapter concept. The 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). 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. Figure 1: SPS connection setup Overview Page 4 of 14

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. GAP connection setup Page 5 of 14

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. GATT Service discovery Page 6 of 14

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 credits 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 for sending and receiving data (FIFO) on and Another for sending and receiving credits 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) Serial port connection Page 7 of 14

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 creditbased 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. Serial port connection Page 8 of 14

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. Serial port connection Page 9 of 14

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) Serial port connection Page 10 of 14

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. Serial port connection Page 11 of 14

5 Requirements M = Mandatory O = Optional C1 = Either notification, indications or both shall be supported 5.1 Central Feature Support FIFO characteristic write M FIFO characteristic write no response M Credits characteristic write M Credits characteristic write no response M 5.2 Peripheral Feature FIFO characteristic indication FIFO characteristic notification Credits characteristic indication Credits characteristic notification Support C1 C1 C1 C1 Requirements Page 12 of 14

Revision history Revision Date Name Comments R01 7-Jul-2016 pber Initial release. R02 19-Jan-2017 mtho, mlju, kgom 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. R03 R04 30-Mar- 2017 16-May- 2017 kgom kgom 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 ODIN-W2. Minor updates. R05 3-Jul-2017 kgom Replaced firmware with software. R06 28-Nov-2017 hwin Minor changes in section 4 and 4.3.4. Revision history Page 13 of 14

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: info_us@u-blox.com Regional Office West Coast: Phone: +1 408 573 3640 E-mail: info_us@u-blox.com Technical Support: Phone: +1 703 483 3185 E-mail: support_us@u-blox.com Headquarters Europe, Middle East, Africa u-blox AG Phone: +41 44 722 74 44 E-mail: info@u-blox.com Support: support@u-blox.com Asia, Australia, Pacific u-blox Singapore Pte. Ltd. Phone: +65 6734 3811 E-mail: info_ap@u-blox.com Support: support_ap@u-blox.com Regional Office Australia: Phone: +61 2 8448 2016 E-mail: info_anz@u-blox.com Support: support_ap@u-blox.com Regional Office China (Beijing): Phone: +86 10 68 133 545 E-mail: info_cn@u-blox.com Support: support_cn@u-blox.com Regional Office China (Chongqing): Phone: +86 23 6815 1588 E-mail: info_cn@u-blox.com Support: support_cn@u-blox.com Regional Office China (Shanghai): Phone: +86 21 6090 4832 E-mail: info_cn@u-blox.com Support: support_cn@u-blox.com Regional Office China (Shenzhen): Phone: +86 755 8627 1083 E-mail: info_cn@u-blox.com Support: support_cn@u-blox.com Regional Office India: Phone: +91 80 4050 9200 E-mail: info_in@u-blox.com Support: support_in@u-blox.com Regional Office Japan (Osaka): Phone: +81 6 6941 3660 E-mail: info_jp@u-blox.com Support: support_jp@u-blox.com Regional Office Japan (Tokyo): Phone: +81 3 5775 3850 E-mail: info_jp@u-blox.com Support: support_jp@u-blox.com Regional Office Korea: Phone: +82 2 542 0861 E-mail: info_kr@u-blox.com Support: support_kr@u-blox.com Regional Office Taiwan: Phone: +886 2 2657 1090 E-mail: info_tw@u-blox.com Support: support_tw@u-blox.com Contact Page 14 of 14