You are on page 1of 15

User’s Guide

- BLE tag & Gateway -

July 24, 2018


1.1 BLE Tag - Specification

Part name Description


MPU CC2640R2F, ARM Cortex-M3, 48Mhz
Memory Flash:128KB, Cache:8KB, SRAM:20KB
Chip package 2.7 x 2.7 mm, 34pin I/O Interface SPI, I2C, I2S Oper. Voltage 1.8 ~ 3.8V

Current - RX:5.9mA, TX at +5dBm: 9.1mA, TX at +0dBm: 6.1mA


CPU & RF
consumption - Shutdown: 100nA, Standby : 1.1A, Active: 3mA

Temp. sensor Range: -40~85℃, Accuracy:±5℃ Battery monitor Range: 1.8~3.8V, Resolution:50mV

Radio Frequency - 2.4GHz Bluetooth Low Energy(BLE5)

Range 2, 4, 8, 12 or 16G Resolution 8, 10 or 12bit Sampling rate 14~1300 samples/sec


Accelerometer
Current - Sleep: 0.1uA, Sniff : 0.4uA
sensor
consumption - Ultra-Low Power with 32 sample FIFO : 0.9uA @25Hz, 1.6uA @50Hz
(mCube)
Chip package 1.6 x 1.6 x 0.94 (mm), 12pin CPU Interface I2C, SPI
Antenna 2.4GHz PCB Antenna
Button Dome Switch
power DC 1.8 ~ 3.6V
1.2 BLE Tag – Board

GND VDDS

Dome Switch

GND
DIO_12
DIO_10
DIO_13
DIO_11
LED VDDS

GND
RESET
JTAG_TMSC
JTAG_TCKC
VDDS

Accelerometer Sensor CC2640R2F


2.1 BLE+Sub-1GHz Module - Specification

Part name Description


MPU CC1350, ARM Cortex-M3, 48Mhz
Memory Flash:128KB, Cache:8KB, SRAM:20KB
Chip package 7 x 7 mm, 32pin I/O Interface SPI, I2C, I2S Oper. Voltage 1.8 ~ 3.8V

- Sub-1GHz: RX: 5.8mA, TX at +14dBm: 24.3mA


CPU & RF Current
- 2.4GHz BLE: RX:6.4mA, TX at +9dBm: 22.3mA, TX at +0dBm: 6.3mA
consumption
- Shutdown: 125nA, Standby : 830nA, Active: 2.5mA
Temp. sensor Range: -40~85℃, Accuracy:±5℃ Battery monitor Range: 1.8~3.8V, Resolution:50mV
- 2.4GHz Bluetooth Low Energy(BLE) 4.2
Radio Frequency
- Sub-1GHz: 868 ~ 920 MHz (selectable )
Range 2, 4, 8, 12 or 16G Resolution 8, 10 or 12bit Sampling rate 14~1300 samples/sec
Accelerometer
Current - Sleep: 0.1uA, Sniff : 0.4uA
sensor
consumption - Ultra-Low Power with 32 sample FIFO : 0.9uA @25Hz, 1.6uA @50Hz
(mCube)
Chip package 1.6 x 1.6 x 0.94 (mm), 12pin CPU Interface I2C, SPI
- Relative Humidity Accuracy ±2% (typical),
Temp & hunidity Accuracy
- Temperature Accuracy ±0.2°C (typical)
sensor
Current - 710 nA @ 1sps, 11 bit RH Measurement
(TI HDC1080)
consumption - 1.3 μA @ 1sps, 11 bit RH and Temperature
Chip package 3 x 3 x 0.8 (mm) CPU Interface I2C, SPI
External port GPIO for various sensors and DC 3.3V input
Antenna 2.4GHz PCB Antenna, 868 ~ 920MHz PCB Antenna/micro-SMA
Button Dome Switch
power DC 1.8 ~ 3.6V
2.2 BLE+Sub-1GHz Module - Board

