I am using CANopenNode in NMT Master mode with great success on RPi Linux. There are two slave nodes on the bus and I need to set the time on these by time-stamp broadcast. The Time-stamp protocol isn't implemented in CANopenNode and I am looking for some help/guidance on how to do that. Thank you in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Martin,
Thanks a lot for your comment.
I need to look deeper into the code to understand how this works.
One thing though: I am using the libedssharp eds-editor to set up my OD.
As far as I can see, it doesn't support adding a feature flag for Time-Stamp producer, so I will need to add this manually(?)
I was wondering, if I only need to be a Time-Stamp producer and not a Time-stamp consumer, do I need to worry about OIDs, OD entry 1012 etc? -After all, I just need to send a single CAN frame with a fixed known CAN_ID and 6 databytes. So, I wonder if there is an even more hacky way to do this by calling CO_CANsend in stack/socketCAN/CO_driver.c directly?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I am using CANopenNode in NMT Master mode with great success on RPi Linux. There are two slave nodes on the bus and I need to set the time on these by time-stamp broadcast. The Time-stamp protocol isn't implemented in CANopenNode and I am looking for some help/guidance on how to do that. Thank you in advance.
There are two ways:
hacky one:
proper one:
Hope that helps
Last edit: Martin Wagner 2019-07-01
Martin,
Thanks a lot for your comment.
I need to look deeper into the code to understand how this works.
One thing though: I am using the libedssharp eds-editor to set up my OD.
As far as I can see, it doesn't support adding a feature flag for Time-Stamp producer, so I will need to add this manually(?)
I was wondering, if I only need to be a Time-Stamp producer and not a Time-stamp consumer, do I need to worry about OIDs, OD entry 1012 etc? -After all, I just need to send a single CAN frame with a fixed known CAN_ID and 6 databytes. So, I wonder if there is an even more hacky way to do this by calling CO_CANsend in stack/socketCAN/CO_driver.c directly?
Yes.
I don't know the timestamp protocol or assigned OD entries.
you need to add a tx buffer to the CAN driver so you can use CO_CANsend()
even even more hacky way...
yes you can just send it using socketCAN.