Ursalink Control Protocol For UC11xx V1.4

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Ursalink Control Protocol for UC11xx

V1.4

Contents

1.Uplink Payload Structure.............................................................................................2


2.Downlink Payload Structure........................................................................................5
3. Data Types.................................................................................................................. 7
3.1 IPSO Standard Definition..............................................................................7
3.2 Ursalink Custom Format...............................................................................8
3.3 LoRaWAN Parameter....................................................................................9
1.Uplink Payload Structure

An uplink message can be sent from end node to gateway. Additionally, the UC11xx
sends different sensor data in different frames. Therefore, all sensor data must be
prefixed with two bytes:
Data Channel: Uniquely identifies each sensor in the UC11xx across frames.
Data Type: Identifies the data type in the frame.

Note: The device sends multiple sensor data at a time by using the following payload
structure:

1 Byte 1 Byte N Bytes 1 Byte 1 Byte M Bytes 1 Byte ...


Channel 1 Type 1 Data 1 Channel 2 Type 2 Data 2 Channel 3 ...

Channel ID Description
1 Digital Input 1
2 Digital Input 2
... ...
8 Digital Input 8
9 Digital Output 1
10 Digital Output 2
... ...
16 Digital Output 8
17 Analog Input 1
18 Analog Input 2
... ...
24 Analog Input 8
Uplink Packet Example:
UC1114 report uplink:

01 00 01 02 00 00 09 01 00 0a 01 01
Channel Type Value Channel Type Value

01 00 01 02 00 00
means means means means means means
Digital Digit high Digital Digit low
Input1 Input Input2 Input

Channel Type Value Channel Type Value

09 01 00 0a =>10 01 01
means means means means means means
Digital Digital low Digital Digit high
Output1 Output Output2 Output

UC1122 regular report uplink ( there are 3 uplink packages):

11 02 7407 0000 8f07 6c00 12 02 9407 0000 ab07 6e00


Ccy Min Max Avg
Channel Type
Value Value Value Value

11=>17 02 7407=>
6c00=>
means means 19.080 0000=> 8f07=>
1.08
Analog Analog 000000 0000 19.35
Input1 Input 000002

Ccy Min Max Avg


Channel Type
Value Value Value Value
12=>18
02 7407=>
means 6c00=>
means 19.080 0000=> ab07=>
Analog 1.1
Analog 000000 0000 19.63
Input1
Input 000002
01 00 01 09 01 00

Channel Type Value Channel Type Value

01 00 09 01 00
00 means means means
means means
means Digital Digital low
Digital Digital
high Output1 Input
Input1 Input

UC1152 regular report uplink ( there are 3 uplink packages):

ff 0e 19 08 01 ff 0e 1b 13 ec ff
Channel
Channel Type Data Type Value of this channel.
ID
08 =>
00001000
0e
means 19=>25
000=>0
the Data means
means
ff of RS485 01
Coil
RS485 (Modbus
slave Master)
00001=>1
devices Channel 1
means
Data length = 1
Channel
Channel Type Data Type Value of this channel.
ID
13 => 00010011

0e 011=>3
means 1b=>27 means
the Data means Holding Register
ecff=>
ff of RS485 (INT16)
65516
RS485 (Modbus
slave Master) 00010=>2
devices Channel 3 means
Data length = 2
01 00 01 09 01 00

Channel Type Channel Type


Value Value

01 00 00 09 01 00
means means means means means means
Digital Digital high Digital Digital low
Input1 Input Output1 Input

2.Downlink Payload Structure

A downlink message can be sent from gateway to end node in order to perform some
actions on that device.

When the channel range is 1~253, the format is:


1 Byte 2 Bytes 1 Byte1 1 Byte 2 Bytes 1 Byte ...
Channel 1 Data 1 0xff Channel Data2 0xff
...
(reserved) 2 (reserved)

When the channel range is above 255, the format is:


1 Byte 1 Byte N Bytes 1 Byte 1 Byte M Bytes
255 Type 1 Data 1 255 Type 2 Data 2
Frame N: Set the data reporting interval as 20mins (1200s), and only enable channels
with index 0,1,2.

