<?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>Implementing Simple On Off model callback in main not fired</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/58952/implementing-simple-on-off-model-callback-in-main-not-fired</link><description>I am trying to implement the Simple On Off Server model in an existing project. In main.c I did the following: 
 1. In models_init_cb(), I added the following lines: 
 
 2. I add callback functions in main.c: 
 
 3. I instantiate m_server towards top</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Mar 2020 15:39:33 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/58952/implementing-simple-on-off-model-callback-in-main-not-fired" /><item><title>RE: Implementing Simple On Off model callback in main not fired</title><link>https://devzone.nordicsemi.com/thread/239384?ContentTypeID=1</link><pubDate>Wed, 11 Mar 2020 15:39:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1d052881-889c-4767-b0fc-c3db575dfdce</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi John,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;You may want to debug from accesslayer. The message should arrive in&amp;nbsp;mesh_msg_handle() ( assuming you have configured the app key from the phone)&amp;nbsp;&lt;/p&gt;
&lt;p&gt;And one of the call back inside simple_on_off_server.c should be called from the access layer (handle_set_cb,&amp;nbsp;handle_get_cb,&amp;nbsp;handle_set_unreliable_cb) if you have the correct opcode.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>