<?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 Send the thread network name through CoAP Response</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/97091/how-to-send-the-thread-network-name-through-coap-response</link><description>Hi i was wondering how could i send, with a coap response, one&amp;#39;s device network name and a, for exaple a temperature value, like this: 
 &amp;lt;device&amp;#39;s network name&amp;gt;: &amp;lt;temperature value&amp;gt; 
 
 I tried this, but failed: 
 
 const char * myTemperatureJson = &amp;quot;23</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 03 Mar 2023 09:24:13 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/97091/how-to-send-the-thread-network-name-through-coap-response" /><item><title>RE: How to Send the thread network name through CoAP Response</title><link>https://devzone.nordicsemi.com/thread/413182?ContentTypeID=1</link><pubDate>Fri, 03 Mar 2023 09:24:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c221d974-5111-45f3-a41f-213628c21b8c</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;These are not really Nordic specific questions, but really a general question on how to use strings in C.&amp;nbsp;&lt;/p&gt;
[quote user="simon8"]c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\src\main.c:26:35: error: initializer element is not constant[/quote]
&lt;p&gt;Since you are trying to write a constant char buffer, all the elements needs to be constants as well. In your case, the ot_name is not constant.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;FYI: When you declare something as a constant, it will be stored in flash, rather than RAM. This means that it needs to be constant at all times. Therefore, if a variable is not constant meaning it will be stored in RAM), it can&amp;#39;t store the resulting buffer in flash, because what happens if you at some point decides to change something in your ot_name[].&lt;/p&gt;
&lt;p&gt;Do you intentionally want to have all these as const? I guess the name may not change, but the temperature parameter looks like something you may want to change during runtime?&lt;/p&gt;
&lt;p&gt;I suggest you either remove all your &amp;quot;const&amp;quot;s, or you can look into &lt;a href="https://www.tutorialspoint.com/c_standard_library/c_function_sprintf.htm"&gt;sprintf&lt;/a&gt;() or &lt;a href="https://www.tutorialspoint.com/c_standard_library/c_function_memcpy.htm"&gt;memcpy()&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Send the thread network name through CoAP Response</title><link>https://devzone.nordicsemi.com/thread/412756?ContentTypeID=1</link><pubDate>Wed, 01 Mar 2023 13:32:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:267d47d0-45cc-4ed5-9b94-8a3b0695a11e</guid><dc:creator>simon8</dc:creator><description>&lt;div&gt;
&lt;div&gt;&lt;span&gt;i&amp;#39;ve implemented these lines in order to fix that problem, but appers an other one:&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;char&lt;/span&gt;&lt;span&gt; ot_name&lt;/span&gt;&lt;span&gt;[]&lt;/span&gt;&lt;span&gt; = CONFIG_OPENTHREAD_NETWORK_NAME;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;char&lt;/span&gt;&lt;span&gt; *mTemperature = &lt;/span&gt;&lt;span&gt;&amp;quot;23.32&amp;quot;&lt;/span&gt;&lt;span&gt;;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;const&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;char&lt;/span&gt;&lt;span&gt; *buf&lt;/span&gt;&lt;span&gt;[]&lt;/span&gt;&lt;span&gt; = {ot_name,&lt;/span&gt;&lt;span&gt;&amp;quot; &amp;quot;&lt;/span&gt;&lt;span&gt;, mTemperature};&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;.&lt;/p&gt;
&lt;p&gt;Building coap_rec_myserver&lt;br /&gt;west build --build-dir c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\build c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver&lt;/p&gt;
&lt;p&gt;[0/16] Performing build step for &amp;#39;802154_rpmsg_subimage&amp;#39;&lt;br /&gt;ninja: no work to do.&lt;br /&gt;[2/14] Building C object CMakeFiles/app.dir/src/main.c.obj&lt;br /&gt;FAILED: CMakeFiles/app.dir/src/main.c.obj &lt;br /&gt;C:\ncs\toolchains\v2.1.1\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\&amp;quot;nrf-config.h\&amp;quot; -DMBEDTLS_USER_CONFIG_FILE=\&amp;quot;nrf-config-user.h\&amp;quot; -DNRF5340_XXAA_APPLICATION -DNRF_802154_ACK_TIMEOUT_ENABLED=1 -DNRF_802154_ECB_PRIORITY=-1 -DNRF_802154_ENCRYPTION_ENABLED=1 -DNRF_802154_IE_WRITER_ENABLED=1 -DNRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0 -DNRF_802154_PENDING_EXTENDED_ADDRESSES=&amp;quot;&amp;quot; -DNRF_802154_PENDING_SHORT_ADDRESSES=&amp;quot;&amp;quot; -DNRF_802154_RX_BUFFERS=16 -DNRF_802154_SECURITY_WRITER_ENABLED=1 -DNRF_802154_SWI_PRIORITY=1 -DNRF_802154_TX_STARTED_NOTIFY_ENABLED=1 -DNRF_802154_USE_RAW_API=1 -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.1.1/zephyr/include/zephyr -IC:/ncs/v2.1.1/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.1.1/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.1.1/zephyr/lib/libc/newlib/include -IC:/ncs/v2.1.1/zephyr/lib/util/fnmatch/. -IC:/ncs/v2.1.1/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.1.1/zephyr/subsys/net/lib/sockets/. -IC:/ncs/v2.1.1/zephyr/subsys/settings/include -IC:/ncs/v2.1.1/nrf/include -IC:/ncs/v2.1.1/zephyr/modules/openthread/platform/. -IC:/ncs/v2.1.1/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.1.1/modules/hal/nordic/nrfx -IC:/ncs/v2.1.1/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.1.1/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.1.1/zephyr/modules/hal_nordic/nrfx/. -Imodules/libmetal/libmetal/lib/include -IC:/ncs/v2.1.1/modules/lib/open-amp/open-amp/lib/include -IC:/ncs/v2.1.1/nrfxlib/openthread/include -IC:/ncs/v2.1.1/nrfxlib/nrf_802154/serialization/include -IC:/ncs/v2.1.1/nrfxlib/nrf_802154/serialization/include/platform -IC:/ncs/v2.1.1/nrfxlib/nrf_802154/serialization/include/serialization -IC:/ncs/v2.1.1/nrfxlib/nrf_802154/serialization/include/host -Imodules/nrfxlib/nrfxlib/nrf_security/src/include/generated -IC:/ncs/v2.1.1/nrfxlib/nrf_security/include -IC:/ncs/v2.1.1/nrfxlib/nrf_security/include/mbedtls -IC:/ncs/v2.1.1/nrfxlib/nrf_security/include/psa -IC:/ncs/v2.1.1/mbedtls/include -IC:/ncs/v2.1.1/mbedtls/include/mbedtls -IC:/ncs/v2.1.1/mbedtls/include/psa -IC:/ncs/v2.1.1/mbedtls/library -IC:/ncs/v2.1.1/nrfxlib/nrf_security/../crypto/nrf_oberon/include -IC:/ncs/v2.1.1/nrfxlib/nrf_security/../crypto/nrf_oberon/include/mbedtls -IC:/ncs/v2.1.1/nrfxlib/nrf_security/../crypto/nrf_oberon/include/psa -IC:/ncs/v2.1.1/nrfxlib/crypto/nrf_oberon/include/mbedtls -IC:/ncs/v2.1.1/nrfxlib/crypto/nrf_oberon/include -isystem C:/ncs/v2.1.1/zephyr/subsys/cpp/include -isystem C:/ncs/v2.1.1/nrfxlib/crypto/nrf_cc312_platform/include -Os -imacros C:/progetti/nexter/VS/esempi/server-send__client-receive/coap_rec_myserver/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=C:/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.1.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/progetti/nexter/VS/esempi/server-send__client-receive/coap_rec_myserver=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.1.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.1.1=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c&lt;br /&gt;c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\src\main.c:26:35: error: initializer element is not constant&lt;br /&gt; 26 | const char *buf[] = {ot_name,&amp;quot; &amp;quot;, mTemperature};&lt;br /&gt; | ^~~~~~~~~~~~&lt;br /&gt;c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\src\main.c:26:35: note: (near initialization for &amp;#39;buf[2]&amp;#39;)&lt;br /&gt;ninja: build stopped: subcommand failed.&lt;br /&gt;FATAL ERROR: command exited with status 1: &amp;#39;c:\ncs\toolchains\v2.1.1\opt\bin\cmake.EXE&amp;#39; --build &amp;#39;c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\build&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;how could i fix that?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Send the thread network name through CoAP Response</title><link>https://devzone.nordicsemi.com/thread/412456?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 10:20:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4fdb23ff-497d-4e30-9e1d-c9f0fa8b140b</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Oh, ok. So this has nothing to do with OpenThread. It has to do with the way you are trying to create a character string.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;First of all, you need to change the&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;#39; &amp;#39;&lt;br /&gt;with&amp;nbsp;&lt;br /&gt;&amp;quot; &amp;quot;&lt;br /&gt;and lastly, I don&amp;#39;t think the line&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;const char *buf[] = {CONFIG_BOARD, &amp;quot; &amp;quot;, myTemperature};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;works as you intend it to.&lt;/p&gt;
&lt;p&gt;Please have a look at what was printed from this snippet:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    const char *myTemperature = &amp;quot;23.32&amp;quot;;
    const char *buf[] = {CONFIG_BOARD, &amp;quot; &amp;quot;, myTemperature};

    LOG_INF(&amp;quot;buf[1]: %s&amp;quot;, buf[0]);
    LOG_INF(&amp;quot;buf[2]: %s&amp;quot;, buf[1]);
    LOG_INF(&amp;quot;buf[3]: %s&amp;quot;, buf[2]);
    LOG_INF(&amp;quot;location buf[0]: %p&amp;quot;, buf[0]);
    LOG_INF(&amp;quot;location buf[1]: %p&amp;quot;, buf[1]);
    LOG_INF(&amp;quot;location buf[2]: %p&amp;quot;, buf[2]);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I got the log:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;00&amp;gt; [00:00:00.004,608] &amp;lt;inf&amp;gt; peripheral_uart: buf[1]: nrf52840dk_nrf52840
