<?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>Message received event, Bluetooth Mesh</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55658/message-received-event-bluetooth-mesh</link><description>Hello, I am using nRF SDK for Mesh 3.1 and nRF52940 SoC. I have two nodes in my network which both act as a client and a server. Both of them subscribes and publishes to same group address. That is, if I publish a message on one of the devices, both receive</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Dec 2019 15:51:39 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55658/message-received-event-bluetooth-mesh" /><item><title>RE: Message received event, Bluetooth Mesh</title><link>https://devzone.nordicsemi.com/thread/225721?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 15:51:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9e1aebee-a0fe-4e31-a49e-61b65656a80e</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;This is probably because the interrupt handler for the event is blocking the device from actually transmitting the message. I suggest that you try to leave the interrupt handler as soon as possible. You can e.g. set a flag in the interrupt handler, and then use the main context to check if that flag is set. If it is, then perform whatever tasks that you need to handle from main().&amp;nbsp;&lt;/p&gt;
&lt;p&gt;So your main() can look something like this:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;volatile bool m_my_flag = false;

static void my_interrupt_handler(void)
{
    m_my_flag = true;   // leave the interrupt handler quickly, so that the radio can transmit the message
}


int main(void)
{
    initialize();
    start();

    for (;;)
    {
        if (m_my_flag)
        {
            m_my_flag = false;
            do_stuff(); // handle interrupt from main context, so that the radio has the priority.
        }
        (void)sd_app_evt_wait();
    }
}&lt;/pre&gt;&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>