kcenergy User Guide Introduction Hardware

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

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

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

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

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

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

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

LM961 Bluetooth Dual Mode Module Standalone (With Embedded Bluetooth v4.1 Stack)

Wireless-Tag WT51822-S4AT

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

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

BLE010V5 1. (Based on CSR1010) Bluetooth Modules. User s Manual V1.5

Customize service and solution for wireless transportation products. Bluetooth Module Hardware Datasheet BLE1010C2P

LM931 Bluetooth low energy Module

BLE (Based on CSR1011) Bluetooth Module. User s Manual V1.3

Rayson Bluetooth Module

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

NDB-C0706A Dual Mode Bluetooth Module

LM930 Bluetooth low energy Module (with U.FL Connector) Standalone (With Embedded Bluetooth v4.1 Stack)

BLE010V2 1. (Based on CSR1010) Bluetooth Modules. User s Manual V2.7

Innovati s Bluetooth 100M Universal Wireless Bluetooth Module

kcserial User Guide version 2006.FEB.20

BLE Bluetooth Low Energy Modules SBC2112-B. Preliminary Specification. Version 1.0

LM53X Development and Evaluation Product Family

WM1030 Rev Introduction. Ultra low power DASH7 Modem. Applications. Description. 868 / 915 MHz. Features. WIZZILAB Technical datasheet 1/10

KST3300 Firmware Specification

LM931 Bluetooth low energy Module Standalone (With Embedded Bluetooth v4.1 Stack)

KC-21. Class 2 Bluetooth Data Module. Firmware Features. Hardware Features. Applications. Description

Bluetooth Low Energy Protocol Stack

SH1030 Rev Introduction. Ultra low power DASH7 Arduino Shield Modem. Applications. Description. 868 MHz. Features

ATSAMB11 BluSDK SMART Example Profiles Application User's Guide

abserial User Guide 10 Feb 2015

MiniBeacon Plus User Manual

User Manual V1.1 Date: WiFi RS-232 Adapter. Red LED: IP Address Blue LED: TX/RX 5V Out (Pin 9)

Product Specification

March 21, BT22 Datasheet. Amp ed RF Technology, Co., Ltd.

BLE Command Line Interface Document

LM930 Bluetooth low energy Module (with IPEX Connector) Standalone (With Embedded Bluetooth v4.1 Stack)

BT 31 Data Sheet. Amp ed RF Technology Inc.

Bluetooth Class 1/2 SPP Module

Product Specification

Use of ISP1507-AL Evaluation Boards

Features : General Description:

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

BT-22 Product Specification

G3P-WiFi User Manual Release 1.2

Pmod ESP32 Reference Manual

LM780 Bluetooth Serial Data Module 25m Distance with On-Board Antenna

LM058 Bluetooth Serial Adapter

DFRobot BLE4.1 Module SKU: TEL0120

Bluetooth Low Energy Protocol Stack

s132_nrf52 release notes

Key Specifications. Description. Applications. BC118-Disovery Board v1. Manual Rev B

KC-22. Class 2 Bluetooth Data Micro Module. Firmware Features. Hardware Features. Applications. Description

LMU Bluetooth Chipset Application Note

Bluetooth RS232 Serial Adapter

Tap BLE API Documentation

Wireless Sensor Networks BLUETOOTH LOW ENERGY. Flavia Martelli

Qblinks Qmote Maker s Module Developer Guide

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

Use of ISP1807-LR Evaluation Boards

LM300 Bluetooth Ethernet Access Point/Server 3 Simultaneous Bluetooth SPP Connections

Our default kcgateway is released in two editions: our class 1 KC5012 edition, and our class 2 KC6012 edition (also intended for KC6112 modules).

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

BLUETOOTH HID PROFILE

RN-WIFLY-EVAL-UM. WiFly Evaluation Kit Roving Networks. All rights reserved. RN-WIFLY-EVAL-UM-1.0 Version /8/2011 USER MANUAL

