8 years, 10 months ago.

Collission while sending from two nodes on each other

Hello, Ive noticed that it happens collision when from node A sends to node B and from node B to node A in one time, probably becose radio is occupied by sending and is not able to receive, the messages are not delivered then. Any fix for that? Thank you

Question relating to:

mBed RFM12B module library

1 Answer

8 years, 10 months ago.

You need to implement some form of handshaking: the receiving device, node B, sends a message back after proper reception of the message from node A (and vice versa). If node A does not receive the acknowledging message it can transmit it again until it receives the acknowledge from node B. Insert random wait periods to prevent the system from getting in a loop.

If I understand, the problem is that when collision happens, then when I try to resend it then its resended on both nodes in same time, so collision will happen even after... I tought that for this case is in RFM12B lib function send which I will use instead of SendStart, but when I use this function it get stuck in while(!canSend), could you provide sample code for using one RFM12B as sender/receiver in correct way? assume that in Send function I need to pass receiver_id and message, Im not very good in usage of threads in cpp but if Im right, Im not able to pass arguments like that to thread function. Thank you for any help

posted by Vaclav Bilek 08 Jul 2015