RS485 Multimaster bus

I have been working on my own code for a few days but I can not seem to find a solution for collision detection on RS485.

If anyone knows of a library that allows a multimaster bus protocol to run on rs485? Then I can give up on my own attempts.

What would be even better if there was a Ethernet over 485 library :smiley:

If you want collision detection at the bit level you are in for some serious work. You should be able to detect collisions at the byte level by reading back what you wrote to the bus. That implies a protocol with a node ID as the first byte and an "open collector" bus so the clashes don't cause any hardware problems. Or if you aren't worried about priority you don't need a node ID.

This can be done with RS-485 if you think outside the box WRT wiring up the transceivers.


Rob

I have done a protocol and the corresponding hardware controller which support collision detection at the bit level,
The protocol's name is CDBUS, details: GitHub - dukelec/cdbus_doc: Introduce to the CDBUS (Advertising, please ignore.)