PETRONE / LINK / Protocol / Intro
Modified : 2017.10.18



1. Introduce PETRONE LINK

PETRONE LINK(LINK) is communication module for connect and control PETRONE. PETRONE and LINK communicat using Bluetooth Low Energy(BLE). But, LINK user can connect to PETRONE use only serial communication.



2. Data transmission structure

Communicating with LINK device, the data block configuration is as follows:

                                                                                       
0
1
2
3
...
N-1
N
Start code
Header
Data
CRC16
DataType
Length
0x0A
0x55
-
-
-
-
-

Each item is explained as follows.

Area Description
Start code Data transmission notice
Header Length of data that follows header
Data Data
CRC16 Check the header and the data were delivered correctly.


http://www.menie.org/georges/embedded/crc16.html |

Data and the CRA16 zone use Little Endian. When Little Endian is present, If more than two bytes, low byte is front of the array. You can change it conveniently using Bitconverter in C#.

  0x1234 0x12345678
Big Endian [ 12 34 ] [ 12 34 56 78 ]
Little Endian [ 34 12 ] [ 78 56 34 12 ]



3. Precautions in use

  • To control the LINK module, typically use Command.

  • When sending data to LINK module, the device will send Ack with the exception of a few commands.

  • LINK module communicates changing the behavior mode of LINK when it is in Active mode.

  • The device scan is operate for 1.6 seconds and will not use serial communication until the scan is complete.



4. Configure parameters for serial port

Area Setting value
Baud Rate 115200
Parity None
Data Bits 8
Stop Bits 1



5. Driver install

  • LINK module is using Silicon Labs CP2104 for serial communication. If Windows™ can not install the USB driver automatically, please visit the site below to obtain and install the drivers for your OS.

CP210x USB to UART Bridge VCP Drivers



PETRONE

  1. Intro
  2. Typedef
  3. DataType
  4. Definitions
  5. Base Structs
  6. Structs
  7. Structs - Light
  8. Firmware Update
  1. Intro
  2. DataType
  3. Definitions
  4. Structs
  5. Examples


Index