Free Essay

Bluetooth Tech

In:

Submitted By impeccable012
Words 4075
Pages 17
TI Bluetooth low energy
Training, October 2013
Greg Stewart gstewart@ti.com

®

1

Introduction

2

TI Bluetooth low energy benefits – CC2541
Cost Effective
 Highly integrated solution • Single-chip and WNP solution • Flash-based  Low cost HW design • 6x6mm QFN package • 2 layers layout

Flexibility
 Mature solution • TI first to market (2010) • >7000kits shipped • Leading market share (IMS/ABI)  Flexible configuration • Central/Peripheral role switching • Combo Roles • Over-the-air SW update • Boot Image Manager (BMI)  Support • www.ti.com/ble • Most active BLE community (www.ti.com/ble-forum) • All information publicly available

High Performance
 Powerful • >1 year battery life with CR2032 • 97dB link budget  Ultra-low power • Very low-power sleep modes • Short transition times between operating modes • Ref.design with dc-dc (TPS62730)

 Quick software development • SW examples for all adopted profiles • iOS App source code

TI Bluetooth low energy enabled Products
Kensington
Proximity tag

Nokia
Precious Tag

Lifesense
Blood Pressure Monitor

Ruwido/Swisscom
Remote Control

UnderArmor
Heart Rate Monitor

Kwikset
Smart door lock

Schneider
Notebook protector

TI Bluetooth low energy enabled Products
Smartbiotics
Smart LED Bulbs

Misfit Wearable's
Shine – Activity Monitor

KEEO
Smart Key

TI Bluetooth low energy enabled Products
Kinetek LifeTrak

TetherCell

UniKey

Parrot

BACTrack

TI Bluetooth low energy enabled Products
Murata Polar ZOMM

Schneider

Bluetrek

Recon

Ace Sensor

TI Bluetooth low energy enabled Products
Blast Motion IDT Griffin Citizen

MonBaby

SoundOfMotion

Tom Tom

TI track record
July 2010 Bluetooth 4.0 standard adopted by Bluetooth SIG Aug 2011 TI BLE stack 1.1 released, including support for all profiles released to date Feb 2012 CC2541 released, providing 33% improvement in power consumption July 2012 BLE stack 1.2 released, including support for switching between master and slave roles

Oct. 2010 CC2540 was the first single-mode Bluetooth low energy IC

July 2011 TPS63730 companion DC/DC released, enhancing battery life by 20%

Jan 2012 First Bluetooth low energy product. Recon Instruments releases ski goggles with BLE remote control

May 2012 5000 development kit sold

Dec 2012 BLE stack 1.3 released, including support for Over-theAir download

"As shown with its certifications, new profile offerings and updated Bluetooth low energy stack, we are pleased to see TI playing a critical role in delivering Bluetooth v4.0 with low energy capabilities to new places – from health monitoring to fitness equipment, alert notifications and more.“ Mike Foley, Ph. D., Executive Director, Bluetooth SIG

TI Hardware

10

TI Bluetooth low energy Hardware

CC2540 Flash SoC USB

CC2541 Flash SoC I2C

CC2541S Flash WNP

Two ways of using TI Bluetooth low energy

One-Chip Solution

Two-Chip Solution
(Network Processor)

CC2540 CC2541 BLE Stack + Application + Profiles

Serial

MCU
Application + Profiles

CC2540 CC2541 CC2541S BLE Stack
11

TI Bluetooth low energy Hardware

CC2540 Flash SoC USB

CC2541 Flash SoC I2C

CC2541S Flash WNP

Development Kits

CC2540DK-MINI CC2541DK-MINI The most easiest way of evaluating Bluetooth low energy

BOOST-CC2541S

CC2540DK CC2541EMK Advanced kit with several peripheral interfaces and features

CC2541DK-SENSOR

CC2541DK-RC

BoosterPack for MSP430, Stellaris and C2000

Targiting Smart Phone App developers. Provides sensor data from 6 sensors

Operates as a mouse, keyboard and consumer remote using HOGP

12

Order Kit and Download SDK
• Visit ti.com/ble

Download

Order Kit

Order Kit

Download SW Stack

Evaluate and Learn Bluetooth low energy
13

Software Solution

14

TI BLE Software Solution
Application
HAL
GAP Role Profile GATT Service Profile

Source

Apps ...
Other Profiles

Library

Generic Access Profile
Generic Attribute Profile OSAL Attribute Protocol Security Manager Stack

Logical Link Control and Adaption Protocol HCI Link Layer

Physical Layer
OSAL = Operating System Abstraction Layer (Prioritized task handling loop) HAL = Hardware Abstraction Layer (Drivers and API for LEDs, Buttons etc) Full API to access all stack functionality in the stack (Library) from the Application and Profiles
15

TI Bluetooth low energy Tools
• BTool
– Run and test Bluetooth low energy communication through a CC254x Network Processor

• Sniffer
– Capture Bluetooth low energy communication live with full overview.

• Flash Programmer
– Program CC254x devices – Read and write IEEE addresses

16

Documentation and Support
• Guides included in the BLE installer
– – – – TI BLE Software Developers Guide TI BLE Sample Applications Guide TI BLE Vendor Specific HCI Guide TI BLE API Guide

• Online documentation
– TI BLE Product Page (www.ti.com/ble) – TI BLE Wiki (www.ti.com/ble-wiki)

Data Sheets User Guides Reference Designs Application Notes

• Online Support
– TI BLE E2E forum

Application Examples Walkthrough Step by Step guides FAQ
17

Bluetooth low energy Protocol Stack

18

P

P GAP PHY

P

GAP - Roles
• A Bluetooth low energy device can operate in four profile roles:
– Broadcaster • An advertiser that is non-connectable • Example: Temperature Sensor – Observer • Scans for advertisements, but cannot initiate connections • Example: Temperature Display – Peripheral • An advertiser that is connectable • Operates as a slave in a connection • Example: Watch – Central • Scans for advertisements and initiates connections • Operates as a master in connections. • Example: Smart Phone

19

