I was searching for a reliable and simple protocol for a multidrop master/slave RS485 network. Reliable means it should work well if some errors occur, so it should provide retransmissions and detection of frame duplication.
As soon as I read about HDLC in Normal Responde Mode, I loved it immediately. It is exactly what I wanted.
IMHO this protocol has many good points:
- one node on the network (master) starts transmission and could give token to another node (slave);
- as soon as the slave finishes transmissione the token is passed back to the master;
- frame are marked with sequence numbers so the receiver could detect duplicated frames and transmitter could detect which frames weren't received by the receiver;
- flow control data can be inserted in data frames (I-frame) or separated in other frames (S-frame);
- the protocol implementation could be flexible: the transmitter can sends only one frame or many frames at the same time and the receiver is free to ack only the last frame received (if the previous ones were received correct);
- it should be simple to implement in microcontrollers with poor resources.
I tried to find some HDLC NRM implementations, but I didn't find any. I also tried to write my implementation, but it isn't so simple for me.
Does someone want to share his HDLC NRM implementation or point me to an implementation I didn't found?
Does someone suggest other good protocols with similar features?