Dome Switch JTAG Port (20 contacts

RESET

VDDS
SWO
GND

TDO
TMS
RXD
TXD

TCK
TDI
External Port

340 MHz Temp & Humidity sensor


PCB Antenna
CC1350

LED

Accelerometer Sensor

868 ~ 920 MHz


BLE 2.4GHz PCB Antenna
PCB Antenna

Sub-1GHz micro-SMA
3.1 Gateway - Specification

Part name Description


MPU CC1350, ARM Cortex-M3, 48MHz
Memory Flash:128KB, Cache:8KB, SRAM:20KB
Internal Comm. SPI connection with WiFi-Comm-Module
- Sub-1GHz: RX: 5.8mA, TX at +14dBm: 24.3mA
Current
End-Device- - 2.4GHz BLE: RX:6.4mA, TX at +9dBm: 22.3mA, TX at +0dBm: 6.3mA
Consumption
Comm-Module - Shutdown: 125nA, Standby : 830nA, Active: 2.82mA
- Temperature: Range: -40~85℃, Accuracy:±5℃
Monitoring
- Battery: 1.8~3.8V, Resolution:50mV
- 2.4GHz Bluetooth Low Energy(BLE) 4.2
RF Comm.
- Sub-1GHz: 868 ~ 920 MHz (selectable)
MPU CC3200, ARM Cortex-M4, 80MHz
- Internal RAM:256KB
Memory
- External Flash Memory : 1MB
Internal Comm. - SPI connection with End-Device-Comm-Module
- Dedicated ARM MCU with WiFi and Internet Protocols in ROM
- 802.11 b/g/n
WiFi-Comm- WiFi Network - TCP/IP Stack, Socket Application, 8 Simultaneous TCP or UDP Sockets, 2 Simultaneous TLS and SSL Sockets
Module Subsystem - TX Power : 18dBm @1 DSSS, 14.5dBm@54 OFDM
- RX Sensitivity : -95.7dBm@1 DSSS, -74dBm@54 OFDM
- Application Throughput : UDP:16 Mbps, TCP:13Mbps
- Hibernate: 4uA
Current - Low-Power Deep Sleep: 250uA
consumption - RX Traffic (MCU Active): 59mA@54 OFDM
- TX Traffic (MCU Active): 229mA@54 OFDM
- WiFi 2.4GHz: Chip Ant, SMA connector
Antenna - BLE 2.4GHz: PCB Ant, SMA connector
- Sub-1GHz (868~920MHz ): PCB Ant, SMA connector
- DC 5V input (internal 3.3V supply)
Power
- Backup battery (1000~3000mAh)
- End-Device-Comm-Module: 10pin JTAG Port, Green & Red LED port
Port & LED
- WiFi-Comm-Module: 10pin JTAG Port, Green & Red LED port
3.2 Gateway - Board

 Mode Switch : left: UniFlash, right: Normal start


 PWR Switch : left: Power On, right: Power Off
4. Debugger & Download Tools

CC3200 Download Cable (UNIFLASH)

Micro-USB: XDS110 Debugger port

JTAG: 10 lines flat cable for gateway-CC1350

JTAG: Clip for BLE Tag (14 Contacts, 1.27mm pitch)


Clip for Sub-1Ghz Module (20 Contacts, 1.27mm pitch)
5. TI SimpleLink SDK & Tool

 CC2640R2F :
- http://www.ti.com/product/CC2640R2F/toolssoftware

 C1350
- http://www.ti.com/product/CC1350/toolssoftware

 CC3200 :
- SimpleLink Wi-Fi CC3200 Software Development Kit (SDK) : http://www.ti.com/tool/cc3200sdk
- Previous versions of UniFlash with support for CC3200/CC3100 : http://www.ti.com/tool/uniflash

 Code Composer Studio (CCS) Integrated Development Environment (IDE) : http://www.ti.com/tool/ccstudio-wcs


6.1 Gateway settings

1) UniFlash - http://processors.wiki.ti.com/index.php/CCS_UniFlash_v3.4.1_Release_Notes
Install
- Window office Install

2) Setup proced
ure 1. Turn off power switch inside gateway and set mode selection switch to configuration mode

