Network Processor GATT

Similar documents
Bluetooth Low Energy CC2540 Mini Development Kit User s Guide

Bluetooth Low Energy CC2540/41 Mini Development Kit User s Guide

Bluetooth Low Energy CC2540 Development Kit CC2541 Evaluation Module Kit User s Guide

TI BLE Vendor Specific HCI Reference Guide. Version 2.1.0

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

Texas Instruments Tech Day Bluetooth Low Energy CC2540. ANT+ CC2570 and CC2571

Wireless Sensor Networks BLUETOOTH LOW ENERGY. Flavia Martelli

Tap BLE API Documentation

Bluetooth Low Energy (BLE) Transparent Transmission Controller Programming User Guide BC7601/BC7602/BC32F7611

INGICS. ibs01 Payload Format. Jul, 2016 rev. 3

SimpleLink Bluetooth low energy CC26X0 Wireless MCU. Over-the-Air Download User s Guide. For BLE-Stack Version: 2.2.2

BT2540 Bluetooth 4.0 BLE (CC2540) Module Users Manual

Texas Instruments CC2540/41 Bluetooth Low Energy Software Developer s Guide v1.3.2

+ (5~27 VDC) GND. Bluetooth V4.2 BLE RS-422/485 Serial Adapter. Model: BLE-485C. 1. Package content: BLE RS-422/485 adapter

Network Processor Interface User s Guide

TI SimpleLink dual-band CC1350 wireless MCU

SimpleLink Bluetooth low energy CC2640 wireless MCU. Over-the-Air Download User s Guide

Bluetooth 4.0 Development Board (B-DB001 Base Board with B-001 core module)

+ (5~27 VDC) GND. Bluetooth V4.1 BLE RS-232 Serial Adapter. Model: BLE-232B. 1. Package content: BLE RS-232 adapter

+ (5~27 VDC) GND. Bluetooth V4.2 BLE RS-232 Serial Adapter. Model: BLE-232D-E. 1. Package content: BLE RS-232 adapter

Serial Bluetooth Smart Adapter - RS232, Low Energy 4.2 BLE Datasheet and Quick Reference for USBLE232DEXA

BLE Command Line Interface Document

PM0257. BlueNRG-1, BlueNRG-2 BLE stack v2.x programming guidelines. Programming manual. Introduction

Zigbee Module User Guide

HOST CONTROLLER INTERFACE FUNCTIONAL SPECIFICATION

s132_nrf52 release notes

Energy Efficient Mobile Compu4ng Building low power sensing devices with Bluetooth low energy. Simo Veikkolainen Nokia May 2014

Multi-link support for up to four simultaneous connections in any combination of roles

Figure 26 CC Debugger Interface

Bluetooth V4.1 BLE RS-232 Serial Adapter Model: BLE-232B Bluetooth V4.2 BLE RS-232 Serial Adapter Model: BLE-232C

FEXL7105_BACI_Manual-01. Bluetooth Application Controller Interface (BACI) Command Manual

SwitchLinc 2-Wire Dimmer (RF Only) (2474DWH - Dev 0x01 / Sub 0x24)

DRF1605H Zigbee Module 1.6km Transfer CC2530 Wireless Module UART to Zigbee

Serial Bluetooth Smart Adapter - RS232, Low Energy 4.1 BLE Datasheet and Quick Reference for BLE232V2

Bluegiga Bluetooth Smart Software v.1.3 5/28/2014 1

Bluetooth LE 4.0 and 4.1 (BLE)

QPP Proprietary Profile Guide

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

Click to edit Master title style Buzzing Smart Devices

IoT Deep DIve #3. Advanced BLE - Custom GAP/GATT

PAN172x Design Guide

SLCD Technical Note TN-100. Programming the SLCD bitmap / macro flash memory in an embedded system

KST3300 Firmware Specification

Micro Module Shutter. Micro Module Shutter

DL-LN3X Series 2.4G Ad-hoc Network Wireless Communication Module

深圳市鼎泰克电子有限公司. Zigbee Module User Guide. Shenzhen DTK Electronics Co., Ltd V5.7. Shenzhen DTK Electronics CO., LTD. Zigbee Module User Guide DRF Series

kcenergy User Guide Introduction Hardware

BLUEGIGA BLUETOOTH SMART SOFTWARE

nblue TM BR-MUSB-LE4.0-S2A (CC2540)

kcenergy User Guide DRAFT EDITION Introduction Serial Data Communications Hardware Supported Bluetooth Profiles

BLE121LR Bluetooth Smart Long Range Module 5/12/2014 1

