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

RSSI and RSRP on THINGY.91

Dear, 

Im trying to measure the RSSI with THINGY:91, I found on the document  nrf91_at_commands_v1.1.pdf about

1. AT+CSQ

      +CSQ: <rssi>,<ber>

Note: Not detectable, RAT not supported. Use +CESQ and %CESQ for E-UTRA signal quality.

2. AT + CESQ 

    +CESQ: <rxlev>,<ber>,<rscp>,<ecno>,<rsrq>,<rsrp>

<rsrp>
0 – RSRP < −140 dBm
1 – When −140 dBm ≤ RSRP < −139 dBm
2 – When −139 dBm ≤ RSRP < −138 dBm
...
95 – When −46 dBm ≤ RSRP < −45 dBm
96 – When −45 dBm ≤ RSRP < −44 dBm
97 – When −44 dBm ≤ RSRP
255 – Not known or not detectable

I am using AT+CESQ to find RSRP 

and, i found some document about RSRP range: 

https://wiki.teltonika.lt/view/RSRP_and_RSRQ

But, when I tested to measure it, i got: 

I set the devices (3) in my freezer, and got the RSRP < -100dBm, 

is it conflict here? On the document, they say: NO signal when RSRP < -100dBm, but, I measured -120dBm, and I still received the data from my THINGY:91 - it means : still signal 

I am using Telia NB-IOT( Unit1) Telia LTE-M(Unit2) and Telenor LTE-M(Unit3)

My question is: RSRP vs Signal strength range? RSRP for no signal?

Thanks 

BR, 

Hoang Nguyen