2. Connect the supplied console cable to the PC USB port and to the console port on the gateway board

3. Check the COM port of the console cable through PC device management, start UniFlash, enter COM port

4. Run "Get Version" from the command pad to see if it runs without errors

5. Remove all update checks for files in "System Files" (update only by technical support personnel)

6. "/ Mqtt_config" in "User Files" (if not created) update check and set file path in PC (see mqtt_config.txt)
7. In "CC31xx / CC32xx Config Groups"
"Device Role": update check and select "Device Role" as Station
"Station": update check
"AP": Update check and input SSID and password for connecting with router (WiFi AP)

8. Select "Program" from "Operation" menu and execute it and wait for completion

9. Exit from "File" menu and exit


6.2 MQTT Subscribing / Publishing

Subscribing topic: “GW_xxxxxxxxxxxx Subscribing topic: “GW_xxxxxxxxxxxx_r


Publishing topic : “GW_xxxxxxxxxxxx_r Publishing topic : “GW_xxxxxxxxxxxx

Gateway Server

MQTT Broker

 xxxxxxxxxxxx : Gateway ID (12 byte)


 Server publishing key word : “GW_read”, “GW_write”, “TAG_read”, “TAG_write”
 Gateway publishing key word : “GW_data”, “GW_status”, “TAG_date”, “TAG_status”
6.3 mqtt_config – Gateway Settings Sample
#
# MQTT Configuration
#
# created date: 2017.11.23 # --------------------------------------------
# # Client id = Device id = Subscribe Topic
# --------------------------------------------
# -------------------------------------------- #Max length: 20 byte
# Server/Broker Address #cid = LP-WiFi.GW000
# --------------------------------------------
#addr = insator.samsungsds.com cid = GW_0001
#
#Local Test Network # --------------------------------------------
addr = 192.168.219.115
# Publish Topic
# -------------------------------------------- # --------------------------------------------
# Port number #Max length: 20 byte
# --------------------------------------------
#INSATOR port pub = ocp/dataBus
#port = 8005
# # --------------------------------------------
#default
port = 1883 # Keep Alive Timer (seconds)
# --------------------------------------------
alive = 25
# --------------------------------------------
# Security enable & protocol version
# -------------------------------------------- # --------------------------------------------
#define SL_SO_SEC_METHOD_SSLV3 (0) /* security metohd SSL v3*/
#define SL_SO_SEC_METHOD_TLSV1 (1) /* security metohd TLS v1*/ # User Name
#define SL_SO_SEC_METHOD_TLSV1_1 (2) /* security metohd TLS v1_1*/ # --------------------------------------------
#define SL_SO_SEC_METHOD_TLSV1_2 (3) /* security metohd TLS v1_2*/ uname =
#define SL_SO_SEC_METHOD_SSLv3_TLSV1_2 (4) /* use highest possible version from
SSLv3 - TLS 1.2*/
#define SL_SO_SEC_METHOD_DLSV1 (5) /* security metohd DTL v1 */
# # --------------------------------------------
#INSATOR
#security = 3 # User Password
# --------------------------------------------
upass =
# --------------------------------------------
# Cipher version
# --------------------------------------------
#define SL_SEC_MASK_SSL_RSA_WITH_RC4_128_SHA (1)
#define SL_SEC_MASK_SSL_RSA_WITH_RC4_128_MD5 (2) # --------------------------------------------
#define SL_SEC_MASK_TLS_RSA_WITH_AES_256_CBC_SHA (4) # Date Time
#define SL_SEC_MASK_TLS_DHE_RSA_WITH_AES_256_CBC_SHA (8) # --------------------------------------------
#define SL_SEC_MASK_TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA (16)
#define SL_SEC_MASK_TLS_ECDHE_RSA_WITH_RC4_128_SHA (32) # format : YY:MM:DD:HH:MM:SS
#define SL_SEC_MASK_TLS_RSA_WITH_AES_128_CBC_SHA256 (64) date = 18:01:08:00:00:00
#define SL_SEC_MASK_TLS_RSA_WITH_AES_256_CBC_SHA256 (128)
#define SL_SEC_MASK_TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256 (256)
#define SL_SEC_MASK_TLS_ECDHE_ECDSA_WITH_AES_128_CBC_SHA256 (512) # ----- End of File --------------------------
#
#INSATOR
#cipher = 64
6.4 MQTT communication with server (mqtt_config Reference)
1) Client ID Definitions - If you do not define it in the mqtt_config file, it will automatically generate a 15-byte string
- Automatic generation example: GW_cc78ab53b584
- The maximum length is 20 bytes.
2) Subscribe Topic - Use Client ID
Definitions
3) Publish Topic - Used with "_r" appended to the Client ID
Definitions - Automatic generation example: GW_cc78ab53b584_r
- The maximum length is 20 bytes.

