<?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>receiving &amp;#39;OK&amp;#39; after CR_LF in datamode</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/79687/receiving-ok-after-cr_lf-in-datamode</link><description>I&amp;#39;m currently trying to send a HTTP body payload that includes &amp;quot;\r\n&amp;quot; in the data payload. I&amp;#39;m getting an &amp;quot;OK&amp;quot; response before I have sent the complete payload. 
 
 The problem occurs when sending the HTTP request (#XHTTPREQ). After sending the initial</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 20 Sep 2021 16:40:11 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/79687/receiving-ok-after-cr_lf-in-datamode" /><item><title>RE: receiving 'OK' after CR_LF in datamode</title><link>https://devzone.nordicsemi.com/thread/330342?ContentTypeID=1</link><pubDate>Mon, 20 Sep 2021 16:40:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6b3710fe-c227-4d51-973a-fa9c8b7b7f92</guid><dc:creator>Anthony Ambuehl</dc:creator><description>&lt;p&gt;The documentation for 1.5.1 indicates it has the concept of datamode, nonetheless it seems the code does not work as described.&amp;nbsp; I have updated to 1.6.1 now, so I will close this ticket.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: receiving 'OK' after CR_LF in datamode</title><link>https://devzone.nordicsemi.com/thread/329943?ContentTypeID=1</link><pubDate>Fri, 17 Sep 2021 07:40:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfe7b1ac-b222-4fcb-a955-8bd627fb34cf</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p&gt;Hello Anthony,&lt;/p&gt;
&lt;p&gt;The Serial LTE modem application has no datamode available in NCS v1.5.1. So the &lt;em&gt;“\r\n”&lt;/em&gt; in line:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;quot;------B0uNd4Ry2018\r\n\&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;will basically terminate the command.&lt;/p&gt;
&lt;p&gt;Additionally, characters like &lt;em&gt;“\&amp;quot;”&lt;/em&gt; could cause trouble as they might be interpreted differently in command mode, which makes it difficult the send data in .json format as body.&lt;/p&gt;
&lt;p&gt;Hence, I strongly recommend you update to at least NCS v1.6.0, where datamode was added to the Serial LTE modem application. The command you would like to send could look something like this then:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:35.041,000] &amp;lt;info&amp;gt; MODEM_NRF9160: tx:&amp;quot;POST&amp;quot;,&amp;quot;/device/api/v0/station/powerontest&amp;quot;,&amp;quot;User-Agent: SLM/1.2.0
Accept: application/json
Content-Type: application/ json
Content-Disposition: form-data; name=\&amp;quot;log_data\&amp;quot;
Content-Length: XXXX
&amp;quot;,XXXX&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Followed by URC:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#XHTTPCREQ: 1&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;which makes the Serial LTE modem application entering datamode.&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;{
&amp;quot;source&amp;quot;: &amp;quot;Basestation 2.14.0&amp;quot;,
&amp;quot;stationMAC&amp;quot;: &amp;quot;DA1111111111&amp;quot;,
&amp;quot;serialNum&amp;quot;: &amp;quot;B00000\&amp;quot;,
&amp;quot;deviceMAC&amp;quot;: &amp;quot;DA1111111111&amp;quot;,
&amp;quot;logType&amp;quot;: &amp;quot;Station&amp;quot;,
&amp;quot;fwVersion&amp;quot;: &amp;quot;2.14.0\&amp;quot;,
&amp;quot;sdVersion&amp;quot;: &amp;quot;09-89-168&amp;quot;,
&amp;quot;blVersion&amp;quot;: 8,
&amp;quot;command&amp;quot;: &amp;quot;selfTest&amp;quot;,
&amp;quot;rtc&amp;quot;: {
    &amp;quot;epochTime&amp;quot;: 1631050498,
    &amp;quot;batterySwitchOverFlag&amp;quot;: 1,
    &amp;quot;batteryLowFlag&amp;quot;: 0
  },
&amp;quot;modem&amp;quot;: {
    &amp;quot;fwVersion\&amp;quot;: &amp;quot;L0.0.00.00.05.08 [Apr 17 2019 19:34:02]&amp;quot;,
    &amp;quot;model&amp;quot;: &amp;quot;SARA-R410M-02B&amp;quot;,
    &amp;quot;ICCID&amp;quot;: &amp;quot;89011703278453956677&amp;quot;,
    &amp;quot;CSQ&amp;quot;: &amp;quot;+CSQ: 21,99&amp;quot;,
    &amp;quot;CESQ&amp;quot;: &amp;quot;+CESQ: 99,99,255,255,14,38&amp;quot;,
    &amp;quot;IMEI&amp;quot;: &amp;quot;352753097871972&amp;quot;
  },
&amp;quot;createdAt&amp;quot;: &amp;quot;2021-09-07T21:34:58Z&amp;quot;,
&amp;quot;epochTime&amp;quot;: 1631050498,
&amp;quot;localEpochTime&amp;quot;: 13143,
&amp;quot;tzOffset&amp;quot;:-14400,
“inventory&amp;quot;:
{
 productName : &amp;quot;Trio_Station&amp;quot;,
 subsystems : [
    { &amp;quot;id&amp;quot; : 0, &amp;quot;name&amp;quot; : &amp;quot;NRF_00&amp;quot;, &amp;quot;version&amp;quot; : &amp;quot;2.14.0&amp;quot; },
    { &amp;quot;id&amp;quot; : 1, &amp;quot;name&amp;quot; : &amp;quot;MODEM_00&amp;quot;, &amp;quot;version&amp;quot; : &amp;quot;L0.0.00.00.05.08 [Apr 17 2019 19:34:02]&amp;quot; }
  ]
}
,
&amp;quot;last_key&amp;quot;:0
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Datamode is able to send the original .json text without shift or newline chars, etc.&lt;/p&gt;
&lt;p&gt;When total XXXX bytes has been sent, SLM HTTP client quits datamode automatically followed by:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#XHTTPCREQ: 0&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I hope this will solve your issue!&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: receiving 'OK' after CR_LF in datamode</title><link>https://devzone.nordicsemi.com/thread/329871?ContentTypeID=1</link><pubDate>Thu, 16 Sep 2021 13:52:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a41a2ac0-5c0c-4ef8-8b0c-b29e9e36031d</guid><dc:creator>Albrecht Markus Schellenberger</dc:creator><description>&lt;p lang="en-GB"&gt;Hello Anthony,&lt;/p&gt;
&lt;p lang="en-GB"&gt;I will come back to you tomorrow.&lt;/p&gt;
&lt;p lang="en-GB"&gt;Regards,&lt;/p&gt;
&lt;p lang="en-GB"&gt;Markus&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: receiving 'OK' after CR_LF in datamode</title><link>https://devzone.nordicsemi.com/thread/329667?ContentTypeID=1</link><pubDate>Wed, 15 Sep 2021 16:30:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:649b4d98-1039-4276-9530-6f72c85d379e</guid><dc:creator>Anthony Ambuehl</dc:creator><description>&lt;p&gt;Some additional information:&lt;/p&gt;
&lt;p&gt;Testing with Release 1.5.1.&amp;nbsp; Using SLM over UART, only modification is to switch UART port to UART2.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>