FRC_TestRFsignal = 0x85
Collects bytes. This embedded FRC command tests the RF signal at the given channel using the given RX filter. The command counts and returns the value of checkRF IQRF OS function calls returning TRUE during the currently used FRC response time interval. The counter starts initiated with value 1. If the final counter value is less than 128 (0x80 hexadecimal), the unchanged counter value is returned. If the final counter value is greater or equal to 128, then the counter value is divided by 128 and the division byte result with MSB (7th bit) set is returned. So the MSB of the return FRC value is used to find out whether the resolution is fine (1 count) or coarse (128 counts) respectively.
See the pseudo-code below:
setRFchannel( DataOutBeforeResponseFRC[0] /* Channel */ );
uns16 counter = 1;
while ( isFrcResponseTime() )
if ( checkRF( DataOutBeforeResponseFRC[1] /* RX Filter */ ) )
counter++;
if ( counter < 0x80 )
return counter;
else
return ( counter / 0x80 ) | 0x80;
Input FCR user data has the following content:
0 |
1 |
Channel |
RXfilter |
Channel The channel to test.
RXfilter RX filter value passed as a parameter to checkRF IQRF OS function. See IQRF OS documentation for more details.
Use value 0xFF to get the data from the previous measurement. This can be used to collect the values measured by all Nodes at the same time by the first use of the command. Next selective FRC with a properly set bitmap will then return the value from next up to 63 Nodes. In this case, the shortest FRC response time of 40 ms can be used, so this procedure ensures the fasted acquisition of the test RF signal data measured at the same time.