Data sheet Wireless UART firmware version 4

Bluetooth low energy technology Bluegiga Technologies

Introduction to Bluetooth Low Energy

Embit Binary Interface - IEEE Specific Documentation. embit s.r.l.

The BlueNRG-1, BlueNRG-2 BLE OTA (over-the-air) firmware upgrade

Developer Notes INSTEON Thermostat v012. Developer Notes. INSTEON Thermostat. Revision History

EH-MC-10. Command Interface User Guide. Ver 1.3

1 Firmware Description

Tutorial 1: C-Language

Venstar Thermostat Adapter

nrf Connect Bluetooth low energy

INSTEON Hidden Door Sensor

u-blox Low Energy Serial Port Service

UART HCI Bluetooth Module for Linux BT860

Panasonic PAN1026 Toshiba TC35661

When is Bluetooth not Bluetooth?

Accumulator and memory instructions 1. Loads, stores, and transfers 2. Arithmetic operations 3. Multiply and divide 4. Logical operations 5. Data test

QSG139: Getting Started with Bluetooth Software Development

How to test the USBLE232D and USBLE232DEXA Serial Bluetooth Smart Low Energy Adapter

Serial Bluetooth Smart Adapter - RS232, Low Energy 4.2 BLE Datasheet and Quick Reference for USBLE232C

Product Anomaly Notification (PAN)

CISS Communication Protocol Bluetooth LE

Internet of Things Bill Siever. New Applications. Needs. Wearables. Embedded Smarts. Simple to Setup. Networking w/ Long Battery Life (Low Power)

NimBLE - portable Bluetooth stack from Apache Mynewt

AN4869 Application note

FN-BC04 MP3 Sound Module with 10W Amplifier. User s Manual

Application Note v1.2

LMU Bluetooth Chipset Application Note

Application Note 2871 Step-by-Step Configuration for Configuration Mode (DS31256)

PAN1326C Bluetooth. Design Guide. Wireless Modules. Basic Data Rate and Low Energy Module. Rev. 1.0

AN980: BLUETOOTH SMART SDK

KT403A Datasheet(Part)

Version: C Issued Date: 2018/11/08. User Guide ( 簡易使用手冊 ) Demo Board for MDBT42Q-AT / PAT. 韌體版本 (FW Revision): 1.3

Reconnection Configuration Service

Application Note AN045

Bluetooth Low Energy Protocol Stack

BLUEGIGA BLUETOOTH SMART SOFTWARE

The local bus can operate in two modes in DS31256:

ART Demo Application for Mobile Phones

Bluetooth Low Energy Protocol Stack

Developer Notes for KeypadLinc Line

STSW-BNRGUI. BlueNRG GUI SW package. Data brief. Features. Description

BLE232: Manual Copyright 2014 taskit GmbH

Page 1 of 6. nblue BR-XB-LE4.0-D2A Summary Datasheet Copyright BlueRadios, Inc.

Understanding Bluetooth Low Energy. Hary Radakichenane RF Marketing Manager Raffaele Riva RF Application Manager

Application Note of IS1678S Bluetooth Controller. ISSC Technologies Corp.

CMS-8GP32. A Motorola MC68HC908GP32 Microcontroller Board. xiom anufacturing

Bidirectional wireless communication between IBM Cloud and Bluetooth Low Energy peripherals through SimpleLink Wi-Fi

Transcription:

TEXAS INSTRUMENTS INCORPORATED Network Processor GATT How to setup GATT DB OFF CHIP on CC254X Greg Stewart 7/29/2012 This document describes how to setup a Network Processor implementation with the CC2540X where the GATT database is stored off chip. This requires the external CPU to process read and write request of the GATT database server entries.

Contents 1 Overview... 3 1.1 Network Processor GATT DATABASE OFF CHIP... 3 2 Setup... 3 2.1 Network Processor... 3 2.1.1 This guide used a SmartRF board with 2540 module running HostTestRelease. Compile HostTestRelease... 3 2.1.2 Preprocessor Options... 3 2.2 External MCU... 4 2.3 Master/Phone... 4 3 Setup GATT Table on Network Processor... 4 3.1 Send_GATT_AddService 0x2800, 3... 5 3.2 Send_GATT_AddAttribute "03:28", 0x03... 5 4 Verify GATT Table... 5 5 Advertise and Connect... 7 6 MCU Handle Request... 7