HZX N03 Bluetooth 4.0 Low Energy Module Datasheet

How to configure the BlueNRG-1 and BlueNRG-2 devices in network coprocessor mode. Main components Bluetooth Low Energy wireless system-on-chip

CISS Communication Protocol Bluetooth LE

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

CISS - Connected Industrial Sensor Solution

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

Firmware Reprogramming Guide

QuickLogic TAG-N System User Manual

ELET114A Bluetooth Module DATASHEET. Website: / 7

Serial Cable Replacement Data Acquisition Remote Sensors RFID Tag Readers HFP Handsfree Profile Remote phone control (without audio link).

See version notes page for changes EPOS. Aviation M2M LNG

BLE232: Manual Copyright 2014 taskit GmbH

ZICM357P2 - Evaluation Kit User s Guide

Enhanced Data Rate (EDR) compliant with V2.0.E.2 of the. specification for both 2Mbps and 3Mbps modulation modes

WiMOD LR Base Plus Host Controller Interface

Data sheet Wireless UART firmware version 4

ACR1255U-J1. Secure Bluetooth NFC Reader. User Manual V1.02. Subject to change without prior notice.

RC232 Configuration and Communication Tool (CCT) User Manual

BLUEGIGA BLUETOOTH SMART SOFTWARE

iwrap User Guide Version 1.2

Using Network Analyzer Tool to Monitor Bluetooth Mesh Traffic

RN-171-EK Evaluation Board

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

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

RN52 Bluetooth Audio Module

WiMOD LR Base Host Controller Interface

BT LE RN4020 USB Dongle Datasheet

BLUETOOTH 2.0 UART MODUEL USER GUIDE (BT20_U)

Preliminary File System User Manual

BLUE RANGE USER GUIDE. Low Energy

LM071 Bluetooth 2.0 / EDR Module Class 2 BC04, 8MB Flash, Up to 25m

Inside Bluetooth Low Energy

MBUS-CCT (Configuration and Communication Tool) User Manual

LM048 Bluetooth v2.0, v2.1 RS232 Serial Adapter Standalone (With Embedded Bluetooth v2.0 / v2.1 Stack)

Transcription:

Introduction Our kcenergy firmware provides an embedded Bluetooth Low Energy (BLE) system on a small footprint preengineered module. The firmware is written for the CSR1010 chipset. kcenergy provides the required BLE profiles including GATT and GAP, along with several optional profiles, and custom KC Wirefree profiles. kcenergy can function as BLE client and/or server. It can provide ibeacon advertisements, GATT client and server features, as well as over the air updates. It is typically used to provide data to host devices through GATT server characteristics or beacon advertisements. The firmware can expose both server and client functionality, although it exposes only server functionality by default. The AT Mode command may be used to change this. Serial port functionality is available. This service can transmit data to and from the UART interface wirelessly to remote devices. Bandwidth is more limited than a dedicated SPP module and is not expected to exceed 20 kb/s. The data exchange can operating in either CommandMode or DataMode. In CommandMode, the data received will have a [coms]=n<lf> prefix, where n is an ASCII number string indicating the number of bytes received, followed by the data payload, and closed with a <LF> suffix. In DataMode, all Uart activity is transparent data streaming. Entering the ~~~ string will escape from DataMode. Hardware This User Guide covers device operations specific to this firmware edition. Hardware features and capabilities are outlined in the module Datasheets. Page 1

