<?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/45772/nrf-mesh</link><description>HI........ I am working on nRF MESH latest version , so i am here using three boards nRF52832 , i have set the character message in client side , when the button 1 is pressed , corresponding character message will be sent to server , how to print this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 11 Apr 2019 13:31:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/45772/nrf-mesh" /><item><title>RE: nRF MESH</title><link>https://devzone.nordicsemi.com/thread/181632?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 13:31:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cdbceec0-d8f4-4c12-9f99-a7f69f62a41d</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Try to change %d to %c, since it is a character, and not an integer.&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/181480?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 08:13:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5beadb5-2a2e-4a4d-873d-8c71f325c41f</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;Thank you&amp;nbsp; for response .&lt;/p&gt;
&lt;p&gt;Here this is my log line ,i am printing a value by assigning to a character&lt;/p&gt;
&lt;p&gt;this is my server code&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;
/* Callback for updating the hardware state */
static void app_onoff_server_set_cb(const app_onoff_server_t * p_server,char cat)
{
    /* Resolve the server instance here if required, this example uses only 1 instance. */

    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;character: %d\n&amp;quot;,  cat);
    
    hal_led_pin_set(ONOFF_SERVER_0_LED, cat);
}
&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/181477?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 08:06:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d63553e1-9197-4bff-81f1-4ccf1aed0e29</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;yeah how to change that .. ap_on.off.c&amp;nbsp; , msg :SET:1 LINE ...&amp;nbsp;&lt;/p&gt;
&lt;p&gt;see the pic i have made some changes i dono whether it is correct or not&amp;nbsp;&lt;/p&gt;
&lt;p&gt;please guide me&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;

/***** Generic OnOff model interface callbacks *****/

static void generic_onoff_state_get_cb(const generic_onoff_server_t * p_self,
                                       const access_message_rx_meta_t * p_meta,
                                       generic_onoff_status_params_t * p_out)
{
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;msg: GET \n&amp;quot;);

    app_onoff_server_t   * p_server = PARENT_BY_FIELD_GET(app_onoff_server_t, server, p_self);

    /* Requirement: Provide the current value of the OnOff state */
    p_server-&amp;gt;onoff_get_cb(p_server, &amp;amp;p_server-&amp;gt;state.present_onoff);
    p_out-&amp;gt;present_on_off = p_server-&amp;gt;state.present_onoff;
    p_out-&amp;gt;target_on_off = p_server-&amp;gt;state.target_onoff;

    /* Requirement: Always report remaining time */
    if (p_server-&amp;gt;state.remaining_time_ms &amp;gt; 0 &amp;amp;&amp;amp; p_server-&amp;gt;state.delay_ms == 0)
    {
        uint32_t delta = (1000ul * app_timer_cnt_diff_compute(app_timer_cnt_get(), p_server-&amp;gt;last_rtc_counter)) / APP_TIMER_CLOCK_FREQ;
        if (p_server-&amp;gt;state.remaining_time_ms &amp;gt;= delta &amp;amp;&amp;amp; delta &amp;gt; 0)
        {
            p_out-&amp;gt;remaining_time_ms = p_server-&amp;gt;state.remaining_time_ms - delta;
        }
        else
        {
            p_out-&amp;gt;remaining_time_ms = 0;
        }
    }
    else
    {
        p_out-&amp;gt;remaining_time_ms = p_server-&amp;gt;state.remaining_time_ms;
    }
}

static void generic_onoff_state_set_cb(const generic_onoff_server_t * p_self,
                                       const access_message_rx_meta_t * p_meta,
                                       const generic_onoff_set_params_t * p_in,
                                       const model_transition_t * p_in_transition,
                                       generic_onoff_status_params_t * p_out)
{
    __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;msg: SET: %d\n&amp;quot;, p_in-&amp;gt;cat);

    app_onoff_server_t   * p_server = PARENT_BY_FIELD_GET(app_onoff_server_t, server, p_self);

    /* Update internal representation of OnOff value, process timing */
    p_server-&amp;gt;value_updated = false;
    p_server-&amp;gt;state.target_onoff = p_in-&amp;gt;cat;
    if (p_in_transition == NULL)
    {
        p_server-&amp;gt;state.delay_ms = 0;
        p_server-&amp;gt;state.remaining_time_ms = 0;
    }
    else
    {
        p_server-&amp;gt;state.delay_ms = p_in_transition-&amp;gt;delay_ms;
        p_server-&amp;gt;state.remaining_time_ms = p_in_transition-&amp;gt;transition_time_ms;
    }

    onoff_state_value_update(p_server);
    onoff_state_process_timing(p_server);

    /* Prepare response */
    if (p_out != NULL)
    {
        p_out-&amp;gt;present_on_off = p_server-&amp;gt;state.present_onoff;
        p_out-&amp;gt;target_on_off = p_server-&amp;gt;state.target_onoff;
        p_out-&amp;gt;remaining_time_ms = p_server-&amp;gt;state.remaining_time_ms;
    }
}