1 Overview 1.1 Network Processor GATT DATABASE OFF CHIP This document describes how to setup a Network Processor implementation with the CC2540X where the GATT database is stored off chip. This requires the external CPU to process read and write request of the GATT database server entries. Master (phone) RF Peripheral (CC254x) Network Processor UART/SPI External MCU (MSP430) 2 Setup 2.1 Network Processor 2.1.1 This guide used a SmartRF board with 2540 module running HostTestRelease. Compile HostTestRelease The hosttestrelease project is used when the CC254X is used as a network processor. This project default directory is C:\Texas Instruments\BLE-CC254x-1.2.1\Projects\ble\HostTestApp\CC254x\HostTestRelease.eww 2.1.2 Preprocessor Options To allow the MCU to receive all the GATT reads/request, it is necessary to build the application with the GATT_DB_OFF_CHIP preprocessor command.

2.2 External MCU The PC Tool HCITester.exe communicating with the SmartRF board over a UART simulates the external MCU. Please see wiki guide on setting up and running HCITester.exe. 2.3 Master/Phone The phone is simulated using Btool and a CC2540USB Dongle. 3 Setup GATT Table on Network Processor The following script is an example of GATT Table setup on the NP. This will let the NP lower layers know that there are valid attributes. Without these entries, the NP would reject any read or write request

from another BLE device. One the attributes are setup, any valid read/write request(depending on permission setup) will be forwarded to the external MCU. #initialize as peripheral Send_GAP_DeviceInit 0x04, 3, 0, 0, 1 ################################ # Generic Service ################################ #01- Add Primary Service Send_GATT_AddService 0x2800, 3 #02 Add Characteristic Declaration Send_GATT_AddAttribute "03:28", 0x03 #03 DeviceName Send_GATT_AddAttribute "00:2A", 0x03 sleep 100 ################################# # Simple BLE Service ################################# #04- Add Primary Service Send_GATT_AddService 0x2800, 4 #05 Add Characteristic Declaration - SimpleBleChar1 Send_GATT_AddAttribute "03:28", 0x03 #06 - Char 1 Value Send_GATT_AddAttribute "F1:FF", 0x03 #07 - Char1 Description Send_GATT_AddAttribute "01:29", 0x03 sleep 100 Send_ATT_FindInfoReq 0xfffe, 0x0001, 0xFFFF 3.1 Send_GATT_AddService 0x2800, 3 This command tells the NP to add a primary service and reserve space for 3 attributes ( counting itself as one). In the script above, these attributes will be a Characteristic Declaration fro Device Name and the Device Name Value attribute. 3.2 Send_GATT_AddAttribute "03:28", 0x03 This command tells the NP to add a Characteristic Declaration. The permissions are set here. Note, the value is not set, and as with attributes on a NP, any value read write request must be handled by external mcu. 4 Verify GATT Table One way to easily verify the GATT table setup is to use the ATT_FIND_INFO_REQ with the connection handle set to the loopback handle (0xFFFE).

