Vous êtes sur la page 1sur 8

ISC PROTOCOL SPECIFICATION

REVISION 1.0.0

MARCH 31, 2018


BACH KHOA ENERGY LTD.
115B1, 268 LY THUONG KIET ST., WARD 10, 10 DIST., HO CHI MINH CITY
ISC PROTOCOL SPECIFICATION

ISC (IoT Sensors Module Control) Protocol


Specification
--------------------------------------------------------------------------------------------------------------------------------------------------------

Document status
Revision Draft
Date 27-Mar-18

Revision History
Revision Date Author Modification
1.0.0 31-Mar-18 Truong Nguyen Initial version

1|Page
Copyright © 2018 Bach Khoa Energy Ltd. All rights reserved
ISC PROTOCOL SPECIFICATION

Table of content
1. Abstraction……………………………………………………………………………………..
2. Overview…………………………………………………………………………………………
3. PDU…………………………………………………………………………………………………
4. PHY…………………………………………………………………………………………………
5. Network Management…………………………………………………………………….
6. Functional Description…………………………………………………………………….
7. Timing Characteristics……………………………………………………………………..

2|Page
Copyright © 2018 Bach Khoa Energy Ltd. All rights reserved
ISC PROTOCOL SPECIFICATION

1. Abstraction
T.B.D

2. Overview

Figure 1 ISC Layer diagram

Figure 2 Communication model physical layer

3|Page
Copyright © 2018 Bach Khoa Energy Ltd. All rights reserved
ISC PROTOCOL SPECIFICATION

ISC protocol is an application protocol layer that is used to control sensor node in IoT network. This
protocol layer is run on physical layer that is RS232 as synchronous base.

3. PDU
2 bytes 1 byte = LENGTH_VAL -1 1 byte
START LENGTH PDU CRC
DID Service ID Service Parameter
- LENGTH_VAL: value of length field. This indicate length of total following data including 1 CRC byte.
- Any data is transfer in little endian mode.

4. PHY
Request Frame
2 bytes 1 byte = LENGTH_VAL 1 byte
START LENGTH PDU CRC
0xA5A5 DID Service ID Service Parameter

Respond Frame
2 bytes 1 byte = LENGTH_VAL 1 byte
START LENGTH PDU CRC
0x5A5A DID Service ID Respond Parameter

Asynchronous Event Notification


2 bytes 1 byte = LENGTH_VAL 1 byte
START LENGTH PDU CRC
0xAAAA DID Event ID Event Parameter

Asynchronous Event Acknowledge


2 bytes 1 byte = LENGTH_VAL 1 byte
START LENGTH PDU CRC
0x5555 DID Event ID Event Confirm Parameter

4|Page
Copyright © 2018 Bach Khoa Energy Ltd. All rights reserved
ISC PROTOCOL SPECIFICATION

5. Network Management
Overview

Figure 3 Network management components

ISC protocol works as Master – Slave model. Sensor nodes always serves as Slave. Any request is started from
Master. Slaves could send asynchronous event without asking from Master when there is any unexpected
circumstance appears on its internal structure.

Transaction
A transaction is defined as 1 close loop communication. A transaction is finished when a request message is send
success and got the feedback (NRC or positive respond code with corresponding data).
A transaction is always initiated from Master device. And a transaction is finished when Slave device gives respond
to Master.

Bus IDLE 0x01


Bus status is IDLE when a request is sent from source device (RF module or sensor module) to destination device
success and got the respond from destination device to source device, it needs a respond back (acknowledge or
return data) to finish one transaction.
Bus IDLE is observed on both sides (source and destination).

Bus BUSY 0x10


When one transaction is beginning, bus status is changed to bus BUSY. If bus is BUSY, source device cannot send
further request message until got feedback or at least one asynchronous event occurs.
Bus BUSY is observed on both sides (source and destination).

As synchronous EVENT
Asynchronous event is sent from Slave device to Source device. An asynchronous event appears when there is any
unexpected accident or behavior occurs inside Slave and it need to be reported to other monitoring (E.g. Master
device).

Asynchronous event can be sent event bus is BUSY (one transaction is on-going).
Asynchronous event is cleared when internal accident/unexpected behavior is cleared by a request message or it is
acknowledged from Master.

5|Page
Copyright © 2018 Bach Khoa Energy Ltd. All rights reserved
ISC PROTOCOL SPECIFICATION

In software level, the number of accidents/unexpected behaviors are counted. The counter increases when new
accident/unexpected behaviors come and decreases when it got one acknowledged from Master.
When asynchronous appears on Slave, it will be send out in cyclic mode with period T_ASY (milliseconds). The cyclic
activity is stopped when event counter is zero.

Session time out


When a transaction or an asynchronous event is received by destination, the bus is BUSY. If after TO_MAX, there is
no any feedback from destination, the bus is automatic move to IDLE stage to terminate current transaction. In this
case, source device will have resending handling to handle this or ignore current request. It depends on how critical
of service request.

When bus is in IDLE mode, Master device will send bus status message using Bus acquisition service in cyclic mode
with following parameter is network status. Period of bus status is T_IDLE. See timing characteristic to indicate this
period.

Device management
When new device is connected to network, it does not know network status. Therefore it waits for network status
update from Master. If there is no master, device will lock its network by network manager forever.
Any device in network requires a device ID. Device will send service $22 to ask for joining network when bus is in
IDLE mode. Device IDs are managed by Master node.
To prevent the Bus confliction, asynchronous event notification is blocked if device have not joined to network yet.
When asynchronous event notification is blocked, event counter can be increase maximum to 255 (0xFF) and stop
counting from here until it is reset by request from Master (after joining network).

6. Functional Description
Table 1 Service functions

Service ID Length Description Remark


(bytes)
0x00 Bus Acquisition
0x01 Reset device
0x02 Read device identifications
0x04 Write data by ID
0x08 Read data by ID
0x10 Start Routine
0x20 Stop Routine
0x40 Request download data
0x80 Diagnostic Control
0x11 Diagnostic service
0x12 Download data
0x14 Get Diagnostic Troubleshoot Code
0x18 Get Latest Asynchronous Event
0x21 Get Asynchronous Event Counter
0x22 Request to join network
0x24 Set bus characteristics
0x28 Clear Event by ID
0x41 Driver control

6|Page
Copyright © 2018 Bach Khoa Energy Ltd. All rights reserved
ISC PROTOCOL SPECIFICATION

$00 Bus Acquisition


$01 Reset device
$02 read device identification
$04 Write data by ID
$08 Read data by ID
$10 Start Routine
$20 Stop Routine
$40 Request Download Data
$80 Diagnostic Function Control
$11 Diagnostic Service
$12 Download Data
$14 Get DTC
$18 Get Asynchronous Event
$21 Get Asynchronous Event Counter
$22 Request to join network
$24 Set bus characteristics
$28 Clear Event by ID
$41 Driver control

7. Timing characteristics
Table 2 Timing characteristics table

Name Description Value


Baud-rate Bus baud-rate Support up to 340800 kbps. Default
is 115200 kbps
T_ASY Period of sending asynchronous 2,000ms
event in cyclic mode
TO_MAX Transaction timeout 50ms
TF_MAX Frame timeout. Maximum period of 500ms
one frame.
T_IDLE Period of network status update 10,000s
when bus is IDLE

7|Page
Copyright © 2018 Bach Khoa Energy Ltd. All rights reserved

Vous aimerez peut-être aussi