# Simple sensor node reading

**URL:** <https://forum.opencyphal.org/t/simple-sensor-node-reading/1528>\
**Category:** Applications & Usage\
**Created:** [November 19, 2021, 8:06am UTC](https://forum.opencyphal.org/t/simple-sensor-node-reading/1528 "2021-11-19T08:06:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![fe\_fe](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/fe_fe/32/1020_2.png) [@fe\_fe](https://forum.opencyphal.org/u/fe_fe)\
**Post date:** [November 19, 2021, 8:06am UTC](https://forum.opencyphal.org/t/simple-sensor-node-reading/1528/1 "2021-11-19T08:06:12Z")

</div>

Dear all,

I am having a hard time trying to read an airspeed sensor (namely the ASPD-DLVR of the [Mateksys](http://www.mateksys.com/?portfolio=aspd-dlvr) ), which uses the UAVCAN protocol and is connected to a flight computer via CAN bus.  
I have two of these sensors and both behave the same, so a hardware fault is very unlikely.

A requirement is to use pure Linux libraries avoiding any third-party code and that is why I’m using SocketCan. So far so good, but the problem is that I read very weird data.  
For example, the length of the payload is not always constant and oscillates between 6 and 8 bytes. However, according to the datasheet of the airspeed sensor, the payload should be 4 bytes.

My guess is that something is happening at the protocol level with the UAVCAN.  
Since I don’t completely understand how UAVCAN works and apparently how to retrieve the payload with SocketCan, I wonder whether there exists anything like the [Simple sensor node example](https://legacy.uavcan.org/Examples/Simple_sensor_node/) for the reading (I tried to reverse-engineer this example but without success).  
Or maybe I discover that is simply not possible to decode a UAVCAN protocol message with the SocketCan.

Thanks for the help

---

<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:** [November 19, 2021, 1:25pm UTC](https://forum.opencyphal.org/t/simple-sensor-node-reading/1528/2 "2021-11-19T13:25:40Z")

</div>

Please read the first two chapters and flip through the following ones:

> **[1. Introduction - UAVCAN](https://legacy.uavcan.org/Specification/1._Introduction/)**
>
> Legacy UAVCAN v0 website. Not recommended for new designs.

> [@fe\_fe](#):
>
> However, according to the datasheet of the airspeed sensor, the payload should be 4 bytes.

I don’t think the datasheet says that. There must be either a misunderstanding or a mistake involved somewhere.

If you are still stuck, do reach out to the vendor.

---

<div class="post-metadata">

**Author:** ![fe\_fe](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/fe_fe/32/1020_2.png) [@fe\_fe](https://forum.opencyphal.org/u/fe_fe)\
**Post date:** [November 19, 2021, 1:41pm UTC](https://forum.opencyphal.org/t/simple-sensor-node-reading/1528/3 "2021-11-19T13:41:33Z")

</div>

Thanks for the reply.

This is from the datasheet

 ![Schermata 2021-11-19 alle 14.40.14](https://forum.opencyphal.org/uploads/default/original/2X/b/bbb823bbd0f1d9f98991c03e8436665e9e10386e.png)

[https://www.mouser.it/pdfdocs/AllSensorsDLVRSensors.PDF](https://www.mouser.it/pdfdocs/AllSensorsDLVRSensors.PDF)

Maybe I misunderstood it.

---

<div class="post-metadata">

**Author:** ![fe\_fe](https://forum.opencyphal.org/user_avatar/forum.opencyphal.org/fe_fe/32/1020_2.png) [@fe\_fe](https://forum.opencyphal.org/u/fe_fe)\
**Post date:** [December 1, 2021, 3:54pm UTC](https://forum.opencyphal.org/t/simple-sensor-node-reading/1528/4 "2021-12-01T15:54:27Z")

</div>

As a general note, answering to read a documentation is not really a reply. I was able to get there alone.

However, thanks anyway.
