<?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>Sending UDP using the Serial LTE Modem application  - AT sequence</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66288/sending-udp-using-the-serial-lte-modem-application---at-sequence</link><description>Hi 
 I have upgraded from an early version of SLM to the latest version in nRF Connect SDK ver. 1.3.1 
 the SLM application is running on a custom board with a nRF52840. Using the old version of SLM, the following commands resulted in successful communication</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 02 Oct 2020 08:43:15 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66288/sending-udp-using-the-serial-lte-modem-application---at-sequence" /><item><title>RE: Sending UDP using the Serial LTE Modem application  - AT sequence</title><link>https://devzone.nordicsemi.com/thread/272671?ContentTypeID=1</link><pubDate>Fri, 02 Oct 2020 08:43:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7ec2583-694c-4489-a980-3a544dd28442</guid><dc:creator>Bard</dc:creator><description>&lt;p&gt;The following sequence now works fine:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;at#xudpcli=1,&amp;quot;xx.xxx.xx.xxx&amp;quot;,xxxx
at#xudpsend=1,&amp;quot;testdata&amp;quot;
at#xudpcli=0
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Thank you&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending UDP using the Serial LTE Modem application  - AT sequence</title><link>https://devzone.nordicsemi.com/thread/272293?ContentTypeID=1</link><pubDate>Wed, 30 Sep 2020 12:09:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e8d7b58d-b89c-4391-acc1-521e79096c05</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Please enable UDP proxy:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;CONFIG_SLM_UDP_PROXY=y&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;and connect using:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;AT#XUDPCLI=&amp;lt;op&amp;gt;[,&amp;lt;url&amp;gt;,&amp;lt;port&amp;gt;[,&amp;lt;sec_tag&amp;gt;]&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;AT#XUDPSEND=&amp;lt;datatype&amp;gt;,&amp;lt;data&amp;gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;recv is handled automatically when using proxy.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;quot;Proxy&amp;quot; not related to a proxy server as commonly known.
It is named a proxy as it stands between the TCP interface of the modem and the application itself.
The modem TCP/UDP layer supports full-duplex but the AT commands are blocking, 
so we need this added interface to remove the blocking behavior.&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending UDP using the Serial LTE Modem application  - AT sequence</title><link>https://devzone.nordicsemi.com/thread/272073?ContentTypeID=1</link><pubDate>Tue, 29 Sep 2020 13:05:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e401c9c-a932-42f9-80f7-d67a93238ae4</guid><dc:creator>Bard</dc:creator><description>&lt;p&gt;Using the draft documentation, I ended up with this sequence:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;at#xsocket=1,2,0    // must have the last zero
at#xsendto=&amp;quot;xx.xxx.xx.xxx&amp;quot;,xxxx,&amp;quot;Test UDP&amp;quot;

// both below works ok
at#xrecvfrom=&amp;quot;xx.xxx.xx.xxx&amp;quot;,xxxx
at#xrecvfrom=&amp;quot;xx.xxx.xx.xxx&amp;quot;,xxxx,100,1

