0
\$\begingroup\$

There are some electrical specifications specifically designed for multi-master protocols such as CAN, I2C, 1-Wire, etc. which are classified under CSMA/CD networks.

However, RS485 has a push pull output (with a current limit guard) so when two masters are started sending data at the same time, both frames will be corrupted and the re-transmission should be handled by the protocol stack. RS485 can be classified under CSMA/CA networks.

Question

Is only protocols implemented on top of CSMA/CD networks considered as "multi master protocols" or can any protocol on CSMA/CA network that somehow implements handshake (ACK) and re-transmission features be considered as a "multi master protocol"?

Specifically, is implementing a multi-master protocol on top of RS-485 possible, or is it considered only a workaround because of the inability of collision detection nature of the bus?

\$\endgroup\$
  • 2
    \$\begingroup\$ The bus arbitration you describe for CAN is based on message identifiers, not by some "master priority" - CAN doesn't have masters or node id on the data link layer. Neither does RS-485. What you describe is simply CSMA/CA versus CSMA/CD. Master and slave are concepts of higher layers in the OSI model. Typically RS-485 based protocols use handshaking over hardware or software to prevent collisions. But also star topologies with a master in the middle, where all traffic has to pass the master. \$\endgroup\$ – Lundin Sep 4 at 6:39
  • \$\begingroup\$ Yes, the bus arbitration for CAN is based on message identifiers, which can be interpreted as node ID, thus the priority of the node. One physical node can send different messages with different identifiers, thus can be considered as "one physical device with multiple roles". I intentionally skipped this detail. You are also correct for the other claims. However, we are restricting our case with bus network topology. \$\endgroup\$ – ceremcem Sep 4 at 7:48
  • 3
    \$\begingroup\$ RS485 is just an electrical specification. To transmit any data over RS485 you have to define your own protocol. Although it is not possible (or at least not easy) to implement collision detection you can have a multi-master protocol by other means, such as token passing. This is perfectly legal and normal. \$\endgroup\$ – Steve G Sep 4 at 8:09
  • 1
    \$\begingroup\$ @ceremcem "CAN is based on message identifiers, which can be interpreted as node ID" No. Node id is a higher layer concept. Application layer standards like CANopen use node id as an offset to some CAN identifiers, but nothing in the CAN physical/data link layers mentions this. You keep mixing up all layers. \$\endgroup\$ – Lundin Sep 4 at 8:20
  • \$\begingroup\$ @Lundin "No. Node id is a higher layer concept" Depends on how you interpret things. Think that every physical node is restricted to be able to send only one type of messages. The message ID becomes node ID and node ID becomes message ID. Notice that my short explanation in the question is not for only CAN, but for also I2C, 1Wire etc. This is a meta concept. You have to send node specific (thus message specific) ID at the beginning of telegram in order to prioritize the communication. My question boils down to the point: "is a CSMA/CA network eligible for implementing multi-master protocols?" \$\endgroup\$ – ceremcem Sep 5 at 5:38
2
\$\begingroup\$

RS485 is purely a physical layer specification. You need your own protocol for anything you run over it eg home made, or something like MODBUS. Normally I would have just one master that requests information from connected devices. For anything multimaster or more complex the use a different bus eg CAN or Ethernet

\$\endgroup\$
  • \$\begingroup\$ Please see my update in the question. \$\endgroup\$ – ceremcem Sep 5 at 22:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.