GAP – Multiple Roles
• The BLE specification multiple-role configurations:
– Peripheral and Broadcaster
• device operates as a slave in a single link layer connection • send out non-connectable advertisements

P

P GAP PHY

P

– Peripheral and Observer:
• device operates as a slave in a single link layer connection • Scan for advertisements without initiating a connection

– Central and Broadcaster:
• Device scans for advertisements and initiates connections as a master • Broadcast non-connectable advertisements

20

TI Bluetooth low energy Software Examples
• Profile Specific
– – – – Heart Rate Glucose HID Keyboard Etc.

• ”General”
– – – – SimpleBLEPeripheral SimpleBLECentral SimpleBLEBroadcaster SimpleBLEObserver

Bluetooth SIG adopted Profiles

Cycling Speed and Cadence Running Speed and Cadence Blood Glucose HID over GATT Proximity Find me Health thermometer Heart rate sensor Time Alert Notification Battery Status

- Certified - Certified - Certified - Certified - Certified - Certified - Certified - Certified - Certified - Certified - Certified

(BLEv1.3.2, June ‘13)

(BLEv1.3.2, June ‘13) (BLEv1.2, February ‘12) (BLEv1.2, February ‘12) (BLEv1.1, July ‘11) (BLEv1.1, July ‘11) (BLEv1.1, July ‘11) (BLEv1.1, July ‘11) (BLEv1.1, July ‘11) (BLEv1.1, July ‘11) (BLEv1.1, July ‘11)
21

Proprietary Profile
• Uses GATT Architecture for easy implementation

• Proprietary Services uses 128bit UUID
– Example in Sensor Tag project – Custom example available at wiki – UUIDs can be generated online (www.ti.com/ble-stack) (www.ti.com/ble-wiki) (www.uuidgenerator.com)

• Use adopted Services
– Faster implementation – Ensure interoperability

(www.bluetooth.org)

• TI base UUID
– F000XXXX-0451-4000-B000-000000000000
22

Memory Footprint Examples (BLEv1.3)
Project Flash [KBytes] RAM [KBytes]

SimpleBLEPeripheral
SimpleBLECentral SimpleBLEObserver SImpleBLEBroadcaster KeyFobDemo Heart Rate HostTest (Network Processor) Profiles Device Information Service Heart Rate Service Battery Service

114
123 43 39 116 112 151 Flash [KBytes] 1.068 0.678 0.846

6.2
7.2 3.3 3.3 6.4 6.1 7.5 RAM [KBytes] 0.176 0.078 0.053

Proximity

0.984

0.094
23

Software Development Kit
• User Requirements
– An intermediate level of knowledge of the C programming language

• Runs on embedded 8051 (MCU) with limited resources
– Algorithms and application should be coded efficiently – C standard library should not be used

• Concepts of encapsulation and information hiding:
– GetParameter and SetParameter functions etc. – Callbacks

24

Embedded Software
Application
HAL
GAP Role Profile GATT Service Profile

Development

Apps ...
Other Profiles

Source Library

Generic Access Profile
Generic Attribute Profile OSAL Attribute Protocol Security Manager Stack

Logical Link Control and Adaption Protocol HCI Link Layer

Physical Layer
OSAL = Operating System Abstraction Layer (Prioritized task handling loop) HAL = Hardware Abstraction Layer (Drivers and API for LEDs, Buttons etc) Full API to access all stack functionality in the stack (Library) from the Application and Profiles
25

Developer’s resources
HAL

User Application

Other Profiles

• HAL
– Some are very specific to our boards/ICs

• APP
– User application – Specific drivers

• PROFILES
– Adopted (Battery, Proximity) – Proprietary (Accelerometer, SimpleKeys)
26

Operating System Abstraction Layer (OSAL)
• The SW architecture is based around the Operating System Abstraction Layer (OSAL) • The OSAL is a control loop that allows SW to setup execution of events • Each subsystem of the software runs as an OSAL task, and has a unique task identifier (ID) • Low task ID → Task has higher priority • Typical Project has 12 OSAL tasks
ID
0

Task
Link Layer

1 2
3 4 5 6 7 8 9 10 11

HAL HCI
OSAL Callback Timer L2CAP GAP GATT SM GAP Role GAP Bond Manager GATT Server Application
27

OSAL – Files and Key API’s
• Key Files:
– osal.c – API’s for OSAL – osal.h – OSAL API declarations

• Key API’s:
– osal_init_system – osal_start_system – osal_set_event – osal_start_timerEx – osal_stop_timerEx – osal_msg_allocate – osal_msg_send – osal_msg_deallocate – osal_mem_alloc – osal_mem_free Initializes OSAL Starts the OSAL main loop Sets an OSAL event for a task Sets an OSAL event for a task at a scheduled moment in time Cancels an existing OSAL event Dynamically allocates memory for an OSAL message Sends an OSAL message to a specific task Deallocates an OSAL message (call this from receiving task) Dynamically allocates memory Free previously allocated memory

• Additional information on the OSAL can be found in the OSAL API guide: C:\Texas Instruments\BLE-CC2540\Documents\osal\OSAL API.pdf
28

Execution flow: OSAL’s point of view
• OSAL is a prioritized work-queue
– If two tasks have events, handle highest first

Board init, Tasks’ init()

• The stack is event-driven
– Act on the environment, then – Sleep until something happens

osal_run_system()
Set events for timed out timers.

Wakeup and cont. after any ISR is done

n=0

n > tasks

• Lower stack layers communicate via OSAL messages and events
– Then call functions in the user application: • On attribute writes/reads • On connection loss/establishment

Task n++ has events

Yes

No

Call task n’s ProcessEvent CB

Schedule wakeup. Sleep.

29

Execution flow: Application point of view hal_key.c ISR (set debounce timer)

simpleBLEperipheral.c (application)
Init (set periodic timer, register profiles etc)
SimpleBLEPeripheral_ProcessEvent

OSAL osal_set_timer osal_msg_send osal_run_system

1
ProcessOSALMsg handleKeys (Send notification) performPeriodicTask (update a value)

