<?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>It is possible to send data from nrf9160sip to ESP32 using UART communication?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53910/it-is-possible-to-send-data-from-nrf9160sip-to-esp32-using-uart-communication</link><description>Hi All 
 
 We have to send GPS data to Cloud but we do not have network so is this possible to send GPS data from nRF9160sip to ESP32 via UART communication 
 and after using MQTT send those data to cloud from ESP32. 
 so our quires are 
 [1] It is possible</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 06 Nov 2019 13:11:32 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53910/it-is-possible-to-send-data-from-nrf9160sip-to-esp32-using-uart-communication" /><item><title>RE: It is possible to send data from nrf9160sip to ESP32 using UART communication?</title><link>https://devzone.nordicsemi.com/thread/218831?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2019 13:11:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6c8971ef-98b0-4d3e-b8e5-75a38c94b5ea</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Which NCS tag are you on? I am not able to build your project. Please zip the whole project directory and attach it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: It is possible to send data from nrf9160sip to ESP32 using UART communication?</title><link>https://devzone.nordicsemi.com/thread/218787?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2019 10:31:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb0dfa22-a705-4c32-86e1-3cf044551750</guid><dc:creator>shital</dc:creator><description>&lt;p&gt;Hi Heidi&lt;/p&gt;
&lt;p&gt;Yes we build example.&lt;/p&gt;
&lt;p&gt;Name of overlay file is nrf9160_pca10090ns.overlay&lt;/p&gt;
&lt;p&gt;ok i also try the prj.config file from given example but its not send any data.&lt;/p&gt;
&lt;p&gt;i am confused about to pin configuration and like what are of pins i used for send data to external module via uart.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;which uart used send data to external module like uart0,uart1?&lt;/p&gt;
&lt;p&gt;and which pin used for?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: It is possible to send data from nrf9160sip to ESP32 using UART communication?</title><link>https://devzone.nordicsemi.com/thread/218739?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2019 08:58:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b4319296-0fe5-42ab-b40d-78416a4b5e43</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi, can you tell me exactly why it isn&amp;#39;t working?&lt;/p&gt;
&lt;p&gt;Are you able to build your example?&lt;/p&gt;
&lt;p&gt;What is your overlay file called?&lt;/p&gt;
&lt;p&gt;Why are you enabling the configs for UART1,2 and 3 when you are using UART 0?&lt;/p&gt;
&lt;p&gt;Which NCS tag are you on: v1.0.0, master, etc.?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: It is possible to send data from nrf9160sip to ESP32 using UART communication?</title><link>https://devzone.nordicsemi.com/thread/218715?ContentTypeID=1</link><pubDate>Wed, 06 Nov 2019 06:40:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73a1e509-3e2c-4a30-bb26-a125402509ed</guid><dc:creator>shital</dc:creator><description>&lt;p&gt;Hi Heidi&lt;/p&gt;
&lt;p&gt;Thanks for your support its quit easy but for me its beat confused about to send data i atteched my code and overlay file, prj.config file and main.c&amp;nbsp;&lt;/p&gt;
&lt;p&gt;so can you suggest me where is i doing misatake or something missing&lt;/p&gt;
&lt;p&gt;Thanks in Advanced&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;zephyr.h&amp;gt;
#include &amp;lt;misc/printk.h&amp;gt;
#include &amp;lt;uart.h&amp;gt;
#include &amp;lt;string.h&amp;gt;
#include &amp;lt;stdlib.h&amp;gt;

/* nRF9160 DK voltage = 3.0V 
 * non sucure
 * board name: nrf9160_pca10090ns
  nrf9160_pca10090ns.overlay /


struct uart_data_t {
	
	u8_t    data[1024];
	u16_t   len;
};

static u8_t uart_buf[1024];
static K_FIFO_DEFINE(fifo_uart_tx_data);


/********************************************/

