# Traffic\_report CRC

**URL:** <https://forum.opencyphal.org/t/traffic-report-crc/1132>\
**Category:** LibCyphal\
**Created:** [February 19, 2021, 2:22pm UTC](https://forum.opencyphal.org/t/traffic-report-crc/1132 "2021-02-19T14:22:23Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Maxim](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/maxim/32/924_2.png) [@Maxim](https://forum.opencyphal.org/u/Maxim)\
**Post date:** [February 19, 2021, 2:22pm UTC](https://forum.opencyphal.org/t/traffic-report-crc/1132/1 "2021-02-19T14:22:23Z")

</div>

Hello Pavel. There was a problem with the correctness of the formation of the CRC for the message ardupilot.equipment.trafficmonitor.TrafficReport. I use the canard 0.2 library.

When debugging the Ardupilot CubeBlack sources, an inconsistency was found when calculating the checksum in TransferListener :: checkPayloadCrc. Temporarily disabling this CRC check on CUBE, I made the package pass further; adding the line send\_adsb\_vehicle (chan) at the end of the function void AP\_ADSB :: handle\_adsb\_vehicle (const adsb\_vehicle\_t & vehicle) got the correct display of test adsb objects sent by the microcontroller via the uavcan .

After making sure that the data from the packets is displayed correctly, I still could not solve the problem with the correctness of the CRC (for adsb message) in the canard 0.2 version. Is it possible to solve this problem within canard 0.2 - at least as a friendly exception ?!

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [February 19, 2021, 2:40pm UTC](https://forum.opencyphal.org/t/traffic-report-crc/1132/2 "2021-02-19T14:40:33Z")

</div>

Based on your description, you are using libuavcan, not libcanard, so I’ve moved this conversation into the correct category.

The issues you are observing can be explained by multiple implementations using different DSDL source. Ensure that you are using exact same DSDL files everywhere, recompile DSDL, and things should start working again.

While you are at it, consider pressing your autopilot vendor to adopt UAVCAN v1, because: 1. v0 is obsolete, 2. v0 doesn’t have scalable support for vendor-specific DSDL, and 3. issues of this kind cannot occur in v1 by design.

---

<div class="post-metadata">

**Author:** ![Maxim](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/maxim/32/924_2.png) [@Maxim](https://forum.opencyphal.org/u/Maxim)\
**Post date:** [February 19, 2021, 3:35pm UTC](https://forum.opencyphal.org/t/traffic-report-crc/1132/3 "2021-02-19T15:35:52Z")

</div>

Could you give a link that describes how to get the DataTypeSignature to calculate the resulting CRC for the uavcan frame v0.2 ?! As I understand it, the current script generates the SIGNATURE\_CRC signature based on the format of the message fields and its file hierarchy, was it possible to get different CRC values depending on the location of the folder structure ?!

Is there a script that processes one specified dsdl file selectively, which stores a example record like this:

**uavcan.equipment.trafficmonitor.TrafficReport**  
**uavcan.Timestamp timestamp**  
**saturated uint32 icao\_address**  
**saturated uint16 tslc**  
**saturated int32 latitude\_deg\_1e7**  
**saturated int32 longitude\_deg\_1e7**  
**…**  
**…**

???

Thanks.

---

<div class="post-metadata">

**Author:** ![pavel.kirienko](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/pavel.kirienko/32/9_2.png) [@pavel.kirienko](https://forum.opencyphal.org/u/pavel.kirienko)\
**Post date:** [February 19, 2021, 4:35pm UTC](https://forum.opencyphal.org/t/traffic-report-crc/1132/4 "2021-02-19T16:35:53Z")

</div>

> [@Maxim](#):
>
> ???

1. [3. Data structure description language - UAVCAN](https://legacy.uavcan.org/Specification/3._Data_structure_description_language/#signature)

2. [https://github.com/UAVCAN/libcanard/blob/legacy-v0/show\_data\_type\_info.py](https://github.com/UAVCAN/libcanard/blob/legacy-v0/show_data_type_info.py)

---

<div class="post-metadata">

**Author:** ![Maxim](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/maxim/32/924_2.png) [@Maxim](https://forum.opencyphal.org/u/Maxim)\
**Post date:** [February 22, 2021, 12:48pm UTC](https://forum.opencyphal.org/t/traffic-report-crc/1132/5 "2021-02-22T12:48:15Z")

</div>

Many thanks. Everything works now.

```
  - Your script helped. Looked through the entire list of message signatures.
```