4) Sensor data transfer p <step-1> The gateway registers the subscribe topic on Broker and the server registers the publish topic of Gateway to Brok
rocedure
er.

<step-2> The server publishes the following message through the broker to the gateway's subscribe topic
{"TAG_read" : {"in": 0, "ti" : “FFFFFFFFFFFF", "ri": ["28", "31“] }}

* “TAG_read”  Expression of the read command.


* “in”:0  Interval is a representation of the data received from the communication module to the server without skippin
g. If it is set to '2' instead of '0', it is sent to the server only once when receiving 3 times..
* “ti”:”FFFFFFFFFFFF”  Tag id represents all communication modules. For specific tags, specify the id of the tag.
* “ri”:[“28”, “31”]  In Resource Id, "28" is the id of the external sensor, and "31" is the internal sensor id.
* Overall Meaning: This command requests reporting without skip on Resource Id "28" and "31" data received from all c
ommunication modules.

<step-3> The gateway publishes the sensor data received from the communication module as a message of the following f
ormat.

(1) If the publish topic name is not defined by the user (default):
{“TAG_data”:{“ti”: “cc78ab528681”, “28”:010641020201030341040561, “31”:[22, 21.2, 49.9]}}

(2) If the publish topic is defined by the user:


{“TAG_data”:{“gi”: “GW_cc78ab53b584”, “ti”: “cc78ab528681”, “28”:”010641020201030341040561”, “31”:[22,
21.2, 49.9]}}

* “TAG_data”  Means data received from the communication module


* “ti”:“cc78ab528681”  Tag id
* “28”:010641020201030341040561
6.5 MQTT Resource List
Electronic tag (TAG) Gateway (GW)
MQTT Service MQTT Service
Division Resource
name R/W Commamd Item name R/W Command
 Device ID 00 R TAG_read  Device ID 00 R GW_read
Basic Inform  Model Number 01 R  Model Number 01 R
ation  Manufacturer Name 02 R  Manufacturer Name 02 R
 Certification Number 03 R  Certification Number 03 R

 TX Power Table  Sub1G RF Mode 05 04 RW RW TAG_read  Security Mode 04 RW GW_read


 TX Power Mode  Sub1G Ch Bandwidth 06 20 RW RW TAG_write  Server IP Address 05 RW GW_write
 UUID Value Reset  Sub1G Ch Number 07 21 W RW  Operation Mode 06 RW
 Base Timer  Sub1G Tx Power 08 23 RW RW  TAG UUID operation Abort 07 W
 Number of frame type  Sub1G Tx Repeat 09 33 RW RW  LED Control 08 RW
 Frame type  Sub1G Sync Interval 10 34 RW RW
Setup / Cont Frame Period
Operation mode


Sub1G Rx On Time
Sub1G Rx Off Time
11
12
35
36
RW
RW
RW
RW


Sub1G Rf-Mode
Sub1G Channel Bandwidth
18
19
RW
RW
rol  Connect interval  Sub1G Time Slot Width 13 37 RW RW  Sub1G Channel Number 20 RW
 Connect mode  Sub1G Time Slot Num 14 38 RW RW  Sub1G Tx Power 21 RW
 Connect Device List 15 RW  Sub1G Tx Number of Repeat 22 RW
 Device Shutdown 16 W  Sub1G Sync Interval 23 RW
 Security Enable 17 RW
 LED Control 18 RW
 Sleep Timer 19 RW
