0

I'm building a system consisting of many (> 100) equal nodes all connected via CAN bus. The idea is that all nodes must have the same information, any node may generate an event and will broadcast it via CAN. For those events, the 8 byte payload provided by a CAN frame are enough and a broadcast will reach all nodes on a bus, so the requirement is met.

Now I also want to distribute firmware updates (or other files) to all nodes via CAN, obviously here I need some sort of fragmentation and the 8 bytes are a bit scarce.

Someone suggested CANopen to me to save me some work, but it appears that it only supports peer-to-peer mode with SDO block transfer and no broadcast.

Is there already a protocol that supports distributing files to all CAN nodes or do I have to come up with my own?

If so, what considerations should I take?

I haven't used CAN before.

user1273684
  • 1,559
  • 15
  • 24
  • While it is good to use existing libraries when available, what you're doing sounds simple enough to do from scratch, and would easily keep the broadcast aspect you want. To answer your question specifically, though, I do not know what already exists. The best case scenario is, someone will post something you can use. But if not, coding it from scratch ought not be too daunting. – donjuedo Aug 03 '15 at 15:39

2 Answers2

0

In order to send bigger messages you can use the ISO TP layer. I have used a module in python that implements it and you can probably find libraries for other devices in other languates since it is quite common. To implement CANopen to send bigger than 8 bytes messages is overkill.

Cipepote
  • 36
  • 1
  • 5
-1

Yes, PDOs is used to process real time data, to transfer the same variables always, not an stream data protocol. May be you can add a feedback PDO from the slaves to the server. I've worked with some nodes that when I wanted to enable them, I'd to send a enable and then wait that in a PDO from slave to master, the slave said it was enabled. Or you can use SYNC.

JMA
  • 494
  • 2
  • 13