<?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>How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio</link><description>Hi, I am new to NRF and segger embedded studio. 
 So I want to send temperature sensor data connected with nrf52840 DK to the Murata1_SC device using UART. 
 The data will be sent using AT Commands. 
 So how to send AT Commands in Segger embedded studio</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 28 May 2021 16:10:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio" /><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312450?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 16:10:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6424075-ded5-4a89-bc28-deba2e9fd658</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;Here is my code&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;quot;app_uart.h&amp;quot;
#include &amp;quot;app_error.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;nrf.h&amp;quot;
#include &amp;quot;bsp.h&amp;quot;
#include &amp;quot;nrf_uart.h&amp;quot;
#include &amp;quot;nrf_log.h&amp;quot;
#include &amp;quot;nrf_log_ctrl.h&amp;quot;
#include &amp;quot;nrf_log_default_backends.h&amp;quot;

#define ENABLE_SWO

//#define DTM_RX_PIN NRF_GPIO_PIN_MAP(0, 11) // p0.11
//#define DTM_TX_PIN NRF_GPIO_PIN_MAP(1, 8) // p1.08


#define UART_TX_BUFF_SIZE 256
#define UART_RX_BUFF_SIZE 256

#define UART_HWFC APP_UART_FLOW_CONTROL_DISABLED


void uart_err_handle(app_uart_evt_type_t * p)
{
  

}


///**@brief Function for UART initialization.
// */
//static void uart_init(void)
//{   
//    uint32_t err_code;
//    const app_uart_comm_params_t comm_params =
//      {
//          DTM_RX_PIN,
//          DTM_TX_PIN,
//          RTS_PIN_NUMBER,
//          CTS_PIN_NUMBER,
//          APP_UART_FLOW_CONTROL_DISABLED,
//          false,
//          NRF_UART_BAUDRATE_115200
//          //DTM_BITRATE
//      };

