LowPowerLab Forum

Hardware support => RF - Range - Antennas - RFM69 library => Topic started by: davegravy on April 10, 2016, 02:04:23 PM

Title: ATC not working
Post by: davegravy on April 10, 2016, 02:04:23 PM
I believe I have all the requirements met for using ATC however the RSSI seems to start at -27 and drop only to -36 (when I set the target to -70). Is it possible that since I have the moteinos within 2" of each-other that the minimum TX power still achieves -36 dBm?

(I don't have a means yet to power my 2nd moteino separately and move it away from the 1st).



Title: Re: ATC not working
Post by: TomWS on April 10, 2016, 04:14:29 PM
Quote from: davegravy on April 10, 2016, 02:04:23 PM
Is it possible that since I have the moteinos within 2" of each-other that the minimum TX power still achieves -36 dBm?
I'd say that was very likely.  In your debug code, when you're sending, print out radio._transmitLevel.  I believe it will go to 0, the lowest possible value.

Tom
Title: Re: ATC not working
Post by: LukaQ on January 27, 2018, 12:32:58 PM
Quote from: TomWS on April 10, 2016, 04:14:29 PM
I'd say that was very likely.  In your debug code, when you're sending, print out radio._transmitLevel.  I believe it will go to 0, the lowest possible value.

Tom
Can you give code example? I always see 31 with radio.sendWithRetry(GATEWAYID, (const void*)(&(radio._transmitLevel)), sizeof(radio._transmitLevel))
Title: Re: ATC not working
Post by: Felix on January 27, 2018, 07:52:37 PM
A few thoughts,

Give them some distance. Then compare with and without ATC to see the difference.

As Tom/Luka stated, to really know what's going on, print out or send the radio._transmitLevel to watch it go down.

Also don't forget you need ATC on the receiving side (for feeback) and you need to send with retry or request ACKs otherwise the sender will never receive any ACK with feedback, so obviously it will not know how to dial power level.
Title: Re: ATC not working
Post by: LukaQ on January 28, 2018, 02:45:28 AM
Quote from: Felix on January 27, 2018, 07:52:37 PM
A few thoughts,

Give them some distance. Then compare with and without ATC to see the difference.

As Tom/Luka stated, to really know what's going on, print out or send the radio._transmitLevel to watch it go down.

Also don't forget you need ATC on the receiving side (for feeback) and you need to send with retry or request ACKs otherwise the sender will never receive any ACK with feedback, so obviously it will not know how to dial power level.
Correct, you need 3 things:

Serial.print("My TX level:"); Serial.print(radio._transmitLevel,DEC);
This will print your level

Next thing is, your need to know RSSI on other side (node)
Serial.print(", RSSI:");   Serial.println(radio.getAckRSSI(),DEC);
This will give you your RSSI

and third thing you need is to set
#define ATC_RSSI      -30
This value is your target RSSI, which you want to get, by changing power level.

Also you need to keep in mind, if you are above your target RSSI and your power level is already on 0, your distance is closer than your minimal power level, you might need to think about turning of PA2, maybe even PA1 (on HW version only) and power boost register turned off and have only PA0 active

PA1 is up to 13dbm
PA1+PA2 is up to 17dBm
PA1+PA2 and boost up to 20dBm

unfortunately in default RFM69, all this things are turned on, not good for power consumption. Is there easy way to set those in sketch?