Hello,
I'm creating a "ping" sketch to measure the % of packet lost using the tmrh20 library. I will post it once it is finished but it is just a modification of the "GettingStarted" sketch.
It is very simple:
- Node 1 send a value to node 2.
- Node 2 receive the message and send it back to node 1.
- Node 1 receive the message.
I'm measuring the number of packets lost and the turnaround time.
But doing some tests, I realised about something very strange that I don't understand...
Based on the sketch described above, both the node 1 and 2 are sending and receiving the same amount of data.
They both use the same commands to send and receive.
I have two hardware sensors/devices (let's call it A and B ) based on arduinos nano.
When I use A as Node 1 it gets 0.2% of packets lost. (B is used as Node 2)
When I use B as Node 1 it gets 15% of packets lost!! (A is used as Node 2)
Remember: Both nodes are sending and receiving the same amount of data.
I understand that the current, radio, noise, etc. might have an impact on the performance and range but why it is working fine on one way? And not in the other way? This is making me crazy. Both sensors are sending and receiving the same data. If one of them is not sending (or receiving) well, the performance still should be the same independent on who is acting as node 1 or 2.
What I am missing?
Thank you!