<?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>nRF mesh</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/45670/nrf-mesh</link><description>hi..... i am using nRF52832 and segger latest version 3.1 mesh sdk 
 i am trying to send the message from client to server side using light switch example , I have made some changes in light switch client example ,i have changed the boolen(APP_STATE_ON</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Apr 2019 07:05:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45670/nrf-mesh" /><item><title>RE: nRF mesh</title><link>https://devzone.nordicsemi.com/thread/180645?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 07:05:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f54f3ab8-e0d6-4d0c-80a3-3a2bfadd9636</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;how do i check in server side whether my message&amp;nbsp; is received or not which i have sent from client&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF mesh</title><link>https://devzone.nordicsemi.com/thread/180518?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 13:26:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd25b92e-e83a-454f-94d7-ccdc10c6393f</guid><dc:creator>awneil</dc:creator><description>[quote userid="6462" url="~/f/nordic-q-a/45670/nrf-mesh/180506"]Why is &lt;strong&gt;x_in&lt;/strong&gt; a &lt;strong&gt;uint16_t&lt;/strong&gt; when you are assigning a &lt;strong&gt;char&lt;/strong&gt; to it ?[/quote][quote userid="25682" url="~/f/nordic-q-a/45670/nrf-mesh/180510"]Why is x_in an unsigned 16 int &amp;amp; a is a character?[/quote]
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/saral"&gt;ps_anu&lt;/a&gt; - these 2 questions are equivalent.&lt;/p&gt;
[quote userid="25682" url="~/f/nordic-q-a/45670/nrf-mesh/180510"]it will &amp;quot;work&amp;quot;[/quote]
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/members/saral"&gt;ps_anu&lt;/a&gt; -&amp;nbsp;It &amp;quot;works&amp;quot; because of the standard &amp;#39;C&amp;#39; &lt;em&gt;&lt;strong&gt;promotion&lt;/strong&gt;&lt;/em&gt; rules - so long as you understand those, and don&amp;#39;t get caught out by them ...&lt;/p&gt;
&lt;p&gt;&lt;a href="https://wiki.sei.cmu.edu/confluence/display/c/INT02-C.+Understand+integer+conversion+rules"&gt;https://wiki.sei.cmu.edu/confluence/display/c/INT02-C.+Understand+integer+conversion+rules&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;again, this is standard &amp;#39;C&amp;#39; - not specific to Nordic.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF mesh</title><link>https://devzone.nordicsemi.com/thread/180510?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 13:11:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7bec8a5e-fb3c-43e6-95de-b48bbdf64bb2</guid><dc:creator>Bj&amp;#248;rn Kvaale</dc:creator><description>&lt;p&gt;Why is x_in an unsigned 16 int &amp;amp; a is a character? I have tested it and it will &amp;quot;work&amp;quot;, but I do not understand why you did this.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF mesh</title><link>https://devzone.nordicsemi.com/thread/180506?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 13:08:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd3c14dd-231f-4a5d-8f16-f55cd511d483</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;It is syntactically valid.&lt;/p&gt;
&lt;p&gt;I have no idea what you are actually trying to achieve - so can&amp;#39;t say whether or not it is &amp;quot;correct&amp;quot; in that sense.&lt;/p&gt;
&lt;p&gt;Comments on &amp;#39;C&amp;#39; style:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;char a = 78;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;What&amp;#39;s with the &lt;a href="https://en.wikipedia.org/wiki/Magic_number_(programming)" rel="noopener noreferrer" target="_blank"&gt;magic number&lt;/a&gt; 78 ?&lt;/p&gt;
&lt;p&gt;If you want a lowercase letter X, then say so:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;char a = &amp;#39;x&amp;#39;;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Why have two cases here:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    switch(button_number)
    {
        case 0:
        case 2:
        
           x_in = a;
            break;

        case 1:
        case 3:
       
            x_in = a;
            break;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;They both do the same thing - so why not just&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;    switch(button_number)
    {
        case 0:
        case 2:
        case 1:
        case 3:
       
            x_in = a;
            break;
    }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and note that the value of x_in will be &lt;em&gt;&lt;strong&gt;undefined&lt;/strong&gt; &lt;/em&gt;in any other case.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Why is &lt;strong&gt;x_in&lt;/strong&gt; a &lt;strong&gt;uint16_t&lt;/strong&gt; when you are assigning a &lt;strong&gt;char&lt;/strong&gt; to it ?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF mesh</title><link>https://devzone.nordicsemi.com/thread/180495?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 12:37:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd093cbf-b935-40e8-8434-f20d1b047db3</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;is this correct or&amp;nbsp; wrong , i equallized both the sides... if it is wrong , what is wrong say me clearly please&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; uint16_t x_in;
    char a = 78;
 //char arr[80] = &amp;quot;code&amp;quot;;
// char ara [80] = &amp;quot;set&amp;quot;;
 
    switch(button_number)
    {
        case 0:
        case 2:
        
           x_in = a;
            break;

        case 1:
        case 3:
       
            x_in = a;
            break;
    }

    set_params.tid = tid++;
    transition_params.delay_ms = APP_CONFIG_ONOFF_DELAY_MS;
    transition_params.transition_time_ms = APP_CONFIG_ONOFF_TRANSITION_TIME_MS;
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Sending msg: ONOFF SET %d\n&amp;quot;,x_in);&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF mesh</title><link>https://devzone.nordicsemi.com/thread/180404?ContentTypeID=1</link><pubDate>Fri, 05 Apr 2019 05:42:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4e42693-0728-45e0-aa9e-d98bb073e4e7</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;but i have not used the bool state value even i have not included the generic_onoff_common.h which has definition , typestructure for bool state value, instead of that i created a variable which is used throughout the program&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF mesh</title><link>https://devzone.nordicsemi.com/thread/180367?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 15:57:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:748ded88-45c7-4c88-86b7-1670a1419dd7</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;As noted in &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/44964/how-to-print-the-data-from-particular-node-to-uart/179179#179179" rel="noopener noreferrer" target="_blank"&gt;your previous thread&lt;/a&gt;, this code:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt; char arr[5] = &amp;quot;code&amp;quot;;
 char ara[5] = &amp;quot;set&amp;quot;;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;defines both &amp;#39;arr&amp;#39; and &amp;#39;ara&amp;#39; to be char arrays.&lt;/p&gt;
&lt;p&gt;Therefore, for this code to work:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;set_params.on_off = arr;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;&amp;#39;set_params.on_off&amp;#39; mus be a char pointer.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You still haven&amp;#39;t confirmed this.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This is because, as explained in your previous thread, t&lt;span&gt;he thing on the left-hand side of an assignment has to be of the same type (or a &amp;quot;compatible&amp;quot; type) as the thing on the right-hand side of the assignment.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Again, this is standard &amp;#39;C&amp;#39; programming - nothing specific to Nordic or nRF52 or BLE.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And this line can&amp;#39;t be right:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;set_params.on_off = Ara;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;because the &amp;#39;C&amp;#39; programming language is case-sensitive - so &amp;#39;ara&amp;#39; is not the same thing as &amp;#39;Ara&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Surely, you must have got build errors or warnings for these?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>