<?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>How to add feature to Serial LTE Modem application?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/118241/how-to-add-feature-to-serial-lte-modem-application</link><description>Hello all, 
 I&amp;#39;m working on nRF-9160 and nRF-9151. 
 What I want to add into SLM application were: 
 
 Configure to communicate through UART2 since it will be working with external MCU (already solved) 
 Having a power status LED, which turns on as soon</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 24 Jan 2025 13:44:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/118241/how-to-add-feature-to-serial-lte-modem-application" /><item><title>RE: How to add feature to Serial LTE Modem application?</title><link>https://devzone.nordicsemi.com/thread/519979?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2025 13:44:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bd0b5b96-0644-4bb7-a8fe-dddf99d15b24</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi Alan-Ni,&lt;/p&gt;
[quote user="Alan-Ni"]&lt;p&gt;&amp;quot;&amp;quot;&amp;quot;&lt;span&gt;When using external MCUs like you are, you connect the indicate pin to the external MCU and use the toggling of the indicate pin to re-enable the UART via the power pin&lt;/span&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;Does that means normally one should send power up signal to 91XX through Power pin to wake up the SiP? Or if the external MCU was also in sleep mode should be able to be wake up through this indicate pin?&lt;/p&gt;[/quote]
&lt;p&gt;Honestly, I don&amp;#39;t know. My paraphrasing may have made this unclear. This is the original message: &lt;/p&gt;
&lt;p&gt;&amp;quot;&lt;span&gt;The indicate pin is configured to the led0 in nRF9151DK. When you are in sleeping and are receiving data from network or get unsolicited notifications, the indicate led0 is flashing. The idea is that with external MCU, you connect the indicate pin to the external MCU, and use the toggling of the indicate pin as your cue to re-enable the UART (via the power pin).&amp;quot; &lt;/span&gt;&lt;/p&gt;
&lt;p&gt;If the above quote does not help your understanding I will ask for clarification internally. &lt;span&gt;&lt;/span&gt;&lt;/p&gt;
[quote user="Alan-Ni"]&lt;span&gt;For the debug function, I&amp;#39;ve read the mentioned part of the code, and saw the code comment saying &amp;quot;&lt;/span&gt;We ignore everything before the start of the AT-command.&amp;quot;,&lt;br /&gt;It looks like there were some garbage ignoring design already, so I tested again to input some random string and get an ERROR response as expect.&lt;br /&gt;However I checked the comment again and notice it says &amp;quot;before the start of the AT command&amp;quot;, so I guess a starting point of AT must exist to avoid getting that ERROR.&lt;br /&gt;I tested again, I append an AT at the end of the random string, and this time I get an OK instead of ERROR.&lt;br /&gt;So... that totally is a problem solved to me, adding AT at the end of my debug message is totally acceptable.&lt;br /&gt;Thanks a lot![/quote]
&lt;p&gt;Great! &lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span&gt;Maria&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add feature to Serial LTE Modem application?</title><link>https://devzone.nordicsemi.com/thread/519943?ContentTypeID=1</link><pubDate>Fri, 24 Jan 2025 09:32:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2caa5b62-842f-422a-994c-b96f56782c7d</guid><dc:creator>Alan-Ni</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;Maria Gilje,&lt;/p&gt;
&lt;p&gt;I don&amp;#39;t quite get the meaning of&lt;/p&gt;
&lt;p&gt;&amp;quot;&amp;quot;&amp;quot;&lt;span&gt;When using external MCUs like you are, you connect the indicate pin to the external MCU and use the toggling of the indicate pin to re-enable the UART via the power pin&lt;/span&gt;&amp;quot;&amp;quot;&amp;quot;&lt;/p&gt;
&lt;p&gt;Does that means normally one should send power up signal to 91XX through Power pin to wake up the SiP? Or if the external MCU was also in sleep mode should be able to be wake up through this indicate pin?&lt;/p&gt;
&lt;p&gt;Also I would like to know how do I&amp;nbsp;implement the recommended&amp;nbsp;&lt;span&gt;duplicate GPIO logic method.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;Could that be done by configuring the overlay? Like binding the status of my LED GPIO to that default indicate pin GPIO?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;For the debug function, I&amp;#39;ve read the mentioned part of the code, and saw the code comment saying &amp;quot;&lt;/span&gt;We ignore everything before the start of the AT-command.&amp;quot;,&lt;br /&gt;It looks like there were some garbage ignoring design already, so I tested again to input some random string and get an ERROR response as expect.&lt;br /&gt;However I checked the comment again and notice it says &amp;quot;before the start of the AT command&amp;quot;, so I guess a starting point of AT must exist to avoid getting that ERROR.&lt;br /&gt;I tested again, I append an AT at the end of the random string, and this time I get an OK instead of ERROR.&lt;br /&gt;So... that totally is a problem solved to me, adding AT at the end of my debug message is totally acceptable.&lt;br /&gt;Thanks a lot!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add feature to Serial LTE Modem application?</title><link>https://devzone.nordicsemi.com/thread/519816?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2025 14:58:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:993276fc-1fe5-4138-8326-912b0eab8737</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hi Alan-Ni, &lt;/p&gt;
[quote user="Alan-Ni"]&amp;nbsp;Thanks for replying![/quote]
&lt;p&gt;Happy to!&lt;/p&gt;
[quote user=""]&lt;span&gt;Plus what was this function normally used? Is it a good method to output that to a LED instead of to somethings input?&lt;/span&gt;[/quote]
&lt;p&gt;The original functionality is that the LED will flash when the device is in sleeping state data is received from the network. When using external MCUs like you are, you connect the indicate pin to the external MCU and use the toggling of the indicate pin to re-enable the UART via the power pin.&lt;/p&gt;
&lt;p&gt;The recommendation I got is that when you use the external MCU you should keep the original functionality in the SLM app and duplicate some of the GPIO logic to control the LED.&lt;/p&gt;
[quote user=""]3. If not in data-mode, ignore inputs that doesn&amp;#39;t start with AT since that probably wasn&amp;#39;t messages for 91XX.[/quote][quote user=""]&lt;span&gt;And for the third function, my actual problem was I&amp;#39;m short&amp;nbsp;of my MCU output interface, so the UART connecting to nRF91XX was the only interface I could use to print debug message.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;However it looks like the SLM application would start analyzing commands no matter if it starts with AT or not, so when I print my own message, it would return ERROR to me and that will trigger my MCU to reset the 91XX.&lt;/span&gt;[/quote]
&lt;p&gt;To ignore messages which are not AT commands you need to search for the start of the AT command in &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.7.0/applications/serial_lte_modem/src/slm_at_host.c#L578"&gt;slm_at_host.c&lt;/a&gt;. You can see how this is done when the goal is to ignore the AT part of the AT-commands &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/v2.7.0/applications/serial_lte_modem/src/slm_at_host.c#L528-L535"&gt;here&lt;/a&gt;. &lt;/p&gt;
&lt;p&gt;This approach will most likely work well when used from the start of the processed loop in cmd_rx_handler. Note that if the debug message includes the start of the AT command, they will not be ignored, so keep in mind the formatting of the debug messages.&lt;/p&gt;
[quote user="Alan-Ni"]For the 3rd modify, I&amp;#39;m building v2.7.0 now but it is totally fine to move on to newer version.[/quote]
&lt;p&gt;Using nRF Connect SDK v2.7.0 should be fine. If we see that upgrading further is necessary, we&amp;#39;ll let you know. For now it is up to you if you want to switch to v2.9.0 or not. &lt;/p&gt;
[quote user="Alan-Ni"]Since 9151 only support 2.7.0 or higher version[/quote]
&lt;p&gt;This is the reason I asked, so it&amp;#39;s great to see that you are aware already!&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add feature to Serial LTE Modem application?</title><link>https://devzone.nordicsemi.com/thread/519751?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2025 12:30:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c918e468-9fc1-4121-8b05-2d8f6ce9ed52</guid><dc:creator>Alan-Ni</dc:creator><description>&lt;p&gt;Hi Maria,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Thanks for replying!&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve tested to configure the indicate pin to PO.30 and it does lit on the LED (Sleep mode not tested yet).&lt;/p&gt;
&lt;p&gt;For the 3rd modify, I&amp;#39;m building v2.7.0 now but it is totally fine to move on to newer version.&lt;br /&gt;Since 9151 only support 2.7.0 or higher version, and in our previous project MCU was coded to communicate with v2.4.0 SLM 9160, so changes are a must anyway.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to add feature to Serial LTE Modem application?</title><link>https://devzone.nordicsemi.com/thread/519741?ContentTypeID=1</link><pubDate>Thu, 23 Jan 2025 11:59:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bd27e36-020b-447c-a3e4-d53f1bcd9254</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]2. Having a power status LED, which turns on as soon as there&amp;#39;s power going into SiP, but&amp;nbsp;would turn of while in sleep mode.[/quote][quote user=""]For the second one, I&amp;#39;ve also seen a configuration about &amp;quot;&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/nrf/applications/serial_lte_modem/doc/slm_description.html"&gt;CONFIG_SLM_INDICATE_PIN&lt;/a&gt;&amp;quot; - Interface GPIO pin to indicate data available or unsolicited event notifications.&lt;br /&gt;It was noted that &amp;quot;This pin is configured to be active low, so it will be high when inactive.&amp;quot;&lt;br /&gt;That looks kind of match what I need since it would be high when waiting for data or notifications.&lt;br /&gt;However Its default to set to&amp;nbsp;&lt;strong&gt;P0.30&lt;/strong&gt;, and I&amp;#39;m not sure will any function be impacted if I change the port of this function? ( My LED was on GPIO0)&lt;br /&gt;[/quote]
&lt;p&gt;As long as the LED you use is not a high-power LED you should be able to implement this functionality.&lt;/p&gt;
&lt;p&gt;Using another pin than P0.30 is fine.&lt;/p&gt;
[quote user=""]Plus what was this function normally used? Is it a good method to output that to a LED instead of to somethings input?[/quote]
&lt;p&gt;I am not experienced with the SLM application, so I will forward these questions internally.&lt;/p&gt;
&lt;p&gt;Do note that you need to configure an interrupt pin to wake up from the SLM from sleep mode as well.&lt;/p&gt;
[quote user=""]3. If not in data-mode, ignore inputs that doesn&amp;#39;t start with AT since that probably wasn&amp;#39;t messages for 91XX.[/quote][quote user=""]&lt;span&gt;And for the third function, my actual problem was I&amp;#39;m short&amp;nbsp;of my MCU output interface, so the UART connecting to nRF91XX was the only interface I could use to print debug message.&lt;br /&gt;&lt;/span&gt;&lt;span&gt;However it looks like the SLM application would start analyzing commands no matter if it starts with AT or not, so when I print my own message, it would return ERROR to me and that will trigger my MCU to reset the 91XX.&lt;/span&gt;[/quote]
&lt;p&gt;I will also forward this internally. &lt;/p&gt;
&lt;p&gt;Please let us know which nRF Connect SDK version you are using. If you haven&amp;#39;t started yet, we recommend the latest tagged release (v2.9.0 currently).&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>