<?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>Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/28086/using-rtt-viewer-and-uart-to-send-esp8266-at-commands</link><description>Hello ,
I am using sdk12.2 and pca10028. I have implemented rtt viewer so that I dont need uart to debug or to print something. I am using uart to send AT commands to esp8266. I have tested individually and my uart code can send AT commands and I am</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 12 Dec 2017 06:36:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/28086/using-rtt-viewer-and-uart-to-send-esp8266-at-commands" /><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110711?ContentTypeID=1</link><pubDate>Tue, 12 Dec 2017 06:36:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fddbc059-3022-4890-9a08-cb799bad9f0c</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hi Newbie and Petter,
I am implementing same like you, means i am using nRf52832 and sd is 132 and want to send data to server using ESP8266. I interface ESP8266 with nRF52832 DK via UART and trying to send AT command to ESP8266. i refre your code but i don&amp;#39;t getting response back from ESP8266 can you please help me how i can send data to server using this WiFi. Is it need to implement RTT viewer why you use in your programming.&lt;/p&gt;
&lt;p&gt;Thanks ...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110710?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 13:59:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:209da366-9e79-4ed5-9a07-31819a9ad6f9</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Changing APP_IRQ_PRIORITY_HIGHEST worked for me and the rest was working fine.
Thanks,
Shailav&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110701?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 13:49:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9bc9787c-9bfd-4fd7-aef5-96a9c3d64454</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;What did the trick?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110689?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 12:59:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1a03499f-656d-4e83-abec-5df69d2a9f12</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi Peter,
Its working now. Thanks for all the support.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110699?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 10:59:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fadfc378-8d0b-43ba-b269-5105a44ddd64</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Yeah it is not helping. I will remove the delay. I will let you know about the progress.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110692?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 10:47:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:735d1990-da33-425f-866d-97255569714f</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I don&amp;#39;t see how random delay would help? And it isn&amp;#39;t random is it?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110704?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 10:36:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7891bb7-e5a7-45be-a21b-627408024754</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Its a random delay I kept so that I can properly get the response from back from ESP8266. Is that effecting my code? Should I remove?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110703?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 10:33:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7eac7274-46bc-4417-a9bd-4f6b33eb1488</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I have tried. It works here. It is sending data over the UART. Can I ask why you have those 10 second delays in your code?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110702?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 10:17:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:593d8fc1-d65d-4d1b-9134-b667fe202169</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi Petter,
I changed to APP_IRQ_PRIORITY_HIGHEST. But I can see something working. I will try the code again and will let you know.
Thanks,
Shailav&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110693?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 09:24:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f334f1b3-4c69-4d55-af4c-3ff4e3e0d61e</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;What if you change APP_IRQ_PRIORITY_LOWEST to APP_IRQ_PRIORITY_HIGHEST when you call APP_UART_FIFO_INIT inside uart_init()?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110694?ContentTypeID=1</link><pubDate>Thu, 20 Jul 2017 07:47:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd3392d7-0429-4794-9f8c-a2f81a0b985a</guid><dc:creator>Roger Clark</dc:creator><description>&lt;p&gt;Why not just use an ESP32 for both Wifi and BLE ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110690?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 14:10:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f24ab57c-d02d-4128-9ee7-23d40009537a</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi,
I have set priority to 1. I am attaching my project.&lt;/p&gt;
&lt;p&gt;Thanks,
Shailav&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110695?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 13:53:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:35a4a815-4195-4297-ae67-5740a8953175</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m not suggesting this to be your final product, I&amp;#39;m trying to suggest something that will solve the problem you are having. To figure out why it is not working. Can you please try stop scanning and see if you are able to return to main(), and then call uart_loopback_test() from there? Or try to increase the UART priority to 1? Or try to disable the uart interrupt so that it will poll the register instead? Or you can upload your complete project so I can test it here.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110698?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 13:31:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67794797-a03e-49ef-ad9f-506e8f5d33ad</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi,
I want to scan 1 device UUID and want to send that to Webserver using Esp8266. Then again I want scan other device UUID and want to send that data to webserver. So Scanning should be continuous to detect new devices.
Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110697?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 13:26:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9675b745-f2af-43de-9dd5-9ecd8e1459ca</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;You never return to main? What if you try to stop scanning when you get the advertisment you want?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110687?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 12:47:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:94d2d84e-cd7b-4755-b8f3-65da12a551ee</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi,
I can copy that.I have 2 functions in my main loop:
uart_loopback_test();
scan_start();
So when the scan_start(); my code starts scanning nearby devices and it never returns to main function again. So I was trying to call  uart_loopback_test(); in  BLE_GAPEVT_ADV_REPORT. But unfortunately my uart_loopback_test is not working in BLE_GAPEVT_ADV_REPORT function.
I am attaching my main file in question above. Please suggest me changes.
Thanks&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110691?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 12:06:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c5ec1ff-e522-48d8-843e-a2fe320cf624</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Can&amp;#39;t you just copy the address to a global array?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110688?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 11:46:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d78c849a-cd6f-4ac4-8f5d-ec97342e0780</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi,
My main challenge is I want to pass the parameters like&lt;/p&gt;
&lt;p&gt;p_adv_report-&amp;gt;peer_addr.addr[4],
p_adv_report-&amp;gt;peer_addr.addr[3],
p_adv_report-&amp;gt;peer_addr.addr[2],
p_adv_report-&amp;gt;peer_addr.addr[1],
p_adv_report-&amp;gt;peer_addr.addr[0]
in my function uart_loopback_test();.
In my uart_loopback test there is one function to send data for example:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;	    for (uint32_t i = 0; i &amp;lt; 40; i++)
{
    tx_DATA[i] =  p_adv_report-&amp;gt;peer_addr.addr[i],
    while (app_uart_put(tx_DATA[i]) != NRF_SUCCESS);
 }
	 nrf_delay_ms(10000);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;So how should I implement this?
