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

nRF Mesh overwrites previous devices (because of hardcoded uuid)

This isn't exactly a question, because after like...8 hours of debugging, I figured it out.  However, in zephyr/samples/bluetooth/mesh, it defines a hardcoded device uuid `dev_uuid`.  This means that when you upload the code to more than one device, they all have the same uuid.  This means that when you try to add them all in the nRF Mesh app, that despite that they all have different MACs (or whatever that code it shows is), nRF Mesh will add one, then replace that one with the others as you add each, so you still only end up with one device listed, with no apparent explanation.  I couldn't find any mention of this in the readmes etc., and dev_uuid is buried in the middle of the code with no note or anything.  I wasn't sure if it was the device key (which appeared to be the same for all of them, but was a side effect of the collision, I think), or just a glitch in nRF Mesh, or what.  Changing the dev_uuid manually, or adding code to automatically generate one, solved the problem, and nRF Mesh added the devices as separate entities after that.

Dunno what you want to do about it (add some notes somewhere, perhaps?), but I thought I should make this post so that others can find it, at least.

Parents
  • Hi,

    Thank you for sharing!

    We have our own Bluetooth mesh stack, nRF5 SDK for Mesh, which is based on our nRF5 SDK (not Zephyr based). That means our current efforts are not directed towards the Zephyr Mesh stack, and our ability to support the Zephyr stack is rather limited. I will take note of this issue anyway, in case we get new related questions later or if we choose to go in the Zephyr direction for mesh in the future.

    Regards,
    Terje

Reply
  • Hi,

    Thank you for sharing!

    We have our own Bluetooth mesh stack, nRF5 SDK for Mesh, which is based on our nRF5 SDK (not Zephyr based). That means our current efforts are not directed towards the Zephyr Mesh stack, and our ability to support the Zephyr stack is rather limited. I will take note of this issue anyway, in case we get new related questions later or if we choose to go in the Zephyr direction for mesh in the future.

    Regards,
    Terje

Children
  • Ah.  Perhaps the root problem here, then, is that you (Nordic Semiconductor) have a whole heap of documentation, tools, and webpages, which support and/or are targeted at a variety of different devices, and the lines between them are unclear.  The nRF52840 packaging directed me to nordicsemi.com/start52840dongle, which directed me to a Getting Started doc page, which had me download nRF Connect for Desktop, which contained a Getting Started Assistant, and assuming that to be relevant I followed its instructions to install the nRF Connect SDK.  Fast-forward a few hours of frustration and failure and Googling, I asked and was told that the nRF Connect SDK did not support my device, and that I should use the Zephyr Getting Started Guide.  In retrospect, given what you've told me, that was only relevant if I specifically wanted to run a Zephyr example project.  Really, I was only trying to do that because I thought those were the example projects meant for my device.  To finish the story, after finally getting the Zephyr code working, I posted my comment above, and have been informed that I should use the nRF5 SDK for Mesh, which (by the way) doesn't contain anything obviously useful in the Get Started tab, but rather, you need to click Get Documentation and find the Getting Started subcategory in the left panel.  That's...five separate Getting Started pages/tools, one of which not even directly and clearly accessible from the tab sharing its name, each of the five subtly tailored to one several different use cases.  I appreciate having lots of documentation, but when I can't tell that it's the WRONG documentation, it's significantly less helpful.  Perhaps if every Getting Started page clearly listed what it DOES work for, and where to go if you have something else?

  • Hi,

    I see. Thank you for the valuable feedback.

    The crucial point where it all went wrong seems to be at the "Getting Started Assistant", which is intended for the new nRF91 series (LTE), and not for the nRF52 series (BLE, mesh, etc). From there it just rolled off in the completely wrong direction.

    At least it all got cleared up in the end. Yes, you did find the documentation for the nRF5 SDK for Mesh there.

    Thank you again for sharing the story, as it means we can learn from it and improve on it. It is highly appreciated!

    Regards,
    Terje

  • Hi,

    Another note. I see that you started by getting the nRF52840 Dongle. For development we highly recommend using an nRF52 series device Development Kit (e.g. nRF52840 DK) for development. The Dongle is first and foremost intended for providing PC connectivity, and for development a DK is much better. We also have a wider range of examples for the DKs in our SDKs. For instance, the nRF52840 Dongle (PCA10059) is not listed at all in the compatibility list for nRF5 SDK for mesh.

    Regards,
    Terje

Related