Supported Bluetooth Profiles Profile Name Version Dependencies GAP Generic Access Profile 1.0 None GATT Generic Attribute Profile 1.0 None FMP Find Me Profile 1.0 IAS PXP Proximity Profile 1.0 LLS, IAS, TXP Included Bluetooth Low Energy Services Services are organized collections of attributes that expose data fields for wireless input and output on the BLE device to remote devices. Note: The 16 bit Bluetooth Service UUIDs are shorthand for 0000XXXX 0000 1000 8000 00805F9B34FB. Profile Name UUID Configure GAP Generic Access Service 0x1800 Enabled GATT Generic Attribute Service 0x1801 Enabled DIS Device Information Service 0x180A Enabled BATT Battery Service 0x180F Enabled TPS Tx Power Service 0x1804 Enabled LLS Link Loss Service 0x1803 Enabled IAS Immediate Alert Service 0x1802 Enabled Included Custom Services kcenergy firmware provides the following custom services and characteristics by default: Service COMS Service COMS Characteristic Bytes Type UUID UUID 0000F100 0000 AAAA BBBB CCCCDDDDEEEE Data Transfer 20 String 0000F101 0000 AAAA BBBB CCCCDDDDEEEE The COMS Service allows the transfer of serial data between a host and the kcenergy Uart. The Data Transfer characteristic is used to send and receive data. In order to automatically receive data from the COMS Service, the client device (phone) must send a Notification request for the kcenergy Data Transfer Characteristic. With the server notification enabled, kcenergy will automatically send any new data (received from the Uart). Android API call is setcharacteristicnotification(characteristic, enable) ios API call is setnotifyvalue(enable, characteristic) Page 2

Service PIOS Service PIOS UUID Characteristic Bytes Type UUID 0000F200 0000 AAAA BBBB CCCCDDDDEEEE Aio State 2 Value 0000F201 0000 AAAA BBBB CCCCDDDDEEEE Aio Notify 1 Value 0000F202 0000 AAAA BBBB CCCCDDDDEEEE Pio State 2 Value 0000F203 0000 AAAA BBBB CCCCDDDDEEEE The PIOS Service reports the Aio and Pio values of the module to client devices. Reading the Pio state will obtain the current Pio state while writing the Pio state will set the Pio state. The Aio state characteristic will read from Aio 1 and write to Aio 2. Notifications using the AT Notf command must be enabled on the client side and will send periodic notifications from Aio 0 thereafter. Service MEAS Service MEAS Characteristic Bytes Type UUID UUID 0000F300 0000 AAAA BBBB CCCCDDDDEEEE Measure 0 2 Value 0000F301 0000 AAAA BBBB CCCCDDDDEEEE Measure 1 2 Value 0000F302 0000 AAAA BBBB CCCCDDDDEEEE Measure 2 2 Value 0000F303 0000 AAAA BBBB CCCCDDDDEEEE Measure 3 4 Value 0000F304 0000 AAAA BBBB CCCCDDDDEEEE Measure Str 21 String 0000F305 0000 AAAA BBBB CCCCDDDDEEEE The MEAS Service provides a convenient way to send and receive structured numerical data, such as Temperatures, Lengths, and Time. Measurement characteristics 0 2 are each 16 bit values, while the Measurement 3 characteristic is a 32 bit value. The Measurement String characteristic is string up to 21 characters/bytes. If notifications are requested by the client device (phone), then all updates to these characteristics are automatically transmitted to the phone. Otherwise, they can be read manually anytime. Service OTAU Service OTAU UUID 00001016 D102 11E1 9B23 00025B00A5A5 The OTAU (Over The Air Update) Service permits the device to be wirelessly updated to newer versions of firmware. This is a CSR implementation, and requires the CSR OTA application to run on a PC (and requires a CSR Low Energy Bluetooth device built in or USB dongle). Page 3

Wireless Firmware Update The system firmware can be updated wirelessly. Requirements are: Microsoft Windows 8 (or higher), Bluetooth Low Energy device (internal or dongle), the CSR µenergy Over the Air Updater application, the new firmware image file. http://www.kcwirefree.com/docs/csr_ota_installer.zip Instructions Install CSR_OTA application. Turn on computer Bluetooth Low Energy (internal or dongle) Open µenergyotaupdater Select kcenergy firmware image file Select Enable Challenge Response Insert the KC Wirefree authentication key: EAAC15BA601F7B910010796171552142 Power up KC Wirefree BlueEnergy demo board or module Press the Scan for Device button to find BlueEnergy device Select the device then press the Update Device button Page 4