ff 03 b0 04 ff 05 01 07
Channel Type Value Channel Type Value
01
(set
channel as
with index
within
03
b0 04 => 04 b0 05 (set 0-15.
(set data
ff = 255 = 1200 ff = 255 Channel
collecting
(second) Mask) 07=
interval )
00000111
(enable
channels
with index
0,1,2.)

Frame N+1: Set the data collection interval as 60s

ff 02 3c 00
Channel Type Value
02
(set data 3c 00 => 00 3c
ff = 255
collecting = 60 (second)
interval )

Frame N+2: Set the digital output 1 as high

09 01 00 ff
Channel Type 00 ff
09 means
01 means
Digital reserved
high
Output 1
Frame N+3: Set the digital output 2 as low

0a 00 00 ff
Channel Type 00 ff
0a means
00 means
Digital reserved
low
Output 2

Frame N+4: Set the device time

ff 11 3d 1c de 5d
Channel Type timestamp
11=> 17 3d 1c de 5d =>
means 5d de 1c 3d =>
ff = 255 setting 1574837309 =>
the device 2019/11/27
time 14:48:29

3. Data Types

3.1 IPSO Standard Definition

Data Types conform to the IPSO Alliance Smart Objects Guidelines, which identifies
each data type with an “Object ID.” However, as shown below, a conversion is made
to fit the Object ID into a single byte.
DATA_TYPE = IPSO_OBJECT_ID - 3200

Data Resolution
Type IPSO Hex Data Size
per Byte
Digital Input 3200 0 1 1
Digital Output 3201 1 1 1
8
Analog Input 3202 2 0.01 signed
(ccy+min+max+avg)
Analog Output 3203 3 2 0.01 signed
3.2 Ursalink Custom Format

Type Data
Type Description/Example
ID Size
Ursalink Custom
1 1 0x01
Format Version
Data Collection
2 2 Unit: 1s
Interval
Data Reporting
3 2 Unit: 1s
Interval
LoRa Channel ID (1Byte) + Value (2Byte)
5 3
Mask ID: 1~6
Bit 0: info Bit 1: debug
Debug Level 7 1
Bit 2: warn Bit 3: err
Product SN 8 6 641090824375 => 0x641090824375
Hardware
9 2 0110 => 0x01 0x10
Version
Software
10 2 0110 => 0x01 0x10
Version
0xff reserved.
Contents reported after rebooting
Device Power On
11 1 each time: Ursalink Custom Format
Notification
Version+SN+Hardware Version
+Software Version+the battery level
Channel ID of RS485 (1 bit) + Data
Type (8 bits) + Value (N Bytes)

Data Type (0~2 bits):


00: Coil
01: Discrete
02: Input Register (INT16)
Input Register (INT 32 with upper 16
The Data of RS485
14 mutable bits)
Slave Devices
Input Register (INT 32 with lower 16
bits)
03: Holding Register (INT16)
Holding Register (INT 32 with upper
16 bits)
Holding Register (INT 32 with lower 16
bits)
04: Holding Register (INT32)
05: Holding Register (Float)
06: Input Register (INT32)
07: Input Register (Float)

(3~7 Bits):
Data Length
3d 1c de 5d => 5d de 1c 3d =>
Set Device Time 17 4
1574837309 => 2019/11/27 14:48:29

Channel ID of
Description
RS485
25 RS485(Modbus Master) Channel 1
26 RS485(Modbus Master) Channel 2
27 RS485(Modbus Master) Channel 3
... ...
32 RS485(Modbus Master) Channel 8

3.3 LoRaWAN Parameter

Device EUI 24E1+SN


APP EUI 24E124C0002A0002
App Port 0x85
NetID 0x010203
DevAddr The last 8 digits of SN.
AppKey 5572404c696e6b4c6f52613230313823
NwkSKey 5572404c696e6b4c6f52613230313823
AppSKey 5572404c696e6b4c6f52613230313823

You might also like