int main(void)
{

  APP_ERROR_CHECK(NRF_LOG_INIT(NULL));
  NRF_LOG_DEFAULT_BACKENDS_INIT();
  
  NRF_LOG_INFO(&amp;quot;AT/n&amp;quot;);
  uint32_t err_code;

  bsp_board_init(BSP_INIT_LEDS);
  
  const app_uart_comm_params_t com_params = 
   {
    RX_PIN_NUMBER, 
    TX_PIN_NUMBER, 
    RTS_PIN_NUMBER,
    CTS_PIN_NUMBER,
    UART_HWFC,     //APP_UART_FLOW_CONTROL_DISABLED
    false,
    NRF_UART_BAUDRATE_115200
    };


  APP_UART_FIFO_INIT(&amp;amp;com_params, 
                      UART_RX_BUFF_SIZE, 
                      UART_TX_BUFF_SIZE, 
                      uart_err_handle, 
                      APP_IRQ_PRIORITY_LOWEST, 
                      err_code);

  APP_ERROR_CHECK(err_code);
  NRF_LOG_INFO(&amp;quot;AT/n&amp;quot;);
  nrf_delay_ms(1000);
  //printf(&amp;quot;Hello PC from Nordic&amp;quot;);
  
  while(true)
  {
    uint8_t cr;
    NRF_LOG_INFO(&amp;quot;AT/n&amp;quot;);
    printf(&amp;quot;\r\nAT\r\n&amp;quot;);
    nrf_delay_ms(2000);
    while(app_uart_get(&amp;amp;cr) != NRF_SUCCESS);//wait here for the character from pc
    if(cr == &amp;#39;OK&amp;#39;)
    {
      bsp_board_leds_on();
      NRF_LOG_INFO(&amp;quot;OK&amp;quot;);
      
    }
    if(cr == &amp;#39;ERROR&amp;#39;)
    {
      bsp_board_leds_off();
      NRF_LOG_INFO(&amp;quot;ERROR&amp;quot;);
    }
  }
}



&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Please correct me where i am wrong?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312449?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 16:09:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cb865be6-4911-47ba-982e-4177bee2c5a7</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;where id debug terminal in this&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312445?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 15:54:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e23a42bc-8123-4d3e-98a5-dc286cf4c90f</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;Please tell me where in segger I can check the output of the command&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/7215.Capture.JPG" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312435?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 15:11:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d8b847fd-7032-4c15-9e46-2d41099e736e</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;see the link I provided.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312432?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 15:05:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a58ff265-9cff-4483-9fc8-b513a24d271a</guid><dc:creator>Rajbir Singh</dc:creator><description>[quote userid="6462" url="~/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312403#312403"]As with any other microcontroller, you would need to connect some sort of monitor onto the wires connecting the nRF to the modem[/quote]
&lt;p&gt;means another device, I don&amp;#39;t understand what actually you are saying.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312424?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 14:27:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca75ea84-0320-4f77-8f39-82f7b4af44d4</guid><dc:creator>Rajbir Singh</dc:creator><description>[quote userid="98377" url="~/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312393#312393"]is used to send data through UART.[/quote]
&lt;p&gt;this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312422?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 14:25:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4c31c931-1f4c-4901-b3c1-1d90c037406a</guid><dc:creator>Rajbir Singh</dc:creator><description>[quote userid="6462" url="~/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312403#312403"]Do you have any experience with ant other microcontroller(s) and/or any other IDE(s) ?[/quote]
&lt;p&gt;yes, i have experience in Arduino programming, python programming for raspberry pi but don&amp;#39;t have any in Avr microcontrollers.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312405?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 13:30:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdb49332-dbe1-4194-b4a2-74e9762c08f0</guid><dc:creator>awneil</dc:creator><description>[quote userid="98377" url="~/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312394#312394"]&lt;blockquote class="quote"&gt;&lt;div class="quote-user"&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312383#312383"&gt;awneil said:&lt;/a&gt;&lt;/div&gt;&lt;div class="quote-content"&gt;don&amp;#39;t really understand what you meant by Software UART&lt;/div&gt;&lt;/blockquote&gt;&lt;div class="quote-footer"&gt;&lt;/div&gt;
&lt;p&gt;it is like SoftwareSerial lib in Arduino, by using this we can make any I/O pins as Rx and Tx&lt;/p&gt;[/quote]
&lt;p&gt;That was &lt;a href="https://devzone.nordicsemi.com/members/hungbui"&gt;Hung Bui&lt;/a&gt; - not me.&lt;/p&gt;
&lt;p&gt;The Arduino SoftwareSerial is, indeed, bit-banged:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.arduino.cc/en/Reference/softwareSerial"&gt;www.arduino.cc/.../softwareSerial&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312403?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 13:27:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f936617-a6bf-4c17-a3ae-c6b0958a32b2</guid><dc:creator>awneil</dc:creator><description>[quote userid="98377" url="~/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312393#312393"]&lt;p&gt;Some are saying P0.05 to P0.08 is used by J-Link.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;[/quote]
&lt;p&gt;That would refer to a Nordic Dev Kit - you could easily check this in the User Manual and/or schematics for that Dev Kit.&lt;/p&gt;
&lt;p&gt;In that case you would, indeed, need to choose different pins - or use the other UART.&lt;/p&gt;
[quote userid="98377" url="~/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312393#312393"]which pins should I use [/quote]
&lt;p&gt;As stated earlier, with just a few restrictions, you are free to choose any pins you like.&lt;/p&gt;
[quote userid="98377" url="~/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312393#312393"]how to change the pins in the code[/quote]
&lt;p&gt;Using the macro definitions shown above.&lt;/p&gt;
[quote userid="98377" url="~/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312393#312393"] I am new to nrf and segger [/quote]
&lt;p&gt;Do you have any experience with ant other microcontroller(s) and/or any other IDE(s) ?&lt;/p&gt;
[quote userid="98377" url="~/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312393#312393"]how can I check the data in the output console[/quote]
&lt;p&gt;As with any other microcontroller, you would need to connect some sort of monitor onto the wires connecting the nRF to the modem&lt;/p&gt;
&lt;p&gt;See:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.avrfreaks.net/comment/2336161#comment-2336161"&gt;https://www.avrfreaks.net/comment/2336161#comment-2336161&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.avrfreaks.net/comment/2306116#comment-2306116"&gt;https://www.avrfreaks.net/comment/2306116#comment-2306116&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312394?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 13:12:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ff17761-4c13-450a-91d4-829475cbeeaa</guid><dc:creator>Rajbir Singh</dc:creator><description>[quote userid="6462" url="~/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312383#312383"]don&amp;#39;t really understand what you meant by Software UART[/quote]
&lt;p&gt;it is like SoftwareSerial lib in Arduino, by using this we can make any I/O pins as Rx and Tx.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312393?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 13:10:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:da72bef2-55e5-4b8f-afbc-391bc94c81f2</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;basically, I want to send AT commands to an LTE Module using nrf52840, so I used the UART example in the example folder of nrf sdk 17.0.2.&lt;/p&gt;
&lt;p&gt;But I have read its response back to see what I get.&lt;/p&gt;
&lt;p&gt;Si I have read m Q&amp;amp;A on devzone.nordicsemi.com.&lt;/p&gt;
&lt;p&gt;Some are saying P0.05 to P0.08 is used by J-Link.&lt;/p&gt;
&lt;p&gt;So I am confused, so which pins should I use to communicate and how to change the pins in the code.&lt;/p&gt;
&lt;p&gt;Actually I am new to nrf and segger so i have some basic questions also&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;printf(&amp;quot;AT\n&amp;quot;)&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;is used to send data through UART.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But how can I check the data in the output console, means which command is used to print data in the output console&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;is it&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;NRF_LOG_INFO(&amp;quot;AT/n&amp;quot;);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;or&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;app_uart_put()&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Please help&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312383?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 12:57:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:082e4393-b4ad-4a9a-b7d4-9fc940669d8c</guid><dc:creator>awneil</dc:creator><description>[quote userid="2121" url="~/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312382#312382"] don&amp;#39;t really understand what you meant by Software UART[/quote]
&lt;p&gt;I presume he means bit-banging it in software?&lt;/p&gt;
&lt;p&gt;Doesn&amp;#39;t seem much point in doing that when the nRF52840 has 2 &amp;quot;real&amp;quot; (ie, hardware) UARTS?&lt;/p&gt;
[quote userid="2121" url="~/f/nordic-q-a/75447/how-to-send-sensor-data-using-at-commands-to-a-device-using-uart-in-segger-embedded-studio/312382#312382"]RX pin to pin P0.27 on the chip. TX pin to P0.26[/quote]
&lt;p&gt;How does it work for P&lt;span style="text-decoration:underline;"&gt;&lt;strong&gt;1&lt;/strong&gt;&lt;/span&gt;.xx pins ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/312382?ContentTypeID=1</link><pubDate>Fri, 28 May 2021 12:53:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0e204d5-ccd4-4104-a628-343ac0767f28</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What&amp;#39;s the exact issue you are having ?&amp;nbsp;&lt;br /&gt;Can you develop your app based on the uart example in the SDK or the example that you found working above ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t really understand what you meant by Software UART ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;What did you mean by &amp;quot;hardware UART is used by debugger&amp;quot; ?&amp;nbsp;&lt;br /&gt;Calling this:&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define RX_PIN_NUMBER 27 //8
#define TX_PIN_NUMBER 26 //6
#define CTS_PIN_NUMBER 12 //7
#define RTS_PIN_NUMBER 11 //5&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Will degine the RX pin to pin P0.27 on the chip. TX pin to P0.26 on the chip, and so on.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/311695?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 09:03:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60d4d0ea-1b29-4430-a5fc-727bc4f4cc91</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;Please help i have some issues.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/311416?ContentTypeID=1</link><pubDate>Tue, 25 May 2021 11:17:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ee15ec4-b229-40ce-8181-7438d433d4e0</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/awneil"&gt;awneil&lt;/a&gt; by using the above code, I am not able to send anything.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But I tried the following code to send data to Arduino and I am able to send the data.&lt;pre class="ui-code" data-mode="c_cpp"&gt;

#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;quot;app_uart.h&amp;quot;
#include &amp;quot;app_error.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;nrf.h&amp;quot;
#include &amp;quot;bsp.h&amp;quot;
#include &amp;quot;nrf_uart.h&amp;quot;

//#define RX_PIN_NUMBER 27 //8
//#define TX_PIN_NUMBER 26 //6
//#define CTS_PIN_NUMBER 12 //7
//#define RTS_PIN_NUMBER 11 //5


#define UART_TX_BUFF_SIZE 256
#define UART_RX_BUFF_SIZE 256

#define UART_HWFC APP_UART_FLOW_CONTROL_DISABLED

void uart_err_handle(app_uart_evt_type_t * p)
{
  

}

int main(void)
{
  uint32_t err_code;

  bsp_board_init(BSP_INIT_LEDS);
  
  const app_uart_comm_params_t com_params = 
   {
    RX_PIN_NUMBER,
    TX_PIN_NUMBER,
    RTS_PIN_NUMBER,
    CTS_PIN_NUMBER,
    UART_HWFC,
    false,
    NRF_UART_BAUDRATE_115200
    };

  APP_UART_FIFO_INIT(&amp;amp;com_params, UART_RX_BUFF_SIZE, UART_TX_BUFF_SIZE, uart_err_handle, APP_IRQ_PRIORITY_LOWEST, err_code);

  APP_ERROR_CHECK(err_code);
  
  printf(&amp;quot;Hello PC from Nordic\r\n&amp;quot;);
  
  while(true)
  {
    uint8_t cr;

    while(app_uart_get(&amp;amp;cr) != NRF_SUCCESS);//wait here for the character from pc
    if(cr == &amp;#39;OK&amp;#39;)
    {
      bsp_board_leds_on();
      printf(&amp;quot;Leds are ON\r\n&amp;quot;);
    }
    if(cr == &amp;#39;ERROR&amp;#39;)
    {
      bsp_board_leds_off();
      printf(&amp;quot;Leds are OFF\r\n&amp;quot;);
    }
  }
}



&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also, I am confused that by changing these pins&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#define RX_PIN_NUMBER 27 //8
#define TX_PIN_NUMBER 26 //6
#define CTS_PIN_NUMBER 12 //7
#define RTS_PIN_NUMBER 11 //5
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Could I able to change the hardware UART to Software UART&lt;/p&gt;
&lt;p&gt;Because Hardware UART is used by Debugger&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/311257?ContentTypeID=1</link><pubDate>Mon, 24 May 2021 15:56:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e48838d-f24e-4463-ae25-fb5d3af7ce47</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;I am using hardware pins,but i am able to make communication with device.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/311256?ContentTypeID=1</link><pubDate>Mon, 24 May 2021 15:54:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d1df7702-376e-4cab-a543-cedad65e7f7b</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;Is this correct&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;quot;app_uart.h&amp;quot;
#include &amp;quot;app_error.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;nrf.h&amp;quot;
#include &amp;quot;bsp.h&amp;quot;
#include &amp;quot;nrf_uart.h&amp;quot;
#include &amp;lt;string.h&amp;gt;

#define RX_PIN_NUMBER 27 //8
#define TX_PIN_NUMBER 26 //6
#define CTS_PIN_NUMBER 12 //7
#define RTS_PIN_NUMBER 11 //5


#define UART_TX_BUF_SIZE 256                         /**&amp;lt; UART TX buffer size. */
#define UART_RX_BUF_SIZE 256                         /**&amp;lt; UART RX buffer size. */

/* When UART is used for communication with the host do not use flow control.*/
#define UART_HWFC APP_UART_FLOW_CONTROL_DISABLED

void uart_error_handle(app_uart_evt_t * p_event)
{
    if (p_event-&amp;gt;evt_type == APP_UART_COMMUNICATION_ERROR)
    {
        APP_ERROR_HANDLER(p_event-&amp;gt;data.error_communication);
    }
    else if (p_event-&amp;gt;evt_type == APP_UART_FIFO_ERROR)
    {
        APP_ERROR_HANDLER(p_event-&amp;gt;data.error_code);
    }
}

void uart_putstring(const uint8_t *str) 
{
       uint32_t err_code;

       while( str ) 
       {
            err_code = app_uart_put(( uint8_t*) str++ );

            APP_ERROR_CHECK(err_code);
       }
}
 


/***

static void uart_loopback_test()
{
    uint8_t * tx_data = (uint8_t *)(&amp;quot;\r\nLOOPBACK_TEST\r\n&amp;quot;);
    uint8_t   rx_data;

    // Start sending one byte and see if you get the same
    for (uint32_t i = 0; i &amp;lt; MAX_TEST_DATA_BYTES; i++)
    {
        uint32_t err_code;
        while (app_uart_put(tx_data[i]) != NRF_SUCCESS);

        nrf_delay_ms(10);
        err_code = app_uart_get(&amp;amp;rx_data);

        if ((rx_data != tx_data[i]) || (err_code != NRF_SUCCESS))
        {
            show_error();
        }
    }
    return;
}

***/

char* uart_getstring(char* rx_data) 
{
       uint32_t err_code;
       err_code = app_uart_get(rx_data);
       APP_ERROR_CHECK(err_code);
       return rx_data;
}


/**
 * @brief Function for main application entry.
 */
int main(void)
{
    uint32_t err_code;

    const app_uart_comm_params_t comm_params =
      {
          RX_PIN_NUMBER,
          TX_PIN_NUMBER,
          RTS_PIN_NUMBER,
          CTS_PIN_NUMBER,
          UART_HWFC,
          false,

          NRF_UART_BAUDRATE_115200

      };

    APP_UART_FIFO_INIT(&amp;amp;comm_params,
                         UART_RX_BUF_SIZE,
                         UART_TX_BUF_SIZE,
                         uart_error_handle,
                         APP_IRQ_PRIORITY_LOWEST,
                         err_code);

    APP_ERROR_CHECK(err_code);

 //Commands to send data to murata_1sc

    uart_putstring((const char*)&amp;quot;AT\r\n&amp;quot;); //variaible iterate - array iterate
    nrf_delay_ms(100);
     char* output;
    output = uart_getstring(output);
    printf(output);
    
    uart_putstring((const char*)&amp;quot;AT%AWSIOTCMD=\&amp;quot;PUBLISH\&amp;quot;,\&amp;quot;tracker/location\&amp;quot;,\&amp;quot;{\&amp;quot;message\&amp;quot;:\&amp;quot;Hello from Murata 1SC\&amp;quot;}\&amp;quot;\r\n&amp;quot;); //variaible iterate - array iterate
    nrf_delay_ms(100);
     char* output;
    output = uart_getstring(output);
    printf(output);
 
}








/***
 
 //array of commands declare
 char arrr[12][150]  = { &amp;quot; AT\r\n &amp;quot;,
                         &amp;quot; &amp;quot;,
                         &amp;quot; &amp;quot;,
                         &amp;quot; AT%CERTCMD=\&amp;quot;DIR\&amp;quot;%CERTCMD:murata_1sc_cert.pem,cert.pem,privatekey.pem,murata_private.key\r\n &amp;quot;,
                         &amp;quot; AT%CERTCFG=\&amp;quot;ADD\&amp;quot;,1,,\&amp;quot;~\&amp;quot;,\&amp;quot;murata_1sc_cert.pem\&amp;quot;,\&amp;quot;murata_1sc_private.key\&amp;quot;\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTCFG=\&amp;quot;PROTOCOL\&amp;quot;,1200,0\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTEV=\&amp;quot;ALL\&amp;quot;,1\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTCMD=\&amp;quot;CONNECT\&amp;quot;\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTCMD=\&amp;quot;PUBLISH\&amp;quot;,\&amp;quot;tracker/location\&amp;quot;,\&amp;quot;{\&amp;quot;message\&amp;quot;:\&amp;quot;Hello from Murata 1SC\&amp;quot;}\&amp;quot;\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTCMD=\&amp;quot;SUBSCRIBE\&amp;quot;,\&amp;quot;tracker/location\&amp;quot;\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTCMD=\&amp;quot;SUBSCRIBE\&amp;quot;,\&amp;quot;$aws/things/murata_1sc/shadow/update\&amp;quot;\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTCMD=\&amp;quot;PUBLISH\&amp;quot;,\&amp;quot;$aws/things/murata_1sc/shadow/update\&amp;quot;,\&amp;quot; { \&amp;quot;state\&amp;quot;: {\&amp;quot;desired\&amp;quot;: { \&amp;quot;color\&amp;quot;: \&amp;quot;yellow\&amp;quot; } } }\&amp;quot;\r\n &amp;quot;
                       };
 //char outttt[12][100];    
 //loopstart

 int i = 0;
 for(i=0;i&amp;lt;13;i++)
 {
    uart_putstring((const char*)arrr[i]); //variaible iterate - array iterate
    nrf_delay_ms(100);
    char* output;
    while( true )
        {
          // wait for timeout or reply complete
          output = uart_getstring(output);
          if (output == &amp;quot;ERROR&amp;quot;)
          {
           printf(&amp;quot;ERROR&amp;quot;);
          }
}

//print
//loop end
}
}

***/



&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;From where to check the GPIO pin in nrf&lt;/p&gt;
&lt;p&gt;like&lt;/p&gt;
&lt;p&gt;P1.02&lt;/p&gt;
&lt;p&gt;P1.03&lt;/p&gt;
&lt;p&gt;P1.04&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/311254?ContentTypeID=1</link><pubDate>Mon, 24 May 2021 14:57:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:780dfbb9-1fe8-4636-9ae7-6151d8362ed2</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;See the Product Specification: the nRF52 have flexible pin mapping - with just a couple of restrictions, the UART (and other peripherals) can be routed to &lt;em&gt;&lt;strong&gt;any&lt;/strong&gt; &lt;/em&gt;pins.&lt;/p&gt;
&lt;p&gt;The nRF52840 has two hardware UARTs&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/311252?ContentTypeID=1</link><pubDate>Mon, 24 May 2021 14:36:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de3aebde-57ae-4443-9522-6ee1231b9c8e</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;Yes, I am just testing the timeout with different commands.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Could me please tell me, how can I make other pins as UART&lt;/p&gt;
&lt;p&gt;Because P0.05 to P0.08 are Hardware UART pins&lt;/p&gt;
&lt;p&gt;&amp;nbsp; how can i make other GPIO pins work as UART like software serial in Arduino&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/311250?ContentTypeID=1</link><pubDate>Mon, 24 May 2021 13:48:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7f77a670-af79-4dfd-9bc4-59e4e2cb652f</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;This should really be documented by the module manufacturer - you need to contact them for details.&lt;/p&gt;
&lt;p&gt;Remember that you have to consider &lt;em&gt;worst&lt;/em&gt; case conditions.&lt;/p&gt;
&lt;p&gt;But if your application is OK to wait a whole 4s for a command which should complete &amp;quot;immediately&amp;quot; - then that&amp;#39;s fine.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s your application - only you can answer that.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/311243?ContentTypeID=1</link><pubDate>Mon, 24 May 2021 11:48:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2c997bc-2049-4892-ad2e-fe869e9f9aa1</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;I have sent AT every commands to the module using TeraTerm software, so some commands took almost 3 to 4 seconds to respond.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So 4 seconds timout will be fine for this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/311223?ContentTypeID=1</link><pubDate>Mon, 24 May 2021 09:35:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be40f9f6-7221-41e5-8fed-81efdbb1e4c0</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;What, exactly, is your confusion?&lt;/p&gt;
&lt;p&gt;Another on ignoring responses when sending commands - only this morning:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://www.avrfreaks.net/comment/3144271#comment-3144271"&gt;www.avrfreaks.net/.../3144271&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/311182?ContentTypeID=1</link><pubDate>Sun, 23 May 2021 14:13:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:40224c43-83d2-42e5-93bd-5e1cb9a56001</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;i have made this code&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;stdbool.h&amp;gt;
#include &amp;lt;stdint.h&amp;gt;
#include &amp;lt;stdio.h&amp;gt;
#include &amp;quot;app_uart.h&amp;quot;
#include &amp;quot;app_error.h&amp;quot;
#include &amp;quot;nrf_delay.h&amp;quot;
#include &amp;quot;nrf.h&amp;quot;
#include &amp;quot;bsp.h&amp;quot;
#include &amp;quot;nrf_uart.h&amp;quot;
#include &amp;lt;string.h&amp;gt;


#define UART_TX_BUF_SIZE 256                         /**&amp;lt; UART TX buffer size. */
#define UART_RX_BUF_SIZE 256                         /**&amp;lt; UART RX buffer size. */

/* When UART is used for communication with the host do not use flow control.*/
#define UART_HWFC APP_UART_FLOW_CONTROL_DISABLED

void uart_error_handle(app_uart_evt_t * p_event)
{
    if (p_event-&amp;gt;evt_type == APP_UART_COMMUNICATION_ERROR)
    {
        APP_ERROR_HANDLER(p_event-&amp;gt;data.error_communication);
    }
    else if (p_event-&amp;gt;evt_type == APP_UART_FIFO_ERROR)
    {
        APP_ERROR_HANDLER(p_event-&amp;gt;data.error_code);
    }
}

void uart_putstring(const uint8_t *str) 
{
       uint32_t err_code;

       while( str ) 
       {
            err_code = app_uart_put(( uint8_t*) str++ );

            APP_ERROR_CHECK(err_code);
       }
}
 
char* uart_getstring(char* rx_data) 
{
       uint32_t err_code;
       err_code = app_uart_get(rx_data);
       return rx_data;
}


/**
 * @brief Function for main application entry.
 */
int main(void)
{
    uint32_t err_code;

    const app_uart_comm_params_t comm_params =
      {
          RX_PIN_NUMBER,
          TX_PIN_NUMBER,
          RTS_PIN_NUMBER,
          CTS_PIN_NUMBER,
          UART_HWFC,
          false,

          NRF_UART_BAUDRATE_115200

      };

    APP_UART_FIFO_INIT(&amp;amp;comm_params,
                         UART_RX_BUF_SIZE,
                         UART_TX_BUF_SIZE,
                         uart_error_handle,
                         APP_IRQ_PRIORITY_LOWEST,
                         err_code);

    APP_ERROR_CHECK(err_code);

 //Commands to send data to murata_1sc

//    uart_putstring((const char*)&amp;quot;AT\r\n&amp;quot;); //variaible iterate - array iterate
  //   char* output;
    //output = uart_getstring(output);
     //printf(&amp;quot;Hello PC from Nordic Device!!!\r\n&amp;quot;);


 
 //array of commands declare
 char arrr[12][150]  = { &amp;quot; AT\r\n &amp;quot;,
                         &amp;quot; &amp;quot;,
                         &amp;quot; &amp;quot;,
                         &amp;quot; AT%CERTCMD=\&amp;quot;DIR\&amp;quot;%CERTCMD:murata_1sc_cert.pem,cert.pem,privatekey.pem,murata_private.key\r\n &amp;quot;,
                         &amp;quot; AT%CERTCFG=\&amp;quot;ADD\&amp;quot;,1,,\&amp;quot;~\&amp;quot;,\&amp;quot;murata_1sc_cert.pem\&amp;quot;,\&amp;quot;murata_1sc_private.key\&amp;quot;\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTCFG=\&amp;quot;PROTOCOL\&amp;quot;,1200,0\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTEV=\&amp;quot;ALL\&amp;quot;,1\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTCMD=\&amp;quot;CONNECT\&amp;quot;\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTCMD=\&amp;quot;PUBLISH\&amp;quot;,\&amp;quot;tracker/location\&amp;quot;,\&amp;quot;{\&amp;quot;message\&amp;quot;:\&amp;quot;Hello from Murata 1SC\&amp;quot;}\&amp;quot;\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTCMD=\&amp;quot;SUBSCRIBE\&amp;quot;,\&amp;quot;tracker/location\&amp;quot;\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTCMD=\&amp;quot;SUBSCRIBE\&amp;quot;,\&amp;quot;$aws/things/murata_1sc/shadow/update\&amp;quot;\r\n &amp;quot;,
                         &amp;quot; AT%AWSIOTCMD=\&amp;quot;PUBLISH\&amp;quot;,\&amp;quot;$aws/things/murata_1sc/shadow/update\&amp;quot;,\&amp;quot; { \&amp;quot;state\&amp;quot;: {\&amp;quot;desired\&amp;quot;: { \&amp;quot;color\&amp;quot;: \&amp;quot;yellow\&amp;quot; } } }\&amp;quot;\r\n &amp;quot;
                       };
 //char outttt[12][100];    
 //loopstart

 int i = 0;
 for(i=0;i&amp;lt;13;i++)
 {
    uart_putstring((const char*)arrr[i]); //variaible iterate - array iterate
    char* output;
   
      while( !timeout &amp;amp;&amp;amp; !reply_complete )
        {
          // wait for timeout or reply complete
          output = uart_getstring(output);
          if (output == &amp;quot;ERROR&amp;quot;)
          {
           printf(&amp;quot;ERROR&amp;quot;);
          }
}

//print
//loop end
}
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I am still confused about time out&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/311169?ContentTypeID=1</link><pubDate>Sat, 22 May 2021 12:19:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:666b8d59-0f90-48d0-b9c7-3fa82011a7b3</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;ok thank you so much, I&amp;#39;ll try that&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to send sensor data using AT commands to a device using Uart in segger embedded studio</title><link>https://devzone.nordicsemi.com/thread/311168?ContentTypeID=1</link><pubDate>Sat, 22 May 2021 11:40:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79dee2df-c02d-4d09-8d48-4268ba9f3eae</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;I wouldn&amp;#39;t recommend this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;send_AT_Command();

timeout();

if (received_srting == actual_string)
{
    print(received_srting);
}
else
{
    print(&amp;quot;ERROR&amp;quot;,received_srting);
}
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;because that means you always wait for the maximum time - irrespective of how quickly the modem responds.&lt;/p&gt;
&lt;p&gt;also note that replies will generally include variable data - so you can&amp;#39;t just test for an &amp;quot;expected string&amp;quot;&lt;/p&gt;
&lt;p&gt;instead, maybe something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;send_AT_Command();

while( !timeout &amp;amp;&amp;amp; !reply_complete )
{
    // wait for timeout or reply complete
}

// handle reply or timeout ...&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>