BLE Phone Utility Apps BLE Scanner Free Android Does not handle notifications or PNP ID s. nrf Master Control Panel Free Android/IOS Status indicators do not update, DFU not avail. ibeacondetector Free Android RSSI values may be erroneous. LightBlue Free IOS No known issues. Locate Beacon Free IOS No known issues. Device States Idle Idle is the default device state. It disables discovery advertising and disconnects any currently active connections. Bypass and Notification functions will have no effect when the device is idle. The UART will be active Fast Discovery The device will send out advertising packets every 60 ms for up to 30 seconds, after which it will transition to Slow Discovery to save power. In other respects, discovery is identical to Idle. Slow Discovery The device will advertise once every 1280ms for up to 60 seconds. Scanning Scanning is only available when the device is acting in a client role. This state is used to indicate passive listening for discoverable devices. Connected Connected state enables the connection specific commands, including AT Notf, Meas, and UART Bypass. Upon entering this state, the message ConnUp will be printed to UART. Disconnecting This temporary state indicates that a disconnection is in progress. When the disconnection is completed, the message ConnDn will be printed to UART. Page 5

Pio Assignments on KC 4014/4114 Modules PIN I/O Default Firmware Feature AIO 0 AIO 1 Input Demo Reader AIO 2 Output Demo Controller TXD Output Uart Transmit RXD Input Uart Receive PIO 2 Input Factory Reset (HIGH during boot) PIO 3 Input Command Button PIO 4 Input Aux Button PIO 5 [CLK] Input Unassigned (Optional SPI CLK, I2C SCL) PIO 6 [CSB] Input Unassigned (Optional SPI CSB, I2C SDA) PIO 7 [MOSI] Input Unassigned (Optional SPI MOSI) PIO 8 [MISO] Input Unassigned (Optional SPI MISO) PIO 9 Output Activity Output PIO 10 Output Aux Output PIO 11 Input Unassigned SPI Input Enables SPI feature WAKE Input Wake from Deep Sleep when HIGH Page 6

Low Energy UART The onboard UART is the primary interface for configuring and communicating with the device. The UART operates in one of two modes: Bypass and Command mode Bypass Mode Bypass mode remains similar to the bypass mode found on previous Command Mode AT Commands on the KC4014 and KC4114 use a new command format that differs from our commands on other kcwirefree modules. All commands now require either a get or a set parameter following the command. parameters return the value of the current setting while set will modify the device state as appropriate. Default UART setting is 115200 8 N 1, without hardware flow control. Enter AT Commands via UART as standard strings, terminated with the LF character (0x0A). Command lines parsed and executed when the LF character is received. All AT Commands accept either a or parameter. The parameter will return the value of the current setting. The parameter will save the following parameters as appropriate. Output messages are terminated with LF (0x0A). While in a remote connected Bypass mode, using the escape sequence ~~~ can escape bypass mode AT Command List Addr Aio Bat Bcon Coms Conn Dbug Dtim Hid I2c Idle Info Link Mem Meas Mode Name Pair Pio Role Rset Rssi Uart AT Commands AT Addr The Addr command prints the Bluetooth device address. AT Addr AT Addr Addr 646E:6C:F003 AT Aio The Aio command provides the interface to the Analogue I/O pins on the kcenergy BLE module. There are 3 available Aio pins, numbered 0 2. The Aios may be driven from 0 1350mV. The available notification timer may be configured to report the voltage on Aio pin 0 to a remote device at periodic intervals. Page 7

