107-systems / 107-Arduino-MCP2515

Arduino library for controlling the MCP2515 in order to receive/transmit CAN frames.
https://107-systems.org
MIT License
90 stars 14 forks source link

use 29-bit CAN-IDs #25

Closed generationmake closed 3 years ago

generationmake commented 3 years ago

at the moment the library uses 11-bit CAN-IDs but UAVCAN uses extended 29-bit CAN-IDs. See this forum post: https://forum.uavcan.org/t/receiving-heartbeat-message-with-pyuavcan-cli/1035/4?u=generationmake

generationmake commented 3 years ago

sorry for setting this to priority high ;-)

pavel-kirienko commented 3 years ago

I am a mere bystander here so I could be wrong but I think this issue is misplaced. This library does not generate CAN frames, it merely transfers them over from libcanard. The problem must be somewhere in your CAN driver; probably you forgot to set the extended flag or something.

aentinger commented 3 years ago

@pavel-kirienko You've got it right! Thank you and @generationmake for opening this issue, the fix is contained within #25.

generationmake commented 3 years ago

@aentinger Seems to be OK now. Output from candump:

 (1608480559.168992)  can0  RX - -  107D550D   [8]  3D 00 00 00 00 00 00 FD   '=.......'
 (1608480560.170775)  can0  RX - -  107D550D   [8]  3E 00 00 00 00 00 00 FE   '>.......'
 (1608480561.172638)  can0  RX - -  107D550D   [8]  3F 00 00 00 00 00 00 E0   '?.......'

Output from pyuavcan:

---
7509:
  uptime: 55
  health:
    value: 0
  mode:
    value: 0
  vendor_specific_status_code: 0

---
7509:
  uptime: 56
  health:
    value: 0
  mode:
    value: 0
  vendor_specific_status_code: 0
aentinger commented 3 years ago

Juhu 🚀