void uart_sendCOM(struct device x,  u8_t Cont)
{
	       
         u16_t len = strlen(Cont); 
         uart_fifo_fill(x, Cont,len );
         uart_irq_tx_enable(x);
         
    
}
void uart_cb(struct device *x)
{
	uart_irq_update(x);
	int data_length = 0;

	if (uart_irq_rx_ready(x)) {
                data_length = uart_fifo_read(x, uart_buf, sizeof(uart_buf));
		uart_buf[data_length] = 0;
	}
	printk(&amp;quot;%s&amp;quot;, uart_buf);

       	if (uart_irq_tx_ready(x)) {
               
        	struct uart_data_t *buf =
			k_fifo_get(&amp;amp;fifo_uart_tx_data, K_NO_WAIT);
		u16_t written = 0;

		/ Nothing in the FIFO, nothing to send /
		if (!buf) {
			uart_irq_tx_disable(x);
			return;
		}

		while (buf-&amp;gt;len &amp;gt; written) {
			written += uart_fifo_fill(x,
						  &amp;amp;buf-&amp;gt;data[written],
						  buf-&amp;gt;len - written);
		}

		while (!uart_irq_tx_complete(x)) {
			/* Wait for the last byte to get
			 * shifted out of the module
			 */
		}

		if (k_fifo_is_empty(&amp;amp;fifo_uart_tx_data)) {
			uart_irq_tx_disable(x);
		}

		k_free(buf);
	
		
	}

       
}