Notify Cmd <aio> <e/d> <level> <period> AT Aio <aio> AT Aio <aio> <e/d> <level> At Aio Notf <e/d> <period> Aio pins 0 2 E/D (enable or disable) Voltage in mv at which to drive the Aio (optional) Reporting interval in milliseconds AT Aio 1 475 mv AT Bat The Battery command may be used to read the current battery level. The command will return the battery level in both percent and millivolts. AT Bat AT Bat 100% 3327mV AT Bcon This command can be used to configure the settings for ibeacon and altbeacon setups. The Major and Minor parameters refer to customer installation information. The TX power parameter is an index into the power table and should be omitted. <minor> <major> <UUID minor> <UUID major> <TX power> AT Bcon AT Bcon <minor> <major> <UUID minor> <UUID major> <TX power> The minor version of the beacon to be advertised in hexadecimal format The major version of the Beacon to be advertised in hexadecimal format Minor 16 bit word of the UUID in hexadecimal format Major 16 bit word of the UUID in hexadecimal format The TX Power parameter should be normally omitted. AT Bcon 0123 4567 89ab cdef 6 0123 4567 89AB CDEF 6 Page 8

AT Coms The Coms (Com Port Transfer) command sends data using the COMS Service, for transmission to the remote device. The bytes parameter is the payload size. Must include a LineFeed between the AT Command and the data payload. There is no additional LineFeed or other End Of Line marker following the payload data. The Coms command will transmit the subsequent <bytes> of data when received, until completed. Issuing the Coms command with 0 bytes, will cause the The remote device must have enabled notifications on the COMS Service Data Transfer Characteristic, otherwise unsolicited data cannot be sent, and the command will fail. Command <bytes> <lf> <data> not connected AT Coms <bytes><lf><data> 0=DataMode, 1 64 bytes to transmit (ASCII number string) LineFeed character Data payload AT Coms 10<lf>HelloWorld Coms Ok AT Coms 12<lf>HelloWorld!! Coms Failed AT Coms 0 [datamode] AT Conn The Conn (Connection) command reconnects to the last connected device. This functionality will be expanded in future releases. AT Conn AT Conn Conn 00163EE366AF AT Dbug The Dbug (Debug) command is designed for internal purposes only. Use only under direction from kcwirefree support. Debug output is not human readable without additional direction. <flags> AT Dbug AT Dbug <flags> Hex16 flag to enable debugging modules AT Dbug 111 0 1 1 0 1 1 1 1 Page 9

AT Hid The HID command may be used to send HID packets if the appropriate HID profile is enabled in firmware. The report IDs must be in the range 1 3. Report ID 1 corresponds to HID Input/Keyboard keys while report ID 3 corresponds to Consumer/Media keys. <id> <data> AT Hid <id> <data> Hid report ID (1 3) The packet in hexadecimal format AT Hid 3 200000 [20:00:00] AT I2c The I2c command may be used to communicate with I2c devices manually. For I2c configuration, all values except the enable flag are optional. <device> <addr> <length> <data> <e/d> <sda> <scl> <power> <on period> <off period> <pull mode> AT I2c <device> <addr> <length> AT I2c <device> <addr> <data> AT I2c config AT I2c config <e/d> <sda> <scl> <power> <on period> <off period> <pull mode> I2c device address in hexadecimal format I2c memory address to read or write in hexadecimal format Length of data to be read in hexadecimal format Hexadecimal data to be written E/D (enable or disable) SDA line Pio (2 9). Default Pio is 5 SCL line Pio (2 9). Default Pio is 6 Power rail Pio (2 9). Default Pio is the onboard power rail The clock tings default to I2c Fast Mode. The clock settings default to I2c Fast Mode. Please contact KC Wirefree for help modifying this value. At I2C 50 1200 4 [4A:00:32:FF:] Page 10

