<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>reading signal strength in firmware nrf91</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/49966/reading-signal-strength-in-firmware-nrf91</link><description>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</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 18 Jul 2019 13:32:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/49966/reading-signal-strength-in-firmware-nrf91" /><item><title>RE: reading signal strength in firmware nrf91</title><link>https://devzone.nordicsemi.com/thread/199311?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2019 13:32:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca9ef08c-2735-4a79-8055-f69245d068bf</guid><dc:creator>Vojislav</dc:creator><description>&lt;p&gt;Hi Hakan,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Thanks for the help, also one more thing needs to be changed. sizeof will return 0 because there is nothing in the buffer.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;here is the function that worked for me:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void get_signal_strength(void){

        const char signal_strength_command[] = &amp;quot;AT+CESQ&amp;quot;;
        char cmd_rcv_buf[50];
        enum at_cmd_state state;
        at_cmd_write(signal_strength_command, cmd_rcv_buf, 50, &amp;amp;state);
        if (state == AT_CMD_OK) {
            printk(&amp;quot;answ: %s&amp;quot;, cmd_rcv_buf);
	}	
        printk(&amp;quot;state: %d, ret %d\n&amp;quot;, state);
        
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading signal strength in firmware nrf91</title><link>https://devzone.nordicsemi.com/thread/199273?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2019 12:25:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9154c588-2428-4255-aa4b-35e90257523d</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Try something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void get_signal_strength(void)
{
	const char signal_strength_command[] = &amp;quot;AT+CESQ&amp;quot;;
	char cmd_rcv_buf[50];
	enum at_cmd_state state;
	int ret = at_cmd_write(signal_strength_command, cmd_rcv_buf, sizeof(cmd_rcv_buf), &amp;amp;state);
	if (state == AT_CMD_OK) {
		printk(&amp;quot;answ: %s&amp;quot;, cmd_rcv_buf);
	}	
	printk(&amp;quot;state: %d, ret %d\n&amp;quot;, state, ret);
}&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading signal strength in firmware nrf91</title><link>https://devzone.nordicsemi.com/thread/199225?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2019 10:54:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f79220e-3221-4cea-a96c-41c91f811d24</guid><dc:creator>Vojislav</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;br /&gt;&lt;br /&gt;I am trying to do this, but there is no result:&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;void get_signal_strength(void){

        const char signal_strength_command[] = &amp;quot;AT+CESQ&amp;quot;;
        char cmd_rcv_buf[50];
        enum at_cmd_state *err;
        at_cmd_write(signal_strength_command, cmd_rcv_buf, strlen(cmd_rcv_buf), err);
        printk(&amp;quot;state: %d   &amp;quot;, err);
        printk(&amp;quot;answ: %s \n&amp;quot;, cmd_rcv_buf);
}&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Of course, I am connected to the NB-IoT network before calling this function.&amp;nbsp;&lt;br /&gt;Serial output is:&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;state: 0   answ:  
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Do you know what might be the problem?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Voja&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: reading signal strength in firmware nrf91</title><link>https://devzone.nordicsemi.com/thread/199160?ContentTypeID=1</link><pubDate>Thu, 18 Jul 2019 08:46:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3ba5590e-6b98-4360-ba04-c5c056394f80</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;If that is the only thing you&amp;#39;re interested in, just send the at command and parse the response to filter out the RSRP.&lt;/p&gt;
&lt;p&gt;If you need more parameters, have a look at this library:&amp;nbsp;&lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/lib/modem_info"&gt;https://github.com/NordicPlayground/fw-nrfconnect-nrf/tree/master/lib/modem_info&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>