09:00:49.453 Packet "ATT_FindInfoReq", Opcode 0xfd04 09:00:49.453 Parameters: 09:00:49.453 connectionhandle : 0xfffe 09:00:49.453 starthandle : 0x0001 09:00:49.453 endhandle : 0xFFFF 09:00:49.453 -- 09:00:49.453 Outgoing Dump: 09:00:49.453 0000: 01 04 fd 06 fe ff 01 00 ff ff... 09:00:49.468 Incoming Dump: 09:00:49.468 0000: 04 ff 06 7f 06 00 04 fd 00... 09:00:49.484 -- 09:00:49.484 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff 09:00:49.500 Parameters: 09:00:49.500 Event Opcode : 0x067f (CommandStatus) 09:00:49.500 Status : 0x00 (SUCCESS) 09:00:49.500 opcode : 0xfd04 (ATT_FindInfoReq) 09:00:49.500 datalen : 0x00 09:00:49.500 -- 09:00:49.500 Incoming Dump: 09:00:49.500 0000: 04 ff 1b... 09:00:49.500 Incoming Dump: 09:00:49.500 0000: 05 05 00 fe ff 15 01 01 00 00 28 02 00 03 28 03...(...(. 09:00:49.500 0010: 00 00 2a 04 00 00 28 05 00 03 28..*...(...( 09:00:49.515 -- 09:00:49.515 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff 09:00:49.531 Parameters: 09:00:49.531 Event Opcode : 0x0505 (ATT_FindInfoRsp) 09:00:49.531 Status : 0x00 (SUCCESS) 09:00:49.531 connectionhandle : 0xfffe 09:00:49.531 pdulen : 0x15 09:00:49.531 format : 0x01 (HANDLE_BT_UUID_TYPE - handle(s) and 16-bit Bluetooth UUID(s)) 09:00:49.531 handle : 0x0001 09:00:49.531 uuid : "00:28" 09:00:49.531 handle : 0x0002 09:00:49.531 uuid : "03:28" 09:00:49.531 handle : 0x0003 09:00:49.531 uuid : "00:2A" 09:00:49.531 handle : 0x0004 09:00:49.531 uuid : "00:28" 09:00:49.531 handle : 0x0005 09:00:49.531 uuid : "03:28" 09:00:49.531 -- 09:00:49.531 Incoming Dump: 09:00:49.531 0000: 04 ff 0f 05 05 00 fe ff 09 01 06 00 f1 ff 07 00... 09:00:49.531 0010: 01 29.) 09:00:49.546 -- 09:00:49.546 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff 09:00:49.546 Parameters: 09:00:49.546 Event Opcode : 0x0505 (ATT_FindInfoRsp) 09:00:49.546 Status : 0x00 (SUCCESS) 09:00:49.546 connectionhandle : 0xfffe 09:00:49.546 pdulen : 0x09 09:00:49.546 format : 0x01 (HANDLE_BT_UUID_TYPE - handle(s) and 16-bit Bluetooth UUID(s)) 09:00:49.546 handle : 0x0006 09:00:49.546 uuid : "F1:FF" 09:00:49.546 handle : 0x0007 09:00:49.546 uuid : "01:29" 09:00:49.546 -- 09:00:49.562 Incoming Dump: 09:00:49.562 0000: 04 ff 06 05 05 1a fe ff 00... 09:00:49.562 -- 09:00:49.562 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff 09:00:49.578 Parameters:

09:00:49.578 Event Opcode : 0x0505 (ATT_FindInfoRsp) 09:00:49.578 Status : 0x1a (bleprocedurecomplete) 09:00:49.578 connectionhandle : 0xfffe 09:00:49.578 pdulen : 0x00 09:00:49.578 -- 5 Advertise and Connect Use the following script to put the NP in discoverable mode. #Update advertising data Send_GAP_UpdateAdvertisingData 1, "02:01:04:05:05:05:07:07" #Update scan respon Send_GAP_UpdateAdvertisingData 0x00, "02:01:04:05:02:02:02:02" sleep 100 #Make discoverable: GAP_ADTYPE_ADV_IND Send_GAP_MakeDiscoverable 0x00, 0, 0, 0x07, 0x00 From BTool, initiate a connection. 6 MCU Handle Request The external mcu must handle reads and writes. Request Response Btool (OTA) NP HciTester Btool (OTA) NP HciTester From BTool.exe initiate a read request. From discovery, we know that handle 6 is the char1 value UUID (0xfff1). [56] : <Tx> - 09:16:44.218 -Type : 0x01 (Command) -Opcode : 0xFD8A (GATT_ReadCharValue) -Data Length : 0x04 (4) byte(s) ConnHandle : 0x0000 (0) Handle : 0x0006 (6) Dump(Tx): 01 8A FD 04 00 00 06 00 The NP will forward the request to the external mcu (HCITester.exe). From HCI tester, send a response for the value requested. 21:16:44.312 Incoming Dump: 21:16:44.312 0000: 04 ff 08 0a 05 00 00 00 02 06 00... 21:16:44.359 --

21:16:44.359 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff 21:16:44.406 Parameters: 21:16:44.406 Event Opcode : 0x050a (ATT_ReadReq) 21:16:44.406 Status : 0x00 (SUCCESS) 21:16:44.406 connectionhandle : 0x0000 21:16:44.406 pdulen : 0x02 21:16:44.406 handle : 0x0006 21:16:46.750 Packet "ATT_ReadRsp", Opcode 0xfd0b 21:16:46.750 Parameters: 21:16:46.750 connectionhandle : 0 21:16:46.750 value : "123" 21:16:46.750 -- 21:16:46.750 Outgoing Dump: 21:16:46.750 0000: 01 0b fd 04 00 00 12 30...0 21:16:46.750 -- 21:16:46.750 *** Script End *** 21:16:46.750 -- 21:16:46.781 Incoming Dump: 21:16:46.781 0000: 04 ff 06 7f 06 00 0b fd 00... 21:16:46.828 -- 21:16:46.828 Packet "HCI_Vendor_Specific_Event", Opcode 0x00ff 21:16:46.890 Parameters: 21:16:46.890 Event Opcode : 0x067f (CommandStatus) 21:16:46.890 Status : 0x00 (SUCCESS) 21:16:46.890 opcode : 0xfd0b (ATT_ReadRsp) 21:16:46.890 datalen : 0x00 21:16:46.890 --