AT Idle The Idle command may be used to change the sleep mode of the device. The Uart is disabled when the device is in Deep Sleep, except when using the special 2400 baud rate setting. <mode> AT Idle AT Idle <mode> Sleep mode 0 2 0=Never, 1=Deep Sleep, 2=Shallow Sleep (default) AT Idle 2 Idle 2 AT Info The Info command prints out the information regarding the current firmware version. AT Info AT Info kcenergy v0.6 by KC Wirefree HW v1.0 SW v0.6 Date Jun 3 2015 AT Meas The AT Meas (Measurement) command provides an interface to KC Wirefree s custom measurements profile. All characteristics and notifications available in the profile are accessible through this command. It is only accessible in firmware in which the measures measurements profile is enabled. When a characteristic is set, notifications will be sent to connected devices if they have elected to receive notifications on that characteristic. Str Str <index> <value> <string> AT Meas <index> AT Meas <index> <value> AT Meas str AT Meas str <string> 0 3 (measurement characteristic variable 0 3) 16 bit value (measurement characteristic variable 0 2) 32 bit value (measurement characteristic variable 3) ASCII string (measurement characteristic variable str) At Meas str TestStr Page 11

Meas TestStr AT Mode The AT Mode command is used to print out the device state. These states will also be printed automatically when the device state changes. The device states include: [init] This is a very brief power up state [idle] No discovery or connection [fast] Fast discovery (advertising every 60ms) [slow] Slow discovery (advertising every 1280ms) [scan] Listening for discoverable/advertising BLE devices [conn] Device is connected to a host [dcon] Device is currently disconnecting, very brief state AT Mode AT Mode [conn] AT Notf The Notf (Notify) command is used to send notifications on any characteristic for which notifications have been enabled. This command should not be used without specific direction from kcwirefree. <handle> <data> AT Notf <handle> <data> GATT characteristic ID in hexadecimal The data as a stream of non zero bytes AT Notf 2816 5658 AT Pair The AT Pair command may only be used to delete pairing in the present iteration. AT Pair del AT pair del Pair del 0 AT Pio The Pio command may be used to read and set the Pio lines. <pio> AT Pio <pio> AT Pio <e/d> <pio> Pio pin 2 11 Page 12

<enable> E/D (enable or disable) AT Pio 9 E Pio 9 E AT Rset The Rset (Reset) command may be used to reset the device. AT Rset AT Rset kcenergy v0.8 by KC Wirefree HW v1.0 SW v0.8 Date Jun 3 2015 AT Role This command is used to switch the device between operating modes. It should be followed by AT Reset. Server mode is the factory default and will expose GATT services to remote hosts. Client mode is currently limited to discovery procedures, RSSI, and reading advertisement data. Additional functionality for this mode available upon request. Beacon mode can be used to enable ibeacon functionality. The AT Bcon command may be used to configure Beacon data to your requirements. <role> AT Role AT Role <role> Only role 0 is currently available AT Role Role 0 AT Rssi The Rssi command returns the Rssi reading of the active connection. AT Rssi AT Rssi dbm 49 AT Uart The Uart command is used to configure the UART interface to customer requirements. AT Uart Page 13

Bypass <enable> <baud rate> <config> <blocking> <flow ctrl> <rts> <cts> AT Uart <enable> <baud rate> <config> <blocking> <flow ctrl> <rts> <cts> AT Uart bypass <enable> E/D (enable or disable) Useful values for this parameter can be found in the following table 12C0 (2400 baud works in Deep Sleep), 0028 (9600 baud), 004E (19200 baud), 009E (38400 baud), 00EB (57600 baud), 01D9 (115200 baud), 0760 (460800 baud), 0EBF (921600 baud) This parameter is optional This parameter is optional E/D (enable or disable) RTS pio assignment (2 11) CTS pio assignment (2 11) AT Uart E 01d9 E D D 01D9 0 Page 14

Contact Information KC Wirefree Corporation 2640 W Medtronic Way Tempe, Arizona 85281 Phone (602) 386 2640 Website www.kcwirefree.com Support sales@kcwirefree.com Page 15