<?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>nRF51: Extending the IoT-MQTT example</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17280/nrf51-extending-the-iot-mqtt-example</link><description>Hello, 
 I need a little help regarding IoT-SDK 0.8.0 on nRF51.
In the MQTT-Example connection to the broker is established only when I press the button (callback), but not when I call mqtt_connect() directly with same set of parameters after recognizing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 14 Nov 2016 11:38:52 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17280/nrf51-extending-the-iot-mqtt-example" /><item><title>RE: nRF51: Extending the IoT-MQTT example</title><link>https://devzone.nordicsemi.com/thread/66409?ContentTypeID=1</link><pubDate>Mon, 14 Nov 2016 11:38:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b53a2441-8ffb-416c-af0a-7e29ec8da15b</guid><dc:creator>Krzysztof Chruscinski</dc:creator><description>&lt;p&gt;TIMERs is probably by default set to run on 16MHz so 2000ms is just too long period and timer wraps (TIMER1 and TIMER2 are 16bit on NRF51). If you want to has 2000ms on 16bits you need to reduce frequency of the TIMER. It is done in nrf_drv_timer_config_t that needs to be provided to nrf_drv_timer_init (in your example there is NULL provided which meant default configuration).&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;nrf_drv_timer_config_t config = NRF_DRV_TIMER_DEFAULT_CONFIG(1);
config.frequency = NRF_TIMER_FREQ_31250Hz;
&lt;/code&gt;&lt;/pre&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: Extending the IoT-MQTT example</title><link>https://devzone.nordicsemi.com/thread/66408?ContentTypeID=1</link><pubDate>Thu, 10 Nov 2016 12:05:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:12e00aeb-b0b7-4a6c-9de4-8c9cfe525a91</guid><dc:creator>Stian R&amp;#248;ed Hafskjold</dc:creator><description>&lt;p&gt;Please open up a new question for this&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: Extending the IoT-MQTT example</title><link>https://devzone.nordicsemi.com/thread/66407?ContentTypeID=1</link><pubDate>Wed, 09 Nov 2016 12:56:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c6dcc34b-8a7b-4d00-8a1c-26f71624e060</guid><dc:creator>mr91</dc:creator><description>&lt;p&gt;Today I tried the timer of SDK 8.1.0.&lt;/p&gt;
&lt;p&gt;I tried to implement the timer from the example:&lt;/p&gt;
&lt;p&gt;nrf_drv_config.h:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#define TIMER1_ENABLED 1 
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Timer0 seems to be not available when a Softdevice is present.&lt;/p&gt;
&lt;p&gt;main.c:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;const nrf_drv_timer_t MYTIM = NRF_DRV_TIMER_INSTANCE(1);
...

err_code = nrf_drv_timer_init(&amp;amp;MYTIM, NULL, mytim_event_handler);
time_ticks = nrf_drv_timer_ms_to_ticks(&amp;amp;MYTIM, 2000);
nrf_drv_timer_extended_compare(&amp;amp;MYTIM, NRF_TIMER_CC_CHANNEL0, time_ticks, NRF_TIMER_SHORT_COMPARE0_CLEAR_MASK, true);
nrf_drv_timer_enable(&amp;amp;MYTIM);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The callback function:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;void mytim_event_handler(nrf_timer_event_t event_type, void* p_context)
{

      
    switch(event_type)
    {
        case NRF_TIMER_EVENT_COMPARE0:
        {
          __asm(&amp;quot;nop&amp;quot;);
        }
        break;
       
        default:
        break;
    }    
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I expected, that the event NRF_TIMER_EVENT_COMPARE0 is triggered every 2 seconds (2000 ms). Unfortunately, it is called almost instantaneous after starting the program without the delay. Same result when I activate the breakpoint during running execution of the program.
I also tried Timer2 instead of Timer1 with the same result.&lt;/p&gt;
&lt;p&gt;Can you help me?&lt;/p&gt;
&lt;p&gt;Regards&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: Extending the IoT-MQTT example</title><link>https://devzone.nordicsemi.com/thread/66405?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2016 16:20:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:703632da-9246-4583-8a12-8b222aa8a7b5</guid><dc:creator>Krishna Shingala</dc:creator><description>&lt;p&gt;Try here. &lt;a href="http://developer.nordicsemi.com/nRF5_SDK/nRF51_SDK_v8.x.x/"&gt;developer.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: Extending the IoT-MQTT example</title><link>https://devzone.nordicsemi.com/thread/66401?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2016 15:12:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c43e545d-fb7c-47ab-9fe7-4fe47510c1e8</guid><dc:creator>mr91</dc:creator><description>&lt;p&gt;Thank you very much. Can you tell me where I can download the SDK v8.1.0 itself? All examples seems to be included there.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: Extending the IoT-MQTT example</title><link>https://devzone.nordicsemi.com/thread/66404?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2016 14:56:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:206d7e86-b460-48dc-936c-efba52356cf1</guid><dc:creator>Krishna Shingala</dc:creator><description>&lt;p&gt;You should find the documentation here: &lt;a href="http://developer.nordicsemi.com/nRF5_SDK/nRF51_SDK_v8.x.x/doc/8.1.0/"&gt;developer.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: Extending the IoT-MQTT example</title><link>https://devzone.nordicsemi.com/thread/66403?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2016 14:52:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:383ba491-4c55-4c6b-a6fc-a972d327466a</guid><dc:creator>mr91</dc:creator><description>&lt;p&gt;Thank you. Can you tell me where to find the documentation of SDK v8.1.0? In Infocenter, there are only documentations for newer versions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: Extending the IoT-MQTT example</title><link>https://devzone.nordicsemi.com/thread/66402?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2016 14:30:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c1db9900-8340-4da0-be38-dd867a6298fb</guid><dc:creator>Krishna Shingala</dc:creator><description>&lt;p&gt;Hi again, IoT SDK v0.80. is based on nRF51 SDK v8.1.0.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: Extending the IoT-MQTT example</title><link>https://devzone.nordicsemi.com/thread/66406?ContentTypeID=1</link><pubDate>Mon, 07 Nov 2016 09:28:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a873e92a-e61a-443b-ad85-ce8093cdf6fd</guid><dc:creator>mr91</dc:creator><description>&lt;p&gt;Thank you very much for your answer. Can you tell me on which version of the SDK the IoT-SDK v0.8.0 is based on? Can I create a personal timer regarding to the documentation of this SDK-Version?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF51: Extending the IoT-MQTT example</title><link>https://devzone.nordicsemi.com/thread/66400?ContentTypeID=1</link><pubDate>Mon, 24 Oct 2016 15:30:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e125e44b-7bed-46f3-9d1d-efaba251040a</guid><dc:creator>Krishna Shingala</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;For the kit to get a global IP address, certain neighbor discovery and router advertisement procedures are required. These procedures take sometime after the interface is up.
So between, the interface up and getting a globally address, all attempts to have non-link local reach from the kit will result in a routing error on the lwIP stack.&lt;/p&gt;
&lt;p&gt;Therefore, it’s not a button push that is really needed, but a timer, to wait and try again until you do have reachability outside of the link local scope.&lt;/p&gt;
&lt;p&gt;Hope this helps!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>