When you select a serial protocol and press "Edit" button on Serial protocol list dialog box, a serial protocol editing panel will be shown.
This is a blank serial protocol editing panel (for Receiving protocol)
There are four categories in Serial protocol fields (protocol editing table row). Flag, variable size data, fixed size data and delimiter.
Inserts a flag field [FL] : Constant value of byte or text. The value and length of this field are known through the communication. | |
Inserts a variable size data field [VA] : Variable size data. The value and length of this field are not known through the communication. | |
Inserts a fixed size data field [FX] : Fixed size data. The value of this field is not known but the length of this field is known through the communication. | |
Inserts a delimiter field [DE] : Constant value of byte. The value and length of this field are known through the communication. Every values of this field supposed to be same through this protocol. | |
Inserts a check sum field [CS] : The length of this field is 1 byte and the value of this field is dependent on the value of other fields. The value of this field is an "exclusive or (XOR)" of specified fields. |
Note : Please refer to the tutorial sample page for the concrete example of how to define serial protocols.
Followings are additional editing functions.
Moves up the selected row in the protocol editing table by a row. | |
Moves down the selected row in the protocol editing table by a row. | |
Deletes the selected row in the protocol editing table. | |
Checks if the currently editing protocol meets the predefined basic syntax. |
ACK (Acknowledge), NAK (Negative Acknowledge) and Timeout (* Receive protocol feature)
When received data is correct, send this Acknowledge data.
When received data is not correct or timed out with out any received data, send
this Negative Acknowledge data.
Set socket timeout in milliseconds. When the socket attempts to read data,
if there is no data transmission during this period of time, the socket
will be closed automatically. Roughly, in domestic connection, 1000 ms will do.
And 2000 ms in Intercontinental connection.
Some helpful functions
Shows Hex-Dec-ASCII converter dialog. | |
Imports a serial protocol from a file (*.sep). | |
Exports currently editing protocol to a file (*.sep). Before exporting, the program will check this protocol. |
Saves currently editing protocol and closes this editor. Before save, the program will check this protocol. | |
Dismisses current editing and close this editor. |
Using Hex-Dec-ASCII converter
Input a value in corresponding field and press "Convert" button. Then you will find the corresponding value in other representation. Please note that HelloDevice IDE uses "unsigned byte" value as basic unit so that "FF" in Hex will be wrapped to "-1" in Dec. Also, a value over 127 and below -128 in Dec will have no result.
In every 'Value' input field in custom protocol editor and 'Acknowledge', 'Negative Acknowledge' data input field, you can use non-printable ASCII control characters listed below instead of using direct Hex value.
HEX | NAME | HEX | NAME | HEX | NAME | HEX | NAME | HEX | NAME |
00 | NUL | 01 | SOH | 02 | STX | 03 | ETX | 04 | EOT |
05 | ENQ | 06 | ACK | 07 | BEL | 08 | BS | 09 | HT |
0A | LF | 0B | VT | 0C | FF | 0D | CR | 0E | SO |
0F | SI | 10 | DLE | 11 | DC1 | 12 | DC2 | 13 | DC3 |
14 | DC4 | 15 | NAK | 16 | SYN | 17 | ETB | 18 | CAN |
19 | EM | 1A | SUB | 1B | ESC | 1C | FS | 1D | GS |
1E | RS | 1F | US |