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
  • Hello,

    receiver sensitivity for Cat-M1 is -108 dBm and -107 dBm for low band and mid band respectively. For Cat-NB1/Cat-NB2 it's -114 and -113 dBm. It makes sense that you'll still receive something when the RSRP is close to -100 dBm.

  • 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 

  • I can send you the whole source_code if i have time to review it Slight smile

  • Dear

    I found my problem: 

    I couldnt reboot:

    I got the error when i tried to run sys_reboot(0);  ( #include <misc/reboot.h> )

    void sys_reboot(int type)
    {
            printk("STATE: error_handler/sys_reboot \n\r"); 
    	(void)irq_lock();
             printk("STATE: error_handler/sys_reboot/ irq_lock \n\r"); 
    #ifdef CONFIG_SYS_CLOCK_EXISTS
    	sys_clock_disable();
    #endif
             printk("STATE: error_handler/sys_reboot/ sys_arch_reboot \n\r"); 
    	sys_arch_reboot(type);
    
    	/* should never get here */
    	printk("Failed to reboot: spinning endlessly...\n");
    	for (;;) {
    		k_cpu_idle();
    	}
    }
    

    error:

    Exception occurred in Secure State
    ***** HARD FAULT *****
      Fault escalation (see below)
    ***** BUS FAULT *****
      Precise data bus error
      BFAR Address: 0x50008120
    ***** Hardware exception *****
    Current thread ID = 0x2002abec
    Faulting instruction address = 0x74b056ee
    Fatal fault in ISR! Spinning...

    Plz help me

  • What happens if you just try to call NVIC_SystemReset() instead?

  • Thanks for suggestion, i will try it later

  • Dear

    NVIC_SystemReset

    I tried NVIC_SystemReset(), after modem_configure(), 1time, then, my THINGY:91 has a problem: 

    Connecting to LTE network. This may take several minutes.
    [00:00:28.564,514] [1B][0m<dbg> lte_lc.at_handler: recv: +CEREG: 2,"9D6D","0125DF64",9
    [1B][0m
    [00:00:32.653,900] [1B][0m<dbg> lte_lc.at_handler: recv: +CEREG: 4,"9D6D","0125DF64",9
    [1B][0m
    [00:01:31.799,346] [1B][0m<dbg> lte_lc.at_handler: recv: +CEREG: 4,"FFFE","FFFFFFFF",9
    [1B][0m
    [00:01:58.508,422] [1B][0m<dbg> lte_lc.at_handler: recv: +CEREG: 2,"0C98","01FEC912",9
    [1B][0m
    [00:02:25.204,986] [1B][0m<dbg> lte_lc.at_handler: recv: +CEREG: 2,"FFFE","FFFFFFFF",9
    [1B][0m
    

    It couldnt do anything else now, just stuck here. Could you plz tell me why?

    I want to reset my THINGY:91. 

    Mvh

    Hoang 

Reply
  • Dear

    NVIC_SystemReset

    I tried NVIC_SystemReset(), after modem_configure(), 1time, then, my THINGY:91 has a problem: 

    Connecting to LTE network. This may take several minutes.
    [00:00:28.564,514] [1B][0m<dbg> lte_lc.at_handler: recv: +CEREG: 2,"9D6D","0125DF64",9
    [1B][0m
    [00:00:32.653,900] [1B][0m<dbg> lte_lc.at_handler: recv: +CEREG: 4,"9D6D","0125DF64",9
    [1B][0m
    [00:01:31.799,346] [1B][0m<dbg> lte_lc.at_handler: recv: +CEREG: 4,"FFFE","FFFFFFFF",9
    [1B][0m
    [00:01:58.508,422] [1B][0m<dbg> lte_lc.at_handler: recv: +CEREG: 2,"0C98","01FEC912",9
    [1B][0m
    [00:02:25.204,986] [1B][0m<dbg> lte_lc.at_handler: recv: +CEREG: 2,"FFFE","FFFFFFFF",9
    [1B][0m
    

    It couldnt do anything else now, just stuck here. Could you plz tell me why?

    I want to reset my THINGY:91. 

    Mvh

    Hoang 

Children
Related