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

Problem facing with RSSI value in ESB

Hi,

I am using ESB library for nRF52 microcontroller. At receiver i want to measure RSSI value of a packet. I got RRSI from nrf_esb_payload_t structure.

I am printing RSSI value in UART but i am getting some random symboals not proper RSSI values.

Please help me out.

My code main.c

Parents
  • FormerMember
    0 FormerMember

    When I test the below, reading out the RSSI from the NRF_LOG_DEBUG, the RSSI values seems likely to be correct:

    case NRF_ESB_EVENT_RX_RECEIVED:
            NRF_LOG_DEBUG("RX RECEIVED EVENT\r\n");
            if (nrf_esb_read_rx_payload(&rx_payload) == NRF_SUCCESS)
            {
                // Set LEDs identical to the ones on the PTX.
                nrf_gpio_pin_write(LED_1, !(rx_payload.data[1]%8>0 && rx_payload.data[1]%8<=4));
                nrf_gpio_pin_write(LED_2, !(rx_payload.data[1]%8>1 && rx_payload.data[1]%8<=5));
                nrf_gpio_pin_write(LED_3, !(rx_payload.data[1]%8>2 && rx_payload.data[1]%8<=6));
                nrf_gpio_pin_write(LED_4, !(rx_payload.data[1]%8>3));
    
                NRF_LOG_DEBUG("Receiving packet: %02x\r\n", rx_payload.data[1]);
    	        NRF_LOG_DEBUG("RSSI: %02x\r\n",rx_payload.rssi );
            }
            break;
    

    (SDK 12.1.0)

    What kind of values do you read from the RSSI measurements? Does the baudrate in your firmware match the baudrate in the terminal?

  • FormerMember
    0 FormerMember in reply to FormerMember

    What happens if you choose to only see the hex values in the "display" tab? The various symbols could be the translated value from hex to ascii.

    If assuming that the "12"s are some kind of overhead, the RSSI values would be the following: -60, -62, -62, -62, -62, -62, -42, -39, -39, -42, etc

Reply Children
No Data
Related