This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

mesh integration on existing firmware -- Program dwells on unknown function

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't start after initializiation.

in detail I basically tried implementing the mesh_main.c file from the sdk_coexist proximity example, initialization seems to work alright, my services are still visible on LightBlue but as soo as I start the mesh stack my programs will suspend on an unknown function 0x978. This doesn't happen in the SoftDevice but rather at the end of the nrf_mesh_enable function. Debugging doesn't give me an error either, the program basically just stops.

Any hints on what is going on here? I copied most of the configuration from the proximity coexist example as flash_placement specs and configurations from the app_config file, only some settings have to stay the same as before. 

Im using a nrf52840 and SD140 6.1.0

Would appreciate any kind of help!

  • 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?!

    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

  • Hi Juliusc, 

    It'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. 

    Please check at exact which line the code stopped working. 

     I would suggest to use the proximity coexisting example as the base and integrate your application into the example. 

  • 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 cycles and then crashes. I can't really pinpoint the moment where it crashes its not at runtime so maybe a bluetooth event?

    I thought about that too but right now that'd be a lot of code tweaking since my application is quite large and customised

  • 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. 

  • I did try so, the call stack is empty as soon as the application hangs on ldd r3 address 0x00000978

    From my understanding, this means that anything pauses the bluetooth activity and therefore crashes the program.

    Its what happens when you press pause in debug mode on a bluetooth application. I can't really pinpoint where it happens though

Related