<?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>mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/74630/mesh-integration-on-existing-firmware----program-dwells-on-unknown-function</link><description>Hi, 
 I just recently began implementing the mesh stack into an existing application, using mesh v3.2 and nrf sdk 15.2. 
 Integration works well by using the integration guide provided in the infocenter, but the mesh doesn&amp;#39;t start after initializiation</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 07 May 2021 09:00:10 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/74630/mesh-integration-on-existing-firmware----program-dwells-on-unknown-function" /><item><title>RE: mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/thread/308673?ContentTypeID=1</link><pubDate>Fri, 07 May 2021 09:00:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:246e244f-4ecc-49b1-a25c-3db6f9e15376</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;Im quite sure that timers are the biggest problem here indeed and even starting from scratch its hard to just change all the settings without having 200 errors rain upon me. Ill need to set a plan on how to proceed but right now I feel lost with mesh&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/thread/308499?ContentTypeID=1</link><pubDate>Thu, 06 May 2021 09:50:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3e12357-e8ae-4295-aa74-10a406f4d332</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Julius,&amp;nbsp;&lt;br /&gt;I think the best way now is to start from scratch. I don&amp;#39;t say that you need to re-implement you application from scratch but to use a BLE example (the one that you based your application on) and then add mesh in to the example.&amp;nbsp;&lt;br /&gt;This way if anything go wrong the same way as in your application it would be much easier to debug.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Regarding the timer, please double check and make sure app_timer_mesh.c is used, not app_timer.c&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/thread/308475?ContentTypeID=1</link><pubDate>Thu, 06 May 2021 08:48:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:524ac2a2-46fb-4f81-a7b9-a09e236b7115</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;btw one thing I notice on my way is that if I disable all the timers in the sdk_config, the dwelling doesn&amp;#39;t happen anymore and ble works but not mesh. Do you have any input on that?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/thread/308473?ContentTypeID=1</link><pubDate>Thu, 06 May 2021 08:44:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:940c4aa4-a9f9-442f-8f00-f9c3b2b7efda</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;it doesn&amp;#39;t crash, I can use normal blue yes, pairing works fine, the static provides doesn&amp;#39;t find the mesh device though. Also I do know about the fact that it needs to be unprovisioned but it also isn&amp;#39;t.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;anything else there is left to do? quite hard to send minimal firmware when so many things are depending on each other.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;thanks for all your suggestions though, this aint an easy problem, mesh hasn&amp;#39;t been my best friend to date ;)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/thread/308289?ContentTypeID=1</link><pubDate>Wed, 05 May 2021 07:49:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a82efd20-d25e-47d1-9fa5-b3ab308e3095</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please check if it still run or it crashed at some point.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Did you see it advertise as a normal BLE device (not mesh)?&lt;/p&gt;
&lt;p&gt;I assume you use the static provisioner, not the phone to provision the node , correct ?&lt;br /&gt;&lt;br /&gt;If the node already provisioned it won&amp;#39;t show up in the list of provisionees.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;If the firmware can run on a DK, you can send us the (minimal) firmware so we can test here.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/thread/308283?ContentTypeID=1</link><pubDate>Wed, 05 May 2021 07:27:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:266338c2-33ef-4bd8-9f1f-c9d0ca3d22b2</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;Hey Hung, so Im playing around with this a lot but can&amp;#39;t really get a stable version.&lt;/p&gt;
&lt;p&gt;I tried disabling the timer in the sdk_config since that&amp;#39;s what&amp;#39;s up in the proximity example as well and it does seem to work but my static provisioner still can&amp;#39;t find the node. There must be something with the times lots somehow, I disabled every other peripheral and function and only init able and mesh. Im 100% certain its not in my code, since I copy and pasted the prox examples main files into my solution and excluded my own application from the built and still can&amp;#39;t provision it, it must be somewhere else but I literally copied all of the settings for the linker/flash/sdk_config/preprocessors so Im really puzzled here.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/thread/308116?ContentTypeID=1</link><pubDate>Tue, 04 May 2021 09:32:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1f56ce5-567a-4f43-a3d1-ce4ac77e42e6</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;If you put a breakpoint when the softdevice is active and continue after that it will fail. The reason is that the softdevice uses some timer and when you break in a breakpoint the timers will not stop and they continue, this will confuse the softdevice and you won&amp;#39;t be able to continue after you break in a breakpoint.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Please try printing out logging or use GPIO toggling to debug.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I would suggest to simplify down the code, turn off other functionality and try to get just the softdevice (BLE) and mesh running. It would be easier to spot what&amp;#39;s wrong on a minimal firmware.&amp;nbsp;&lt;br /&gt;You can send us the minimal firmware that can reproduce the issue on a nRF52 DK so we can test and debug here.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/thread/307832?ContentTypeID=1</link><pubDate>Mon, 03 May 2021 07:36:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8910fae4-76c8-4977-92fb-2458d5a7eb90</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;I did try so, the call stack is empty as soon as the application hangs on ldd r3 address 0x00000978&lt;/p&gt;
&lt;p&gt;From my understanding, this means that anything pauses the bluetooth activity and therefore crashes the program.&lt;/p&gt;
&lt;p&gt;Its what happens when you press pause in debug mode on a bluetooth application. I can&amp;#39;t really pinpoint where it happens though&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/thread/307696?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 14:16:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2bc9cfa4-066b-4106-8b1f-45d629d8d80d</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Please enable logging and try to debug. Do you see any assert ? hardfault ? The call stack should give you some hint of what caused the assertion.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/thread/307653?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 12:00:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a614d7c3-77ae-45a8-a301-7bf702ec1ed1</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;Thank you for the quick reply, let me put it like this, after the ble/mesh inits/starts my application goes into its main loop, makes a few&amp;nbsp;cycles and then crashes. I can&amp;#39;t really pinpoint the moment where it crashes its not at runtime so maybe a bluetooth event?&lt;/p&gt;
&lt;p&gt;I thought about that too but right now that&amp;#39;d be a lot of code tweaking since my application is quite large and customised&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/thread/307650?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 11:45:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5efad17b-9128-4b40-9efc-89f2d5ceb265</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Juliusc,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;It&amp;#39;s important to be able to debug the application and see where the code crashed. You can use either breakpoint and step in the code or use logging to print out debug info.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Please check at exact which line the code stopped working.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I would suggest to use the proximity coexisting example as the base and integrate your application into the example.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: mesh integration on existing firmware -- Program dwells on unknown function</title><link>https://devzone.nordicsemi.com/thread/307620?ContentTypeID=1</link><pubDate>Fri, 30 Apr 2021 09:26:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b3c013e2-d651-4d53-a238-009e6752d052</guid><dc:creator>Juliusc</dc:creator><description>&lt;p&gt;Correction: the program actually dwells after starting the stack. It might have to do with the time slots given to mesh? Unfortunately Im not very deep into how managing the timeslots between mesh and blue works.. Maybe I can get some input on this?!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Also some more information: as I said Im using the mesh_main.c part from the proximity coexisting example so basically the light switch client mesh application and Ive basically left all of the settings the same as they were before like Connection params and advertising params. I had the MTU size on 247 but that didnt work well so its back to 69&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>