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

reading signal strength in firmware nrf91

Hi, 

I am trying to read signal strength inside my code. At the moment I know I can do this with AT commands:

AT+CESQ
+CESQ: 99,99,255,255,255,46
OK

RSRP = -140 + 46 = -94 dBm signal strength

And I also saw there is something implemented in the asset tracker application. My question is: Is there a function to read such parameter or how to do it if there is no such thing?

Thank you.

Voja

Parents Reply
  • Hi Hakan, 

    Thanks for the help, also one more thing needs to be changed. sizeof will return 0 because there is nothing in the buffer. 

    here is the function that worked for me:

    void get_signal_strength(void){
    
            const char signal_strength_command[] = "AT+CESQ";
            char cmd_rcv_buf[50];
            enum at_cmd_state state;
            at_cmd_write(signal_strength_command, cmd_rcv_buf, 50, &state);
            if (state == AT_CMD_OK) {
                printk("answ: %s", cmd_rcv_buf);
    	}	
            printk("state: %d, ret %d\n", state);
            
    }

Children
No Data
Related