<?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>Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/53314/invalid-model-when-trying-to-bind-app-key-to-level-model</link><description>Hi 
 When I select the Generic Level server model and try to bind the app key I get an invalid model Error. I am using the nRF Mesh android app. 
 This might be relevant or no but i see this in the debug terminal when provisioning 
 config_server.c, 629</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 13 Nov 2019 08:43:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/53314/invalid-model-when-trying-to-bind-app-key-to-level-model" /><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/219824?ContentTypeID=1</link><pubDate>Wed, 13 Nov 2019 08:43:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:027e9c6f-6c8f-4be3-bcc1-c411b68b65c8</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;I still can&amp;#39;t seem to build your project, getting the same error as earlier.&lt;/p&gt;
&lt;p&gt;Maybe you can have a look at the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.meshsdk.v3.2.0/md_examples_experimental_dimming_README.html?cp=5_2_3_6_0" rel="noopener noreferrer" target="_blank"&gt;dimming example&lt;/a&gt;&amp;nbsp;from the Mesh SDK and see how the Generic Level model is implemented there?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/219200?ContentTypeID=1</link><pubDate>Fri, 08 Nov 2019 06:52:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b47c5328-4cd8-46ed-9d30-5703f63f9f05</guid><dc:creator>Andre Lochner</dc:creator><description>&lt;p&gt;Hi ,&lt;/p&gt;
&lt;p&gt;Thanks , I appreciate your willingness to help.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;This is the project file for the server&lt;br /&gt;\nrf5SDKforMeshv320src\examples\eds\server\light_switch_server_nrf52840_xxAA_s140_6_1_1.emProject&lt;/p&gt;
&lt;p&gt;In the mesh app I click on&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;generic level server&lt;br /&gt;bind key&lt;/p&gt;
&lt;p&gt;And then get an&amp;nbsp;Invalid model error&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="Uploaded project files" href="https://drive.google.com/drive/folders/1BJ35kkcCKNaGhmy_5xjeMTB3qXlGOm0t?usp=sharing"&gt;https://drive.google.com/drive/folders/1BJ35kkcCKNaGhmy_5xjeMTB3qXlGOm0t?usp=sharing&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/218992?ContentTypeID=1</link><pubDate>Thu, 07 Nov 2019 09:27:16 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a93a8fec-b25d-4d13-9193-16551f98a00e</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not able to build or run your code. Could you send me your whole project so I can test it over here? Also include a step-by-step procedure on how I can reproduce this.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If you want I can make it into a private case before you share your code.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/218525?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2019 11:58:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:619151ce-cd4e-4b7c-be50-a5989401ffca</guid><dc:creator>Andre Lochner</dc:creator><description>&lt;p&gt;No unfortunately not.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/218518?ContentTypeID=1</link><pubDate>Tue, 05 Nov 2019 11:47:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:03545423-21a2-4327-9664-c7a3b1d1907f</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Do you have a DK available that you can test on?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/218151?ContentTypeID=1</link><pubDate>Mon, 04 Nov 2019 08:43:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1caac9de-e2f3-4836-be45-3200029670ed</guid><dc:creator>Andre Lochner</dc:creator><description>&lt;p&gt;/**&lt;br /&gt; * Level server callback list.&lt;br /&gt; */&lt;br /&gt;typedef struct&lt;br /&gt;{&lt;br /&gt; /** Callbacks for the level state. */&lt;br /&gt; generic_level_server_state_cbs_t level_cbs;&lt;br /&gt;} generic_level_server_callbacks_t;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/218150?ContentTypeID=1</link><pubDate>Mon, 04 Nov 2019 08:42:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c9f32068-b37c-48c0-bd49-e7d5d6c4e68d</guid><dc:creator>Andre Lochner</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;I am using a custom board with NRF52840 module on it. Everything is is standard examples that I modified. the server_cbs comes from&amp;nbsp;&amp;nbsp;C:\Nordic_SDK\nrf5SDKforMeshv320src\models\model_spec\generic_level\include\generic_level_server.h&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/215675?ContentTypeID=1</link><pubDate>Fri, 18 Oct 2019 10:58:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1135bad-1aaa-41ef-ae0f-7521aa875bef</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Are you testing with a DK or a custom board? Which chip are you using? I&amp;#39;m not able to build your code, getting an error. &amp;quot;server_cbs&amp;quot;, initializer is not a constant. How can I reproduce this?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/215550?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 13:50:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:20fa89c4-dba0-4b03-82f3-1ff9d067f7e5</guid><dc:creator>Andre Lochner</dc:creator><description>&lt;p&gt;/* Copyright (c) 2010 - 2019, Nordic Semiconductor ASA&lt;br /&gt; * All rights reserved.&lt;br /&gt; *&lt;br /&gt; * Redistribution and use in source and binary forms, with or without modification,&lt;br /&gt; * are permitted provided that the following conditions are met:&lt;br /&gt; *&lt;br /&gt; * 1. Redistributions of source code must retain the above copyright notice, this&lt;br /&gt; * list of conditions and the following disclaimer.&lt;br /&gt; *&lt;br /&gt; * 2. Redistributions in binary form, except as embedded into a Nordic&lt;br /&gt; * Semiconductor ASA integrated circuit in a product or a software update for&lt;br /&gt; * such product, must reproduce the above copyright notice, this list of&lt;br /&gt; * conditions and the following disclaimer in the documentation and/or other&lt;br /&gt; * materials provided with the distribution.&lt;br /&gt; *&lt;br /&gt; * 3. Neither the name of Nordic Semiconductor ASA nor the names of its&lt;br /&gt; * contributors may be used to endorse or promote products derived from this&lt;br /&gt; * software without specific prior written permission.&lt;br /&gt; *&lt;br /&gt; * 4. This software, with or without modification, must only be used with a&lt;br /&gt; * Nordic Semiconductor ASA integrated circuit.&lt;br /&gt; *&lt;br /&gt; * 5. Any software provided in binary form under this license must not be reverse&lt;br /&gt; * engineered, decompiled, modified and/or disassembled.&lt;br /&gt;*&lt;br /&gt; * THIS SOFTWARE IS PROVIDED BY NORDIC SEMICONDUCTOR ASA &amp;quot;AS IS&amp;quot; AND ANY EXPRESS&lt;br /&gt; * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES&lt;br /&gt; * OF MERCHANTABILITY, NONINFRINGEMENT, AND FITNESS FOR A PARTICULAR PURPOSE ARE&lt;br /&gt; * DISCLAIMED. IN NO EVENT SHALL NORDIC SEMICONDUCTOR ASA OR CONTRIBUTORS BE&lt;br /&gt; * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR&lt;br /&gt; * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE&lt;br /&gt; * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)&lt;br /&gt; * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT&lt;br /&gt; * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT&lt;br /&gt; * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.&lt;br /&gt; */&lt;/p&gt;
&lt;p&gt;#include &amp;lt;stdint.h&amp;gt;&lt;br /&gt;#include &amp;lt;string.h&amp;gt;&lt;/p&gt;
&lt;p&gt;/* HAL */&lt;br /&gt;#include &amp;quot;boards.h&amp;quot;&lt;br /&gt;#include &amp;quot;simple_hal.h&amp;quot;&lt;br /&gt;#include &amp;quot;app_timer.h&amp;quot;&lt;br /&gt;#include &amp;quot;nrf_delay.h&amp;quot;&lt;/p&gt;
&lt;p&gt;/* Core */&lt;br /&gt;#include &amp;quot;nrf_mesh_config_core.h&amp;quot;&lt;br /&gt;#include &amp;quot;nrf_mesh_gatt.h&amp;quot;&lt;br /&gt;#include &amp;quot;nrf_mesh_configure.h&amp;quot;&lt;br /&gt;#include &amp;quot;nrf_mesh.h&amp;quot;&lt;br /&gt;#include &amp;quot;mesh_stack.h&amp;quot;&lt;br /&gt;#include &amp;quot;device_state_manager.h&amp;quot;&lt;br /&gt;#include &amp;quot;access_config.h&amp;quot;&lt;br /&gt;#include &amp;quot;proxy.h&amp;quot;&lt;/p&gt;
&lt;p&gt;/* Provisioning and configuration */&lt;br /&gt;#include &amp;quot;mesh_provisionee.h&amp;quot;&lt;br /&gt;#include &amp;quot;mesh_app_utils.h&amp;quot;&lt;/p&gt;
&lt;p&gt;/* Models */&lt;br /&gt;#include &amp;quot;generic_onoff_server.h&amp;quot;&lt;br /&gt;#include &amp;quot;generic_level_server.h&amp;quot;&lt;/p&gt;
&lt;p&gt;/* Logging and RTT */&lt;br /&gt;#include &amp;quot;log.h&amp;quot;&lt;br /&gt;#include &amp;quot;rtt_input.h&amp;quot;&lt;/p&gt;
&lt;p&gt;/* Example specific includes */&lt;br /&gt;#include &amp;quot;app_config.h&amp;quot;&lt;br /&gt;#include &amp;quot;example_common.h&amp;quot;&lt;br /&gt;#include &amp;quot;nrf_mesh_config_examples.h&amp;quot;&lt;br /&gt;#include &amp;quot;light_switch_example_common.h&amp;quot;&lt;br /&gt;#include &amp;quot;app_onoff.h&amp;quot;&lt;br /&gt;#include &amp;quot;ble_softdevice_support.h&amp;quot;&lt;/p&gt;
&lt;p&gt;// andre custom files&lt;br /&gt;#include &amp;quot;brd_io.h&amp;quot;&lt;/p&gt;
&lt;p&gt;#define ONOFF_SERVER_0_LED (BSP_LED_0)&lt;br /&gt;#define APP_ONOFF_ELEMENT_INDEX (0)&lt;/p&gt;
&lt;p&gt;static bool m_device_provisioned;&lt;/p&gt;
&lt;p&gt;static uint32_t level_counter = 0;&lt;/p&gt;
&lt;p&gt;/*************************************************************************************************/&lt;br /&gt;static void app_onoff_server_set_cb(const app_onoff_server_t * p_server, bool onoff);&lt;br /&gt;static void app_onoff_server_get_cb(const app_onoff_server_t * p_server, bool * p_present_onoff);&lt;/p&gt;
&lt;p&gt;/* Generic OnOff server structure definition and initialization */&lt;br /&gt;APP_ONOFF_SERVER_DEF(m_onoff_server_0,&lt;br /&gt; APP_CONFIG_FORCE_SEGMENTATION,&lt;br /&gt; APP_CONFIG_MIC_SIZE,&lt;br /&gt; app_onoff_server_set_cb,&lt;br /&gt; app_onoff_server_get_cb)&lt;/p&gt;
&lt;p&gt;// EDS &lt;br /&gt;static generic_level_server_t l_server;&lt;/p&gt;
&lt;p&gt;// forward declarations for callbacks&lt;br /&gt;static void level_server_get_cb(const generic_level_server_t * p_self,const access_message_rx_meta_t * p_meta, generic_level_status_params_t * p_out );&lt;/p&gt;
&lt;p&gt;static void level_server_set_cb(const generic_level_server_t * p_self,&lt;br /&gt; const access_message_rx_meta_t * p_meta,&lt;br /&gt; const generic_level_set_params_t * p_in,&lt;br /&gt; const model_transition_t * p_in_transition,&lt;br /&gt; generic_level_status_params_t * p_out);&lt;/p&gt;
&lt;p&gt;static void level_server_delta_set_cb(const generic_level_server_t * p_self, &lt;br /&gt; const access_message_rx_meta_t * p_meta, &lt;br /&gt; const generic_level_delta_set_params_t * p_in,&lt;br /&gt; const model_transition_t * p_in_transition,&lt;br /&gt; generic_level_status_params_t * p_out );&lt;/p&gt;
&lt;p&gt;static void level_server_move_set_cb(const generic_level_server_t * p_self,&lt;br /&gt; const access_message_rx_meta_t * p_meta,&lt;br /&gt; const generic_level_move_set_params_t * p_in,&lt;br /&gt; const model_transition_t * p_in_transition,&lt;br /&gt; generic_level_status_params_t * p_out);&lt;/p&gt;
&lt;p&gt;// EDS -- define the callbacks for the level server&lt;br /&gt;const generic_level_server_state_cbs_t server_cbs =&lt;br /&gt;{&lt;br /&gt; .get_cb = level_server_get_cb,&lt;br /&gt; .set_cb = level_server_set_cb,&lt;br /&gt; .delta_set_cb = level_server_delta_set_cb,&lt;br /&gt; .move_set_cb = level_server_move_set_cb&lt;br /&gt;};&lt;/p&gt;
&lt;p&gt;const generic_level_server_callbacks_t levels_cbs = {&lt;br /&gt; server_cbs&lt;br /&gt; };&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;//EDS all callbacks for the level server&lt;br /&gt;static void level_server_get_cb(const generic_level_server_t * p_self,const access_message_rx_meta_t * p_meta, generic_level_status_params_t * p_out )&lt;br /&gt;{&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;level_server_get_cb\n&amp;quot;);&lt;br /&gt; &lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void level_server_set_cb(const generic_level_server_t * p_self,&lt;br /&gt; const access_message_rx_meta_t * p_meta,&lt;br /&gt; const generic_level_set_params_t * p_in,&lt;br /&gt; const model_transition_t * p_in_transition,&lt;br /&gt; generic_level_status_params_t * p_out)&lt;br /&gt;{&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;level_server_set_cb\n&amp;quot;);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;static void level_server_delta_set_cb(const generic_level_server_t * p_self, &lt;br /&gt; const access_message_rx_meta_t * p_meta, &lt;br /&gt; const generic_level_delta_set_params_t * p_in,&lt;br /&gt; const model_transition_t * p_in_transition,&lt;br /&gt; generic_level_status_params_t * p_out )&lt;br /&gt;{&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;level_server_delta_set_cb\n&amp;quot;);&lt;br /&gt; //__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;level_server_delta_set_cb level %d\n&amp;quot;, onoff);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void level_server_move_set_cb(const generic_level_server_t * p_self,&lt;br /&gt; const access_message_rx_meta_t * p_meta,&lt;br /&gt; const generic_level_move_set_params_t * p_in,&lt;br /&gt; const model_transition_t * p_in_transition,&lt;br /&gt; generic_level_status_params_t * p_out)&lt;br /&gt;{&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;level_server_move_set_cb\n&amp;quot;);&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;/* Callback for updating the hardware state */&lt;br /&gt;static void app_onoff_server_set_cb(const app_onoff_server_t * p_server, bool onoff)&lt;br /&gt;{&lt;br /&gt; /* Resolve the server instance here if required, this example uses only 1 instance. */&lt;/p&gt;
&lt;p&gt;__LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Setting GPIO value: %d\n&amp;quot;, onoff)&lt;br /&gt; brd_io_led_on(3);&lt;br /&gt; brd_io_led_on(0);&lt;br /&gt; nrf_delay_ms(200);&lt;br /&gt; brd_io_led_off(3);&lt;br /&gt; brd_io_led_off(0);&lt;br /&gt; brd_io_led_on(1);&lt;br /&gt; brd_io_led_on(2);&lt;br /&gt; nrf_delay_ms(200);&lt;br /&gt; brd_io_led_off(1);&lt;br /&gt; brd_io_led_off(2);&lt;br /&gt; brd_io_led_on(3);&lt;br /&gt; brd_io_led_on(0);&lt;br /&gt; nrf_delay_ms(200);&lt;br /&gt; brd_io_led_off(3);&lt;br /&gt; brd_io_led_off(0);&lt;br /&gt; brd_io_led_on(1);&lt;br /&gt; brd_io_led_on(2);&lt;br /&gt; nrf_delay_ms(200);&lt;br /&gt; brd_io_led_off(1);&lt;br /&gt; brd_io_led_off(2);&lt;br /&gt; //hal_led_pin_set(ONOFF_SERVER_0_LED, onoff);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;/* Callback for reading the hardware state */&lt;br /&gt;static void app_onoff_server_get_cb(const app_onoff_server_t * p_server, bool * p_present_onoff)&lt;br /&gt;{&lt;br /&gt; /* Resolve the server instance here if required, this example uses only 1 instance. */&lt;/p&gt;
&lt;p&gt;*p_present_onoff = hal_led_pin_get(ONOFF_SERVER_0_LED);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void app_model_init(void)&lt;br /&gt;{&lt;br /&gt; /* Instantiate onoff server on element index APP_ONOFF_ELEMENT_INDEX */&lt;br /&gt; ERROR_CHECK(app_onoff_init(&amp;amp;m_onoff_server_0, APP_ONOFF_ELEMENT_INDEX));&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;App OnOff Model Handle: %d\n&amp;quot;, m_onoff_server_0.server.model_handle);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;/*************************************************************************************************/&lt;/p&gt;
&lt;p&gt;static void node_reset(void)&lt;br /&gt;{&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;----- Node reset -----\n&amp;quot;);&lt;br /&gt; //hal_led_blink_ms(LEDS_MASK, LED_BLINK_INTERVAL_MS, LED_BLINK_CNT_RESET);&lt;br /&gt; /* This function may return if there are ongoing flash operations. */&lt;br /&gt; mesh_stack_device_reset();&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void config_server_evt_cb(const config_server_evt_t * p_evt)&lt;br /&gt;{&lt;br /&gt; if (p_evt-&amp;gt;type == CONFIG_SERVER_EVT_NODE_RESET)&lt;br /&gt; {&lt;br /&gt; node_reset();&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void button_event_handler(uint32_t button_number)&lt;br /&gt;{&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Button %u pressed\n&amp;quot;, button_number);&lt;br /&gt; switch (button_number)&lt;br /&gt; {&lt;br /&gt; /* Pressing SW1 on the Development Kit will result in LED state to toggle and trigger&lt;br /&gt; the STATUS message to inform client about the state change. This is a demonstration of&lt;br /&gt; state change publication due to local event. */&lt;br /&gt; case 0:&lt;br /&gt; {&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;User action \n&amp;quot;);&lt;br /&gt; //hal_led_pin_set(ONOFF_SERVER_0_LED, !hal_led_pin_get(ONOFF_SERVER_0_LED));&lt;br /&gt; app_onoff_status_publish(&amp;amp;m_onoff_server_0);&lt;br /&gt; break;&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;/* Initiate node reset */&lt;br /&gt; case 3:&lt;br /&gt; {&lt;br /&gt; /* Clear all the states to reset the node. */&lt;br /&gt; if (mesh_stack_is_device_provisioned())&lt;br /&gt; {&lt;br /&gt;#if MESH_FEATURE_GATT_PROXY_ENABLED&lt;br /&gt; (void) proxy_stop();&lt;br /&gt;#endif&lt;br /&gt; mesh_stack_config_clear();&lt;br /&gt; node_reset();&lt;br /&gt; }&lt;br /&gt; else&lt;br /&gt; {&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;The device is unprovisioned. Resetting has no effect.\n&amp;quot;);&lt;br /&gt; }&lt;br /&gt; break;&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;default:&lt;br /&gt; break;&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void app_rtt_input_handler(int key)&lt;br /&gt;{&lt;br /&gt; if (key &amp;gt;= &amp;#39;0&amp;#39; &amp;amp;&amp;amp; key &amp;lt;= &amp;#39;4&amp;#39;)&lt;br /&gt; {&lt;br /&gt; uint32_t button_number = key - &amp;#39;0&amp;#39;;&lt;br /&gt; button_event_handler(button_number);&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void device_identification_start_cb(uint8_t attention_duration_s)&lt;br /&gt;{&lt;br /&gt; //hal_led_mask_set(LEDS_MASK, false);&lt;br /&gt; /*hal_led_blink_ms(BSP_LED_2_MASK | BSP_LED_3_MASK,&lt;br /&gt; LED_BLINK_ATTENTION_INTERVAL_MS,&lt;br /&gt; LED_BLINK_ATTENTION_COUNT(attention_duration_s));*/&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void provisioning_aborted_cb(void)&lt;br /&gt;{&lt;br /&gt; //hal_led_blink_stop();&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void provisioning_complete_cb(void)&lt;br /&gt;{&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Successfully provisioned\n&amp;quot;);&lt;/p&gt;
&lt;p&gt;#if MESH_FEATURE_GATT_ENABLED&lt;br /&gt; /* Restores the application parameters after switching from the Provisioning&lt;br /&gt; * service to the Proxy */&lt;br /&gt; gap_params_init();&lt;br /&gt; conn_params_init();&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;dsm_local_unicast_address_t node_address;&lt;br /&gt; dsm_local_unicast_addresses_get(&amp;amp;node_address);&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Node Address: 0x%04x \n&amp;quot;, node_address.address_start);&lt;/p&gt;
&lt;p&gt;//hal_led_blink_stop();&lt;br /&gt; //hal_led_mask_set(LEDS_MASK, LED_MASK_STATE_OFF);&lt;br /&gt; //hal_led_blink_ms(LEDS_MASK, LED_BLINK_INTERVAL_MS, LED_BLINK_CNT_PROV);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void models_init_cb(void)&lt;br /&gt;{&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Initializing and adding models\n&amp;quot;);&lt;br /&gt; app_model_init();&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;Initializing and adding level model\n&amp;quot;);&lt;br /&gt; l_server.settings.p_callbacks = &amp;amp;levels_cbs;&lt;br /&gt; &lt;br /&gt; l_server.settings.force_segmented = APP_CONFIG_FORCE_SEGMENTATION;&lt;br /&gt; l_server.settings.transmic_size = APP_CONFIG_MIC_SIZE;&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;App Level Model Handle: %d\n&amp;quot;, l_server.model_handle);&lt;br /&gt; ERROR_CHECK(generic_level_server_init(&amp;amp;l_server, 3));&lt;/p&gt;
&lt;p&gt;}&lt;/p&gt;
&lt;p&gt;static void mesh_init(void)&lt;br /&gt;{&lt;br /&gt; mesh_stack_init_params_t init_params =&lt;br /&gt; {&lt;br /&gt; .core.irq_priority = NRF_MESH_IRQ_PRIORITY_LOWEST,&lt;br /&gt; .core.lfclksrc = DEV_BOARD_LF_CLK_CFG,&lt;br /&gt; .core.p_uuid = NULL,&lt;br /&gt; .models.models_init_cb = models_init_cb,&lt;br /&gt; .models.config_server_cb = config_server_evt_cb&lt;br /&gt; };&lt;br /&gt; ERROR_CHECK(mesh_stack_init(&amp;amp;init_params, &amp;amp;m_device_provisioned));&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void initialize(void)&lt;br /&gt;{&lt;br /&gt; __LOG_INIT(LOG_SRC_APP | LOG_SRC_FRIEND, LOG_LEVEL_DBG1, LOG_CALLBACK_DEFAULT);&lt;br /&gt; __LOG(LOG_SRC_APP, LOG_LEVEL_INFO, &amp;quot;----- BLE Mesh Light Switch Server Demo -----\n&amp;quot;);&lt;/p&gt;
&lt;p&gt;ERROR_CHECK(app_timer_init());&lt;br /&gt; // hal_leds_init();&lt;/p&gt;
&lt;p&gt;#if BUTTON_BOARD&lt;br /&gt; ERROR_CHECK(hal_buttons_init(button_event_handler));&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;ble_stack_init();&lt;/p&gt;
&lt;p&gt;#if MESH_FEATURE_GATT_ENABLED&lt;br /&gt; gap_params_init();&lt;br /&gt; conn_params_init();&lt;br /&gt;#endif&lt;/p&gt;
&lt;p&gt;mesh_init();&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;static void start(void)&lt;br /&gt;{&lt;br /&gt; rtt_input_enable(app_rtt_input_handler, RTT_INPUT_POLL_PERIOD_MS);&lt;/p&gt;
&lt;p&gt;if (!m_device_provisioned)&lt;br /&gt; {&lt;br /&gt; static const uint8_t static_auth_data[NRF_MESH_KEY_SIZE] = STATIC_AUTH_DATA;&lt;br /&gt; mesh_provisionee_start_params_t prov_start_params =&lt;br /&gt; {&lt;br /&gt; .p_static_data = static_auth_data,&lt;br /&gt; .prov_complete_cb = provisioning_complete_cb,&lt;br /&gt; .prov_device_identification_start_cb = device_identification_start_cb,&lt;br /&gt; .prov_device_identification_stop_cb = NULL,&lt;br /&gt; .prov_abort_cb = provisioning_aborted_cb,&lt;br /&gt; .p_device_uri = EX_URI_LS_SERVER&lt;br /&gt; };&lt;br /&gt; ERROR_CHECK(mesh_provisionee_prov_start(&amp;amp;prov_start_params));&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;mesh_app_uuid_print(nrf_mesh_configure_device_uuid_get());&lt;/p&gt;
&lt;p&gt;ERROR_CHECK(mesh_stack_start());&lt;/p&gt;
&lt;p&gt;//hal_led_mask_set(LEDS_MASK, LED_MASK_STATE_OFF);&lt;br /&gt; //hal_led_blink_ms(LEDS_MASK, LED_BLINK_INTERVAL_MS, LED_BLINK_CNT_START);&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;int main(void)&lt;br /&gt;{&lt;br /&gt; bsp_board_init(BSP_INIT_LEDS);&lt;br /&gt; bsp_board_leds_on();&lt;br /&gt; brd_io_led_on(3);&lt;br /&gt; brd_io_led_on(0);&lt;br /&gt; nrf_delay_ms(200);&lt;br /&gt; brd_io_led_off(3);&lt;br /&gt; brd_io_led_off(0);&lt;br /&gt; brd_io_led_on(1);&lt;br /&gt; brd_io_led_on(2);&lt;br /&gt; nrf_delay_ms(200);&lt;br /&gt; brd_io_led_off(1);&lt;br /&gt; brd_io_led_off(2);&lt;br /&gt; brd_io_led_on(3);&lt;br /&gt; brd_io_led_on(0);&lt;br /&gt; nrf_delay_ms(200);&lt;br /&gt; brd_io_led_off(3);&lt;br /&gt; brd_io_led_off(0);&lt;br /&gt; brd_io_led_on(1);&lt;br /&gt; brd_io_led_on(2);&lt;br /&gt; nrf_delay_ms(200);&lt;br /&gt; brd_io_led_off(1);&lt;br /&gt; brd_io_led_off(2);&lt;br /&gt; initialize();&lt;br /&gt; start();&lt;/p&gt;
&lt;p&gt;for (;;)&lt;br /&gt; {&lt;br /&gt; (void)sd_app_evt_wait();&lt;br /&gt; }&lt;br /&gt;}&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/215549?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 13:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:24b5e2ba-141b-4be8-9d1f-a1373129ad88</guid><dc:creator>Andre Lochner</dc:creator><description>&lt;p&gt;Yes, works fine with the client model. Its only with the server model where I get this error when I assign an app key.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/215533?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 13:11:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b65a6281-aae8-4867-ab68-19b8591b0f9f</guid><dc:creator>Mttrinh</dc:creator><description>[quote user="AndreLochner"]I did the same with the client and it is working fine and can subscribe to level model.[/quote]
&lt;p&gt;So it works fine when trying&lt;span&gt;&amp;nbsp;to bind the app key to the Generic Level client model?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/215519?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 12:43:06 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e1b95da-3510-416a-b151-4ddf39fb7c03</guid><dc:creator>Andre Lochner</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I am using&amp;nbsp;version&amp;nbsp;v3.2.0. I used the light switch server as my starting template and I have added a level model to it. I did the same with the client and it is working fine and can subscribe to level model. I have made a mod to&amp;nbsp;ACCESS_SUBSCRIPTION_LIST_COUNT is a well. I have played around with various values and at the moment I have it as follow&amp;nbsp;ACCESS_MODEL_COUNT (6),&amp;nbsp;ACCESS_ELEMENT_COUNT (4),&amp;nbsp;ACCESS_SUBSCRIPTION_LIST_COUNT (ACCESS_MODEL_COUNT+2)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Invalid Model when trying to bind app key to Level model</title><link>https://devzone.nordicsemi.com/thread/215494?ContentTypeID=1</link><pubDate>Thu, 17 Oct 2019 11:50:44 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f5883737-8ec9-4df9-8726-293f5686aa98</guid><dc:creator>Mttrinh</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What Mesh SDK version are you using? And which example? Is&amp;nbsp;&lt;span&gt;ACCESS_MODEL_COUNT&amp;nbsp;and&amp;nbsp;ACCESS_ELEMENT_COUNT&amp;nbsp;the only modifications you have done?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>