/***** Interface functions *****/

void app_onoff_status_publish(app_onoff_server_t * p_server)
{
    p_server-&amp;gt;onoff_get_cb(p_server, &amp;amp;p_server-&amp;gt;state.present_onoff);

    p_server-&amp;gt;state.target_onoff = p_server-&amp;gt;state.present_onoff;
    p_server-&amp;gt;state.delay_ms = 0;
    p_server-&amp;gt;state.remaining_time_ms = 0;
    (void) app_timer_stop(*p_server-&amp;gt;p_timer_id);

    generic_onoff_status_params_t status = {
                .present_on_off = p_server-&amp;gt;state.present_onoff,
                .target_on_off = p_server-&amp;gt;state.target_onoff,
                .remaining_time_ms = p_server-&amp;gt;state.remaining_time_ms
            };
    (void) generic_onoff_server_status_publish(&amp;amp;p_server-&amp;gt;server, &amp;amp;status);
}
&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/181476?ContentTypeID=1</link><pubDate>Thu, 11 Apr 2019 08:02:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8ecde34e-1c00-45db-be93-f444a690b9ed</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;What does your log line in main.c on line 97 look like?&lt;/p&gt;
&lt;p&gt;From your &amp;quot;ap_onoff.c, 204, msg: SET: 1, it looks like you are just receiving a bool, and not a character.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Edvin&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/181231?ContentTypeID=1</link><pubDate>Wed, 10 Apr 2019 07:36:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:434dfa40-8117-4d19-9646-b405d0b1decd</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/Capture-server.JPG" /&gt;&lt;/p&gt;
&lt;p&gt;yes i am not getting char properly in server side look at above pic&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/180967?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 09:09:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb02ffe6-b789-4ac9-a1d0-a69075103e0e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Server&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/180910?ContentTypeID=1</link><pubDate>Tue, 09 Apr 2019 07:04:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:49996511-151a-43ef-a6a3-7515751e397f</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;so i need to change the __LOG in server or client side?&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/180811?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 14:15:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c902fae-d296-48b7-a64b-140df92f0ceb</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;If you only changed bool to character, then it should be the same place as you would get the on_off callback earlier.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Try to check the static void generic_onoff_state_set_cb() function in ap_onoff.c, on line 198.&lt;/p&gt;
&lt;p&gt;Try to add the line (or replace the __LOG() function that was already there):&lt;/p&gt;
&lt;p&gt;__LOG(LOG_SRC_APP, LOG_LEVEL_INFO(&amp;quot;msg: char: %c, p_in-&amp;gt;on_off);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Does that give you the character?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&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/180699?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 10:05:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5613e65-ba3b-48f4-893b-8864ee36e92a</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;&amp;nbsp;I didn&amp;#39;t create a custom model but i have made some changes in client side ,( bool to character ). how to receive the data in server, what are the thing i should&amp;nbsp; &amp;nbsp;change&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/180666?ContentTypeID=1</link><pubDate>Mon, 08 Apr 2019 08:44:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9f9fdfcc-965a-4602-be09-7d8c093da4b5</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Well. You have probably created a custom model? Does that model have a callback function? Are you receiving any interrupts when you receive the data? How do you know that you actually get the data?&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/180315?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 12:43:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c74b450c-2893-4d76-bc89-a5899301fa81</guid><dc:creator>ps_anu</dc:creator><description>&lt;p&gt;Hi edvin ,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;i want to print the same data which is transferred from client to server ,how to get that same data i mean at which function i can find my received data in server side .&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks in advance&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/180269?ContentTypeID=1</link><pubDate>Thu, 04 Apr 2019 10:40:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d80be2d2-9640-4a61-9963-f34ea4585c4e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello &lt;a href="https://devzone.nordicsemi.com/members/saral"&gt;ps_anu&lt;/a&gt;,&lt;/p&gt;
&lt;p&gt;Look at how it is done in the ble_app_uart example.&lt;/p&gt;
&lt;p&gt;you need to use the same uart_init() function, and then you use a function similar to nus_data_handler(ble_nus_evt_t * p_evt) from the ble_app_uart event.&lt;/p&gt;
&lt;p&gt;basically, you use app_uart_put(uint8_t byte) for all the characters that you receive.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>