Thats why I was trying to call uart_loopback_test in BLE_GAP_EVT_ADV_REPORT.
Thanks,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110696?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 10:36:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6616977-13b4-4a0d-8d4e-697a16886c2d</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;hr /&gt;
&lt;pre&gt;&lt;code&gt;bool flag = 0;
on_ble_evt()
{
    BLE_GAP_EVT_ADV_REPORT:
    flag = 1;
}

main()
{
    for
    {
          if(flag==1)
          {
               flag = 0;
               uart_loopback_test();
          }
          power_manage();
    }
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The interrupt priority can be changed in sdk_config.h, try setting UART_DEFAULT_CONFIG_IRQ_PRIORITY 1&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110709?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 08:32:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b8d15caa-af4a-49b2-8343-ff547c6e8624</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi,
Can you please show me code snippet to implement your suggestions?
Thanks,
Shailav&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110708?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 08:28:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4869e647-8183-45af-b8a8-02e14cdf5318</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Maybe this is happening because you are calling it from interrupt context? Does it work if you set a flag when you get the BLE_GAPEVT_ADV_REPORT and call uart_loopback_test() from main instead? Or you could try to increase the interrupt priority of the uart?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110700?ContentTypeID=1</link><pubDate>Wed, 19 Jul 2017 08:24:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25eacfdd-ad8a-4c3e-889b-a8d83f2bbc04</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi,
I am not getting errors. I am attaching screenshot of the function and output from uart as well as rtt viewer above in question. My function call uart_loopback_test() is not getting executed when I am calling this in  case BLE_GAP_EVT_ADV_REPORT: I want to send the mac address, rssi and UUId via esp8266 to server.
Thanks,
Shailav&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110707?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 11:39:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f1db50aa-101c-43b4-a03f-227351cdca72</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Ok. So what do you get? Have you tried to debug? Have you checked if you get any errors?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110706?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 10:23:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6a02d11f-cc68-4779-9087-14cf6e68b49a</guid><dc:creator>Newbie</dc:creator><description>&lt;p&gt;Hi Peter,
I figured out the challenge. I am actually trying to scan the nearby ble devices using the code ble_app_uart_c . Now I want to send this data through esp8266 using at commands. Now unfortunately nrf51822 has only 1 uart so I am using rtt viewer to see the data of scan devices. So the left uart I am using now to send AT commands to esp8266.
Now my challenge is when I am using the function of uart in function of scan response is attached in question above.
I am not getting output as expected.
Although I am successful in sending data through uart to Esp8266 wifi module.
For your reference I am attaching the uart code for esp8266 above in question.
Please suggest me changes.
Thanks,
Shailav&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using RTT viewer and Uart to send ESP8266 AT commands</title><link>https://devzone.nordicsemi.com/thread/110705?ContentTypeID=1</link><pubDate>Tue, 18 Jul 2017 08:56:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2a269ddf-10ef-4710-a204-40f14ba89252</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Have you tried to debug to figure out why your scanning stops? Do you get an error somewhere that resets the device? &lt;a href="https://devzone.nordicsemi.com/question/60125/my-device-is-freezing-and-restarting/"&gt;This&lt;/a&gt; might give some insight.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>