hal_drivers.c
Hal_ProcessEvent (send keypress msg to app)

peripheralStateNotificationCB (Write to LCD)

2 peripheral.c GAPRole_ProcessEvent simpleProfileChangeCB (Write value to LCD)

GATTServApp (LIB)

3

The application doesn’t run constantly, but only on 1. Events, messages (timer, keypress)

simpleGATTprofile.c simpleProfile_WriteAttrCB 2. State change callback (connected, disconnected)
3. Attribute value change callback (BLE data)
30

Hardware Abstraction Layer
• The Hardware Abstraction Layer (HAL) provides an application programming interface to hardware-related functions such as
– – – – – – – – – ADC UART SPI Flash Timers Sleep Keys LED LCD

• Additional details on HAL functions can be found in the HAL API Guide:
C:\Texas Instruments\BLE-CC2540\Documents\hal\HAL Driver API.pdf

31

OAD Profile
Over the Air Download

32

Introduction – OAD Profile
• What is OAD?
– OAD is a feature that provides a solution for updating code in released products without the cost of physical access (i.e. programming header). – OAD is a client-server mechanism in which one device acts as the OAD image server (OAD manager) and the other device is the OAD image client (OAD target).

• What is a proprietary Profile?
– Uses GATT Architecture for easy implementation – Proprietary Services uses 128bit UUID • Example in Sensor Tag project (www.ti.com/ble-stack) • Custom example available at wiki (www.ti.com/ble-wiki) • UUIDs can be generated online (www.uuidgenerator.com) – TI base UUID • F000XXXX-0451-4000-B000-000000000000
33

OAD System Overview
OAD Manager Application OAD Image Binary image over BLE OAD Image OAD Target OAD Image

BIM

34

OAD Manager - Examples
OAD Manager Application OAD Image

• Acts as a Central Client

• OADManager
– Use SBL Tool towards a SmartRF05+EM that runs OADManager

• MultiTool
– Runs on an iOS Device

• Device Monitor
– Runs on PC and utilizes CC2540USB Dongle
35

OAD Target - Examples
• Acts as a GATT Server
OAD Target OAD Image A OAD Image B

BIM

• OAD is a GATT Profile.
• Projects examples implementing OAD Target
– SensorTag (CC2541) • A & B images – SimpleBLEPeripheral • A & B Images • Encrypted A & B Images
36

Memory Architecture

37

How to build OAD System
• Target Requirements
– Target must be setup with BIM (Boot Image Manager) • ..\BLE-CC254x-1.3.1\Projects\ble\util\BIM\cc254x\BIM.eww – Target must be setup with Image A with OAD Profile

• Choose a OAD Manager platform , ex. iPhone/iPad or Device Monitor • Build an Image B with OAD Profile.

38

How to build add OAD Profile
• Target Setup
– In Application – Create a new configuration • Add OAD_AddService() • ex. CC2541-OAD-ImgA • Add includes for – Add PROFILE files – “oad.h“ • oad_target.c/h – "oad_target.h" • oad.h – Add definitions: – Linker configuration file • FEATURE_OAD • $PROJ_DIR$\..\..\common\ • OAD_KEEP_NV_PAGES CC2541\cc254x_f256_imgA • FEATURE_OAD_BIM .xcl • HAL_IMAGE_A – Include path to the OAD Profile – Add Build Actions • "$PROJ_DIR$\..\..\common\CC2540\cc254x_ubl_pp.bat“ • "$PROJ_DIR$" "ProdUBL" • "$PROJ_DIR$\CC2541-OAD-ImgA\Exe\ProjectName” 39