TAG_read  BLE MAC Address 09 R GW_read
 Battery Status 10 R
 Temperature 11 R
Status infor  Memory Usage 12 R
 Number of Active TAG 13 R
mation  Number of Output Message to TAG 14 R
 Number of Input Message from TAG 15 R
 Number of WiFi Output Message 16 R
 Number of WiFi Input Message 17 R
 MessageType 22 R
 Device RSSI 24 R
Event infor  Eddystone Version 25 R
 Eddystone Type & Opeation Mode 26 R
mation (mes  Running Time 27 R
sage)  External Sensor Value 28 R
 Motion Count 29 R
 Battery Status 30 R
 Temperature(Device, Ambient) & Humidity 31 R
 btn Count 32 R

<GW Operation Mode> <TAG Temperature & Humidity>


- Resource id: “06” - Resource id : “31”
- value: 99, 98, or 88 - Value: Device-temperature, Ambient-Temperature, and Humidity
- 99 : Sub-1GHz non-TDM, - Device-temp : 1℃ Unit Expression
- 98 : Sub-1GHz-TDM - Ambient-temp : 0.1℃ Unit Expression
- 88 : BLE - Humidity : 0.1% Unit Expression
6.6 MQTT Subscribing And Publishing

Publishing Message Example Explanation


 {"GW_read" : { “in” : 255, "ri" : "all” }  Publishing all resources in the GW every 255 seconds
 {"GW_read" : { “in” : 3, "ri" : [“11”, “10”] } }  Publishing temperature and battery status of GW in 3 second cycle
 {"GW_read" : { “in” : 0, "ri" : [“11”, “10”] } }  Publish GW temperature and battery status only once
 {"GW_read" : { “in” : 0 } }  No longer publishing (no resources selected)
 {"GW_write" : "07" : 0 }  UUID operation abort
 {"GW_write" : "06" : 9 }  software reset
 {"GW_write" : "06" : 99 }  Sub-1Ghz AromLink enabled
 {"GW_write" : "06" : 88 }  2.4GHz BLE enabled

 For Advertising message of tag with ID "112299aaddff" (BLE MAC) (tran


smission period of tag x 15)
 {"TAG_read" : { “in” : 15, "ti" : “112299aaddff”, "ri" : ["all", "00", "01", , , ,] } }  A UID resource can only be published once per command
 If the ID is set to "ffffffffffff", all terminal tags recognized by the gateway
are targeted. (But individual ID settings take precedence)

 The publishing interruption of ID "112299aaddff". (No resources selecte


 {"TAG_read" : { “in” : 0, "ti" : “112299aaddff” } } d)
 {"TAG_read" : { “in” : 0, "ti" : “FFFFFFFFFFFF” } }  Disabling publishing of all tags that do not individually select resources.
(No resources selected)
 {"TAG_read" : "in": 0, "ti" : "ffffffffFFFF", "ri": "22", "23", "24", "25", "26", "27",  One time publishing information for the resource ID specified for messa
"28", "29", "30", "31", "32" } ges received from all tags
 You can publish the mode information of messages received from all ta
 {"TAG_read" : "in": 0, "ti" : "ffffffffFFFF" "all" }
gs once

 Set the transmission period of the tag with ID "0102030f0e0b" (BLE


MAC address) to 20 seconds and turn on the LED
 {"TAG_write": { "ti" : “0102030f0e0b”, “08" : 20, “18" : 1 } }
 Setting the ID to "ffffffffffff" applies to all terminal tags that the gateway
knows and does not set individually

 {"TAG_data" : { "ti" : “112233445566”, "00" : "0xaabbcc0000ddeeff” } }  The publishing message from ID "112233445566". (Publishing advertisi
 {"TAG_data" : { "ti" : “112233445566”, "24" : -78, "28" : 246 } } ng and UUID data messages separately)

You might also like