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

  • Hi

    I may find a problem with my thingy91.

    In my HTTP POST: 

    detail of my HTTP_POST: 

    int snprintk_post (char *PostString, char *HTTP_HOST, int HTTP_PORT)
    {
         
      
       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 ; 
             }
        
    
         //hng: 17012020 testing bad signal
    
         //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);
         /*
         if(!err )
            {
              printk("blocking_connectnetwork is OK: \n\r");
              
             }
         else
          {
               printk("network is error: \n\r");
               return CONFIG_LTE_ERR ; 
          }
          */
         int num_bytes = send(client_fd, send_buf, send_data_len_post, 0);
        
         printk("num_bytes sent: %d\n\r", num_bytes);
         
         //get the fb from webserver ; 
         /*
         int tot_num_bytes = 0;
         do {
    		
             num_bytes =blocking_recv(client_fd, recv_buf, RECV_BUF_SIZE, 0);
             tot_num_bytes += num_bytes;
             if (num_bytes <= 0) {
    			break;
    		             }
    	// printk("%s \n\r", recv_buf);
    	} while (num_bytes > 0);
         */
         printk("Close socket \n\r");
         err = close(client_fd);
         
         freeaddrinfo(res);
         printk("============================== DONE SENDING =============================================== \n\r");
         //poststat = true; 
         return 0; 
         
    clean_up:
    	freeaddrinfo(res);
    	err = close(client_fd);
            
    }

    If the bad signal  came  ( < -135 dBm) when http_posting, it may return HTTP_ERR

    connect(client_fd, (struct sockaddr *)res->ai_addr, sizeof(struct sockaddr_in));

    i used to get the error from this step)

    then, I tried to reconnect_nw():   lte_lc_init_and_connect()

    And, I may  get the 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...

    The problem: The network haven't disconnected yet !!! HTTP_POST returned the ERROR, but I dont know exactly why, and what kind of error?

    If I tried:  DISconnect before reconnect_nw(), I wont get any ERROR.  

    What kind of error can we meet in HTTP POST? 

    ( I m sure, my webserver is OK)

    COuld you help me, I want to know about what kind of error can we meet in http post, and the solution for each of them?

    Thanks so much

    MVH

    Hoang Nguyen

  • Hoang said:
    What kind of error can we meet in HTTP POST? 

    I'm not sure what you're referring to. Is this "HTTP POST" something in the SDK or something you have written?

  • I might be blind or something, but I really can't find the "http_post" you're referring to. It's not in main.c as far as I can tell.

    Also, I see that there is a ENCR_HTTP_POST() in the diagram you posted. Is that it? Where can I find this?

  • Dear

    My fall, I used app_http_start() from: https://github.com/Rallare/fw-nrfconnect-nrf/blob/nrf9160_samples/samples/nrf9160/https_simple/src/main.c to write: snprintk_post() 

    And,  ENCR_HTTP_POST(), I encrypted my data before posting: snprintk_post()

    //char DPost[500]; //encryptedData will be posted to webserver: HTTP_HOST:HTTP_PORT

    int err = snprintk_post(DPost,HTTP_HOST,HTTP_PORT);

     

Related