<?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 Ctrl+z over uart</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/48422/sending-ctrl-z-over-uart</link><description>I am interfacing the nrf2832 with the sim 808 module. 
 In order to be able to send a message I need to use Ctrl+z. 
 This should be entered as an escape sequence. 
 I have tried printf(&amp;quot;\x1A&amp;quot;); but it doesn&amp;#39;t work. How do I send Ctrl+z as an escape sequence</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 26 May 2021 15:00:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/48422/sending-ctrl-z-over-uart" /><item><title>RE: Sending Ctrl+z over uart</title><link>https://devzone.nordicsemi.com/thread/311874?ContentTypeID=1</link><pubDate>Wed, 26 May 2021 15:00:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e834b6ef-77af-49c4-8a89-6795d7b0152c</guid><dc:creator>Rajbir Singh</dc:creator><description>&lt;p&gt;How do you reading the responses sent back&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending Ctrl+z over uart</title><link>https://devzone.nordicsemi.com/thread/192330?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 11:33:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:14f9cf67-1b52-4f38-9ad7-49d47ba84680</guid><dc:creator>Dcrossd</dc:creator><description>&lt;p&gt;yes i changed that too&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending Ctrl+z over uart</title><link>https://devzone.nordicsemi.com/thread/192329?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 11:30:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:066f674a-d631-4d8a-9d26-a78da18d4837</guid><dc:creator>cbd</dc:creator><description>&lt;p&gt;Did you check &amp;amp; change the line with the number to which you&amp;#39;re sending the message? I think that it&amp;#39;s wrong.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending Ctrl+z over uart</title><link>https://devzone.nordicsemi.com/thread/192324?ContentTypeID=1</link><pubDate>Wed, 12 Jun 2019 11:21:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dcfbbf6-02d4-4bfe-91ec-54a28e58ec91</guid><dc:creator>Dcrossd</dc:creator><description>&lt;p&gt;I checked on my debug window and i see that 0x1A is sent on the tx_buf but still i am not getting the message. Does ctrl+z have any other escape sequence?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending Ctrl+z over uart</title><link>https://devzone.nordicsemi.com/thread/192038?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2019 11:45:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0d094f81-0ba2-42e7-9bef-c6cea4fd142e</guid><dc:creator>cbd</dc:creator><description>&lt;p&gt;I&amp;#39;ve just had a peek at the AT-Command manual for the SIM800 devices.&lt;/p&gt;
&lt;p&gt;It looks to me that your number is incorrectly entered. I think that it should be:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;		printf(&amp;quot;AT+CMGS=\&amp;quot;919xxxxx22\&amp;quot;, 145\r&amp;quot;);
&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;+CMGS=&amp;lt;da&amp;gt;[, &amp;lt;toda&amp;gt;] &amp;lt;CR&amp;gt;text is entered &amp;lt;ctrl-Z/ESC&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;&amp;lt;&lt;span style="background-color:#ffffff;"&gt;da&amp;gt; GSM 03.40 TP-Destination-Address Address-Value field in string format(string should be included in quotation marks); BCD numbers (or GSM default alphabet characters) are converted to characters of the currently selected TE character set (specified by +CSCS in 3GPP TS 27.007); type of address given by &amp;lt;toda&amp;gt; &lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span style="background-color:#ffffff;"&gt;&lt;span style="background-color:#ffffff;"&gt;&amp;lt;toda&amp;gt; GSM 04.11 TP-Destination-Address Type-of-Address octet in integer format (when first character of &amp;lt;da&amp;gt; is + (IRA 43) default is 145, otherwise default is 129)&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending Ctrl+z over uart</title><link>https://devzone.nordicsemi.com/thread/192024?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2019 11:25:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd37a1fc-76bf-45e2-9ae9-18a823389b04</guid><dc:creator>Dcrossd</dc:creator><description>&lt;p&gt;Thank you for the response.&lt;/p&gt;
&lt;p&gt;&lt;span&gt;AT+CMGS=&amp;lt;number&amp;gt;&amp;lt;CR&amp;gt;&amp;lt;message&amp;gt;&amp;lt;CTRL-Z&amp;gt;&amp;nbsp; (This the format of the AT commands that has to be sent).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;printf(&amp;quot;\r\nAT+CMGF=1\n&amp;quot;);
		nrf_delay_ms(5000);
		printf(&amp;quot;AT+CMGS=\&amp;quot;+919xxxxx22\&amp;quot;\r&amp;quot;);
		nrf_delay_ms(2000);
		printf(&amp;quot;Hello,Elecrow!&amp;quot;);
		nrf_delay_ms(1000);
        printf(&amp;quot;%c&amp;quot;, 0x1A);	// i tried this but its not working , i have put ctrl+z here 
		nrf_delay_ms(1000);
		printf(&amp;quot;\r\nAT\r\n&amp;quot;);
		nrf_delay_ms(5000);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;the rest of the AT commands are giving proper return values&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending Ctrl+z over uart</title><link>https://devzone.nordicsemi.com/thread/192019?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2019 11:06:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:10edb6b0-c703-471f-8a72-f723a46229f5</guid><dc:creator>cbd</dc:creator><description>&lt;p&gt;Yes you&amp;#39;re right, my mistake.&lt;/p&gt;
&lt;p&gt;I usually treat my data as binary and build them up in a buffer before sending.&lt;/p&gt;
&lt;p&gt;As far as I can tell it should work.&lt;/p&gt;
&lt;p&gt;Are you attempting to escape back to an AT-Command string?&lt;/p&gt;
&lt;p&gt;Do you need to place &amp;lt;CR&amp;gt;&amp;lt;LF&amp;gt; after the CTRL-Z?&lt;/p&gt;
&lt;p&gt;Otherwise have you tried something like&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;printf(&amp;quot;%c&amp;quot;, 0x1A);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending Ctrl+z over uart</title><link>https://devzone.nordicsemi.com/thread/192005?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2019 10:13:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9fb4409c-5426-4e3d-aac3-cd5216dce878</guid><dc:creator>Dcrossd</dc:creator><description>&lt;p&gt;When I put printf(&amp;#39;\x1A&amp;#39;)&amp;nbsp; it gives me a warning telling &amp;#39;format string is not a string literal&amp;#39;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Sending Ctrl+z over uart</title><link>https://devzone.nordicsemi.com/thread/191919?ContentTypeID=1</link><pubDate>Tue, 11 Jun 2019 07:02:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:05a387ad-8802-46e9-980a-14687287f954</guid><dc:creator>cbd</dc:creator><description>&lt;p&gt;I think that your problem is that you&amp;#39;re passing a string rather than a character.&lt;/p&gt;
&lt;p&gt;Try&amp;nbsp;&lt;pre class="ui-code" data-mode="c_cpp"&gt;printf(&amp;#39;\x1A&amp;#39;);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>