Esc doesn't work with custom uavcan device

Hello, everybody.
I have own device that allows to send and receive messages through UAVCAN via can bus.
I expect that if I send a esc::status message to pixhawk from this device it will be processed in uavcan/actuators/esp.cpp module. So, I want to use this device as UAVCAN ESC like Sapog and other.
But esc_status_sub_cb() callback in this module never called.

I think the problem is in pixhawk level (may be I miss smth or forget to start/config smth) because at other level all looks good:

  • uavcan gui tool says that this device works perfect because I can see all messages (from pixhawk and from this device),
  • this device successfully receives all messages from pixhawk, for example RawCommand,
  • this device successfully transmit messages to pixhawk such as rangesensor::measurement (I wrote module on PX4 that allows to use i2c-rangefinder via UAVCAN).
    So, the only problem is PX4 doesn’t process esc::status message.

Can anyone advice me what could be a reason?

@PavelKirienko, hi, as you were tagged in uavcan/actuators/esc.cpp as author, could you help me with this question?

I’v found that uavcan status think that all esc_status frames are transfer errors (other messages are ok). But uavcan gui tool looks well.
The second screenshot taken 30 seconds after the first. My device publish node status with 2 Hz and esc_status with 10 Hz.

I solved it.
It’s my copypaste mistake.
I just called canardBroadcast() with wrong payload_len (more than need).
It’s strange that uavcan gui tool parse this messages.

Nex sorry no one got back to you, but nonetheless welcome!
Glad you figured it out.