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?

  • I modified ESB library. I removed all the configuration and I made it like only when Tx is transmitting then Rx is receiving(There is no Buttons, ACK etc).

    Moreover, I am getting a different kind of ASCII symbols (I removed Typecasting with char) even though am getting ASCII chars and sometimes numbers that 1, 2 etc.

    I have attached my code with above. Please check once.

Reply
  • I modified ESB library. I removed all the configuration and I made it like only when Tx is transmitting then Rx is receiving(There is no Buttons, ACK etc).

    Moreover, I am getting a different kind of ASCII symbols (I removed Typecasting with char) even though am getting ASCII chars and sometimes numbers that 1, 2 etc.

    I have attached my code with above. Please check once.

Children
No Data
Related