at#xsocket=0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;But &lt;em&gt;at#xrecvfrom&lt;/em&gt; hangs if there is no data from the network. Is there a way to test before fetch, or a timeout parameter?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending UDP using the Serial LTE Modem application  - AT sequence</title><link>https://devzone.nordicsemi.com/thread/272006?ContentTypeID=1</link><pubDate>Tue, 29 Sep 2020 09:32:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c248dc1-01b9-4c5c-a2ef-e47d116ae42c</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Bard,&lt;br /&gt;&lt;br /&gt;There is now a &lt;strong&gt;draft &lt;a href="https://github.com/nrfconnect/sdk-nrf/pull/2993" rel="noopener noreferrer" target="_blank"&gt;pull request for the SLM documentation up&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;This version will be reviewed and most likely some changes will be added before its merged with NCS master.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending UDP using the Serial LTE Modem application  - AT sequence</title><link>https://devzone.nordicsemi.com/thread/271489?ContentTypeID=1</link><pubDate>Fri, 25 Sep 2020 11:44:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b17ae67e-835a-4309-a432-064637831977</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Bard,&lt;br /&gt;We are working on improving the documentation to explain this better.&lt;/p&gt;
&lt;table width="792"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="103"&gt;#XSENDTO&lt;/td&gt;
&lt;td width="207"&gt;UDP send data&lt;/td&gt;
&lt;td width="482"&gt;Send data via UDP channel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&lt;/td&gt;
&lt;td width="482"&gt;#XSENDTO=&amp;lt;url&amp;gt;,&amp;lt;port&amp;gt;,&amp;lt;datatype&amp;gt;,&amp;lt;data&amp;gt;&lt;br /&gt; Response:&lt;br /&gt; #XSENDTO: &amp;lt;size&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&lt;/td&gt;
&lt;td width="482"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&amp;lt;url&amp;gt; values&lt;/td&gt;
&lt;td width="482"&gt;String type, hostname or IP address&lt;br /&gt; Max 128 bytes. In case of IP address, IPv4 only, not support IPv6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&amp;lt;port&amp;gt; values&lt;/td&gt;
&lt;td width="482"&gt;Integer, UDP service port&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&amp;lt;datatype&amp;gt; values&lt;/td&gt;
&lt;td width="482"&gt;0 - hexidecimal string format, e.g. &amp;quot;DEADBEEF&amp;quot; for 0xDEADBEEF&lt;br /&gt; 1 - plain text (default value)&lt;br /&gt; 2 - Json&lt;br /&gt; 3 - HTML&lt;br /&gt; 4 - OMA TLV&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&amp;lt;data&amp;gt; values&lt;/td&gt;
&lt;td width="482"&gt;String type, arbitary data&lt;br /&gt; NOTE1 max NET_IPV4_MTU (576) bytes&lt;br /&gt; NOTE2 no NULL char in the middle&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&amp;lt;size&amp;gt; values&lt;/td&gt;
&lt;td width="482"&gt;Integer type, actual number of bytes sent&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&lt;/td&gt;
&lt;td width="482"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;example&lt;/td&gt;
&lt;td width="482"&gt;AT#XSENDTO=&amp;quot;test.server.com&amp;quot;,1234,&amp;quot;Test UDP&amp;quot;&lt;br /&gt; #XSENDTO: 8&lt;br /&gt; OK&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;
&lt;table width="792"&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td width="103"&gt;#XRECVFROM&lt;/td&gt;
&lt;td width="207"&gt;UDP receive data&lt;/td&gt;
&lt;td width="482"&gt;Receive data via UDP channel&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&lt;/td&gt;
&lt;td width="482"&gt;#XRECVFROM=&amp;lt;url&amp;gt;,&amp;lt;port&amp;gt;[,&amp;lt;size&amp;gt;]&lt;br /&gt; NOTE receive max NET_IPV4_MTU(576) bytes&lt;br /&gt; Response:&lt;br /&gt; &amp;lt;data&amp;gt;&lt;br /&gt; #XRECVFROM: &amp;lt;datatype&amp;gt;, &amp;lt;size&amp;gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&lt;/td&gt;
&lt;td width="482"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&amp;lt;url&amp;gt; values&lt;/td&gt;
&lt;td width="482"&gt;String type, hostname or IP address&lt;br /&gt; Max 128 bytes. In case of IP address, IPv4 only, not support IPv6&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&amp;lt;port&amp;gt; values&lt;/td&gt;
&lt;td width="482"&gt;Integer, UDP service port&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&amp;lt;size&amp;gt; values&lt;/td&gt;
&lt;td width="482"&gt;Requested number of bytes in command, , NET_IPV4_MTU if not specified&lt;br /&gt; Actual number of bytes received in response&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&amp;lt;datatype&amp;gt; values&lt;/td&gt;
&lt;td width="482"&gt;See #XSEND command&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;&lt;/td&gt;
&lt;td width="482"&gt;&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td width="103"&gt;&lt;/td&gt;
&lt;td width="207"&gt;example&lt;/td&gt;
&lt;td width="482"&gt;AT#UDPRECVFROM=&amp;quot;test.server.com&amp;quot;,1234&lt;br /&gt; Test OK&lt;br /&gt; #XRECVFROM: 1, 7&lt;br /&gt; OK&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending UDP using the Serial LTE Modem application  - AT sequence</title><link>https://devzone.nordicsemi.com/thread/271430?ContentTypeID=1</link><pubDate>Fri, 25 Sep 2020 06:37:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7207c919-fe11-4e9b-87d0-86ab207d1480</guid><dc:creator>Bard</dc:creator><description>&lt;p&gt;Thank you, Martin. But is there some documentation on the usage of these commands? What is &amp;lt;datatype&amp;gt; and &amp;lt;op&amp;gt;? And how is addressing implemented? - the old AT#XUDPSENDTO&amp;nbsp;had both IP address and Port in the call...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending UDP using the Serial LTE Modem application  - AT sequence</title><link>https://devzone.nordicsemi.com/thread/271356?ContentTypeID=1</link><pubDate>Thu, 24 Sep 2020 13:25:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ed122d8-3140-4995-8550-407ed52606cb</guid><dc:creator>Martin Lesund</dc:creator><description>&lt;p&gt;Hi Bard,&lt;/p&gt;
&lt;p&gt;You can use &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/applications/serial_lte_modem/README.html#bsd-socket-at-commands" rel="noopener noreferrer" target="_blank"&gt;the following commands:&lt;/a&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;at#xsocket=1,2

AT#XSENDTO=&amp;lt;url&amp;gt;,&amp;lt;port&amp;gt;,&amp;lt;datatype&amp;gt;,&amp;lt;data&amp;gt;

AT#XRECVFROM[=&amp;lt;length&amp;gt;]

AT#XSOCKET=0&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>