void main(void)
{
	
        struct device *uart0 = device_get_binding(&amp;quot;UART_0&amp;quot;);
       
        uart_irq_rx_enable(uart0);
        uart_irq_callback_set(uart0, uart_cb);
        uart_sendCOM(uart0, &amp;quot;Hello the world!&amp;quot;);
        k_sleep(3000);
        
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;prj.config&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;# General config
CONFIG_NEWLIB_LIBC=y
CONFIG_TEST_RANDOM_GENERATOR=y
CONFIG_ASSERT=y
CONFIG_REBOOT=y
#CONFIG_UART_2_NRF_UARTE=y
CONFIG_SERIAL=y
CONFIG_TRUSTED_EXECUTION_NONSECURE=y
CONFIG_UART_INTERRUPT_DRIVEN=y
#CONFIG_HAS_HW_NRF_UARTE3=y
CONFIG_HAS_HW_NRF_UARTE1=y
CONFIG_UART_1_NRF_UARTE=y
CONFIG_UART_1=y
CONFIG_AT_HOST_UART=2
CONFIG_UART_0_NRF_UARTE=y
CONFIG_UART_0=y
CONFIG_AT_HOST_UART=0
#CONFIG_UART_ASYNC_API=y
# Network
CONFIG_NETWORKING=y
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NRF_CLOUD_PROVISION_CERTIFICATES=y
# MQTT
CONFIG_MQTT_SOCKET_LIB=y
CONFIG_MQTT_LIB_TLS=y
CONFIG_MQTT_MAX_PACKET_LENGTH=2048
CONFIG_NRF_CLOUD_HOST_NAME=&amp;quot;aigjres9rg3vv-ats.iot.eu-west-1.amazonaws.com&amp;quot;
CONFIG_NRF_CLOUD_SEC_TAG=3314

# LTE link control
CONFIG_POWER_OPTIMIZATION_ENABLE=y
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n

# Modem info
CONFIG_MODEM_INFO=y

# BSD library
CONFIG_BSD_LIBRARY=y

# nRF Cloud
CONFIG_NRF_CLOUD=y

# Sensors
CONFIG_GPS_USE_SIM=y
CONFIG_ACCEL_USE_SIM=y

# Library for buttons and LEDs
CONFIG_DK_LIBRARY=y
CONFIG_DK_LIBRARY_INVERT_LEDS=n

# Console
CONFIG_CONSOLE_SUBSYS=y
CONFIG_CONSOLE_HANDLER=y
CONFIG_CONSOLE_GETCHAR=y

# Main thread
CONFIG_MAIN_THREAD_PRIORITY=7

# Heap and stacks
CONFIG_HEAP_MEM_POOL_SIZE=16384
CONFIG_MAIN_STACK_SIZE=8192
CONFIG_GPS_SIM_THREAD_STACK_SIZE=1024
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1500
CONFIG_HW_STACK_PROTECTION=y

&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;overlay file&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;&amp;amp;uart0 {
	status = &amp;quot;ok&amp;quot;;
	current-speed = &amp;lt;115200&amp;gt;;
	tx-pin = &amp;lt;00&amp;gt;;
	rx-pin = &amp;lt;01&amp;gt;;
};&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: It is possible to send data from nrf9160sip to ESP32 using UART communication?</title><link>https://devzone.nordicsemi.com/thread/218563?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2019 13:01:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c66a3d53-86ed-4671-9ca0-e2757928f5ac</guid><dc:creator>Heidi</dc:creator><description>[quote user="shital"]so how can we do it[/quote]
&lt;p&gt;&amp;nbsp;Exactly how I explained. Use the UART-sample as a base, add the overlay file defining your pins and then look at the uart.h-file to know which function you should use to transmit data.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: It is possible to send data from nrf9160sip to ESP32 using UART communication?</title><link>https://devzone.nordicsemi.com/thread/218519?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2019 11:47:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3bb84b66-87cf-4c2d-bf37-0c47e1e73433</guid><dc:creator>shital</dc:creator><description>&lt;p&gt;Thank you for your valueble replay&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I just want to send data from nRF9160 to other module (&amp;nbsp;&lt;span&gt;a standard USB to serial FTDI converter ) using UART and data show in serial terminal so how can we do it ?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: It is possible to send data from nrf9160sip to ESP32 using UART communication?</title><link>https://devzone.nordicsemi.com/thread/218238?ContentTypeID=1</link><pubDate>Mon, 04 Nov 2019 13:35:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b2e69be7-871e-4397-804a-ad83eec2a5cb</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi, I cannot find any examples that explicitly demonstrate this. However, it is quite easy to implement.&lt;/p&gt;
&lt;p&gt;Take a look at the &lt;a href="https://github.com/NordicPlayground/fw-nrfconnect-zephyr/blob/master/include/drivers/uart.h"&gt;uart.h file&lt;/a&gt;&amp;nbsp;in Zephyr, which explains how to transmit things via UART. Additionally, you will need to add an overlay-file defining the rx, tx, rts and cts pins. I recommend reading through the NCS tutorials,&amp;nbsp;both&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/nrf-connect-sdk-tutorial"&gt;part one&lt;/a&gt; and &lt;a href="https://devzone.nordicsemi.com/nordic/cellular-iot-guides/b/getting-started-cellular/posts/nrf-connect-sdk-tutorial---part-2"&gt;part two&lt;/a&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: It is possible to send data from nrf9160sip to ESP32 using UART communication?</title><link>https://devzone.nordicsemi.com/thread/218186?ContentTypeID=1</link><pubDate>Mon, 04 Nov 2019 11:33:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bf5ab429-c254-4b07-a394-9f01aebf138c</guid><dc:creator>shital</dc:creator><description>&lt;p&gt;Hi &lt;a href="https://devzone.nordicsemi.com/members/heidi"&gt;Heidi&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thanks for your replay,&lt;/p&gt;
&lt;p&gt;I use this example of UART for Transmit data but in this example is only about Rx receive data i beat confuse about how transmit my GPS data to other device.&lt;/p&gt;
&lt;p&gt;Can you suggest me for any UART&amp;nbsp;Transmit example code&amp;nbsp; from nf9160 to other peripheral?&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;
&lt;p&gt;Shital&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: It is possible to send data from nrf9160sip to ESP32 using UART communication?</title><link>https://devzone.nordicsemi.com/thread/217961?ContentTypeID=1</link><pubDate>Fri, 01 Nov 2019 12:54:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2f10fd38-d9f8-40f6-9bcd-f1355d7e1cb2</guid><dc:creator>Heidi</dc:creator><description>&lt;p&gt;Hi! This should absolutely be possible!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
[quote user=""][1] It is possible to send data from nRF9160sip to ESP32 ?[/quote]
&lt;p&gt;&amp;nbsp;Yes. Take a look at &lt;a href="https://github.com/Rallare/fw-nrfconnect-nrf/tree/nrf9160_samples/samples/nrf9160/uart"&gt;this UART-sample&lt;/a&gt; for the nRF9160. Use this as the base for the UART-communication from the nRF9160 to the ESP32.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
[quote user=""][2] It is possible to send data from ESP32 to Cloud via MQTT?[/quote]
&lt;p&gt;&amp;nbsp;The ESP32 is not a Nordic product, so you will have to ask on another forum for any specifics. However, from my understanding, it should be possible to use the ESP32 to post to an MQTT broker.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;As a general statement, it seems like you are only using the nRF91 DK for its GPS antenna. If this is the case, a simpler solution could be just using a GPS module with the ESP32 itself.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Heidi&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>