<?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>GNSS and SMS services</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/100018/gnss-and-sms-services</link><description>I&amp;#39;m trying to get location information sent with SMS to my phone. I have made sure my SIM card is SMS capable by using sms sample, which managed to send and receive messages and GNSS location services work and find fixes. 
 I wanted to use simple example</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Jun 2023 14:40:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/100018/gnss-and-sms-services" /><item><title>RE: GNSS and SMS services</title><link>https://devzone.nordicsemi.com/thread/429365?ContentTypeID=1</link><pubDate>Mon, 05 Jun 2023 14:40:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb482206-4cbe-402f-9ae7-a17c7ab9f6d6</guid><dc:creator>Didrik Rokhaug</dc:creator><description>[quote user="silwyr"]Whatis the second CONFIG option that should be changed?[/quote]
&lt;p&gt;My appologies. That should be CONFIG_THREAD_NAME=y.&lt;/p&gt;
&lt;p&gt;But if the application no longer crashes after you started using a workqueue, this point is moot.&lt;/p&gt;
[quote user="silwyr"]For receiving SMSes I&amp;#39;m not so sure what to do, as currently they are received sometimes at near start up of the program and status report for sent message is received.&amp;nbsp;[/quote]
&lt;p&gt;I am not sure if I understand what you mean here.&lt;/p&gt;
&lt;p&gt;Receiving SMSen is handled by the sms library, which uses the system workqueue to call the callback you register.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GNSS and SMS services</title><link>https://devzone.nordicsemi.com/thread/427631?ContentTypeID=1</link><pubDate>Fri, 26 May 2023 03:31:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b1f61b67-fba6-4225-aa4b-098136010244</guid><dc:creator>silwyr</dc:creator><description>[quote userid="81181" url="~/f/nordic-q-a/100018/gnss-and-sms-services/427472"]Please also add CONFIG_RESET_ON_FATAL_ERROR=n and CONFIG_so we can get logs from the crash itself.[/quote]
&lt;p&gt;Whatis the second CONFIG option that should be changed?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll try the workqueue and add logs when I manage to get them working or get some logs from the crashes.&lt;/p&gt;
&lt;p&gt;After implementing work queue for sending SMS they are sent.&lt;/p&gt;
&lt;p&gt;For receiving SMSes I&amp;#39;m not so sure what to do, as currently they are received sometimes at near start up of the program and status report for sent message is received.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is the current program file.&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/2318.sendWorkQueue.c"&gt;devzone.nordicsemi.com/.../2318.sendWorkQueue.c&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#
# Copyright (c) 2019 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#

# Logging
CONFIG_LOG=y

# Button and LED support
CONFIG_DK_LIBRARY=y

# Newlib
CONFIG_NEWLIB_LIBC=y
# STEP 2.2 - Enable printing of floating-points
CONFIG_NEWLIB_LIBC_FLOAT_PRINTF=y
CONFIG_FPU=y

# Network
CONFIG_NETWORKING=y
CONFIG_NET_NATIVE=n
CONFIG_NET_SOCKETS=y
CONFIG_NET_SOCKETS_OFFLOAD=y
CONFIG_NET_SOCKETS_POSIX_NAMES=y

# Memory
CONFIG_HEAP_MEM_POOL_SIZE=4096
CONFIG_MAIN_STACK_SIZE=4096

# Modem library
CONFIG_NRF_MODEM_LIB=y

# LTE link control
CONFIG_LTE_LINK_CONTROL=y
CONFIG_LTE_AUTO_INIT_AND_CONNECT=n

CONFIG_LTE_NETWORK_MODE_LTE_M_NBIOT_GPS=y

CONFIG_MODEM_ANTENNA_GNSS_EXTERNAL=y
CONFIG_MODEM_ANTENNA_GNSS_ONBOARD=n
CONFIG_SMS=y

CONFIG_LTE_PSM_REQ_RPTAU=&amp;quot;10100101&amp;quot;
CONFIG_LTE_PSM_REQ_RAT=&amp;quot;00001000&amp;quot;

# CONFIG_LTE_EDRX_REQ=y
# CONFIG_LTE_EDRX_REQ_VALUE_LTE_M=&amp;quot;1010&amp;quot;

CONFIG_RESET_ON_FATAL_ERROR=n
&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GNSS and SMS services</title><link>https://devzone.nordicsemi.com/thread/427472?ContentTypeID=1</link><pubDate>Thu, 25 May 2023 10:17:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bea2a59-4d5f-429c-bf95-f9e1e952fa3e</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Could you share the logs from the device?&lt;/p&gt;
&lt;p&gt;Please also add CONFIG_RESET_ON_FATAL_ERROR=n and CONFIG_so we can get logs from the crash itself.&lt;/p&gt;
[quote user="silwyr"]nd are there samples with GNSS and SMS that would be of help in that, I did some searching but couldn&amp;#39;t find any?[/quote]
&lt;p&gt;We don&amp;#39;t have any samples using both SMS and GNSS, so you will have to merge the SMS sample and one of the GNSS samples manually (as you are already doing).&lt;/p&gt;
&lt;p&gt;One thing to be aware of, is that the GNSS handler is run in an interrupt context (see &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.3.0/nrfxlib/nrf_modem/doc/gnss_interface.html#handling-events-and-reading-data-from-gnss"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.3.0/nrfxlib/nrf_modem/doc/gnss_interface.html#handling-events-and-reading-data-from-gnss&lt;/a&gt;), so you shouldn&amp;#39;t do too much processing in it.&lt;/p&gt;
&lt;p&gt;What happens if you move the SMS-sending to a &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.3.0/zephyr/kernel/services/threads/workqueue.html"&gt;workqueue&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GNSS and SMS services</title><link>https://devzone.nordicsemi.com/thread/427463?ContentTypeID=1</link><pubDate>Thu, 25 May 2023 09:27:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3283fa81-d7f1-44e9-b057-180037d8dcaf</guid><dc:creator>silwyr</dc:creator><description>&lt;p&gt;After removing suggested snippet and acquiring PSM time, I managed to send SMS message after GNSS location fix. Program still crashes after that. If I want to be able to receive SMS messages aswell, would that be possible on this kind current program or would I need to start from scratch? And are there samples with GNSS and SMS that would be of help in that, I did some searching but couldn&amp;#39;t find any?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: GNSS and SMS services</title><link>https://devzone.nordicsemi.com/thread/427217?ContentTypeID=1</link><pubDate>Wed, 24 May 2023 12:00:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae8ccefb-71a4-413a-8ff1-f72787fd218a</guid><dc:creator>Didrik Rokhaug</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;The problem is this snippet in main():&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;LOG_INF(&amp;quot;Deactivating LTE&amp;quot;);
if (lte_lc_func_mode_set(LTE_LC_FUNC_MODE_DEACTIVATE_LTE) != 0) {
	LOG_ERR(&amp;quot;Failed to activate GNSS functional mode&amp;quot;);
	return;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If you remove it, you should be able to send SMSes. However, it might affect the GPS performance. The LTE and GNSS stack uses the same resources, and the GNSS stack is only able to run when the LTE stack is not running. This means that unless you use PSM or eDRX to make the LTE stack sleep, the GNSS stack will not get enough runtime to get a fix.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Didrik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>