Parents Reply Children
  • Dear

    I am using THING:91 with NB-IoT of Telia (Norway)  to measure the temperature, .., RSRP, and send the data to my webserver.

    It will send 1 package in each hour. and its staying underground, and I got the data from my thingy:91 (RSRP) 

    My problem: when the signal is bad (RSRP < -130 dBM), it stopped working and couldnt reconnect at kl.19.24. 

    At kl.13.20 , it did NOT send any package (because of bad signal), then, it sent again 14.23. 

    My statemachine: 

     My main: 

    void main(void)
    {
          
         
          env_sensors_init();
          env_sensors_start_polling();
          battery_monitor_init();
          printk("modem_configure\n");
          modem_configure();
      
          while(1){
                                         
                 
                  
                    printk("-----------------------\n\r");
                    sensor_data_read();
                    ENCR_HTTP_POST();
                    k_sleep(DELAYPOST); 
                
                   
            
           
          }
    
    }

    Connecting: modem_configure(); 

    Read the temperature,battery,.., RSRP: sensor_data_read()

    encrypted and send  (HTTP_POST): ENCR_HTTP_POST

    sleep: 1hr

    When the THINGY:91 stays underground, the signal is so bad ( RSRP = -130 dBm), and the worst case, NO signal, then, it couldnt POST (HTTP _POST), it will return ERROR, and I tried to reconnect:

    void ENCR_HTTP_POST (void){
    //FPOST: postData
    int err = snprintk_post(FPost,HTTP_HOST,HTTP_PORT);
                
                if(!err){
                    
                    printk("done http post \n\r");
                }
                else {
                    printk("httppost is error \n\r");
                     goto reconnect; 
                }
             return ; 
    reconnect: 
          printk("reconnect network .......\n\r");
          reconnect_nw();
          //modem_configure(); 
         
    }

    my reconnect_nw() (similar to modem_configure()) 

    void reconnect_nw(void){
                    
                    int err;
    		printk("ReConnecting to LTE network. ");
    		printk("This may take several minutes.\n");
    		//ui_led_set_pattern(UI_LTE_CONNECTING);
    
    		err = lte_lc_init_and_connect();
    		if (err) {
    			printk("LTE link could not be established.\n");
                            error_handler(ERROR_LTE_LC, err);
    			
    		}
    
    		printk("Connected to LTE network\n");
    }
    

    and, my snprintk_post(): ( I m using http post from : https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/https_simple/src/main.c is it your? )

    int snprintk_post (char *PostString, char *HTTP_HOST, int HTTP_PORT)
    {
         
       int poststat = '0';
       struct sockaddr_in local_addr;
       struct addrinfo *res;
       printk("Webserver: http://%s:%d \n\r",HTTP_HOST,HTTP_PORT); 
    
       local_addr.sin_family = AF_INET;
       local_addr.sin_port = htons(0);
       local_addr.sin_addr.s_addr = 0;
     
        int err = getaddrinfo(HTTP_HOST, NULL, NULL, &res);
        printk("get addrinfo\n\r");
        printk("getaddrinfo err: %d\n\r", err);
        
        if(!err) {
           printk("network is OK: \n\r");
        }
    
        else {
             printk("network is error: \n\r");
             return CONFIG_LTE_ERR ; 
        }
        
        ((struct sockaddr_in *)res->ai_addr)->sin_port = htons(HTTP_PORT);
        
       
        char send_buf[MAXLINE + 1];
        int send_data_len_post  = snprintk(send_buf,
    				         500, 
    				         POST_TEMPLATE, HTTP_PATH,
    				         HTTP_HOST, strlen(PostString),
    				         PostString);
    
         printf("send_buf is: %s \n",send_buf);
         printk("send_data_len_post: %d\n\r", send_data_len_post);
         
         int client_fd = socket(AF_INET, SOCK_STREAM, 0);
    
         printk("client_fd: %d\n\r", client_fd);
         err = bind(client_fd, (struct sockaddr *)&local_addr, sizeof(local_addr));
         printk("bind err: %d\n\r", err);
         if(!err )
            {
              printk("bindnetwork is OK: \n\r");
              
             }
         else
            {
              printk("network is error: \n\r");
              return CONFIG_LTE_ERR ; 
             }
        
    
        
         //err = blocking_connect(client_fd, (struct sockaddr *)res->ai_addr,sizeof(struct sockaddr_in));
    
          err = connect(client_fd, (struct sockaddr *)res->ai_addr, sizeof(struct sockaddr_in));
    	if (err > 0) {
    		printk("connect err: %d\n", errno);
    		goto clean_up;
    	}
         //err = blocking_connect(client_fd, (struct sockaddr *)res->ai_addr,sizeof(struct sockaddr_in));
         printk("connect err: %d\n\r", err);
         
         int num_bytes = send(client_fd, send_buf, send_data_len_post, 0);
        
         printk("send err: %d\n\r", num_bytes);
         
         
         printk("Close socket \n\r");
         err = close(client_fd);
         
         freeaddrinfo(res);
         printk("============================== DONE SENDING =============================================== \n\r");
        
         return 0; 
         
    clean_up:
    	freeaddrinfo(res);
    	err = close(client_fd);
            
    }

    Could you plz help me. I dont know why, it stopped working. 

     I tested it many times before I put it underground ( try to put it in the freezer, ..., somewhere with bad signal), and it worked

    Thanks so much 

    MVH, 

    Hoang Nguyen 

  • So you tested this with the thingy in the freezer and it worked? What was the RSRP then? Was it any lower when it was underground? If it was lower than in the freezer then you shouldn't expect to get similar results.

  • Hi

    Thanks for fast response, I spent  2times to write the question to you ( 1st after writing, the  https://devzone.nordicsemi.com/ downed, couldnt submit, must did it again) 

    So you tested this with the thingy in the freezer and it worked?

    YES, it worked, and RSRP: 

    Was it any lower when it was underground?

    I think so, RSRP underground is about  -130 dBm, it is lower than in the freezer. 

    the signal is not stable, it will be up and down, sometime it can connect, sometime it can NOT. I think, 

    I am trying to build: if the NW is bad, it will try to reconnect. 

    Do you have any solution ?

    Thanks so much 

    MVH

    Hoang 

  • Have you considered using an external antenna? The thingy antenna is not very good.

Related