OAD Target Profile typedef struct uint16 crc1; uint16 ver; uint16 len; uint8 uid[4]; uint8 res[4]; } img_hdr_t; { // // // // //
CRC-shadow must be 0xFFFF. User-defined Image Version Number Image length in 4-byte blocks User-defined Image Identification bytes. Reserved space for future use.

00:00:00:7C:41:41:41:41
Version Length User Defined ID

16 Bytes Image Block
40

OAD Resources

• Developer’s Guide for Over Air Download for CC254x
– Found at www.ti.com/blewiki

41

Device Monitor
Debugging and Features

42

Device Monitor - Demo

43

Device Monitor
Easy to download image
But it takes some time...

44

IAR Embedded Workbench
Debugging and Features

45

IAR Embedded Workbench IDE
• All software development on the CC2540/41 is done using IAR Embedded Workbench for 8051 Integrated Development Environment (IDE)

• IAR Embedded Workbench for 8051 includes:
– – – – C Compiler Assembler Library Builder Support for Hardware Debugger

IAR Website: www.iar.com
46

Go to definition
If you ever wonder what a function does, how and where a macro or variable is defined: 1. Right click on a symbol you want to follow 2. Press Go to definition of...

APP/keyfobdemo.c

1

2
HAL/Target/CC2540EB/Drivers/hal_led.c

3. Enjoy saving time
4. Go back whence you came

3 4
47

Find all in files..
To find where a certain variable is manipulated, where an OSAL Event is handled, or where a function is called:

1

1. Double click on the symbol 2. Press CTRL+SHIFT+F

2

3. Double click to jump in the code

3
Declaration Definition Calls to function
48

Break the Code
1. Put the cursor on a line 2. Press F9. Code broken.

1,2

3. Download,
4. Run,

Ctrl+D or
F5 or

5. Step Over,

F10 or

5

4

Note that breaking the code during a connection will terminate the connection
49

Hairline fracture
• Right click on a breakpoint
• Choose Edit Breakpoint... • Don’t break the code until it’s helpful
– Skip a number of breaks – Break on a condition

50

Watch the data
• View the watch window • Add a variable to the watch list (right click) • Next step
– Run until breakpoint – Hit F10 to step over the statement – Check new value of variable in watch window

51

How did I get here?
• Monitor
1. Function Call Sequence: 2. Local Variables: 3. Memory: View -> Call Stack View -> Locals View -> Memory

2 1

3
52

Watch Out
• Avoid compiling with optimization when debugging is on the Menu
– Variables are often ”Unavailable” with optimization on • Add volatile to the declaration, i.e. volatile uint8 variable; • If that doesn’t work, move the declaration outside the function. – Single stepping (F11) will sometimes behave oddly or break IAR. • Assembly code is moved around and changed with optimization, so if debugging features are unavailable, try turning optimizations off.

53

Qualification and Certification
Introduction

54

TI BLE Subsystems
TI BLE Subsystem QDID Include Controller B016552 HCI Link Layer RF PHY Host B017183 GAP GATT ATT SMP L2CAP HCI Profile B020954
Health Thermometer Profile/Service Device Information Service Find Me Profile Immediate Alert Service Link Loss Service Proximity Profile Tx Power Service Heart Rate Profile/Service Time Profile Phone Alert Status Profile Alert Notification Profile Blood Pressure Profile/Service Battery Service HID Service Scan Parameters Service HID over GATT Profile Scan Parameters Profile. Running Speed and Cadence Profile/Service Cycling Speed and Cadence Profile/Service
55

SensorTag
Evaluation

56

Bluetooth low energy SensorTag
• Includes Bluetooth low energy
– CC2541

• 6 sensors
– – – – – – Temperature Humidity Pressure Accelerometer Gyroscope Magnetometer

• Single cell coin cell battery (CR2032)
• FCC, IC and ETSI certified solution
57

Bluetooth low energy SensorTag
CR2032 Battery
DCDC TPS62730

Push Buttons
CC2541

Debug

LEDs

Ez430

I2C

KTXJ9
Acceleration

IMU-3000
Rotation

T5400
Pressure

SHT21
Humidity

MAG3110
Magnetic Field

TMP006
Temperature

58

Bluetooth low energy SensorTag
Compass Pressure sensor IR Temperature sensor Accelerometer Gyroscope
Interface Connector For EZ430 battery packs (optional)

User Buttons

Debug Header MCU + BLE Transciever

Airflow for Humidity Sensor

LEDs

DCDC Converter

PCB Antenna CR2032 Coincell Battery Holder Pairing Button Humidity sensor

Bluetooth low energy SensorTag
• Targeting Smart Phone App Developers
• Limitless App Possibilities
– Health and fitness, medical, educational tools, toys, remote controls, mobile phone accessories, proximity and indoor locationing.

• The CC2541 SensorTag kit shortens the design time for Bluetooth low energy app development from months to hours
– No embedded software design knowledge required. – The SensorTag includes all SW needed for App development – TI has a SensorTag App on the App Store providing developers with easy access to the tools they need.
60

Hands-On: SensorTag
Pre-requisites • BLE Device Monitor (http://www.ti.com/lit/zip/swrc258) • Packet Sniffer (http://www.ti.com/tool/packet-sniffer)

62

System Overview

Bluetooth low energy

Peripheral Device
– Slave – Server (has data)

Central Device
– Master – Client (wants data)

BLE Sniffer

63

BLE Device Monitor
• Windows Application
• The BLE Device Monitor allows you to
– Discover – Read – Alter attributes

on any Bluetooth low energy device

• More information about the BLE Device Monitor at: www.ti.com/SensorTag

64

Setup BLE Device Monitor
• Download: http://www.ti.com/litv/zip/swrc258a • Connect CC2540 USB dongle,
– Program the Dongle with CC2540_USBdongle_HostTestRelease_All.hex
(C:\Program Files\Texas Instruments\BLE Device Monitor\firmware)

– Install USB CDC Driver, usb_cdc_driver_cc2540.inf
(C:\Program Files\Texas Instruments\BLE Device Monitor)

• Start BLE Device Manager
– In Options, select Port

65

Discover the SensorTag
• Press Side Button to start Advertise

66

Connect to the SensorTag
• Select the SensorTag and click on “Connect”

• Status will change from Not Connected to Connected and all Bluetooth low energy Services and Attributes are shown.

67

Using Attributes Tab
• The Attribute tab will list all the GATT Primary Services that is available for the Bluetooth low energy device.
• Click on the + to display the corresponding characteristics to the Service.

68

69

Using SensorTag Tab
• Monitor mode provides numerical readings of the sensors
1. 2. 3. Select Monitoring Select the sensors Click on “Start”



Test Mode is a production test functionality of the SensorTag which will enable you to test all the Sensors and peripherals that are available on the SensorTag. The result will be stored in time stamped log file.
70

SensorTag Source Code

71

Evaluation of CC2541DK-MINI

72

CC2541DK-MINI Unboxing
Quick Start Guide

Keyfob Casing

CC2541 Keyfob

CC2540USB Dongle

CC Debugger

Both CC2541 Keyfob and CC2540USB Dongle are pre-programmed
73

Power up the Keyfob
• There are two ways of powering the CC2541 Keyfob
– Using a CR2032 Coin Cell Battery – Using CC Debugger (Note that the header must be mounted on P1)

OR

– Device LED should lit green for 1 second – Press Right button to start advertisement – Device LED should blink red during the advertisment mode.
74

Setup PC environment
1. Insert CC2540 USB Dongle 2. Install driver, located at ..\BLE-CC254x-1.3\Accessories\Drivers

3. Start BTool
1. 2. Choose Port (dependent on your machine) Press OK

75

Evaluate CC2541DK-MINI
Device information Message Log Device Control



Connect to CC2541 Keyfob

76

Interact with the Keyfob - Buttons
• Button Notifications
– In Btool: Enable notifications by writing 01:00 to handle 0x0048

– On Keyfob: Press buttons to send notification

77

Interact with the Keyfob - Alert
• Immediate Alert
– In Btool: Trigger a buzzer alert by writing 01:00 to handle 0x0028

01 for Low Alert 02 for High Alert 00 to Turn Off

BEEP

78

Interact with the Keyfob - Accelerometer
• Accelerometer
– In Btool: Enable accelerometer by writing 01:00 to handle 0x0034 – In Btool: Enable x-axis notifications by writing 01:00 to handle 0x003B

– Move the Keyfob

79

Human Interface Device over Generic Attribute Profile
HID over GATT Profile
HOGP

80

BLE HID: Introduction
• ”HID Over GATT” Profile specification was approved by the BT SIG in December 2011 • Specification is publicly available at bluetooth.org • Microsoft has already announced native support for LE HID in Windows 8

81

HID over GATT Profile
• Host and Device behave according to HoG Profile • Data is exchanged using characteristics in the HID Service • HID Service is a wrapper for usual USB HID reports.

Profile in yellow, Services in orange

82

Legend, properties

Attribute table: HOGP req. services
Battery service Scan Param. Service

Notification Read Write WriteNoRsp

Info about Host scanning behaviour Request from RC about Host scan info
HID version, country code, remote wake Host is suspending/waking Boot mode or Report mode USB HID Report Descriptor HID Mouse IN HID Keyboard IN HID Consumer Control IN HID LED OUT Boot Keyboard IN Boot Keyboard OUT Boot Mouse IN

HID Service

Feature report

IN = To host OUT = To device

Typical dataflow
Scan keys on ISR hal_key.c / OSAL.c / hal_drivers.c

Periodic sensor poll* hal_motion.c Raw I2C sensor data

Keyscan result, row & col

MOVEA library
AIR_MOTION_LIB_3G3A-Banked.r51

X + Y ”Mickeys”

Application callback hidAdvRemote.c : KeyCback

Application callback hidAdvRemote.c : MotionSensorCback

Command, Usage page

X + Y ”Mickeys”

Build HID report hidAdvRemote.c :hid[Key|CC]SendReport

Build HID report hidAdvRemote.c : hidMouseSendReport

HID Kbd/CC Input report

HID Mouse Input report

Queue report hidDev.c : HidDev_Report

HID Mouse/Kbd/CC Input report

Send report hidDev.c : hidDevSendReport

GATT Notification

BLE Stack

OTA to Central device acting as HOGP Host

84

* Application turns off polling when idle, then restarts on Acc ISR if applicable

What does a report contain
• Mouse, 4 bytes data – Buttons – MickeysX – MickeysY – Wheel • Consumer Control, 2 bytes – Bitmap of command • Keyboard, 8 bytes – Modifier – Reserved – Keycode 1..6

• Significance determined by which characteristic report sent via.
85

iOS BLE App Development
Introduction

86

Developing for iOS
• Development happens in Xcode • Xcode runs on OSX [Mountain] Lion • Xcode and simulator is free
– BLE requires physical iOS device

• Physical device download requires Apple Developer Account
– Costs 99$ per year at developer.apple.com/programs/ios

87

Using Xcode

iOS apps are separated* into Model, View and Controller (MVC). In our example, CoreBluetooth callbacks are in the ViewControllers, and some CoreBt functions are wrapped for convenience in BLEUtility
88

*ideally

Adding a device to Xcode
• Open Organizer (under Window) • Click on device

• Click add to Portal
• Play button works

89

The iOS Source Code
• The communication is asynchronous between app and iOS’s CoreBluetooth

• We issue commands to CBCentralManager and CBPeripheral
– [BLEUtility writeCharacteristic ...]  – [peripheral writeValue:data ... ];

• Then act as delegate for CBCentralManager
– centralManagerDidUpdateState – didDiscoverPeripheral – didConnectPeripheral

• And for CBPeripheral
– didDiscoverServices – didUpdateValueForCharacteristic – didWriteValueForCharacteristic

• Delegates implement callbacks according to a protocol. A design pattern used in iOS.
90

The iOS BLE Limitations
• Uses Private resolvable address instead of fixed IEEE address
– Cannot use whitelist towards iOS devices – Cannot use directed advertisements towards iOS devices

• Connection parameter limitations
– – – – Connection parameters must be updated by slave device(!) Interval must be higher than 20ms; combined with latency, less than 2s Supervisor timeout = 4

• BLE data hidden from the user:
– – – – IEEE address of peripheral Characteristic handles Descriptors Connection parameters

91

References
• Getting started with iOS development – Setting up account and development environment (Xcode) – Developing, installing and testing an app – Distributing on the appstore (pretty complicated) – https://developer.apple.com/programs/ios/gettingstarted/ • Objective-C and iOS – If you are familiar with C: • http://en.wikipedia.org/wiki/Objective-C (very helpful) – Your first iOS app • http://developer.apple.com/library/ios/#documentation/iphone/conceptual/ipho ne101/Articles/00_Introduction.html – BLE Blog by Ole Andreas Torvmark (TI Contractor in Oslo) • http://ble.stalliance.no/

• Sensortag example project – http://www.ti.com/sensortag-wiki
92

Frequently Asked Questions

93

FAQ / known issues
• Using IAR v.8.20, compile/linker error
– Answer: We recommend 8.10.4 or 8.11.4.bacause version 8.20 generates an extra (unnecessary) instruction. Workaround: In hal_sleep.c, remove PCON = halSleepPconValue; in halSetSleepMode replacing it with the line asm("MOV 0x87,halSleepPconValue");

• Porting projects from BLEv1.2.1 to BLEv1.3
– Answer: See porting guide at wiki

94

Thank You

95



TI Bluetooth low energy Solutions http://www.ti.com/ble 

TI Bluetooth low energy Wiki http://www.ti.com/ble-wiki



TI BLE-Stack http://www.ti.com/ble-stack



TI Bluetooth low energy E2E Forum http://www.ti.com/ble-forum 

TI Bluetooth low energy SensorTag

http://www.ti.com/sensortag
96

Similar Documents

Free Essay

New Technology

...Bluetooth Technology Description of Technology Bluetooth technology was invented in 1994 by a group of engineers at Ericsson, a Swedish owned company. The technology was actually named later on after a 10th century Danish King, King Harald Blatand. The name Blatand means blue tooth in English. Bluetooth technology was designed to eliminate the cables and cords. Bluetooth technology operates via radio transmissions in the ISM band at 2.4 to 2.485GHZ. Bluetooth uses a spread spectrum, frequency hopping, full duplex signal at 1600 hops per second. This 2.4 GHZ band is unlicensed and available in most countries. Impacts of Bluetooth Technology 1. Bluetooth has made a tremendous impact on home security. Peep is a new Bluetooth peephole. This peephole will take a picture when someone knocks on the door and then sends it to your smartphone. BeOn Home is a smart lightbulb made to deter burglars but also will come on in the event of power outage or smoke alarm. This bulb also employs a Bluetooth mesh network to extend the range throughout the house. There is a smart deadbolt called, Danalock Smart Lock. This deadbolt can be operated from your smartphone and has a variety of design and control scheme options. 2. Probably one of the better and most important impacts of Bluetooth is in the automotive industry. With Bluetooth you can pair your phone to your car and go hands free on answering calls. Some of your autos allow you to sync your contacts and even text via speech. Bluetooth...

Words: 619 - Pages: 3

Premium Essay

Blue Ant

...BlueAnt Bluetooth Speakerphone Managerial Marketing, BUS 620 August 26, 2013 BlueAnt Bluetooth Speakerphone The BlueAnt Bluetooth speakerphone is manufactured by BlueAnt Wireless. BlueAnt Wireless is based out of Melbourne, Aus. BlueAnt Wireless is a global technology company that has established itself as one of the leading Bluetooth and Mobile Entertainment developers (BlueAnt wireless and vlingo partner to deliver free integrated voice application on BlueAnt products, 2011). They are known for their high-tech hands-free, stereo audio streaming and wireless communications products. They partnered with Vlingo to manufacture a truly hands-free Bluetooth speakerphone for the drivers to use their cellphones. According to McEvoy (2011) the speakerphone market is one of few choice and little competition. In this paper, we will review a marketing plan for the BlueAnt Bluetooth speakerphone. BlueAnt Bluetooth Speakerphone The BlueAnt Bluetooth Speakerphone was designed for cellphone users who excessively utilized their cellphone while driving (Shaw, 2010). With its sleek design the BlueAnt Bluetooth Speakerphone connects to the sun visor of the vehicle. Right out of the box it pairs itself with your cellphone and downloads your contacts. After pairing it is ready to be used. At this point the driver can use their voice to make and answer calls with their voice. Marketing Plan SECTION I: Executive Summary The BlueAnt Bluetooth speakerphone is a high-tech speakerphone...

Words: 1790 - Pages: 8

Premium Essay

Project

...* * * * * The Possibly not so Smartphone Thomas Blackard ITT Tech * * Since the 1990’s cellphone technology has been sneaking itself into our lives one-text message at a time. We have not only become dependent but addicted to our text trance inducing, video playing, face booking internet device wrapped in plastic and glass. The split second our precious phone could touch social media and the internet it was over, we were hooked and there is no turning back. The cellphone has become the single most used portable computing component of our lives and the most disposable and the most intertwined. We could start our story with vendors or marketers but I will discuss some of the more main stream ideology first, i.e. what makes a smartphone a smartphone by definition. From a technological point the discussion is fairly simple really, you take a small LCD screen, battery, cellular radio, CPU and RAM plus a really cool operating system. Voilà! A cell phone. The advanced micro-technology coupled with highly consumable content and our social interactions make the Internet larger and the world smaller. A user could be texting a colleague in Christ Church who could be doing a Facebook Check-In while texting a Twitter post exposing his or her comments or thoughts to tens of thousands of internet denizens almost simultaneously...

Words: 2141 - Pages: 9

Free Essay

Bluetooth and Infrared Technology

...Bluetooth and Infrared Technology Technology has grown so much over the years, thinking back to my childhood when I first saw a remote control and was over the moon with excitement. No more getting up to change the channels, that was my first thought. The first time I saw a cell phone, having to hold that big clunky thing up to your ear throughout an entire conversation was a chore. Now when you do any of these things, you see such advancements that come from two of the most popular technologies that have come to be. Bluetooth and Infrared, both have been around longer than most of us know. During my research for this paper, I learned that Infrared is where we get our remote controls for TV, for which all 80’s children are grateful, we no longer had to come inside to change the channels for our Moms. I have learned where these technologies came from, what they are used for, the people and companies that buy them, and what we can look forward to in the future. Bluetooth is a wireless technology that allows data to be exchanged over short distances using short wavelength radio transmissions. This technology is built into of plethora of products that allows them to exchange information over a wireless connection, or in basic terms, it allows one device to talk to another without wires. Two devices must be paired together in order to share. Several devices can be connected to a single Bluetooth, such as PDAs, mobile phones, laptops, computers, printers, controllers...

Words: 2492 - Pages: 10

Premium Essay

Wireless Signals

...Wireless Communications are very important in our daily lives. Practically everywhere we turn we can see someone working away on a laptop, an iPad, or some other form of wireless PDA. This form of communication is usually used for personal and professional reasons. There are four main types of wireless technology in play here. The four types of wireless technology is Wi-Fi, Cellular, Bluetooth and WiMAX (Cox, 2013). Wi-Fi is the most popular form of wireless technology that we come to depend on today. Wi-Fi uses IEEE 802.11 specifications to provide secure network connections at home, in the office and in the public at places like libraries, coffee houses. Many business offices have Wi-Fi set up so that their employees can be more mobile using laptops they can retreat from their desk and in to a conference room for a quiet space to work. Wi-Fi connection within a network presents challenges for any IT group with regard to security as well as architecture of the network. Many wireless Routers and AP’s are designed to provide quick speeds and secure connection for Wi-Fi some more powerful than others. Many PDA devices are being designed to act as a hot spot, providing Wi-Fi access to laptops and other devices. This brings me to speak about Cellular technology. When we think of cellular technology, we mostly think about being on the go and needing to make a phone call with a wireless phone. Cellular signals use connected transmitters or cells as Michael Cox calls them to...

Words: 725 - Pages: 3

Premium Essay

Mobile Phones

...386 IJCSNS International Journal of Computer Science and Network Security, VOL.8 No.11, November 2008 MOBILE LEARNING: AN APPLICATION OF MOBILE AND WIRELESS TECHNOLOGIES IN NIGERIAN LEARNING SYSTEM. Boyinbode O. K. and Akinyede R. O. Department of Computer Science, Federal University of Technology Akure, Nigeria Abstract Mobile learning (M-Learning) is the point where mobile computing and e-learning intersect to produce an anytime, anywhere learning experiences. Advances in mobile technologies have enhanced M-learning tools at just the right moment to meet the need for more costeffective just in time training options-learning on the go. Electronic Learning offer methods, which decrease the limitations of traditional education but M-learning offers more. This paper discusses the existing devices and technologies appropriate to realize Mobile learning, its advantages over e-learning, and challenges to its adoption of in Nigeria. Keywords: e-Learning, m-learning, mobile computing, SMS, MMS disadvantages lead to search for new and more effective educational methods. E-learning offers new methods for education based on computer internet technology. Mlearning is the intersection of mobile computing and elearning [5]; M-learning has the ability to learn everywhere at every time without permanent physical connection to cable networks. Mobile and Wireless technologies are being used in diverse areas such as travel, education, stock trading, military, package delivery, disaster recovery...

Words: 4432 - Pages: 18

Premium Essay

You What Going with Ghnana

...Technology: Friend Technology is very much a part of modern life. Many people see technology as force that has escaped from human control. Technology helps improve the quality of life. By doing many of mundane tasks, so that people can spend more time.   In today’s world, three modern technologies have become a major part in people`s everyday lives: the computer, cell phone and GPS device. Society uses the computer for a myriad of things from looking up facts to shopping online, but one of the biggest uses of the internet is social networking. The cellphone allows people to talk to any one of their friends. Because the GPS device is automated, it lets the driver focus on the road instead of the map. Although those three technologies may seem quite different, each one gives us convenience, speed, and freedom. Out of all the technology we have come across through the years, mobile telephony has become the most explosive development. It has added the convenience of reaching anyone no matter where they are. It has revolutionized long distance communication and has made the lives of generations easier through constant connection. Cell phones allow a college student to consult with peers and teachers about uncertainties on a project. A cell phone can save the life of a ten year old woman in a car accident, who is able to dial 911 from the seat of her car. As cell phones exploded in today’s lifestyle, so did the programs that come with it. Text messaging became popular...

Words: 1052 - Pages: 5

Premium Essay

Wireless Communication

...captured my attention. A few years ago I first heard of the name Bluetooth. Along with the interesting name, a “futuristic” scenario was embossed in my memory whereby a cell phone would communicate with one’s fridge at home and then notify the owner that the milk-supply was running low. This may seem a little far-fetched but it may very well be a reality and a standard in a few decades. Bluetooth’s primary purpose is to enable short-range wireless voice and data communications anywhere in the world. The way Bluetooth actually works by allowing users to connect to a wide range of telecommunication and computer devices without cables, namely mobile phones, portable computers, personal handheld devices, as well as connection to the Internet (bluetooth.com, ‘how it works’). In the following, I will further explain what, how and where Bluetooth works and what the potential use of this new technology is. The Bluetooth name comes from a Scandinavian king Harald Blatand, where “Blatand” is translated to “Blue Tooth” (Miller Michael, page 26). This king was known for uniting countries just as the Bluetooth technology is intended to unite countries with its open specification. There were five founding companies of the Bluetooth Special Interest Group (SIG): Ericsson, Intel Corporation, IBM, Nokia Corporation and Toshiba Corporation. These companies formed the core group known as the “promoter” companies of the Bluetooth specification. The SIG was first...

Words: 1942 - Pages: 8

Premium Essay

Brick & Mortar It Strategy

...Bricks-and-Mortar IT Strategy Online retailers have been gleaning information about their customers’ merchandise browsing and buying habits Value Proposition  Technology needed to improve brick and mortar retailers      Personalized recommendations Targeted advertisements Improved cross-selling tactics Tracking customer count inside the store Physical Layout of Stores  Personalized recommendations  Personalized notifications can be sent to the customer's cellphone device  Targeted ads Value Proposition  i.e. coupons for shoes if customer has spent extended time in the shoe department  Improved cross-selling tactics  Up selling, different products that customers are unaware of, a item that compliments another item  Tracking customer count inside the store  Ensures adequate staffing levels  Physical Layout of Stores  Helps a retailer develop product placement strategies.  Recognize returning shoppers  Consumers on average are enrolled in 7.4 loyalty programs  53 percent of these members stop participating in at least one loyalty program a year  Irrelevant reward offerings (68 percent) and slow reward accumulation (50 percent) as top barriers Value Proposition  Effectively improve the customers in-store experience  using technology to benefit and value the customer  If customers think that they are benefiting then they will be more willing to provide information.  Personalized (targeted) marketing has potential...

Words: 813 - Pages: 4

Premium Essay

Marketingplan

...Video Baby Monitor with Bluetooth Cody Snodgrass Keller School of Management Marketing Management Professor:  Harold Leffall 1/19/2014 Situation Analysis: Since this type of monitor already exists trying to persuade people to buy this one instead of the competitions. The macro-environmental factors that are going to exist are figuring out the age group that would be the target for this device? Legal issues do not seem to be a problem. However some say this could invade privacy! Technologically speaking this would appeal to many people that have babies to young children. Market Summary: With technology gaining rapid interest many people will want to incorporate it into their baby’s lives. The market for growing technology has increased and so far will continue to years to come. As long as the product lives up to its name then it should speak for itself. SWOT Analysis: Strengths for this product include advanced technology in a growing market. The capabilities for the software and hardware include the ability to expand and grow as well. It will be able to grow with the market. Pairing with cell phones and tablets will appeal to a strong growing market. Weaknesses include many competitors that have a lead on the technology and market. These companies have already made a name for them with other electronics and therefore have an edge on the market. Opportunities include being able to take advantage of a growing market with vast amounts of money and room for growth. Threats...

Words: 559 - Pages: 3

Premium Essay

Apple

...The world today is full of high tech gadgets, gizmos, and widgets. Computers are a large part of the market in that high tech world. Most consumers realize early that buying the right computer is quite the headache. So many choices make the level of involvement for the consumer extremely high with all the involvement factors. Many factors are based on the hardware of the computer. Deciding whether it should be a tablet, laptop, or desktop. Should it have this or that processor? Does it have Bluetooth? Is the hard drive big enough to hold all their music and pictures? Is the screen large enough to watch videos and movies? Is it Wi-Fi or internet capable? These are just a few of the decisions needed by the consumer when it comes to hardware. Other factors are more personal. Deciding what the computer is used for and when they are used? What software will be on the computer? What operating system is on the computer; Windows 8, Chrome, Linux or OSX? What color is it? Finally, what price range is the consumer looking for? All these factors make searching for and buying a computer so difficult. The Apple website definitely simplifies the buying process. When the website is open to the computer selection page, there are little pictures of each type of computer so you can start by picking the form factor you want. After selecting the form factor you are taking to a list of everything available for that particular computer. The consumer is able to click any feature item for the...

Words: 412 - Pages: 2

Premium Essay

Technology

...useful, entertaining & personal experiences * Very intuitive, easy & natural for people * User friendly, will tend to older generations that aren’t capable of knowing the ways of technology, as well as for mentally or physically impaired individuals * http://www.wired.com/2013/12/wearable-computers/all/ * Wearable technology replaces the power of smartphone by increasing accessibility, without the hardships of taking your smartphone out of your pocket or stopping you while doing activities (bicycle, swimming, hiking, skiing) * Wearable revolution could take faster than the mobile revolution * Not much hardware software is required either, as wearable technology can simply work using Bluetooth or Wi-Fi, instead of having a separate Internet plan * Challenge for technologists is to make their wearable technology aesthetically pleasing *...

Words: 1843 - Pages: 8

Free Essay

Itt It220 Lab 5

...Antenna 23DBI 802.11A Directional 152.00 http://www.amazon.com/Outdoor-Pannel-Antenna-802-11A-Directional/dp/B0016HM8VA 802.11g: PROSAFE™ 9 DBI OMNI-DIRECTIONAL ANTENNA ANT2409 129.99 http://www.netgear.com/products/business/access-points-wireless-controllers/antennas-cables/ANT2409.aspx Sewell Part #: SW-6130 Mfg Part #: TEW-OA24D 164.95 http://sewelldirect.com/trendnet-802-11g-wireless-WLAN-24dBi-outdoor-antenna.asp?source=froogle&utm_source=Froogle&utm_medium=cse&cvsfa=1306&cvsfe=2&cvsfhu=53572d36313330 802.11n: CP TECH OAN-2151 Omni-directional Antenna $64.24 http://www.buy.com/prod/cp-tech-oan-2151-omni-directional-antenna-15-dbi-n-type/q/loc/101/210878384.html Netgear ProSafe ANT224D10 2X2 Indoor/Outdoor 10 dBi Directional Antenna, RoHS Compliant, P/N: ANT224D10-10000S. $230 http://www.axiontech.com/prdt.php?item=90457 41.) I would look around and see what other wireless devices, cordless phones, Bluetooth devices and the such to see what would be causing the interference. I would utilize a wi-fi analyzer application to determine where the signal strength is best and relocate the access point or move the interfering device if possible. 42.) Dear Supervisor: Utilizing a secured wireless network with EAP protocol is definitely a way to seriously reduce unauthorized access to the...

Words: 353 - Pages: 2

Premium Essay

Security Evaluation Report

...Information Security Article Evaluation Nelson Okubasu CMGT/441 12/3/2014 MARJORIE MARQUE Can We Sniff WI-Fi?: Implications of Joffe v. Google Google collected information between 2007 and 2010 both in us and oversees. In 2010 a law suit was filed against google for violating the federal wiretap act. Among the first of the cases to rule on intercepting unsecured Wi-Fi communications. As of today our society has become so dependent on using Wi-Fi communications for various aspects of our lives, there is a parallel expectation of privacy. At the same time there are so many people or users out there who don’t understand how Wi-Fi technology works, if their information is secure, whether there privacy is violated or if the government has the right law in place to protect them. The fact that users do not fully understand Wi-Fi technology and the shortcomings of current security mechanisms is not a justification to violate their privacy, but instead to call on the government to enact or amend the Federal Wiretap Act (FWA) to reflect their reasonable expectations. Clear statutory protections will allow for the continued progression of Wi-Fi technology. Society’s dependency on Wi-Fi networks and public hotspots both economically and personally requires expansion of the FWA to ensure national uniformity. Essentially, the court found that even though Wi-Fi networks do transmit data using radio waves, the uses of Wi-Fi technology...

Words: 1058 - Pages: 5

Premium Essay

Into Computer and Technology

...Bluetooth From Wikipedia, the free encyclopedia This article is about a wireless technology standard. For the medieval King of Denmark, see Harald Bluetooth. Bluetooth Developed by Bluetooth Special Interest Group Industry Mobile personal area networks Compatible hardware Mobile phones, Personal computers, Laptop computers Physical range Up to 60 metres[1] Bluetooth is a wireless technology standard for exchanging data over short distances (using short-wavelength UHF radio waves in the ISM band from 2.4 to 2.485 GHz[2]) from fixed and mobile devices, and building personal area networks (PANs). Invented by telecom vendor Ericsson in 1994,[3] it was originally conceived as a wireless alternative to RS-232 data cables. It can connect several devices, overcoming problems of synchronization. Bluetooth is managed by the Bluetooth Special Interest Group (SIG), which has more than 19,000 member companies in the areas of telecommunication, computing, networking, and consumer electronics.[4] Bluetooth was standardized as IEEE 802.15.1, but the standard is no longer maintained. The SIG oversees the development of the specification, manages the qualification program, and protects the trademarks.[5] To be marketed as a Bluetooth device, it must be qualified to standards defined by the SIG.[6] A network of patents is required to implement the technology, which is licensed only for that qualifying device. Contents • 1 Name and logo • 2 Implementation o 2.1 Communication...

Words: 9683 - Pages: 39