Hi, it's me again 😄
I'm currently troubleshooting CAN control broadcasting.
My current setup is the following : Two nodes are connected, one is broadcasting one data object with object-id 0x8001, I'm listening the bus with the Peak dongle.
The nodes have a can_control_rx_handler that go through these control messages with ids > 8000
I'm facing what I do believe is a bug :
Using thingset_import_data in control report callback leads to a general crash, without any LOG_ERR
or LOG of any kind. The MCU gets fully stuck without outputting any fatal reporting.
I'm using the sample you've done when we were working on the Vhelio e-bike.
jalinei/Core@6dccaba
I've commented out the culprit function and I've added HEXDUMP to check the frame before using thingset_import_data.
I'm posting the HEXDUMP output below, it seems valid to me.
[00:00:33.412,000] <inf> ts_can: Thingset frame:
a1 19 80 01 fa 00 00 00 00 |........ .
[00:00:34.412,000] <inf> ts_can: received control msg with id 0x8001 from addr 0xC6
[00:00:34.412,000] <inf> ts_can: Thingset frame:
a1 19 80 01 fa 3a 83 12 6f
Here is the corresponding candump snippet, everything looks sane as well.
can0 0E8001C6 [5] FA 00 00 00 00
can0 0E8001C6 [5] FA 3A 83 12 6F
I made sure that the data item is writtable in my data_object :
THINGSET_ADD_ITEM_FLOAT(ID_CTRL, ID_CTRL_REFERENCE, "zCtrlReference",
&reference_value, 1, THINGSET_ANY_RW, SUBSET_CTRL);
At first I was having a different setup in which both nodes where broadcasting the same 0x8001 data objct, so I was thinking that it was some kind of race conditions to access the data-object.
I simplified the setup so only one node is broadcasting and the second is listening, and I still have the same issue. I works perfectly without calling thingset_import_data but crashes when calling it.
Any clue in what direction to look ?
Hi, it's me again 😄
I'm currently troubleshooting CAN control broadcasting.
My current setup is the following : Two nodes are connected, one is broadcasting one data object with object-id
0x8001, I'm listening the bus with the Peak dongle.The nodes have a
can_control_rx_handlerthat go through these control messages withids > 8000I'm facing what I do believe is a bug :
Using
thingset_import_datain control report callback leads to a general crash, without anyLOG_ERRor
LOGof any kind. The MCU gets fully stuck without outputting anyfatalreporting.I'm using the sample you've done when we were working on the Vhelio e-bike.
jalinei/Core@6dccaba
I've commented out the culprit function and I've added
HEXDUMPto check the frame before usingthingset_import_data.I'm posting the
HEXDUMPoutput below, it seems valid to me.Here is the corresponding
candumpsnippet, everything looks sane as well.I made sure that the data item is writtable in my data_object :
At first I was having a different setup in which both nodes where broadcasting the same
0x8001data objct, so I was thinking that it was some kind of race conditions to access the data-object.I simplified the setup so only one node is broadcasting and the second is listening, and I still have the same issue. I works perfectly without calling
thingset_import_databut crashes when calling it.Any clue in what direction to look ?