My Paragon-X can generate China Mobile (CCSA) format time of day (ToD) messages. How does it calculate the Frame Check Sequence (FCS) for the generated messages?
Panel |
---|
CCSA ToD frame structureThe CCSA ToD frame structure is defined as: The ToD frame is set as a multiple of 8 bits (octets) with FCS. The ToD can be identified by its message CLASS and message ID. The transmission of octets starts from bit 0 (LSB). The transmission of multi-octet fields of the frame (e.g. the length and payload fields) complies with the |
...
big-endian rules. The interpretation of ToD information is as follows: |
...
|
...
...
|
...
...
|
...
|
...
CCSA ToD frame examplesAn example of a CCSA ToD frame is: Start of Frame: 0x43, 0x4D Header: 0x01, 0x20 Length: 0x00 0x10 Payload: 0x00, 0x02, 0xFF, 0x45, 0x00, 0x00, 0x00, 0x00, 0x06, 0x16, 0x0F, 0x00, 0xFF, 0x00, 0x00, 0x00. FCS: 0x17 A second example of a CCSA ToD frame is: Start of Frame: 0x43, 0x4D Header: 0x01, 0x03 Length: 0x00, 0x10 Payload: 0x02, 0x00, 0x03, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 FCS: 0xF7 CRC Calculator websiteThe website http://www.zorc.breitbandkatze.de/crc.html provides a public CRC calculator to calculate FCS sequences. The screenshot below shows the website calculating the FCS value 0x17 from the first CCSA ToD packet example above. To calculate an FCS using this website, use these settings: CRC Order: 8 CRC polynom: 31 Initial Value: ff Select the Final XOR value: 00 Tick the Tick the The CCSA ToD frame data may be typed into the Data Sequence box as shown. Some points to note: The data sequence to enter is the ToD frame Header, Length and Payload only. Don't enter the first two (sync) bytes of the message as they are not included in the FCS calculation. Each hex byte is prefixed by a % rather than the 0x normally used to denote hex numbers. The calculator appends an “Initial value” for the CRC of 0xff so don't include a byte for the FCS in the data sequence. The website calculator assumes a leading Calnex has deployed Paragon-X instruments with network operators and equipment vendors in China who have verified the calculation method and provided the two example CCSA ToD frames used in this note. |
Related articles
Filter by label (Content by label) | ||||||||||
---|---|---|---|---|---|---|---|---|---|---|
|