This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

How to choice the ESB RF channel, then I can get best communicate quality?

Hi,

As well know, there have 100 channels in ESB function in nRF52832, but 2.4GHz also share with Wifi and Bluetooth.

So there have many noise  if I choice wrong channel.

How can I detect the RF noise in each channel and choice the best one?

Thank you,

Chianglin

Parents
  • Hi Ives

    While the radio can be configured to use 100 different channels, you should stick to channels 0-83 in order to ensure you meet ETSI and FCC requirements (1-82 if you use 2Mbps modulation). 

    It is possible to read the current RSSI state on any RF channel when you are in receive mode, which can give you an estimate off the amount of noise on that channel at a specific point in time, but this is not handled automatically by the ESB library. You would have to add some additional code to enable RSSI manually when the radio is in receive mode, as described in the product specification

    An alternative method to avoid bad channels is to look at the number of lost packet (when you don't receive an ACK). As long as you get an ACK on a certain channel you can assume that the link quality is good enough, but if you see that you lose a lot of packets then you could try to change to a different RF frequency to see if the link quality improves. 

    Best regards
    Torbjørn

  • Hi Torbjørn,

    Would you please give me some sample code?

    Thank you,

    Chianglin

Reply Children
  • Hi Chianglin

    Sorry for the late reply, I have been on vacation for the last two weeks. 

    To make an RSSI measurement when you are already in RX mode all you have to do is the following: 

    1. Start the RSSI sampling:

    NRF_RADIO->TASKS_RSSISTART = 1;

    2. Wait for the RSSIEND event to occur, either by enabling an interrupt on this event or by looping over the event register:

    while(NRF_RADIO->EVENTS_RSSIEND == 0);
    // END event occured, proceed after this

    3. Read the RSSI value from the RSSISAMPLE register:

    int8_t rssi_reading = NRF_RADIO->RSSISAMPLE;

    You might have to do multiple readings for each channel, and sample over all the channels, to get a better understanding of the noise on the channel. This we don't have any examples of unfortunately.

    Best regards
    Torbjørn

  • Hi Torbjørn,

    Thank you for your kindly answer.

    I will test it tomorrow.

    Thank you,

    Chianglin

  • Hi Torbjørn,

    I had attach code to receive environment RSSI.

    TestRSSI.7z

    Following data is my execute result,

    The variation of RSSI output is too big,  does it make sense?

    Thank you,

    Chianglin

  • Hi Chianglin

    Unless you put your kit in an RF chamber this looks normal to me.

    The 2.4GHz band is used by countless of wireless devices, and in a normal urban environment there will always be different types of noise at various levels. 

    Interference sources close to you will typically have a stronger signal, while sources further away will be more attenuated. 

    Based on the readings you sent the channel seems to have little interference most of the time, but you obviously don't know what is happening for those 3 seconds when you are not monitoring the RSSI, or what will happen in the future. 

    Best regards
    Torbjørn

Related