00&amp;gt; [00:00:00.004,608] &amp;lt;inf&amp;gt; peripheral_uart: buf[2]:  
00&amp;gt; [00:00:00.004,638] &amp;lt;inf&amp;gt; peripheral_uart: buf[3]: 23.32
00&amp;gt; [00:00:00.004,669] &amp;lt;inf&amp;gt; peripheral_uart: location buf[0]: 0x31414
00&amp;gt; [00:00:00.004,669] &amp;lt;inf&amp;gt; peripheral_uart: location buf[1]: 0x31d11
00&amp;gt; [00:00:00.004,699] &amp;lt;inf&amp;gt; peripheral_uart: location buf[2]: 0x3143e&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Note the location of the different buffers, which are also visible during a debug session:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1677579356330v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;And if I read out the data in these locations, you can see that they are indeed not in the same place in flash:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;C:\Nordic_Semiconductor\SDKs\ncs\v2.1.2\zephyr\samples\hello_world\src&amp;gt;nrfjprog --memrd 0x31414 --n 32
0x00031414: 3566726E 30343832 6E5F6B64 32356672   |nrf52840dk_nrf52|
0x00031424: 00303438 5B667562 203A5D32 62007325   |840.buf[2]: %s.b|

C:\Nordic_Semiconductor\SDKs\ncs\v2.1.2\zephyr\samples\hello_world\src&amp;gt;nrfjprog --memrd 0x31d11 --n 32
0x00031D11: 20007C00 2563001B 5B313B33 316D001B   | .|.%c..[1;31m..|
0x00031D21: 5B313B33 336D0065 72720077 726E0069   |[1;33m.err.wrn.i|

C:\Nordic_Semiconductor\SDKs\ncs\v2.1.2\zephyr\samples\hello_world\src&amp;gt;nrfjprog --memrd 0x3143e --n 32
0x0003143E: 3332332E 00326F6C 61636974 6E6F6220   |23.32.location b|
0x0003144E: 6675305B 3A5D2520 00706F6C 61636974   |uf[0]: %p.locati|&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And please note that all of these strings are null terminated.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;So as long as you are aware that these strings are not adjacent in flash, then you can use it like this. If not, you need to set up your buffer in another way.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Send the thread network name through CoAP Response</title><link>https://devzone.nordicsemi.com/thread/412345?ContentTypeID=1</link><pubDate>Mon, 27 Feb 2023 17:53:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3e35a2f7-5c2c-4ae8-ab23-0b9ed389313b</guid><dc:creator>simon8</dc:creator><description>&lt;p&gt;Sorry&lt;/p&gt;
&lt;p&gt;when i build it prints this:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Building coap_rec_myserver&lt;br /&gt;west build --build-dir c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\build c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver&lt;/p&gt;
&lt;p&gt;[0/16] Performing build step for &amp;#39;802154_rpmsg_subimage&amp;#39;&lt;br /&gt;ninja: no work to do.&lt;br /&gt;[2/14] Building C object CMakeFiles/app.dir/src/main.c.obj&lt;br /&gt;FAILED: CMakeFiles/app.dir/src/main.c.obj &lt;br /&gt;C:\ncs\toolchains\v2.1.1\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DMBEDTLS_CONFIG_FILE=\&amp;quot;nrf-config.h\&amp;quot; -DMBEDTLS_USER_CONFIG_FILE=\&amp;quot;nrf-config-user.h\&amp;quot; -DNRF5340_XXAA_APPLICATION -DNRF_802154_ACK_TIMEOUT_ENABLED=1 -DNRF_802154_ECB_PRIORITY=-1 -DNRF_802154_ENCRYPTION_ENABLED=1 -DNRF_802154_IE_WRITER_ENABLED=1 -DNRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0 -DNRF_802154_PENDING_EXTENDED_ADDRESSES=&amp;quot;&amp;quot; -DNRF_802154_PENDING_SHORT_ADDRESSES=&amp;quot;&amp;quot; -DNRF_802154_RX_BUFFERS=16 -DNRF_802154_SECURITY_WRITER_ENABLED=1 -DNRF_802154_SWI_PRIORITY=1 -DNRF_802154_TX_STARTED_NOTIFY_ENABLED=1 -DNRF_802154_USE_RAW_API=1 -DNRF_SKIP_FICR_NS_COPY_TO_RAM -DUSE_PARTITION_MANAGER=1 -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -IC:/ncs/v2.1.1/zephyr/include/zephyr -IC:/ncs/v2.1.1/zephyr/include -Izephyr/include/generated -IC:/ncs/v2.1.1/zephyr/soc/arm/nordic_nrf/nrf53 -IC:/ncs/v2.1.1/zephyr/lib/libc/newlib/include -IC:/ncs/v2.1.1/zephyr/lib/util/fnmatch/. -IC:/ncs/v2.1.1/zephyr/soc/arm/nordic_nrf/common/. -IC:/ncs/v2.1.1/zephyr/subsys/net/lib/sockets/. -IC:/ncs/v2.1.1/zephyr/subsys/settings/include -IC:/ncs/v2.1.1/nrf/include -IC:/ncs/v2.1.1/zephyr/modules/openthread/platform/. -IC:/ncs/v2.1.1/modules/hal/cmsis/CMSIS/Core/Include -IC:/ncs/v2.1.1/modules/hal/nordic/nrfx -IC:/ncs/v2.1.1/modules/hal/nordic/nrfx/drivers/include -IC:/ncs/v2.1.1/modules/hal/nordic/nrfx/mdk -IC:/ncs/v2.1.1/zephyr/modules/hal_nordic/nrfx/. -Imodules/libmetal/libmetal/lib/include -IC:/ncs/v2.1.1/modules/lib/open-amp/open-amp/lib/include -IC:/ncs/v2.1.1/nrfxlib/openthread/include -IC:/ncs/v2.1.1/nrfxlib/nrf_802154/serialization/include -IC:/ncs/v2.1.1/nrfxlib/nrf_802154/serialization/include/platform -IC:/ncs/v2.1.1/nrfxlib/nrf_802154/serialization/include/serialization -IC:/ncs/v2.1.1/nrfxlib/nrf_802154/serialization/include/host -Imodules/nrfxlib/nrfxlib/nrf_security/src/include/generated -IC:/ncs/v2.1.1/nrfxlib/nrf_security/include -IC:/ncs/v2.1.1/nrfxlib/nrf_security/include/mbedtls -IC:/ncs/v2.1.1/nrfxlib/nrf_security/include/psa -IC:/ncs/v2.1.1/mbedtls/include -IC:/ncs/v2.1.1/mbedtls/include/mbedtls -IC:/ncs/v2.1.1/mbedtls/include/psa -IC:/ncs/v2.1.1/mbedtls/library -IC:/ncs/v2.1.1/nrfxlib/nrf_security/../crypto/nrf_oberon/include -IC:/ncs/v2.1.1/nrfxlib/nrf_security/../crypto/nrf_oberon/include/mbedtls -IC:/ncs/v2.1.1/nrfxlib/nrf_security/../crypto/nrf_oberon/include/psa -IC:/ncs/v2.1.1/nrfxlib/crypto/nrf_oberon/include/mbedtls -IC:/ncs/v2.1.1/nrfxlib/crypto/nrf_oberon/include -isystem C:/ncs/v2.1.1/zephyr/subsys/cpp/include -isystem C:/ncs/v2.1.1/nrfxlib/crypto/nrf_cc312_platform/include -Os -imacros C:/progetti/nexter/VS/esempi/server-send__client-receive/coap_rec_myserver/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m33 -mthumb -mabi=aapcs -mfpu=fpv5-sp-d16 -mfloat-abi=hard -mfp16-format=ieee --sysroot=C:/ncs/toolchains/v2.1.1/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros C:/ncs/v2.1.1/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=C:/progetti/nexter/VS/esempi/server-send__client-receive/coap_rec_myserver=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/ncs/v2.1.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/ncs/v2.1.1=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c&lt;br /&gt;c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\src\main.c:24:53: warning: multi-character character constant [-Wmultichar]&lt;br /&gt; 24 | const char *buf[] = {CONFIG_OPENTHREAD_NETWORK_NAME,&amp;#39; &amp;#39;, myTemperatureJson};&lt;br /&gt; | ^~~~~&lt;br /&gt;c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\src\main.c:24:53: warning: initialization of &amp;#39;const char *&amp;#39; from &amp;#39;int&amp;#39; makes pointer from integer without a cast [-Wint-conversion]&lt;br /&gt;c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\src\main.c:24:53: note: (near initialization for &amp;#39;buf[1]&amp;#39;)&lt;br /&gt;c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\src\main.c:24:60: error: initializer element is not constant&lt;br /&gt; 24 | const char *buf[] = {CONFIG_OPENTHREAD_NETWORK_NAME,&amp;#39; &amp;#39;, myTemperatureJson};&lt;br /&gt; | ^~~~~~~~~~~~~~~~~&lt;br /&gt;c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\src\main.c:24:60: note: (near initialization for &amp;#39;buf[2]&amp;#39;)&lt;br /&gt;../src/main.c: In function &amp;#39;temperature_response_send&amp;#39;:&lt;br /&gt;c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\src\main.c:93:50: warning: passing argument 1 of &amp;#39;strlen&amp;#39; from incompatible pointer type [-Wincompatible-pointer-types]&lt;br /&gt; 93 | error = otMessageAppend(p_response, buf, strlen(buf));&lt;br /&gt; | ^~~&lt;br /&gt; | |&lt;br /&gt; | const char **&lt;br /&gt;In file included from C:\ncs\v2.1.1\zephyr\include\zephyr\net\net_core.h:17,&lt;br /&gt; from C:\ncs\v2.1.1\zephyr\include\zephyr\net\net_if.h:25,&lt;br /&gt; from C:\ncs\v2.1.1\zephyr\include\zephyr\net\openthread.h:23,&lt;br /&gt; from c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\src\main.c:11:&lt;br /&gt;c:\ncs\toolchains\v2.1.1\opt\zephyr-sdk\arm-zephyr-eabi\arm-zephyr-eabi\sys-include\string.h:41:17: note: expected &amp;#39;const char *&amp;#39; but argument is of type &amp;#39;const char **&amp;#39;&lt;br /&gt; 41 | size_t strlen (const char *);&lt;br /&gt; | ^~~~~~~~~~~~&lt;br /&gt;ninja: build stopped: subcommand failed.&lt;br /&gt;FATAL ERROR: command exited with status 1: &amp;#39;c:\ncs\toolchains\v2.1.1\opt\bin\cmake.EXE&amp;#39; --build &amp;#39;c:\progetti\nexter\VS\esempi\server-send__client-receive\coap_rec_myserver\build&amp;#39;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to Send the thread network name through CoAP Response</title><link>https://devzone.nordicsemi.com/thread/412290?ContentTypeID=1</link><pubDate>Mon, 27 Feb 2023 13:42:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7ce6dc86-b74c-4424-8085-cdc82443ab5a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
[quote user=""]I tried this, but failed:[/quote]
&lt;p&gt;So what happened? Does it compile? Does it run? Are you able to send the message, or does it &amp;quot;crash&amp;quot;? Do you receive any messages? Is it corrupted? Is it equal to your *buf[] after your second line?&lt;/p&gt;
&lt;p&gt;BR,&lt;br /&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>