<?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>Moving SMS response to a usable address</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117092/moving-sms-response-to-a-usable-address</link><description>I am using a Sierra Wireless HL7800 modem with the nrF52840. I have been able to receive SMS messages and see them come through the RTT log. Setting to text mode and then listing all incoming messages, I see the below output in the log. 
 rtt:~$ [00:00</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 19 Dec 2024 18:39:00 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117092/moving-sms-response-to-a-usable-address" /><item><title>RE: Moving SMS response to a usable address</title><link>https://devzone.nordicsemi.com/thread/515818?ContentTypeID=1</link><pubDate>Thu, 19 Dec 2024 18:39:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:feedce71-5820-43c9-affa-f31d85417283</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Although you do not use our modem, you might still want to look at our&amp;nbsp;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/libraries/modem/sms.html"&gt;SMS library&lt;/a&gt;. Relevant parser files can be found on github in the&amp;nbsp;&lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/main/lib/sms"&gt;SMS library&lt;/a&gt;. For tutorials and samples related to the use of your particular modem and specifics of the modem implementation, you could try to ask in the&amp;nbsp;&lt;a href="https://forum.sierrawireless.com/categories"&gt;Sierra Wireless Forum&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Moving SMS response to a usable address</title><link>https://devzone.nordicsemi.com/thread/515607?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 21:59:54 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0cbf4bf-9dc9-409e-8760-be4fb571944d</guid><dc:creator>MontanaEE</dc:creator><description>&lt;p&gt;I created a handler in the hl7800.c driver, but I need to parse the SMS.&amp;nbsp; Any tutorials or samples you know of how to to do that?&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;span&gt;static&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;bool&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;on_cmd_received_sms&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;struct&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;net_buf&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;**&lt;/span&gt;&lt;span&gt;buf&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;uint16_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;len&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;size_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;out_len&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;char&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;value&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;MDM_MAX_RESP_SIZE&lt;/span&gt;&lt;span&gt;];&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;out_len&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;net_buf_linearize&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;value&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;sizeof&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;value&lt;/span&gt;&lt;span&gt;), &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt;buf&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;len&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;value&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;out_len&lt;/span&gt;&lt;span&gt;] &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;if&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;strlen&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;value&lt;/span&gt;&lt;span&gt;) &lt;/span&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;sizeof&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;#,###################&amp;quot;&lt;/span&gt;&lt;span&gt;)) {&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* String size too short */&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;return&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; }&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;memcpy&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;ictx&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;mdm_received_msg&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;value&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;MDM_MESSAGE_INDEX_1&lt;/span&gt;&lt;span&gt;], &lt;/span&gt;&lt;span&gt;MDM_HL7800_SMS_MAX_STR_SIZE&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;event_handler&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;HL7800_EVENT_READ_MESSAGE&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;ictx&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;mdm_received_msg&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;LOG_INF&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;SMS: &lt;/span&gt;&lt;span&gt;%s&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;ictx&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;mdm_received_msg&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;LOG_INF&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;SMS Value: &lt;/span&gt;&lt;span&gt;%s&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;value&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;return&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;Once I parse that massage, where do I point to in my main.c to get it?&amp;nbsp; This zephyr is so convoluted.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Moving SMS response to a usable address</title><link>https://devzone.nordicsemi.com/thread/514931?ContentTypeID=1</link><pubDate>Fri, 13 Dec 2024 15:13:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9dda6922-0b67-4af9-b038-3d7fb4697196</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Stephen,&lt;br /&gt;&lt;br /&gt;Please let me know if you have any further questions.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Moving SMS response to a usable address</title><link>https://devzone.nordicsemi.com/thread/514775?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2024 14:40:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39c96ace-2df4-4e89-aa07-9b1ceb6972d9</guid><dc:creator>MontanaEE</dc:creator><description>&lt;p&gt;Thanks Dejan,&amp;nbsp; I will try to find that.&amp;nbsp; I did find a case on the forum Case ID: 246543 where someone is try to do something similar, just with a different AT+Command using a get_response() function.&amp;nbsp; I stands to reason that this has been done before.&amp;nbsp; If the nrf is processing the command to, and getting the response from the modem, the data is already there somewhere.&lt;/p&gt;
&lt;p&gt;Stephen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Moving SMS response to a usable address</title><link>https://devzone.nordicsemi.com/thread/514737?ContentTypeID=1</link><pubDate>Thu, 12 Dec 2024 12:48:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6dead08c-0409-4552-9739-ed6d369dcfaa</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi, &lt;br /&gt;&lt;br /&gt;You could potentially look at the HL7800 driver which determines where the incomming messages are stored. It seems that HL7800 uses &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/modem/hl7800.c#L4779-L4780"&gt;Zephyr modem driver&lt;/a&gt;. There seems to be an unhandled Rx event in the code which prints the content of the message. You would need to look in the code where this is printed, handle event properly and copy the content to your desired location. You would need to check if driver supports what you try to do and possibly extend the driver to support unsupported feature.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Moving SMS response to a usable address</title><link>https://devzone.nordicsemi.com/thread/514619?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 22:52:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:679b2fd3-6b2b-4f58-93ae-df7ee7a18174</guid><dc:creator>MontanaEE</dc:creator><description>&lt;p&gt;Yes, the nrf52840 is getting the message.&amp;nbsp; When a SMS message comes in on UART1 of the nrf, where is it at?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Moving SMS response to a usable address</title><link>https://devzone.nordicsemi.com/thread/514503?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2024 12:30:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cff3dbc9-5f89-414d-a663-0ea0960b9254</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;It is difficult to give you some specific advice since you do not use our modem and SMS library. Is any of our components involved in storing SMS on the application side?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Moving SMS response to a usable address</title><link>https://devzone.nordicsemi.com/thread/514113?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2024 18:46:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fa6aa506-5334-42e3-8936-0b659330b8af</guid><dc:creator>MontanaEE</dc:creator><description>&lt;p&gt;Dejon,&lt;/p&gt;
&lt;p&gt;I am using a Pinnacle 100 from Ezurio. It has the HL7800 modem connected to UART1 on the nrf52840.&amp;nbsp; I have written the driver to send for this instance AT+CMGL which lists the received SMS messages.&amp;nbsp; You can see that I receive the actual text message expected both in hex and text, when I monitor in a JLink RTT Viewer.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I need to find out where I can pull that actual data that was received as a response to the AT+CMGL command (!tttpucl ock:1600) to move it to another memory location so I can compare the received message to a set of expected messages.&lt;/p&gt;
&lt;p&gt;Everything with the modem is working correctly, I just need to know where I can copy the actual received text from.&amp;nbsp; I know the data is there in index 1, just can&amp;#39;t seem to get to it.&lt;/p&gt;
&lt;p&gt;Here is the AT Interface.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/41111821-HL78xx-AT-Command-Reference-r23.pdf"&gt;devzone.nordicsemi.com/.../41111821-HL78xx-AT-Command-Reference-r23.pdf&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Moving SMS response to a usable address</title><link>https://devzone.nordicsemi.com/thread/514101?ContentTypeID=1</link><pubDate>Mon, 09 Dec 2024 17:04:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9cf264b-81ab-407a-a073-672fa5ec948f</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;Can you provide more information about your application?&lt;br /&gt;&lt;br /&gt;Can you provide more context to your question? How are modem and nrf52840 connected and what is the purpose of nrf52840 in your case? What do you try to achieve?&lt;br /&gt;&lt;br /&gt;Where did you get your RTT log from? Which action did you take when you got your log? What was your application doing?&lt;/p&gt;
[quote user=""]From the AT Interface, it looks as if these are stored in &amp;quot;mem1&amp;quot; or &amp;quot;mem3&amp;quot;, but I&amp;#39;m unclear how to access those locations[/quote]
&lt;p&gt;Can you provide a link to AT interface?&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>